:root {
  --bg: #05060f;
  --bg-2: #090c18;
  --panel: #0b0f1c;
  --line: #1d2740;
  --text: #e8ecff;
  --muted: #8fa0bd;
  --dim: #46536b;
  --cyan: #35e0ff;
  --cyan-soft: #9bf6ff;
  --amber: #ffce54;
  --orange: #ff8a3d;
  --pink: #ff5d8f;
  --green: #5dd39e;
  --mono: "Sarasa Mono SC", "Noto Sans SC", "DejaVu Sans Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(53, 224, 255, 0.10), transparent 60%),
    radial-gradient(900px 500px at 90% 20%, rgba(255, 93, 143, 0.07), transparent 55%),
    linear-gradient(180deg, #070a14 0%, #05060f 45%, #04050c 100%);
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 40px;
}

.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 6px 4px 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.brand__kicker {
  font-size: 11px;
  letter-spacing: 0.34em;
  color: var(--cyan);
  text-transform: uppercase;
}

.brand__title {
  margin: 4px 0 2px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1;
  letter-spacing: 0.06em;
  font-weight: 800;
  text-shadow: 0 0 22px rgba(53, 224, 255, 0.35);
}

.brand__slash { color: var(--pink); }

.brand__cn {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.18em;
}

.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.badge {
  font-size: 10px;
  letter-spacing: 0.14em;
  padding: 5px 9px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(11, 15, 28, 0.7);
}

.badge--ai { color: var(--amber); border-color: rgba(255, 206, 84, 0.4); }

.stage { display: flex; flex-direction: column; align-items: center; gap: 12px; }

.crt {
  position: relative;
  padding: 10px;
  background: linear-gradient(180deg, #0d1220, #070a12);
  border: 1px solid #263554;
  border-radius: 10px;
  box-shadow:
    0 0 0 1px rgba(53, 224, 255, 0.10),
    0 0 40px rgba(53, 224, 255, 0.10),
    0 24px 60px rgba(0, 0, 0, 0.55),
    inset 0 0 30px rgba(0, 0, 0, 0.6);
}

.crt canvas {
  display: block;
  width: 1024px;
  height: 576px;
  max-width: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #05060f;
  border-radius: 4px;
  cursor: crosshair;
}

.crt__scanlines,
.crt__glow {
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border-radius: 4px;
}

.crt__scanlines {
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.16) 0px,
    rgba(0, 0, 0, 0.16) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: multiply;
  opacity: 0.75;
}

.crt__glow {
  box-shadow: inset 0 0 60px rgba(53, 224, 255, 0.06);
  background: radial-gradient(120% 90% at 50% 40%, transparent 60%, rgba(0, 0, 0, 0.28));
}

.loading {
  position: absolute;
  inset: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #05060f;
  border-radius: 4px;
  z-index: 3;
  transition: opacity 0.35s ease;
}

.loading.is-hidden { opacity: 0; pointer-events: none; }

.loading p { margin: 0; color: var(--muted); font-size: 12px; letter-spacing: 0.2em; }

.loading__bar {
  width: 200px;
  height: 6px;
  border: 1px solid var(--line);
  background: #0a0e1a;
  overflow: hidden;
}

.loading__bar span {
  display: block;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: slide 1.1s linear infinite;
}

@keyframes slide {
  from { transform: translateX(-100%); }
  to { transform: translateX(350%); }
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.toolbar button {
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--cyan-soft);
  background: rgba(11, 15, 28, 0.8);
  border: 1px solid #24314e;
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.toolbar button:hover {
  border-color: var(--cyan);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(53, 224, 255, 0.25);
}

.toolbar__hint { color: var(--dim); font-size: 11px; letter-spacing: 0.1em; }

.panel {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  margin-top: 26px;
  padding: 22px 24px;
  background: linear-gradient(180deg, rgba(11, 15, 28, 0.9), rgba(8, 11, 21, 0.9));
  border: 1px solid var(--line);
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--cyan);
  text-transform: uppercase;
}

.panel h3 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--amber);
}

.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.controls ul,
.systems {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}

.controls li { white-space: nowrap; }

kbd {
  display: inline-block;
  min-width: 20px;
  padding: 1px 5px;
  margin: 0 2px;
  font-family: inherit;
  font-size: 10px;
  color: var(--text);
  background: #121a2c;
  border: 1px solid #2a3550;
  border-bottom-width: 2px;
  border-radius: 3px;
  text-align: center;
}

.systems b { color: var(--text); font-weight: 600; }

.note {
  margin: 14px 0 0;
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1.8;
  color: var(--cyan-soft);
  background: rgba(53, 224, 255, 0.05);
  border-left: 2px solid var(--cyan);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.08em;
}

@media (max-width: 860px) {
  .masthead { flex-direction: column; align-items: flex-start; }
  .badges { justify-content: flex-start; }
  .panel { grid-template-columns: 1fr; }
  .controls { grid-template-columns: 1fr; }
  .footer { flex-direction: column; }
}
