/* ============================================================
   KRUMZZZ — Tactical Telemetry Design System v4
   Dark terminal DNA, softened into glass cards
   ============================================================ */

/* --- Design Tokens --- */
:root {
  --bg-primary:     #08080A;
  --bg-surface:     rgba(18, 18, 20, 0.72);
  --bg-surface-alt: rgba(255, 255, 255, 0.04);
  --bg-hover:       rgba(255, 255, 255, 0.06);
  --accent:         #F0232D;
  --accent-soft:    #FF5A60;
  --accent-dim:     rgba(240, 35, 45, 0.14);
  --text:           #EDEDEF;
  --text-muted:     #8A8A93;
  --text-dim:       #4A4A52;
  --border:         rgba(255, 255, 255, 0.07);
  --border-strong:  rgba(255, 255, 255, 0.12);
  --border-accent:  rgba(240, 35, 45, 0.45);
  --green:          #4AF626;

  --radius-lg:      20px;
  --radius:         12px;
  --radius-sm:      8px;
  --gap:            14px;
  --pad:            1.4rem;
  --blur:           blur(18px) saturate(140%);
  --shadow:         0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 50px -20px rgba(0, 0, 0, 0.7);
  --ease-out:       cubic-bezier(0.16, 1, 0.3, 1);

  --font-mono:      'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --font-display:   'Inter', 'Arial Black', sans-serif;
  --font-ui:        'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Base --- */
body {
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(240, 35, 45, 0.08), transparent 60%),
    radial-gradient(700px 400px at 100% 110%, rgba(74, 246, 38, 0.04), transparent 60%),
    var(--bg-primary);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap);
  padding: var(--gap) 0;
  overflow-x: hidden;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

audio { display: none; }

button { font: inherit; }

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- Scanlines Overlay --- */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.05) 2px,
    rgba(0, 0, 0, 0.05) 4px
  );
}

/* --- Noise Overlay --- */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 8999;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* --- Background Layers (shared) --- */
.bg-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  pointer-events: none;
  display: none;
}

#bgballs  { opacity: 0.75; }
#bg-hex   { opacity: 0.8; }
#bg-contour { opacity: 1; }

body.bg-mode-balls   #bgballs    { display: block; }
body.bg-mode-hex     #bg-hex     { display: block; }
body.bg-mode-contour #bg-contour { display: block; }

/* --- Shared glass card --- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

/* --- Floating chips (bg switcher, cozy) --- */
.bg-switch,
.bg-indicator,
.cozy-btn {
  background: rgba(18, 18, 20, 0.6);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

.bg-switch {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  padding: 0.6rem 0.65rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.15s var(--ease-out);
}

.bg-switch:hover {
  border-color: var(--border-accent);
  color: var(--text);
}

.bg-switch:active {
  transform: translateY(-50%) scale(0.94);
}

.bg-switch-left  { left: 12px; }
.bg-switch-right { right: 12px; }

.bg-switch-stack {
  position: fixed;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.bg-switch-stack .bg-switch {
  position: static;
  transform: none;
}

.bg-switch-stack .bg-switch:active {
  transform: scale(0.94);
}

.bg-indicator {
  padding: 0.35rem 0.5rem;
  color: var(--text-dim);
  font-size: 10px;
  text-align: center;
  user-select: none;
}

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
  position: relative;
  z-index: 10;
  width: calc(100% - 2 * var(--gap));
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.9rem var(--pad);
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

.site-header::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 64px;
  height: 2px;
  transform: translateX(-50%);
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(240, 35, 45, 0.6);
}

.header-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--text);
  text-transform: uppercase;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  text-transform: uppercase;
}

.header-right { justify-content: flex-end; }

.header-tag,
.header-id,
.header-rev {
  color: var(--text-muted);
}

.header-sep {
  color: var(--text-dim);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(74, 246, 38, 0.08);
  color: var(--green);
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite, pulse-ring 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 246, 38, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(74, 246, 38, 0); }
}

/* ============================================================
   SECTION LABELS (reusable)
   ============================================================ */
.section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.55rem;
  border-radius: 2px;
  background: var(--accent);
  vertical-align: 1px;
}

.section-meta {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-header-bar,
.karaoke-header-bar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

/* ============================================================
   PLAYER LAYOUT
   ============================================================ */
.player-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--gap);
  width: calc(100% - 2 * var(--gap));
  max-width: 1100px;
  align-items: stretch;
}

.player-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* ============================================================
   PLAYER WRAPPER
   ============================================================ */
.player-wrapper {
  position: relative;
  padding: var(--pad);
  overflow: hidden;
}

