/* ─── CSS Variables ──────────────────────────────────────── */
:root {
  --bg-dark:      #060b1a;
  --bg-card:      #0d1730;
  --bg-card-hover:#111e3a;
  --coral:        #ff6b6b;
  --yellow:       #ffd93d;
  --teal:         #00d4ff;
  --teal-dim:     #0099bb;
  --green:        #6bcb77;
  --purple:       #c77dff;
  --text-main:    #e8f4ff;
  --text-dim:     #8ab0cc;
  --border-glow:  rgba(0,212,255,0.4);
  --scanline-opacity: 0.04;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Exo 2', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── Scanline Overlay ───────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,var(--scanline-opacity)) 2px,
    rgba(0,0,0,var(--scanline-opacity)) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ─── Stars Background ───────────────────────────────────── */
.stars-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.stars-bg span {
  position: absolute;
  border-radius: 50%;
  background: white;
  animation: twinkle var(--dur, 3s) ease-in-out infinite var(--delay, 0s);
  opacity: 0;
}

@keyframes twinkle {
  0%, 100% { opacity: 0; }
  50%       { opacity: var(--bright, 0.6); }
}

/* ─── Page Wrapper ───────────────────────────────────────── */
.page { position: relative; z-index: 1; }

/* ─── Navbar ─────────────────────────────────────────────── */
nav {
  display: flex;
  align-items: center;
  padding: 12px 32px;
  background: rgba(6,11,26,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--teal-dim);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity   0.35s ease;
}
nav.nav-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.nav-logo {
  flex: 1;
}

.nav-logo a {
  display: block;
  line-height: 0;
}

.nav-logo img {
  height: 44px;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 8px var(--teal));
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  flex: 1;
  justify-content: center;
}

.nav-links-right {
  justify-content: flex-end;
}

.nav-links a {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--teal);
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.2s, text-shadow 0.2s;
}

.nav-links a:hover {
  color: var(--yellow);
  text-shadow: 0 0 8px var(--yellow);
}

.nav-links a.nav-active {
  color: var(--yellow);
  text-shadow: 0 0 8px var(--yellow);
}

/* ─── Hero (index.html) ──────────────────────────────────── */
.hero {
  position: relative;
  text-align: center;
  padding: 0;
  overflow: hidden;
}

.hero-gif {
  width: 100%;
  display: block;
  filter: brightness(0.6);
}

/* gradient lives on ::after so it spans the full hero independently */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(6,11,26,0.3) 0%,
    rgba(6,11,26,0.0) 30%,
    rgba(6,11,26,0.0) 70%,
    rgba(6,11,26,1.0) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* overlay only covers the non-faded zone so flexbox centers
   the logo within the visible portion of the hero */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 20%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  z-index: 2;
}

.hero-logo {
  width: min(520px, 90vw);
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 20px rgba(0,212,255,0.35));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

.hero-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(14px, 3vw, 26px);
  color: var(--yellow);
  text-shadow: 0 0 12px var(--yellow), 0 0 30px rgba(255,217,61,0.5);
  line-height: 1.5;
  letter-spacing: 2px;
  animation: flicker 6s ease-in-out infinite;
}

@keyframes flicker {
  0%,97%,100% { opacity: 1; }
  98%          { opacity: 0.7; }
  99%          { opacity: 1; }
}

.hero-subtitle {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(11px, 1.8vw, 16px);
  color: var(--teal);
  letter-spacing: 4px;
  text-transform: uppercase;
  text-shadow: 0 0 8px var(--teal);
}

