:root {
  --bg: #0b141d;
  --panel: #16202d;
  --panel-2: #111a25;
  --line: #2a3a4d;
  --text: #d7e6f7;
  --muted: #8ca2b8;
  --primary: #66c0f4;
  --success: #49bf86;
  --warn: #e8b362;
  --danger: #e16c6c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 90% -10%, rgba(102, 192, 244, 0.15), transparent 34%),
    radial-gradient(circle at 10% 0%, rgba(74, 122, 165, 0.18), transparent 30%),
    linear-gradient(180deg, #0b141d, #0f1b28);
  color: var(--text);
}

.container {
  max-width: 1020px;
  margin: 28px auto;
  padding: 0 16px 28px;
}

h1 {
  margin: 0 0 6px;
  font-weight: 700;
  color: #e5f2ff;
}
.subtitle { margin-top: 0; color: var(--muted); }
.top-actions {
  margin-top: 12px;
}

.card {
  background: linear-gradient(180deg, rgba(22, 32, 45, 0.96), rgba(17, 26, 37, 0.96));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin-top: 16px;
  box-shadow: 0 8px 24px rgba(5, 10, 16, 0.4);
}

.grid {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 14px;
  color: var(--muted);
}

input, select, button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e1925;
  color: var(--text);
  padding: 9px;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(79, 140, 255, 0.25);
}

button {
  margin-top: 14px;
  background: linear-gradient(180deg, #66c0f4, #4f9acb);
  color: #0c1a28;
  font-weight: 700;
  border: 1px solid #3f7ca5;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}

button:hover { background: linear-gradient(180deg, #7accfa, #58a7dc); transform: translateY(-1px); }
button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid #3f7ca5;
  background: linear-gradient(180deg, #66c0f4, #4f9acb);
  color: #0c1a28;
  font-weight: 700;
  text-decoration: none;
  transition: background .16s ease, transform .16s ease;
}

.button-link:hover {
  background: linear-gradient(180deg, #7accfa, #58a7dc);
  transform: translateY(-1px);
}

.button-link-secondary {
  border-color: var(--line);
  background: #0f1c2a;
  color: var(--text);
}

.button-link-secondary:hover {
  background: #15273a;
}

.checkboxes {
  display: flex;
  gap: 14px;
  margin-top: 12px;
}

.checkboxes label {
  flex-direction: row;
  align-items: center;
  color: var(--text);
}

.preview {
  margin-top: 12px;
  width: 100%;
  max-height: 360px;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(102, 192, 244, 0.1);
}

.status-badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.4px;
  border: 1px solid transparent;
}

.status-badge.idle { background: rgba(154, 167, 183, 0.18); border-color: rgba(154, 167, 183, 0.5); }
.status-badge.queued { background: rgba(232, 179, 98, 0.16); border-color: rgba(232, 179, 98, 0.45); color: #ffd7a3; }
.status-badge.processing { background: rgba(102, 192, 244, 0.16); border-color: rgba(102, 192, 244, 0.45); color: #b8e4ff; }
.status-badge.completed { background: rgba(48, 196, 122, 0.16); border-color: rgba(48, 196, 122, 0.45); color: #8be2b8; }
.status-badge.failed { background: rgba(234, 95, 95, 0.16); border-color: rgba(234, 95, 95, 0.45); color: #ffb2b2; }

.progress-wrap {
  width: 100%;
  background: #0e1319;
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 20px;
  overflow: hidden;
}

#progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #417a9f, #66c0f4);
  transition: width .25s ease;
}

#logs {
  margin: 0;
  background: #0e1319;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  min-height: 140px;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
}

.checker-wrap {
  margin-top: 10px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #0c131d;
}

#checker-image {
  display: block;
  width: 100%;
  height: auto;
}

.seam {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(232, 179, 98, 0.7);
  box-shadow: 0 0 0 1px rgba(12, 19, 29, 0.8);
}

.seam-1 { left: 20%; }
.seam-2 { left: 40%; }
.seam-3 { left: 60%; }
.seam-4 { left: 80%; }
