@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=VT323&display=swap');

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

body {
  background: #0a0806;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Share Tech Mono', monospace;
  overflow: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(156, 124, 94, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 50% 80% at 20% 80%, rgba(46, 61, 79, 0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── TV CABINET ───────────────────────────────────── */
.tv-wrap {
  position: relative;
  z-index: 10;
  filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 60px rgba(156, 124, 94, 0.08));
  animation: tvFloat 6s ease-in-out infinite;
}

@keyframes tvFloat {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

.tv-cabinet {
  background: linear-gradient(160deg, #3a2e22 0%, #2a2018 40%, #1e1710 100%);
  border-radius: 28px 28px 24px 24px;
  padding: 28px 32px 36px;
  position: relative;
  border: 2px solid #4a3828;
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.08),
    inset 0 -4px 8px rgba(0, 0, 0, 0.6),
    0 8px 0 #1a1208,
    0 12px 0 #140e06;
}

.tv-cabinet::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(92deg,
      transparent 0px,
      transparent 18px,
      rgba(0, 0, 0, 0.06) 18px,
      rgba(0, 0, 0, 0.06) 19px);
  pointer-events: none;
}

/* ── TV CONTENT OVERLAY ───────────────────────────── */
.tv-content-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.tv-content {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  padding: 40px;
  color: #e8e2d9;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(200, 191, 173, 0.2) transparent;
  animation: contentFlicker 0.1s infinite alternate;
}

@keyframes contentFlicker {
  from {
    opacity: 0.98;
  }

  to {
    opacity: 1;
  }
}

.tv-content.active {
  opacity: 1;
  pointer-events: auto;
}

.tv-content h1 {
  font-family: 'VT323', monospace;
  font-size: 52px;
  margin-bottom: 8px;
  text-shadow: 0 0 10px rgba(232, 226, 217, 0.3);
  letter-spacing: 2px;
  line-height: 1;
}

.tv-content .subtitle {
  font-size: 20px;
  color: rgba(200, 191, 173, 0.7);
  margin-bottom: 30px;
}

.tv-content p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 24px;
  color: rgba(232, 226, 217, 0.85);
}

.button-group {
  display: flex;
  gap: 15px;
  margin-top: auto;
  padding-bottom: 10px;
}

.btn-retro {
  background: transparent;
  border: 2px solid #e8e2d9;
  color: #e8e2d9;
  padding: 10px 20px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-retro:hover {
  background: #e8e2d9;
  color: #1a1814;
  box-shadow: 0 0 15px rgba(232, 226, 217, 0.5);
}

.btn-retro.primary {
  background: #e8e2d9;
  color: #1a1814;
}

.btn-retro.primary:hover {
  background: transparent;
  color: #e8e2d9;
}

.download-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 10px;
}

.download-box {
  border: 1px dashed rgba(200, 191, 173, 0.4);
  padding: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.download-box:hover {
  border-style: solid;
  border-color: #e8e2d9;
  background: rgba(255, 255, 255, 0.05);
}

.download-box i {
  display: block;
  font-size: 32px;
  margin-bottom: 8px;
  color: #c4893a;
}

.download-box .os-name {
  font-family: 'VT323', monospace;
  font-size: 22px;
  display: block;
}

.use-list {
  list-style: none;
}

.use-list li {
  margin-bottom: 12px;
  display: flex;
  gap: 10px;
  font-size: 14px;
}

.use-list li span {
  color: #c4893a;
  font-weight: bold;
  min-width: 60px;
}

/* Custom scrollbar for TV content */
.tv-content::-webkit-scrollbar {
  width: 4px;
}

.tv-content::-webkit-scrollbar-thumb {
  background: rgba(200, 191, 173, 0.2);
  border-radius: 2px;
}

/* ── SCREEN BEZEL ─────────────────────────────────── */
.tv-bezel {
  background: linear-gradient(145deg, #1a1410 0%, #0e0c08 100%);
  border-radius: 14px;
  padding: 18px;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.04),
    inset 4px 4px 12px rgba(0, 0, 0, 0.8),
    inset -2px -2px 8px rgba(255, 255, 255, 0.03);
  position: relative;
}

/* ── SCREEN ───────────────────────────────────────── */
.tv-screen {
  width: 520px;
  height: 390px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
}

.tv-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  box-shadow:
    inset 8px 0 20px rgba(0, 0, 0, 0.35),
    inset -8px 0 20px rgba(0, 0, 0, 0.35),
    inset 0 8px 20px rgba(0, 0, 0, 0.25),
    inset 0 -8px 20px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  z-index: 20;
}

#screen {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom,
      transparent 0px,
      transparent 3px,
      rgba(0, 0, 0, 0.18) 3px,
      rgba(0, 0, 0, 0.18) 4px);
  pointer-events: none;
  z-index: 15;
  border-radius: 8px;
  mix-blend-mode: multiply;
}

.phosphor-glow {
  position: absolute;
  inset: -2px;
  border-radius: 10px;
  pointer-events: none;
  z-index: 5;
  transition: box-shadow 1.2s ease;
}

.screen-glass {
  position: absolute;
  top: 6px;
  left: 8px;
  width: 45%;
  height: 30%;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.06) 0%,
      rgba(255, 255, 255, 0.02) 50%,
      transparent 100%);
  border-radius: 6px 6px 0 0;
  pointer-events: none;
  z-index: 25;
}

/* ── CONTROLS BAR ─────────────────────────────────── */
.tv-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 0 4px;
}

.tv-brand {
  font-family: 'VT323', monospace;
  font-size: 22px;
  color: rgba(200, 191, 173, 0.35);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.knobs {
  display: flex;
  gap: 18px;
  align-items: center;
}

.knob {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #5a4535, #2a1e14);
  border: 2px solid #3a2a1c;
  box-shadow:
    0 3px 6px rgba(0, 0, 0, 0.6),
    inset 0 1px 2px rgba(255, 255, 255, 0.1);
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease;
}

.knob::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 10px;
  background: rgba(200, 191, 173, 0.5);
  border-radius: 2px;
}

.knob:hover {
  transform: rotate(30deg);
}

.knob:active {
  transform: rotate(60deg);
}

.knob.ch-knob {
  width: 38px;
  height: 38px;
}

.knob.ch-knob::after {
  height: 12px;
  top: 5px;
}

.indicator-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c4893a;
  box-shadow: 0 0 6px #c4893a, 0 0 12px rgba(196, 137, 58, 0.5);
  animation: ledPulse 2s ease-in-out infinite;
}

@keyframes ledPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

/* ── CHANNEL STRIP ────────────────────────────────── */
.channel-strip {
  display: flex;
  gap: 8px;
  margin-top: 22px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 590px;
}

.ch-btn {
  width: 44px;
  height: 30px;
  border: 1px solid rgba(200, 191, 173, 0.15);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  color: rgba(200, 191, 173, 0.5);
  font-family: 'VT323', monospace;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ch-btn:hover {
  border-color: rgba(200, 191, 173, 0.4);
  color: rgba(232, 226, 217, 0.9);
  transform: translateY(-1px);
}

.ch-btn.active {
  border-color: var(--ch-color, #c4893a);
  color: #e8e2d9;
  box-shadow: 0 0 10px var(--ch-color, #c4893a), inset 0 0 8px rgba(255, 255, 255, 0.05);
}

/* ── HINT ─────────────────────────────────────────── */
.hint {
  margin-top: 16px;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(200, 191, 173, 0.2);
  text-align: center;
}

/* ── CHANNEL SWITCH ANIMATION ─────────────────────── */
.tv-screen.switching #screen {
  animation: crtSwitch 0.45s ease forwards;
}

@keyframes crtSwitch {
  0% {
    transform: scaleY(1);
    filter: brightness(1.2);
  }

  20% {
    transform: scaleY(0.02);
    filter: brightness(3) blur(1px);
  }

  55% {
    transform: scaleY(0.02);
    filter: brightness(0.1);
  }

  75% {
    transform: scaleY(1.04);
    filter: brightness(1.4);
  }

  90% {
    transform: scaleY(0.97);
    filter: brightness(0.9);
  }

  100% {
    transform: scaleY(1);
    filter: brightness(1);
  }
}

@media (max-width: 640px) {
  .tv-screen {
    width: 320px;
    height: 240px;
  }

  .tv-cabinet {
    padding: 16px 18px 24px;
  }

  .ch-btn {
    width: 36px;
    height: 26px;
    font-size: 14px;
  }
}

/* ── RUSSELL BADGE ─────────────────────────────────── */
.russell-badge {
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 100;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid rgba(196, 137, 58, 0.35);
  border-radius: 4px;
  background: rgba(10, 8, 6, 0.75);
  backdrop-filter: blur(4px);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.2s ease;
}

.russell-badge:hover {
  border-color: rgba(196, 137, 58, 0.8);
  transform: translateY(-2px);
}

.russell-badge:hover .badge-glow {
  opacity: 1;
}

.badge-text {
  position: relative;
  z-index: 2;
  font-family: 'VT323', monospace;
  font-size: 18px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(200, 191, 173, 0.55);
  transition: color 0.3s ease;
}

.russell-badge:hover .badge-text {
  color: #e8e2d9;
  text-shadow: 0 0 8px rgba(196, 137, 58, 0.6);
}

.badge-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 120%, rgba(196, 137, 58, 0.12) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}