/* ─── Marquee (index.html) ───────────────────────────────── */
.marquee-bar {
  background: linear-gradient(90deg, var(--coral), var(--yellow), var(--teal), var(--coral));
  background-size: 300% 100%;
  animation: gradientShift 6s linear infinite;
  padding: 8px 0;
  overflow: hidden;
  white-space: nowrap;
  border-top: 2px solid rgba(255,255,255,0.15);
  border-bottom: 2px solid rgba(255,255,255,0.15);
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.marquee-inner {
  display: flex;
  animation: marquee 30s linear infinite;
}

.marquee-inner span {
  flex-shrink: 0;
  white-space: nowrap;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: var(--bg-dark);
  letter-spacing: 2px;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── Sections ───────────────────────────────────────────── */
section { padding: 60px 32px; }

.section-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(14px, 2.5vw, 22px);
  text-align: center;
  margin-bottom: 48px;
  color: var(--yellow);
  text-shadow: 0 0 10px var(--yellow);
  letter-spacing: 2px;
  position: relative;
  overflow-wrap: break-word;
}

.section-title::after {
  content: '';
  display: block;
  width: 120px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  margin: 16px auto 0;
  border-radius: 2px;
}

.hof-title {
  color: #ffd700;
  text-shadow: 0 0 12px #ffd700, 0 0 24px rgba(255,215,0,0.4);
}

.hof-title::after {
  background: linear-gradient(90deg, transparent, #ffd700, transparent);
}

.hof-subtitle {
  font-family: 'Exo 2', sans-serif;
  text-align: center;
  color: var(--text-dim);
  font-size: clamp(13px, 1.8vw, 16px);
  margin-top: -32px;
  margin-bottom: 40px;
}

/* ─── HOF Page Header (hof.html) ─────────────────────────── */
.hof-page-header {
  text-align: center;
  padding: 80px 32px 60px;
  background: radial-gradient(ellipse at center top, rgba(255,215,0,0.1) 0%, transparent 65%);
  border-bottom: 2px solid rgba(255,215,0,0.2);
}

.hof-page-header .section-title {
  margin-bottom: 12px;
}

.hof-page-header .hof-subtitle {
  margin-top: 0;
  margin-bottom: 28px;
}

.back-link {
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: var(--teal);
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.2s, text-shadow 0.2s;
}

.back-link:hover {
  color: var(--yellow);
  text-shadow: 0 0 8px var(--yellow);
}

/* ─── Game Player ────────────────────────────────────────── */
#player-section {
  background: radial-gradient(ellipse at center top, rgba(0,212,255,0.08) 0%, transparent 70%);
  border-top: 1px solid rgba(0,212,255,0.15);
}

.player-wrapper {
  max-width: 960px;
  margin: 0 auto;
}

.player-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.player-game-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  color: var(--teal);
  text-shadow: 0 0 8px var(--teal);
  overflow-wrap: break-word;
  min-width: 0;
}

.player-frame-footer {
  display: none;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.fullscreen-btn {
  background: transparent;
  border: 1px solid var(--teal-dim);
  color: var(--teal);
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  padding: 7px 11px;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.fullscreen-btn:hover {
  background: rgba(0,212,255,0.1);
  border-color: var(--teal);
}

.player-like-btn {
  background: transparent;
  border: 1px solid rgba(255,107,107,0.4);
  color: var(--text-dim);
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  padding: 7px 11px;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.player-like-btn:hover {
  background: rgba(255,107,107,0.08);
  border-color: var(--coral);
  color: var(--coral);
}

.player-like-btn.liked {
  border-color: var(--coral);
  color: var(--coral);
  background: rgba(255,107,107,0.12);
}

.player-frame-box.game-focused {
  border-color: var(--teal);
  box-shadow:
    0 0 0 1px rgba(0,212,255,0.25),
    0 0 40px rgba(0,212,255,0.2),
    inset 0 0 20px rgba(0,0,0,0.5);
}

.game-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
  display: none;
}

.click-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(6, 11, 26, 0.82);
  border: 1px solid var(--teal);
  border-radius: 8px;
  padding: 14px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 24px rgba(0,212,255,0.25);
  animation: hint-pulse 2s ease-in-out infinite;
}

.click-hint-icon {
  font-size: 28px;
  line-height: 1;
}

.click-hint-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: var(--teal);
  letter-spacing: 1px;
  white-space: nowrap;
}

@keyframes hint-pulse {
  0%, 100% { opacity: 0.85; transform: translate(-50%, -50%) scale(1); }
  50%       { opacity: 1;    transform: translate(-50%, -50%) scale(1.04); }
}

#exit-game-btn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
  background: rgba(6,11,26,0.85);
  border: 1px solid var(--teal-dim);
  color: var(--teal);
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  padding: 9px 13px;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 1px;
  backdrop-filter: blur(4px);
  transition: background 0.15s, border-color 0.15s;
}
#exit-game-btn:hover {
  background: rgba(0,212,255,0.12);
  border-color: var(--teal);
}

.player-frame-box {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border: 2px solid var(--teal-dim);
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0,212,255,0.1),
    0 0 30px rgba(0,212,255,0.15),
    inset 0 0 20px rgba(0,0,0,0.5);
}

.player-frame-box iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

