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

:root {
  color-scheme: dark;
  --bg: #0c0c0c;
  --text-dim: #6b6b6b;
  --text: #a8a8a8;
  --glow: rgba(255, 255, 255, 0.04);
}

html,
body {
  min-height: 100%;
}

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, #1a1a1a 0%, transparent 70%),
    radial-gradient(circle at 50% 50%, #111 0%, #050505 100%);
  pointer-events: none;
  z-index: 0;
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  padding: clamp(1rem, 4vw, 3rem);
}

/* ── CRT unit ── */

.crt {
  width: min(92vw, 720px);
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.7));
}

.crt__bezel {
  background: linear-gradient(145deg, #2a2a2a 0%, #141414 40%, #0a0a0a 100%);
  border-radius: clamp(16px, 3vw, 28px);
  padding: clamp(12px, 2.5vw, 20px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -2px 8px rgba(0, 0, 0, 0.6),
    0 0 0 1px #1f1f1f;
}

.crt__screen {
  position: relative;
  border-radius: clamp(10px, 2vw, 18px);
  overflow: hidden;
  background: #000;
  aspect-ratio: 4 / 3;
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.9),
    inset 0 0 120px rgba(0, 0, 0, 0.5);
}

.crt__picture {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Scanlines overlay */
.crt__scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.18) 2px,
    rgba(0, 0, 0, 0.18) 4px
  );
  pointer-events: none;
  z-index: 2;
}

/* Subtle phosphor flicker */
.crt__flicker {
  position: absolute;
  inset: 0;
  background: var(--glow);
  opacity: 0;
  animation: flicker 4s infinite;
  pointer-events: none;
  z-index: 3;
}

@keyframes flicker {
  0%,
  100% {
    opacity: 0;
  }
  92% {
    opacity: 0;
  }
  93% {
    opacity: 0.04;
  }
  94% {
    opacity: 0;
  }
  96% {
    opacity: 0.02;
  }
  97% {
    opacity: 0;
  }
}

.crt__indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3a3a3a;
  margin: 10px auto 2px;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.8);
  animation: power-led 3s ease-in-out infinite;
}

@keyframes power-led {
  0%,
  100% {
    background: #2a2a2a;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.8);
  }
  50% {
    background: #4a3020;
    box-shadow:
      inset 0 0 4px rgba(0, 0, 0, 0.6),
      0 0 6px rgba(180, 80, 20, 0.3);
  }
}

/* ── Footer meta ── */

.meta {
  text-align: center;
  line-height: 1.5;
}

.meta__brand {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.meta__note {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
  letter-spacing: 0.05em;
}

/* ── Accessibility ── */

@media (prefers-reduced-motion: reduce) {
  .crt__flicker,
  .crt__indicator {
    animation: none;
  }
}
