:root {
  --bg: #0a0d12;
  --surface: rgba(21, 27, 37, 0.88);
  --surface-2: rgba(30, 38, 50, 0.84);
  --border: rgba(255,255,255,0.09);
  --text: #f4f7fb;
  --muted: #9ea9b8;
  --accent: #5fe0b7;
  --accent-2: #76a9ff;
  --danger: #ff7272;
  --shadow: 0 20px 60px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(85, 126, 255, 0.10), transparent 34rem),
    linear-gradient(180deg, #0b0e14 0%, #090c11 45%, #07090d 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button, input { font: inherit; }
button { color: inherit; }

.background-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .18;
  pointer-events: none;
  z-index: -1;
}
.glow-one { width: 28rem; height: 28rem; background: #2ed6a7; top: 10rem; right: -8rem; }
.glow-two { width: 24rem; height: 24rem; background: #487cff; bottom: 6rem; left: -8rem; }

.hero {
  padding: 56px 20px 28px;
}
.hero__inner {
  width: min(1100px, 100%);
  margin: 0 auto;
}
.eyebrow {
  display: inline-flex;
  padding: 7px 11px;
  border: 1px solid rgba(95,224,183,.25);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(95,224,183,.07);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .11em;
}

h1 {
  margin: 18px 0 8px;
  max-width: 900px;
  font-size: clamp(2rem, 5vw, 4.25rem);
  line-height: .98;
  letter-spacing: -0.045em;
}
.subtitle {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.9vw, 1.2rem);
}

.progress-card {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(30,39,52,.95), rgba(19,24,33,.95));
  box-shadow: var(--shadow);
}
.progress-card__top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}
.progress-card strong { display: block; margin-top: 3px; font-size: 1.08rem; }
.muted { color: var(--muted); font-size: .88rem; }
.progress-percent { font-size: 2rem; font-weight: 900; letter-spacing: -.04em; }
.progress-track {
  height: 12px;
  margin-top: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.07);
}
.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .25s ease;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.filter-group, .action-group {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
button {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.05);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform .14s ease, background .14s ease, border-color .14s ease;
}
button:hover { transform: translateY(-1px); background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.17); }
.filter-btn.active { background: rgba(95,224,183,.14); border-color: rgba(95,224,183,.36); color: #baf5e2; }
.action-btn.danger { color: #ffb3b3; }
.status-message { min-height: 24px; margin-top: 8px; color: var(--accent); font-size: .9rem; }

.content {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: 48px;
}

.stage {
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(0,0,0,.2);
  overflow: hidden;
}
.stage.hidden { display: none; }
.stage__header {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
}
.stage__header:hover { background: rgba(255,255,255,.025); }
.stage__title-wrap { display: flex; align-items: center; gap: 13px; min-width: 0; }
.stage__icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(255,255,255,.06);
  font-size: 1.35rem;
}
.stage h2 { margin: 0; font-size: 1.18rem; }
.stage__meta { margin-top: 2px; color: var(--muted); font-size: .86rem; }
.stage__chevron { color: var(--muted); transition: transform .2s ease; }
.stage.collapsed .stage__chevron { transform: rotate(-90deg); }
.stage.collapsed .stage__body { display: none; }

.stage__body {
  border-top: 1px solid var(--border);
  padding: 8px 12px 14px;
}
.task {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 9px;
  border-radius: 12px;
}
.task:hover { background: rgba(255,255,255,.035); }
.task.hidden { display: none; }
.task input[type="checkbox"] {
  appearance: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  border: 2px solid rgba(255,255,255,.23);
  border-radius: 7px;
  background: rgba(0,0,0,.12);
  cursor: pointer;
  display: grid;
  place-content: center;
}
.task input[type="checkbox"]::before {
  content: "";
  width: 11px;
  height: 6px;
  border: solid #08120e;
  border-width: 0 0 3px 3px;
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
  transition: transform .1s ease;
}
.task input[type="checkbox"]:checked {
  border-color: var(--accent);
  background: var(--accent);
}
.task input[type="checkbox"]:checked::before { transform: rotate(-45deg) scale(1); }
.task label { cursor: pointer; }
.task.done label { color: #7f8997; text-decoration: line-through; text-decoration-thickness: 1px; }

.stage--green { border-color: rgba(92, 223, 147, .18); }
.stage--yellow { border-color: rgba(255, 216, 91, .18); }
.stage--orange { border-color: rgba(255, 160, 75, .19); }
.stage--red { border-color: rgba(255, 102, 102, .19); }
.stage--purple { border-color: rgba(190, 122, 255, .19); }
.stage--cyan { border-color: rgba(92, 220, 255, .19); }
.stage--gold { border-color: rgba(255, 205, 76, .23); }

.footer {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 46px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.footer p { margin: 4px 0; }
.footer__small { font-size: .84rem; }

@media (max-width: 650px) {
  .hero { padding-top: 32px; }
  .toolbar, .filter-group, .action-group { width: 100%; }
  .filter-group, .action-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-group .filter-btn:last-child { grid-column: span 2; }
  button { width: 100%; }
  .progress-card__top { align-items: center; }
  .progress-percent { font-size: 1.6rem; }
  .content { width: min(100% - 24px, 1100px); }
  .stage__header { padding: 16px; }
}

.hero__badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.live-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 750;
}
.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9299a5;
  box-shadow: 0 0 0 4px rgba(146,153,165,.10);
}
.live-status--online {
  color: #baf5e2;
  border-color: rgba(95,224,183,.28);
  background: rgba(95,224,183,.07);
}
.live-status--online .live-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(95,224,183,.12);
}
.live-status--connecting .live-dot {
  background: #ffd36d;
  box-shadow: 0 0 0 4px rgba(255,211,109,.12);
  animation: pulse-dot 1.2s infinite ease-in-out;
}
.live-status--offline {
  color: #ffb3b3;
  border-color: rgba(255,114,114,.28);
  background: rgba(255,114,114,.07);
}
.live-status--offline .live-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255,114,114,.12);
}
@keyframes pulse-dot {
  50% { opacity: .38; transform: scale(.82); }
}

.server-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--muted);
  font-size: .78rem;
}
.status-message--error { color: var(--danger); }
.footer code {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: #cbd5e1;
  background: rgba(255,255,255,.04);
}

@media (max-width: 650px) {
  .action-group { grid-template-columns: 1fr; }
  .server-meta { display: grid; gap: 4px; }
}