.player-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
  gap: 20px;
}

.player-placeholder .pixel-icon {
  font-size: 64px;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

.player-placeholder p {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  line-height: 2;
}

/* ─── Games Grid ─────────────────────────────────────────── */
#games-section {
  background: linear-gradient(180deg, var(--bg-dark) 0%, #080f20 100%);
}

#hof-section {
  background: linear-gradient(180deg, var(--bg-dark) 0%, #080f20 100%);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ─── Game Card ──────────────────────────────────────────── */
.game-card {
  background: var(--bg-card);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
}

.game-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--teal);
  box-shadow:
    0 0 20px rgba(0,212,255,0.3),
    0 8px 32px rgba(0,0,0,0.5);
}

.game-card.active {
  border-color: var(--yellow);
  box-shadow:
    0 0 20px rgba(255,217,61,0.4),
    0 8px 32px rgba(0,0,0,0.5);
}

.game-card.active::after {
  content: '▶ NOW PLAYING';
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--yellow);
  color: var(--bg-dark);
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
}

.card-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid rgba(0,212,255,0.15);
}

.card-thumb-placeholder {
  width: 100%;
  aspect-ratio: 1/1;
  background: linear-gradient(135deg, #0d1f3c 0%, #1a0d2e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  border-bottom: 1px solid rgba(0,212,255,0.15);
}

.card-body {
  padding: 16px;
}

.card-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.card-play-btn {
  display: block;
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, var(--teal-dim), var(--teal));
  color: var(--bg-dark);
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  text-align: center;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: filter 0.15s, transform 0.1s;
}

.card-play-btn:hover {
  filter: brightness(1.2);
  transform: scale(1.02);
}

.card-play-btn:active {
  transform: scale(0.97);
}

/* ─── Like Button ────────────────────────────────────────── */
.card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.like-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: transparent;
  border: 1px solid rgba(255,107,107,0.35);
  border-radius: 6px;
  color: var(--text-dim);
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.1s;
  flex: 1;
}

.like-btn:hover {
  border-color: var(--coral);
  color: var(--coral);
  background: rgba(255,107,107,0.08);
}

.like-btn.liked {
  border-color: var(--coral);
  color: var(--coral);
  background: rgba(255,107,107,0.12);
}

.like-btn .heart {
  font-size: 13px;
  transition: transform 0.15s;
  line-height: 1;
}

.like-btn:active .heart,
.like-btn.pop .heart {
  transform: scale(1.5);
}

.like-count {
  min-width: 16px;
  text-align: left;
}

/* ─── Coming Soon Card ───────────────────────────────────── */
.game-card.coming-soon {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.coming-soon-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(6,11,26,0.85);
  border: 2px solid var(--coral);
  color: var(--coral);
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  padding: 10px 14px;
  border-radius: 6px;
  text-align: center;
  white-space: nowrap;
  line-height: 2;
  text-shadow: 0 0 8px var(--coral);
  pointer-events: none;
  z-index: 2;
}

/* ─── Voting Section (index.html) ────────────────────────── */
#vote-section {
  background: radial-gradient(ellipse at center, rgba(255,107,107,0.1) 0%, transparent 70%);
  text-align: center;
  border-top: 1px solid rgba(255,107,107,0.2);
}

.vote-box {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 2px solid var(--coral);
  border-radius: 16px;
  padding: 48px 40px;
  box-shadow:
    0 0 40px rgba(255,107,107,0.15),
    inset 0 0 20px rgba(0,0,0,0.3);
}

.vote-icon {
  font-size: 56px;
  margin-bottom: 20px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.12); }
}

.vote-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(13px, 2.5vw, 18px);
  color: var(--coral);
  text-shadow: 0 0 12px var(--coral);
  margin-bottom: 16px;
  line-height: 1.6;
}

.vote-desc {
  font-family: 'Exo 2', sans-serif;
  font-size: 15px;
  color: var(--text-dim);
  margin-bottom: 32px;
  line-height: 1.8;
}

.vote-btn {
  display: inline-block;
  padding: 16px 40px;
  background: linear-gradient(135deg, var(--coral), #ff4757);
  color: white;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  text-decoration: none;
  border-radius: 8px;
  letter-spacing: 1px;
  box-shadow: 0 0 20px rgba(255,107,107,0.4);
  transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
}

.vote-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(255,107,107,0.6), 0 8px 20px rgba(0,0,0,0.3);
}

