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

body {
  background: #2a1f14;
  background-image: 
    repeating-linear-gradient(90deg, transparent, transparent 20px, rgba(0,0,0,0.03) 20px, rgba(0,0,0,0.03) 40px),
    repeating-linear-gradient(0deg, transparent, transparent 20px, rgba(0,0,0,0.03) 20px, rgba(0,0,0,0.03) 40px);
  min-height: 100vh;
  font-family: 'IBM Plex Mono', monospace;
  overflow-x: hidden;
}

.wood-panel-bg {
  background: linear-gradient(180deg, #3d2b1f 0%, #4a3728 20%, #3d2b1f 40%, #4a3728 60%, #3d2b1f 80%, #4a3728 100%);
  background-size: 100% 8px;
}

.carpet-bg {
  background: #5c4033;
  background-image: 
    radial-gradient(ellipse at 20% 50%, #6b4e3d 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, #6b4e3d 0%, transparent 50%),
    repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(0,0,0,0.05) 2px, rgba(0,0,0,0.05) 4px);
}

.tv-housing {
  background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 30%, #1a1a1a 70%, #2a2a2a 100%);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 
    0 20px 60px rgba(0,0,0,0.8),
    inset 0 1px 0 rgba(255,255,255,0.1),
    inset 0 -1px 0 rgba(0,0,0,0.5);
  position: relative;
}

.tv-housing::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(180deg, #3d2b1f 0%, #4a3728 20%, #3d2b1f 40%, #4a3728 60%, #3d2b1f 80%);
  background-size: 100% 6px;
  border-radius: 0 0 16px 16px;
}

.crt-screen {
  position: relative;
  background: #0a0a0a;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 
    inset 0 0 80px rgba(0,0,0,0.8),
    inset 0 0 20px rgba(0,0,0,0.5),
    0 0 2px rgba(100,255,100,0.05);
}

.crt-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.15) 2px,
    rgba(0,0,0,0.15) 4px
  );
  z-index: 10;
  pointer-events: none;
}

.crt-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.5) 100%);
  z-index: 11;
  pointer-events: none;
}

.scanline-overlay {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 1px,
    rgba(0,0,0,0.1) 1px,
    rgba(0,0,0,0.1) 2px
  );
  z-index: 12;
  pointer-events: none;
  animation: scanline-flicker 0.1s infinite;
}

@keyframes scanline-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.97; }
}

@keyframes screen-flicker {
  0%, 97%, 100% { opacity: 1; }
  98% { opacity: 0.92; }
  99% { opacity: 0.96; }
}

.screen-content {
  animation: screen-flicker 4s infinite;
  position: relative;
  z-index: 5;
}

@keyframes static-noise {
  0% { background-position: 0 0; }
  25% { background-position: -100px -200px; }
  50% { background-position: 200px -100px; }
  75% { background-position: -150px 150px; }
  100% { background-position: 100px -50px; }
}

.static-effect {
  position: absolute;
  inset: 0;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  animation: static-noise 0.15s steps(5) infinite;
  opacity: 0.9;
  mix-blend-mode: screen;
}

.vhs-overlay {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
}

.vhs-overlay::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.1);
  animation: vhs-tracking 3s linear infinite;
}

@keyframes vhs-tracking {
  0% { top: -5%; }
  100% { top: 105%; }
}

.vhs-timestamp {
  position: absolute;
  bottom: 12px;
  right: 12px;
  font-family: 'VT323', monospace;
  font-size: 18px;
  color: rgba(255,255,255,0.8);
  text-shadow: 2px 0 #ff0000, -2px 0 #0000ff;
  z-index: 16;
}

.color-bar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  height: 100%;
  width: 100%;
}

.news-chyron {
  background: linear-gradient(180deg, #1a3a7a 0%, #0d2255 100%);
  border-top: 3px solid #ff3333;
  border-bottom: 2px solid #cc0000;
  padding: 6px 12px;
  font-family: 'Oswald', sans-serif;
  color: white;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.ticker-bar {
  background: linear-gradient(90deg, #cc0000 0%, #990000 100%);
  color: white;
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  overflow: hidden;
  white-space: nowrap;
  height: 24px;
  line-height: 24px;
}

.ticker-text {
  display: inline-block;
  animation: ticker-scroll 30s linear infinite;
  padding-left: 100%;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.tv-guide-style {
  font-family: 'Crimson Pro', serif;
  background: #fffde7;
  color: #222;
}

.tv-guide-header {
  background: linear-gradient(135deg, #ffeb3b 0%, #ffc107 100%);
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
}

.led-light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}

.led-on { background: #00ff00; color: #00ff00; }
.led-off { background: #330000; color: #330000; }

.knob {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #555 0%, #333 50%, #444 100%);
  border-radius: 50%;
  border: 2px solid #222;
  cursor: pointer;
  position: relative;
}

.knob::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 8px;
  background: #888;
  border-radius: 1px;
}

.chaos-panel {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid #333;
  border-radius: 8px;
}

.program-card {
  background: linear-gradient(135deg, rgba(20,20,40,0.95) 0%, rgba(10,10,30,0.95) 100%);
  border-left: 3px solid;
  font-family: 'IBM Plex Mono', monospace;
}

@keyframes power-on {
  0% { transform: scaleY(0.005) scaleX(0.3); filter: brightness(10); }
  20% { transform: scaleY(0.005) scaleX(1); filter: brightness(3); }
  40% { transform: scaleY(0.3) scaleX(1); filter: brightness(1.5); }
  100% { transform: scaleY(1) scaleX(1); filter: brightness(1); }
}

@keyframes power-off {
  0% { transform: scaleY(1) scaleX(1); filter: brightness(1); }
  60% { transform: scaleY(0.005) scaleX(1); filter: brightness(3); }
  80% { transform: scaleY(0.005) scaleX(0.3); filter: brightness(10); }
  100% { transform: scaleY(0) scaleX(0); filter: brightness(0); }
}

.power-on-anim {
  animation: power-on 0.6s ease-out forwards;
}

.power-off-anim {
  animation: power-off 0.4s ease-in forwards;
}

@keyframes eas-flash {
  0%, 100% { background-color: #cc0000; }
  50% { background-color: #ff4444; }
}

.eas-banner {
  animation: eas-flash 0.5s infinite;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
}

@keyframes glitch-shift {
  0%, 85%, 100% { transform: translateX(0); filter: none; }
  86% { transform: translateX(-3px); filter: hue-rotate(90deg); }
  87% { transform: translateX(3px); filter: hue-rotate(-90deg); }
  88% { transform: translateX(0); filter: none; }
}

.glitch-effect {
  animation: glitch-shift 5s infinite;
}

.event-log-item {
  border-left: 3px solid;
  padding: 4px 8px;
  font-size: 12px;
  font-family: 'IBM Plex Mono', monospace;
}

.retro-link {
  color: #0000ff;
  text-decoration: underline;
  font-family: 'Crimson Pro', serif;
}

.retro-link:hover {
  color: #ff00ff;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #1a1a1a; }
::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }