/* 拼豆板 Web 控制端样式 */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #14161a;
  color: #e6e8eb;
  line-height: 1.5;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #1c1f26;
  border-bottom: 1px solid #2a2e37;
  position: sticky;
  top: 0;
  z-index: 10;
}

header h1 {
  font-size: 18px;
  margin: 0;
}

#status {
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
}
#status.ok { background: #16351f; color: #4ade80; }
#status.bad { background: #3a1a1a; color: #f87171; }

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: #1c1f26;
  border: 1px solid #2a2e37;
  border-radius: 10px;
  padding: 16px;
}

.card h2 {
  font-size: 15px;
  margin: 0 0 12px;
  color: #cbd5e1;
}

.hint {
  font-size: 12px;
  color: #8b93a1;
  margin: 0 0 12px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

label {
  font-size: 13px;
  color: #b6bdc9;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 140px;
}

input[type="text"], select {
  background: #14161a;
  border: 1px solid #2a2e37;
  color: #e6e8eb;
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 13px;
  width: 100%;
}

input[type="range"] { width: 100%; }

button {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
}
button:hover { background: #1d4ed8; }
button:active { transform: translateY(1px); }

.preview {
  margin: 12px 0;
  display: flex;
  justify-content: center;
  overflow: auto;
}
.preview canvas {
  image-rendering: pixelated;
  border: 1px solid #2a2e37;
  max-width: 100%;
}

.progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.progress-bar {
  height: 8px;
  background: #22c55e;
  border-radius: 4px;
  width: 0%;
  transition: width 0.2s;
  flex: 1;
}
#progressText { font-size: 12px; color: #8b93a1; min-width: 36px; }

.paint-grid {
  margin: 12px auto;
  border: 1px solid #2a2e37;
  touch-action: none;
  user-select: none;
}
.paint-cell {
  aspect-ratio: 1;
  background: #0b0c0f;
  border: 1px solid rgba(255,255,255,0.04);
  cursor: crosshair;
}

.log {
  background: #0b0c0f;
  border: 1px solid #2a2e37;
  border-radius: 6px;
  padding: 10px;
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 12px;
  height: 200px;
  overflow-y: auto;
  color: #9aa4b2;
}
.log div { white-space: pre-wrap; word-break: break-all; }