.vote-btn:active { transform: translateY(0); }

/* ─── Footer ─────────────────────────────────────────────── */
footer {
  background: rgba(0,0,0,0.5);
  border-top: 2px solid var(--teal-dim);
  padding: 32px;
  text-align: center;
}

.footer-logo img {
  height: 36px;
  opacity: 0.7;
  image-rendering: pixelated;
  margin-bottom: 12px;
}

.footer-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: var(--text-dim);
  line-height: 2.4;
  letter-spacing: 1px;
}

.footer-text a {
  color: var(--teal);
  text-decoration: none;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  nav { padding: 10px 16px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 7px; }
  section { padding: 40px 16px; }
  .vote-box { padding: 32px 20px; }
  .vote-btn { padding: 14px 28px; }
  footer { padding: 24px 16px; }
  .hof-page-header { padding: 60px 16px 40px; }
}

@media (max-width: 480px) {
  nav {
    padding: 10px 12px;
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .nav-logo {
    flex: 0 0 100%;
    display: flex;
    justify-content: center;
  }
  .nav-links {
    flex: 0 0 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }
  .nav-links-right {
    flex: 0 0 100%;
    justify-content: center;
  }
  .nav-links a { font-size: 6px; }
  section { padding: 32px 12px; }
  .section-title {
    letter-spacing: 1px;
    margin-bottom: 32px;
  }
  .hof-subtitle { margin-top: -14px; }
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
  .vote-box { padding: 24px 14px; }
  .vote-btn {
    display: block;
    width: 100%;
    padding: 14px 16px;
    font-size: 10px;
    text-align: center;
    box-sizing: border-box;
  }
  .player-game-title { font-size: 11px; }
  footer { padding: 20px 12px; }
  .footer-text { font-size: 7px; }
  .hof-page-header { padding: 40px 12px 28px; }
}

/* ─── CRT Boot Animation ─────────────────────────────────── */
#crt-boot {
  position: fixed;
  inset: 0;
  z-index: 100000;
  pointer-events: all;
  overflow: hidden;
  animation: crtBootFade 0.2s ease-out 1.0s forwards;
}

@keyframes crtBootFade {
  to { opacity: 0; pointer-events: none; }
}

.crt-bar {
  position: absolute;
  left: 0; right: 0;
  height: 50%;
  background: #000;
}

.crt-bar-top {
  top: 0;
  animation: crtBarTop 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
}

.crt-bar-bottom {
  bottom: 0;
  animation: crtBarBottom 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
}

@keyframes crtBarTop    { to { transform: translateY(-100%); } }
@keyframes crtBarBottom { to { transform: translateY(100%);  } }

.crt-scan {
  position: absolute;
  left: 0; right: 0;
  top: calc(50% - 2px);
  bottom: calc(50% - 2px);
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  background: linear-gradient(90deg,
    transparent,
    rgba(255,255,255,.3) 15%, #fff 30%,
    #fff 70%, rgba(255,255,255,.3) 85%,
    transparent);
  box-shadow:
    0 0 12px 5px  rgba(255,255,255,.9),
    0 0 40px 16px rgba(160,210,255,.7),
    0 0 80px 35px rgba(80,160,255,.35);
  animation:
    crtScanIn     0.45s linear                         0.15s forwards,
    crtScanExpand 0.4s  cubic-bezier(0.4, 0, 0.2, 1)  0.6s  forwards;
}

@keyframes crtScanIn {
  0%   { opacity: 0;  transform: scaleX(0); }
  35%  { opacity: 1;  transform: scaleX(1); }
  55%  { opacity: .4; transform: scaleX(1); }
  75%  { opacity: 1;  transform: scaleX(1); }
  100% { opacity: 1;  transform: scaleX(1); }
}

@keyframes crtScanExpand {
  from { top: calc(50% - 2px); bottom: calc(50% - 2px); opacity: 1; }
  20%  { opacity: 0; }
  to   { top: 0; bottom: 0; opacity: 0; }
}

.page { animation: crtPageOn 0.35s ease-out 0.6s forwards; }

@keyframes crtPageOn {
  0%   { filter: brightness(3) saturate(0) blur(1px); }
  25%  { filter: brightness(.85) saturate(.5); }
  55%  { filter: brightness(1.2); }
  80%  { filter: brightness(.97); }
  100% { filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  #crt-boot { display: none; }
  .page { animation: none; }
}
