@font-face { font-family: system-pixel; src: local("Courier New"); }

:root {
  color-scheme: dark;
  --bg: #090d1d;
  --bg-soft: #101735;
  --card: #151f46;
  --card-2: #0f1734;
  --text: #e7f0ff;
  --muted: #94a9d9;
  --cyan: #6ee7ff;
  --pink: #ff7ad9;
  --gold: #ffe08a;
  --green: #8dffbd;
  --line: #2a3e73;
  --line-hot: #5ad7ff;
  --shadow: rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }

html { min-height: 100%; scroll-behavior: smooth; }

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  font-family: "Courier New", system-pixel, monospace;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(110, 231, 255, 0.12), transparent 24rem),
    radial-gradient(circle at 88% 8%, rgba(255, 122, 217, 0.10), transparent 22rem),
    radial-gradient(circle at 50% 100%, rgba(255, 224, 138, 0.08), transparent 28rem),
    linear-gradient(180deg, #121a3b 0%, var(--bg) 72%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}

.stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 22%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 26% 14%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 44% 30%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 72% 18%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 84% 34%, #fff 0 1px, transparent 2px);
  opacity: 0.42;
  animation: twinkle 6s steps(2, end) infinite;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0.10;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.11) 0,
    rgba(255,255,255,0.11) 1px,
    transparent 1px,
    transparent 4px
  );
}

@keyframes twinkle { 50% { opacity: 0.25; } }

.page {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) 0;
}

.card {
  border: 2px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), transparent 22%),
    linear-gradient(180deg, var(--card), var(--card-2));
  box-shadow: 0 18px 36px var(--shadow);
  padding: clamp(18px, 3vw, 28px);
  position: relative;
}

.card::after {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255,255,255,0.075);
  content: "";
  pointer-events: none;
}

.hero { margin-bottom: 18px; }

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  border: 2px solid var(--gold);
  padding: 7px 10px;
  color: var(--gold);
  background: rgba(255, 224, 138, 0.08);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

h1, h2, p, ul { margin: 0; }

h1 {
  max-width: 860px;
  color: var(--cyan);
  font-size: clamp(34px, 7vw, 74px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  text-shadow: 0 0 16px rgba(110, 231, 255, 0.28);
}

h2 {
  margin-bottom: 14px;
  color: var(--gold);
  font-size: 22px;
}

.subtitle {
  max-width: 720px;
  margin-top: 14px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.7;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  gap: 18px;
  align-items: stretch;
}

.player-card { grid-row: span 2; }

.window-bar {
  display: flex;
  gap: 7px;
  margin-bottom: 16px;
}

.window-bar span {
  width: 12px;
  height: 12px;
  background: var(--pink);
  box-shadow: 18px 0 0 var(--gold), 36px 0 0 var(--green);
}

.track-title {
  margin-bottom: 5px;
  color: var(--pink);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
}

.meta, .note, .status, li, .track-button span {
  color: var(--muted);
  line-height: 1.65;
}

.pixel-room {
  position: relative;
  min-height: 220px;
  margin: 22px 0;
  overflow: hidden;
  border: 2px solid var(--line);
  background:
    linear-gradient(180deg, #121a43 0 48%, #081024 48% 100%);
}

.moon {
  position: absolute;
  top: 28px;
  right: 58px;
  width: 46px;
  height: 46px;
  background: var(--gold);
  box-shadow: 0 0 28px rgba(255, 224, 138, 0.45);
}

.building {
  position: absolute;
  bottom: 0;
  background: #091027;
  border: 2px solid #20386b;
}

.building-one { left: 34px; width: 108px; height: 110px; }
.building-two { left: 154px; width: 168px; height: 76px; }

.window {
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(110, 231, 255, 0.5);
  animation: windowBlink 5s steps(1) infinite;
}

.w1 { left: 60px; bottom: 62px; }
.w2 { left: 96px; bottom: 32px; animation-delay: -2s; }
.w3 { left: 226px; bottom: 34px; animation-delay: -3.5s; }

.cat {
  position: absolute;
  right: 84px;
  bottom: 32px;
  width: 36px;
  height: 22px;
  background: #060913;
  box-shadow: 20px 4px 0 #060913;
}

.cat::before, .cat::after {
  position: absolute;
  top: -8px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid #060913;
  content: "";
}

.cat::before { left: 3px; }
.cat::after { right: -17px; }

@keyframes windowBlink {
  0%, 84%, 100% { opacity: 1; }
  85%, 92% { opacity: 0.38; }
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.compact { margin-top: 16px; }

.button, .track-button {
  min-height: 44px;
  border: 2px solid var(--line-hot);
  padding: 10px 14px;
  color: var(--text);
  background: rgba(110, 231, 255, 0.08);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.button:hover, .button:focus-visible, .track-button:hover, .track-button:focus-visible {
  border-color: var(--gold);
  background: rgba(255, 224, 138, 0.11);
  transform: translateY(-1px);
  outline: none;
}

.button.primary {
  border-color: var(--pink);
  background: rgba(255, 122, 217, 0.12);
}

.volume-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

input[type="range"] { width: 100%; accent-color: var(--pink); }

.status {
  min-height: 24px;
  margin-top: 14px;
  color: var(--green);
}

.track-list {
  display: grid;
  gap: 10px;
}

.track-button {
  width: 100%;
  text-align: left;
  border-color: var(--line);
  background: rgba(255,255,255,0.035);
}

.track-button strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
}

.track-button.is-active {
  border-color: var(--pink);
  background: rgba(255, 122, 217, 0.12);
}

.time {
  margin: 18px 0 10px;
  color: var(--cyan);
  font-size: clamp(54px, 9vw, 86px);
  font-weight: 700;
  letter-spacing: -0.08em;
  text-shadow: 0 0 16px rgba(110, 231, 255, 0.28);
}

@media (max-width: 820px) {
  .dashboard { grid-template-columns: 1fr; }
  .player-card { grid-row: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