#visualizer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.45;
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 85%);
  mask-image: linear-gradient(to top, #000 0%, transparent 85%);
}

/* --- Track Info --- */
.track-info {
  position: relative;
  z-index: 2;
  min-height: 1.3em;
  font-family: var(--font-ui);
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Controls row --- */
.player-bottom {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 1.25rem;
}

#controls {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}

#controls button {
  all: unset;
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s var(--ease-out), box-shadow 0.2s ease;
}

#controls button:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

#controls button:active {
  transform: scale(0.92);
}

#controls button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#controls svg {
  fill: var(--text);
  width: 20px;
  height: 20px;
}

#controls .play-main {
  width: 60px;
  height: 60px;
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 8px 24px -6px rgba(240, 35, 45, 0.6);
}

#controls .play-main:hover {
  background: var(--accent-soft);
  border-color: transparent;
  box-shadow: 0 10px 30px -6px rgba(240, 35, 45, 0.75);
}

#controls .play-main svg {
  fill: #fff;
  width: 26px;
  height: 26px;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.time-label {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 2.75rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.progress-bar {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  position: relative;
  transition: height 0.15s ease;
}

.progress-bar::before {
  content: '';
  position: absolute;
  inset: -8px 0;
}

.progress-bar:hover {
  height: 6px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transition: width 0.1s linear;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(240, 35, 45, 0.35);
  transition: transform 0.15s var(--ease-out);
}

.progress-bar:hover .progress-fill::after {
  transform: translateY(-50%) scale(1);
}

/* ============================================================
   VOLUME
   ============================================================ */
.volume-rail {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.volume-icon {
  width: 16px;
  height: 16px;
  fill: var(--text-muted);
  flex-shrink: 0;
}

.volume-slider {
  appearance: none;
  -webkit-appearance: none;
  width: 96px;
  height: 16px;
  outline: none;
  background: transparent;
  cursor: pointer;
}

.volume-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--text);
  transition: transform 0.15s var(--ease-out);
}

.volume-slider:hover::-webkit-slider-thumb { transform: scale(1.2); }

.volume-slider::-moz-range-track {
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
}

.volume-slider::-moz-range-progress {
  height: 4px;
  border-radius: 4px;
  background: var(--accent);
}

.volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 50%;
  background: var(--text);
}

.volume-slider:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.volume-slider:focus-visible::-moz-range-thumb {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================================
   QUEUE / PLAYLISTS PANEL
   ============================================================ */
.queue-panel {
  min-width: 0;
  max-height: 560px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.queue-header {
  padding: var(--pad) var(--pad) 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.playlist-tabs {
  display: flex;
  gap: 6px;
  padding: 0 var(--pad) 0.75rem;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}

.playlist-tabs::-webkit-scrollbar { display: none; }
.playlist-tabs[hidden] { display: none; }

.pl-tab {
  flex-shrink: 0;
  max-width: 160px;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-surface-alt);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pl-tab:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.pl-tab.active {
  background: var(--text);
  border-color: var(--text);
  color: #0A0A0A;
}

.queue-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 0.6rem 0.6rem;
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.queue-list::-webkit-scrollbar { width: 6px; }
.queue-list::-webkit-scrollbar-track { background: transparent; }
.queue-list::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 6px;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s ease, color 0.15s ease;
}

.queue-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.queue-item.active {
  background: var(--accent-dim);
  color: var(--text);
  font-weight: 600;
}

.q-num {
  width: 1.5rem;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--text-dim);
}

.queue-item.active .q-num { color: var(--accent); }

body.is-playing .queue-item.active .q-num {
  color: transparent;
  background:
    linear-gradient(var(--accent), var(--accent)) 0 100% / 3px 60% no-repeat,
    linear-gradient(var(--accent), var(--accent)) 5px 100% / 3px 100% no-repeat,
    linear-gradient(var(--accent), var(--accent)) 10px 100% / 3px 40% no-repeat;
  height: 12px;
  width: 13px;
  margin-right: calc(1.5rem - 13px);
  animation: eq 0.9s ease-in-out infinite alternate;
}

@keyframes eq {
  0%   { background-size: 3px 30%, 3px 90%, 3px 60%; }
  50%  { background-size: 3px 100%, 3px 40%, 3px 80%; }
  100% { background-size: 3px 50%, 3px 70%, 3px 100%; }
}

.q-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   KARAOKE
   ============================================================ */
#karaoke-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 180px;
  padding: var(--pad);
  overflow: hidden;
}

.karaoke-viewport {
  overflow: hidden;
  height: 120px;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
}

#karaoke-lines {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.6s var(--ease-out);
}

.karaoke-line {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-dim);
  text-align: center;
  transition: color 0.3s ease, transform 0.3s var(--ease-out);
  animation: terminal-in 0.35s var(--ease-out) both;
}

.karaoke-line.active {
  color: var(--text);
  font-weight: 700;
  transform: scale(1.04);
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  position: relative;
  z-index: 10;
  margin-top: auto;
  width: calc(100% - 2 * var(--gap));
  max-width: 1100px;
  padding: 0.5rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  text-transform: uppercase;
}

.footer-line {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.footer-sep {
  font-size: 10px;
  color: var(--text-dim);
}

/* ============================================================
   COZY MODE
   ============================================================ */
.cozy-btn {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 50;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.15s var(--ease-out);
}

.cozy-btn:hover {
  border-color: var(--border-accent);
  color: var(--text);
}

.cozy-btn:active {
  transform: scale(0.96);
}

.cozy-btn[aria-pressed="true"] {
  background: var(--accent-dim);
  border-color: var(--border-accent);
  color: var(--accent-soft);
}

body.cozy::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 120% at 50% 10%, rgba(255, 140, 60, 0.06), transparent 50%),
    radial-gradient(120% 120% at 50% 90%, rgba(240, 35, 45, 0.04), transparent 50%);
}

.player-wrapper,
#karaoke-wrapper,
.queue-panel,
.cozy-btn { z-index: 2; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes terminal-in {
  from {
    opacity: 0;
    transform: translateY(8px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.site-header    { animation: terminal-in 0.5s var(--ease-out) both 0.05s; }
.player-wrapper { animation: terminal-in 0.5s var(--ease-out) both 0.15s; }
.queue-panel    { animation: terminal-in 0.5s var(--ease-out) both 0.2s; }
#karaoke-wrapper { animation: terminal-in 0.5s var(--ease-out) both 0.25s; }
.site-footer    { animation: terminal-in 0.5s var(--ease-out) both 0.35s; }

@keyframes title-glitch {
  0%, 100% { opacity: 1; transform: translate(0); }
  10% { opacity: 0.8; transform: translate(-2px, 1px); }
  20% { opacity: 1; transform: translate(1px, -1px); }
  30% { opacity: 0.9; transform: translate(0); }
}

.header-title {
  animation: title-glitch 0.4s ease both 0.1s;
}

/* ============================================================
   PREFERS REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .scanlines {
    display: none;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .player-layout {
    grid-template-columns: 1fr;
  }

  .queue-panel {
    max-height: 420px;
  }

  .site-header {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 0.6rem;
  }

  .header-left,
  .header-right {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  :root {
    --pad: 1rem;
    --gap: 10px;
  }

  .header-left { display: none; }

  .player-bottom {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1rem;
  }

  #controls,
  .volume-rail {
    grid-column: 1;
    justify-self: center;
  }

  .karaoke-line {
    font-size: 14px;
  }

  .site-footer {
    flex-direction: column;
    gap: 0.25rem;
    padding-bottom: 4rem;
  }

  .footer-sep {
    display: none;
  }

  .bg-switch-left,
  .bg-switch-stack {
    top: auto;
    bottom: 12px;
    transform: none;
  }

  .bg-switch-left {
    left: auto;
    right: 116px;
  }

  .bg-switch-stack {
    right: 12px;
    flex-direction: row-reverse;
    align-items: center;
    gap: 4px;
  }

  .bg-indicator {
    font-size: 9px;
    padding: 0.3rem 0.5rem;
  }
}

/* ============================================================
   404 PAGE
   ============================================================ */
.page-404 {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.page-404 .error-text {
  font-family: var(--font-display);
  font-size: clamp(100px, 20vw, 500px);
  font-weight: 900;
  color: var(--accent-dim);
  letter-spacing: -0.05em;
  line-height: 0.9;
  position: absolute;
  user-select: none;
}

.page-404 .error-img {
  position: relative;
  z-index: 1;
  animation: terminal-in 0.5s var(--ease-out) both 0.2s;
}

.page-404 .error-img img {
  display: block;
  max-width: min(500px, 80vw);
  height: auto;
  border-radius: var(--radius-lg);
  filter: grayscale(0.3) contrast(1.1);
}

.page-404 .back-link {
  position: absolute;
  bottom: 2rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-accent);
  border-radius: 999px;
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.1em;
  transition: color 0.2s ease, background 0.2s ease;
}

.page-404 .back-link:hover {
  color: var(--text);
  background: var(--accent-dim);
}
