@font-face {
  font-family: 'Star4000';
  src: url('../../assets/fonts/Star4000.woff') format('woff'),
       url('../../assets/fonts/Star4000.ttf') format('truetype');
}

@font-face {
  font-family: 'Star4000 Large';
  src: url('../../assets/fonts/Star4000_Large.woff') format('woff'),
       url('../../assets/fonts/Star4000_Large.ttf') format('truetype');
}

@font-face {
  font-family: 'Star4000 Extended';
  src: url('../../assets/fonts/Star4000_Extended.woff') format('woff'),
       url('../../assets/fonts/Star4000_Extended.ttf') format('truetype');
}

@font-face {
  font-family: 'Star4000 Small';
  src: url('../../assets/fonts/Star4000_Small.woff') format('woff'),
       url('../../assets/fonts/Star4000_Small.ttf') format('truetype');
}

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

body {
  background-color: #070913;
  color: #ffffff;
  font-family: 'Star4000', monospace;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px 0;
}

.living-room-deck {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 100%;
  max-width: 1350px;
  margin: 0 auto;
  padding: 16px 12px;
  box-sizing: border-box;
}

@media (max-width: 1160px) {
  .living-room-deck {
    flex-direction: column;
    align-items: center;
    gap: 18px;
  }
}

.tv-console {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #11131a;
  border: 10px solid #1a1d26;
  border-radius: 14px;
  box-shadow: 
    0 18px 50px rgba(0, 0, 0, 0.95),
    0 0 25px rgba(0, 30, 80, 0.3),
    inset 0 1px 3px rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.screen-scaler-box {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  transition: width 0.2s ease, height 0.2s ease;
  margin: 0 auto;
  overflow: hidden;
}

.screen-container {
  position: relative;
  width: 854px;
  height: 480px;
  box-shadow: 0 0 50px rgba(0, 50, 150, 0.4), 0 0 10px rgba(0, 0, 0, 0.9);
  border-radius: 8px;
  overflow: hidden;
  background-color: #000;
  transform-origin: center center;
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), width 0.2s ease;
  flex-shrink: 0;
}

.screen-container.mode-4-3 {
  width: 640px !important;
}

.screen-container.mode-4-3 #weatherstar-display {
  width: 640px !important;
  background-size: 640px 480px !important;
}

:fullscreen .screen-scaler-box,
:-webkit-full-screen .screen-scaler-box {
  width: 100vw !important;
  height: 100vh !important;
  background: #000;
}

:fullscreen,
:-webkit-full-screen {
  background-color: #000 !important;
}

/* CRT Scanlines and Phosphor Mask */
.crt-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.35) 50%
  ),
  linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.03),
    rgba(0, 255, 0, 0.01),
    rgba(0, 0, 255, 0.03)
  );
  background-size: 100% 3px, 6px 100%;
}

.crt-overlay::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: radial-gradient(circle at center, transparent 65%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
}

/* Main Display */
#weatherstar-display {
  position: relative;
  width: 854px;
  height: 480px;
  background-size: 854px 480px;
  background-position: 0 0;
  background-repeat: no-repeat;
  transition: background-image 0.25s ease-in-out;
}

/* Background States */
.bg-current {
  background-image: url('../../assets/backgrounds/1-wide-enhanced.png');
}
.bg-regional {
  background-image: url('../../assets/backgrounds/2-wide.png');
}
.bg-forecast-today {
  background-image: url('../../assets/backgrounds/1-wide-enhanced.png');
}
.bg-forecast-3day {
  background-image: url('../../assets/backgrounds/4-wide.png');
}

/* Header Ribbon */
.header-band {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 76px;
  pointer-events: none;
}

.header-left {
  position: absolute;
  left: 44px;
  top: 28px;
  width: 520px;
  height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  box-sizing: border-box;
}

.header-left h1 {
  font-family: 'Star4000 Large', monospace;
  font-size: 26px;
  line-height: 48px;
  color: #ffff00;
  text-shadow: 2px 2px #000000;
  letter-spacing: 1px;
  margin: 0;
  white-space: nowrap;
}

.header-left.has-subtitle h1 {
  font-size: 21px;
  line-height: 1.15;
}

.station-location {
  font-family: 'Star4000', monospace;
  font-size: 15px;
  line-height: 1.15;
  color: #ffffff;
  text-shadow: 2px 2px #000000;
  margin-top: 3px;
  white-space: nowrap;
}

.header-right {
  position: absolute;
  right: 28px;
  top: 28px;
  width: 230px;
  height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
  pointer-events: none;
  box-sizing: border-box;
}

.header-right .clock-time {
  font-family: 'Star4000', monospace;
  font-size: 19px;
  line-height: 1.15;
  color: #ffff00;
  text-shadow: 2px 2px #000000;
  white-space: nowrap;
}

.header-right .clock-date {
  font-family: 'Star4000', monospace;
  font-size: 16px;
  line-height: 1.15;
  color: #ffff00;
  text-shadow: 2px 2px #000000;
  margin-top: 2px;
  white-space: nowrap;
}

/* Slide Stage */
#slide-stage {
  position: absolute;
  top: 76px;
  left: 0;
  width: 854px;
  height: 328px;
}

.slide {
  display: none;
  width: 100%;
  height: 100%;
}

.slide.active {
  display: block;
}

/* Slide 1: Current Conditions */
.current-layout {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 298px;
  margin-top: 14px;
  padding: 0 54px;
  gap: 36px;
  box-sizing: border-box;
}

.left-box {
  width: 270px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.temp-display {
  font-family: 'Star4000 Large', monospace;
  font-size: 54px;
  color: #ffffff;
  text-shadow: 3px 3px #000000;
  margin-bottom: 6px;
  line-height: 1;
}

.icon-container img {
  width: 120px;
  height: 90px;
  image-rendering: pixelated;
}

.condition-label {
  font-family: 'Star4000 Large', monospace;
  font-size: 25px;
  color: #ffff00;
  text-shadow: 2px 2px #000000;
  margin-top: 8px;
  text-align: center;
  line-height: 1.1;
}

.right-box {
  width: 360px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 0;
}

.data-row {
  display: flex;
  justify-content: space-between;
  font-size: 21px;
  text-shadow: 2px 2px #000000;
  line-height: 1.15;
}

.data-row .label {
  color: #00ffff;
}

.data-row .value {
  color: #ffffff;
}

/* Slide 2: Regional Panels */
.regional-panels {
  position: relative;
  width: 100%;
  height: 100%;
}

.reg-panel {
  position: absolute;
  top: 28px;
  height: 279px;
  display: flex;
  flex-direction: column;
}

.reg-locations {
  left: 54px;
  width: 226px;
}

.reg-weather {
  left: 313px;
  width: 226px;
}

.reg-wind {
  left: 571px;
  width: 227px;
}

.col-head {
  color: #ffff00;
  font-size: 20px;
  text-shadow: 2px 2px #000;
  margin-top: 8px;
  margin-bottom: 14px;
  text-align: center;
}

.col-head-dual {
  color: #ffff00;
  font-size: 20px;
  text-shadow: 2px 2px #000;
  margin-top: 8px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
}

.col-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 20px;
  text-shadow: 2px 2px #000;
}

.col-row-item {
  height: 28px;
  display: flex;
  align-items: center;
}

.reg-locations .col-row-item {
  color: #ffffff;
  padding-left: 18px;
}

.reg-weather .col-row-item {
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
}

.reg-weather .t-val {
  color: #ffffff;
  font-size: 20px;
}

.reg-weather .c-val {
  color: #00ffff;
  font-size: 18px;
}

.reg-wind .col-row-item {
  color: #ffffff;
  justify-content: center;
  font-size: 20px;
}

.reg-cities {
  left: 54px;
  width: 226px;
}

.reg-cities .col-row-item {
  color: #ffffff;
  padding-left: 18px;
}

.reg-status {
  left: 571px;
  width: 227px;
}

.reg-status .col-row-item {
  justify-content: center;
  font-size: 20px;
}

.header-tulip-icon {
  height: 22px;
  vertical-align: -2px;
  margin-left: 8px;
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.8));
}

/* Slide 3: Forecast Today */
.forecast-today-container {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  height: 298px;
  margin-top: 14px;
  padding: 0 76px;
  box-sizing: border-box;
}

.forecast-period {
  position: static;
  width: 100%;
  padding: 0;
}

.forecast-period h2 {
  font-family: 'Star4000 Large', monospace;
  font-size: 26px;
  color: #ffff00;
  text-shadow: 2px 2px #000;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.forecast-period p {
  font-size: 20px;
  line-height: 28px;
  color: #ffffff;
  text-shadow: 2px 2px #000;
  letter-spacing: 0.5px;
}

/* Slide 4: 3-Day Extended */
.extended-columns {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  height: 300px;
  margin-top: 12px;
  padding: 0 30px;
  box-sizing: border-box;
}

.ext-card {
  width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ext-day-title {
  font-family: 'Star4000 Large', monospace;
  font-size: 28px;
  color: #ffff00;
  text-shadow: 2px 2px #000;
  margin-bottom: 12px;
}

.ext-icon img {
  width: 104px;
  height: 80px;
  image-rendering: pixelated;
  margin-bottom: 8px;
}

.ext-cond {
  color: #00ffff;
  font-size: 17px;
  text-shadow: 2px 2px #000;
  margin-bottom: 14px;
  text-align: center;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ext-hl-row {
  display: flex;
  gap: 12px;
  font-size: 21px;
  text-shadow: 2px 2px #000;
  margin-bottom: 4px;
}

.ext-hl-row.high .hl-label { color: #ffff00; }
.ext-hl-row.low .hl-label { color: #00ffff; }
.ext-hl-row .hl-val { color: #ffffff; }

/* Slide 5: Radar Display */
.radar-wrapper {
  width: 746px;
  height: 300px;
  margin: 12px auto 0 auto;
  position: relative;
  border: 2px solid #5a78c8;
  outline: 2px solid #1e285a;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  background-color: #121626;
}

#radar-map {
  width: 100%;
  height: 100%;
  background-color: #121626;
}

/* Ensure Leaflet controls don't show unsightly borders */
.leaflet-container {
  background: #121626 !important;
  font-family: 'Star4000', monospace !important;
}

.radar-legend-bar {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 800;
  background: rgba(14, 20, 48, 0.88);
  border: 1px solid #4a5c9a;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.retro-star-marker, .retro-dot-marker {
  pointer-events: none;
  font-family: 'Star4000', monospace !important;
}

.scale-blocks {
  display: flex;
  gap: 2px;
}

.scale-blocks span {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 1px solid #000;
}

.scale-text {
  font-size: 13px;
  color: #ffffff;
  text-shadow: 1px 1px #000;
}

.radar-loop-time {
  font-size: 14px;
  color: #ffff00;
  margin-left: 10px;
  text-shadow: 1px 1px #000;
  font-family: 'Star4000', monospace;
}

/* Ticker Band */
.ticker-band {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 76px;
  background: transparent;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0;
}

.ticker-wrapper {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  align-items: center;
  height: 100%;
}

.ticker-text {
  display: inline-block;
  white-space: nowrap;
  font-family: 'Star4000', monospace;
  font-size: 19px;
  line-height: 76px;
  color: #ffffff;
  text-shadow: 1px 1px #000000;
  will-change: transform;
}

/* TV Front Chassis Panel */
.tv-chassis-panel {
  width: 100%;
  background: linear-gradient(180deg, #181b24 0%, #101218 100%);
  border-top: 2px solid #282d3c;
  border-bottom: 4px solid #08090d;
  border-radius: 0 0 10px 10px;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  gap: 12px;
}

.tv-brand-plate {
  display: flex;
  flex-direction: column;
  user-select: none;
}

.tv-brand-plate .brand-name {
  font-family: 'Star4000', monospace;
  font-size: 13px;
  color: #ffcc00;
  letter-spacing: 1.5px;
  text-shadow: 1px 1px 1px #000;
}

.tv-brand-plate .brand-sub {
  font-family: monospace;
  font-size: 9px;
  color: #7b8ab3;
  letter-spacing: 1px;
}

.tv-speaker-slits {
  display: flex;
  gap: 5px;
}

.tv-speaker-slits span {
  display: inline-block;
  width: 24px;
  height: 3px;
  background: #090a0f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.tv-chassis-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tv-led-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.tv-led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #331010;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
  transition: all 0.2s ease;
}

.tv-led-label {
  font-family: monospace;
  font-size: 9px;
  color: #7b8ab3;
  font-weight: bold;
}

.tv-led.active.tv-led-green {
  background: #44ff44;
  box-shadow: 0 0 8px #44ff44, 0 0 16px rgba(68, 255, 68, 0.6);
}

.tv-led.active.tv-led-amber {
  background: #ffaa00;
  box-shadow: 0 0 8px #ffaa00, 0 0 14px rgba(255, 170, 0, 0.6);
}

.btn-chassis-power {
  background: #1e222e;
  border: 1px solid #3c445c;
  color: #ff5555;
  font-family: monospace;
  font-size: 11px;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  transition: all 0.15s ease;
}

.btn-chassis-power:hover {
  background: #2a3040;
  color: #ff7777;
  border-color: #5d698c;
}

.btn-chassis-power:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* TV Standby Screen (When TV is OFF) */
.tv-standby-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #0a0d18 0%, #030408 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 45;
  overflow: hidden;
}

.standby-glass-glare {
  position: absolute;
  top: -40%;
  left: -30%;
  width: 160%;
  height: 80%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 60%);
  transform: rotate(-15deg);
  pointer-events: none;
}

.standby-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  z-index: 2;
  padding: 24px;
}

.standby-ch-badge {
  background: #141b38;
  border: 1px solid #364273;
  color: #64ff64;
  font-family: monospace;
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 4px;
  letter-spacing: 1px;
  box-shadow: 0 0 10px rgba(100, 255, 100, 0.2);
}

.standby-title {
  font-family: 'Star4000', monospace;
  font-size: 28px;
  color: #ffea75;
  letter-spacing: 2px;
  text-shadow: 2px 2px 4px #000, 0 0 12px rgba(255, 234, 117, 0.3);
}

.standby-subtitle {
  font-family: 'Star4000', monospace;
  font-size: 14px;
  color: #9cb2eb;
  letter-spacing: 1.5px;
}

.btn-tv-power-big {
  background: linear-gradient(180deg, #d32f2f 0%, #8b0000 100%);
  border: 2px solid #ff6666;
  color: #ffffff;
  font-family: 'Star4000', monospace;
  font-size: 18px;
  padding: 12px 28px;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 1.5px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8), 0 0 18px rgba(255, 50, 50, 0.5);
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s ease;
  animation: powerBtnPulse 1.4s infinite alternate ease-in-out;
}

.btn-tv-power-big:hover {
  background: linear-gradient(180deg, #e53935 0%, #b71c1c 100%);
  border-color: #ffffff;
  transform: scale(1.04);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.9), 0 0 25px rgba(255, 70, 70, 0.8);
}

.power-sym {
  font-size: 22px;
}

.standby-hint {
  font-family: monospace;
  font-size: 11px;
  color: #6475a3;
  letter-spacing: 0.5px;
  margin-top: 6px;
}

@keyframes powerBtnPulse {
  0% {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 50, 50, 0.3);
    border-color: #ff6666;
  }
  100% {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.95), 0 0 24px rgba(255, 70, 70, 0.9);
    border-color: #ffffff;
  }
}

/* CRT Power On & Off Animations */
.crt-turning-on {
  animation: crtTurnOnAnim 0.45s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes crtTurnOnAnim {
  0% {
    transform: scale(0.96, 0.005);
    filter: brightness(25) contrast(2);
    opacity: 1;
  }
  30% {
    transform: scale(1, 0.008);
    filter: brightness(18);
    opacity: 1;
  }
  60% {
    transform: scale(1, 1);
    filter: brightness(3.5);
    opacity: 1;
  }
  100% {
    transform: scale(1, 1);
    filter: brightness(1);
    opacity: 1;
  }
}

.crt-turning-off {
  animation: crtTurnOffAnim 0.35s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

@keyframes crtTurnOffAnim {
  0% {
    transform: scale(1, 1);
    filter: brightness(2);
  }
  40% {
    transform: scale(1, 0.005);
    filter: brightness(12);
  }
  80% {
    transform: scale(0.005, 0.005);
    filter: brightness(25);
  }
  100% {
    transform: scale(0, 0);
    filter: brightness(0);
    opacity: 0;
  }
}

/* Full Screen Commercial Break Video Slides */
.bg-commercial {
  background-color: #000000;
  background-image: none !important;
}

.slide-commercial {
  background: #000000;
  position: absolute;
  top: -80px;
  left: 0;
  width: 854px;
  height: 480px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 45; /* Covers header and ticker crawl, sits under CRT scanline overlay */
  cursor: pointer;
}

.slide-commercial.active {
  display: flex !important;
}

.slide-commercial video {
  width: 854px;
  height: 480px;
  object-fit: cover;
  background: #000000;
}

.commercial-badge {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(10, 25, 60, 0.88);
  border: 1px solid #ffcc00;
  color: #ffcc00;
  font-family: 'Star4000', monospace;
  font-size: 14px;
  padding: 4px 12px;
  letter-spacing: 1px;
  text-shadow: 1px 1px #000;
  z-index: 48;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.commercial-unmute-overlay {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 49;
}

.btn-unmute {
  background: rgba(200, 25, 25, 0.92);
  color: #ffffff;
  border: 2px solid #ffffff;
  padding: 8px 18px;
  font-family: 'Star4000', monospace;
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 1px;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
  animation: pulseUnmute 1.5s infinite;
}

@keyframes pulseUnmute {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); background: rgba(240, 45, 45, 1); }
  100% { transform: scale(1); }
}

/* Mall PA Intercom Concourse Indicator Overlay */
.mall-pa-banner {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 18, 42, 0.95);
  border: 2px solid #ffcc00;
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.9), 0 0 16px rgba(255, 204, 0, 0.45);
  color: #ffea75;
  padding: 8px 22px;
  border-radius: 4px;
  z-index: 55;
  font-family: 'Star4000', monospace;
  font-size: 14px;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  text-shadow: 1px 1px 2px #000000;
  animation: paBannerPulse 1.4s infinite ease-in-out;
}

.pa-chime-icon {
  font-size: 18px;
  animation: paIconSpin 1.4s infinite ease-in-out;
}

.pa-banner-text {
  font-weight: bold;
}

@keyframes paBannerPulse {
  0%, 100% {
    border-color: #ffcc00;
    box-shadow: 0 4px 22px rgba(0, 0, 0, 0.9), 0 0 16px rgba(255, 204, 0, 0.4);
  }
  50% {
    border-color: #ffffff;
    color: #ffffff;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.95), 0 0 24px rgba(255, 255, 255, 0.7);
  }
}

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

/* Retro Audio Autoplay Unmute Prompt */
.audio-unmute-prompt {
  position: absolute;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 25, 66, 0.96);
  border: 2px solid #ffff00;
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.9), 0 0 16px rgba(255, 255, 0, 0.5);
  color: #ffff40;
  padding: 6px 20px;
  border-radius: 4px;
  z-index: 999;
  font-family: 'Star4000', monospace;
  font-size: 13px;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-shadow: 1px 1px 2px #000000;
  animation: promptPulse 1.2s infinite alternate ease-in-out;
  transition: transform 0.15s ease;
}

.audio-unmute-prompt:hover {
  transform: translateX(-50%) scale(1.04);
}

.unmute-icon {
  font-size: 18px;
  color: #64ff64;
}

@keyframes promptPulse {
  0% {
    border-color: #ffff00;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.85), 0 0 10px rgba(255, 255, 0, 0.4);
  }
  100% {
    border-color: #64ff64;
    color: #64ff64;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.95), 0 0 20px rgba(100, 255, 100, 0.7);
  }
}

.btn-unmute-pulse {
  background: #1b3820 !important;
  border-color: #64ff64 !important;
  color: #64ff64 !important;
  animation: unmuteBtnPulse 1.2s infinite alternate ease-in-out !important;
}

@keyframes unmuteBtnPulse {
  0% {
    box-shadow: 0 0 4px rgba(100, 255, 100, 0.4);
    border-color: #64ff64;
  }
  100% {
    box-shadow: 0 0 14px rgba(100, 255, 100, 0.9);
    border-color: #ffffff;
    color: #ffffff;
  }
}

/* Retro 90s Cable Remote Control */
.retro-remote {
  width: 250px;
  background: linear-gradient(175deg, #1d1e26 0%, #15161d 50%, #0e0f14 100%);
  border: 2px solid #282a38;
  border-radius: 24px 24px 28px 28px;
  box-shadow: 
    0 18px 45px rgba(0, 0, 0, 0.95),
    inset 0 1px 3px rgba(255, 255, 255, 0.15),
    inset 0 -4px 8px rgba(0, 0, 0, 0.8);
  padding: 14px 12px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  user-select: none;
  position: relative;
  flex-shrink: 0;
  box-sizing: border-box;
}

.remote-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-bottom: 3px;
  border-bottom: 1px solid #232633;
}

.remote-ir-blaster {
  width: 34px;
  height: 9px;
  background: #08080a;
  border-radius: 5px;
  border: 1px solid #333644;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remote-ir-led {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #3b0a0a;
  transition: all 0.08s ease;
}

.remote-ir-led.firing {
  background: #ff2222 !important;
  box-shadow: 0 0 8px #ff2222, 0 0 14px #ff5555 !important;
}

.remote-brand {
  font-family: 'Star4000', monospace;
  font-size: 11px;
  color: #ffea75;
  letter-spacing: 1.5px;
  text-shadow: 1px 1px 1px #000;
}

/* Remote Power & Action Row */
.remote-power-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.remote-btn {
  background: linear-gradient(180deg, #2c303f 0%, #1e202b 100%);
  border: 1px solid #454b63;
  border-top-color: #5d6585;
  border-bottom-color: #12131a;
  color: #d1d9f2;
  font-family: monospace;
  font-size: 11px;
  font-weight: bold;
  padding: 6px 3px;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: all 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 1px 1px 1px #000;
}

.remote-btn:hover {
  background: linear-gradient(180deg, #373c4f 0%, #262937 100%);
  border-color: #6a7499;
  color: #ffffff;
}

.remote-btn:active {
  transform: translateY(1.5px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9);
}

.btn-power {
  flex: 1.2;
  background: linear-gradient(180deg, #c62828 0%, #8e0000 100%) !important;
  border-color: #ef5350 !important;
  color: #ffffff !important;
  letter-spacing: 0.5px;
}

.btn-power:hover {
  background: linear-gradient(180deg, #d32f2f 0%, #b71c1c 100%) !important;
  box-shadow: 0 0 10px rgba(255, 50, 50, 0.6) !important;
}

.btn-mute {
  flex: 1;
  background: linear-gradient(180deg, #bf8c00 0%, #7d5b00 100%) !important;
  border-color: #ffcc00 !important;
  color: #ffffdd !important;
}

.btn-page {
  flex: 1;
  background: linear-gradient(180deg, #1e7e34 0%, #115021 100%) !important;
  border-color: #48c767 !important;
  color: #eaffea !important;
}

/* Remote LCD Display Screen */
.remote-lcd {
  background: #112014;
  border: 2px solid #243c29;
  border-radius: 5px;
  padding: 5px 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8), 0 0 6px rgba(40, 160, 60, 0.15);
  font-family: monospace;
  color: #64ff64;
}

.lcd-header {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #4cd44c;
  font-weight: bold;
  border-bottom: 1px dashed rgba(100, 255, 100, 0.3);
  padding-bottom: 2px;
}

.lcd-main {
  font-size: 11px;
  font-weight: bold;
  color: #a3ffa3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lcd-sub {
  font-size: 9px;
  color: #6ee36e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.remote-section-title {
  font-family: monospace;
  font-size: 9px;
  color: #6d7899;
  font-weight: bold;
  letter-spacing: 0.8px;
  text-align: center;
  margin-top: 2px;
  border-top: 1px solid #1f222d;
  padding-top: 3px;
}

/* Slide & Channel D-Pad */
.remote-dpad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.btn-dir-up, .btn-dir-down {
  width: 95px;
  padding: 5px 0;
}

.dpad-mid-row {
  display: flex;
  gap: 4px;
  width: 100%;
  justify-content: center;
}

.btn-dir-left, .btn-dir-right {
  flex: 1;
  font-size: 10px;
  padding: 5px 2px;
}

.btn-dir-center {
  flex: 1.1;
  background: linear-gradient(180deg, #373c4e 0%, #222533 100%) !important;
  border-color: #636b8c !important;
  color: #ffffaa !important;
  font-size: 12px !important;
  padding: 5px 4px;
}

/* Direct Numeric Keypad (1 - 6) */
.remote-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.btn-num {
  font-size: 10px;
  padding: 5px 2px;
  background: linear-gradient(180deg, #222530 0%, #181922 100%);
  color: #8bb2ff;
}

/* Volume & Intercom Mixers */
.remote-sliders {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.remote-slider-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.slider-head {
  display: flex;
  justify-content: space-between;
  font-family: monospace;
  font-size: 10px;
  color: #9cb2eb;
  font-weight: bold;
}

.slider-val {
  color: #ffff40;
}

.remote-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  background: #0d0f14;
  border-radius: 3px;
  outline: none;
  border: 1px solid #282d3d;
  cursor: pointer;
}

.remote-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: #ffcc00;
  border: 1px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.remote-range::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: #ffcc00;
  border: 1px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Location Tuning */
.remote-input-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.remote-label {
  font-family: monospace;
  font-size: 9px;
  color: #8899bb;
  font-weight: bold;
}

.remote-zip-input {
  flex: 1;
  background: #0d0f15;
  border: 1px solid #364273;
  color: #ffcc00;
  padding: 3px 5px;
  font-family: monospace;
  font-size: 11px;
  text-align: center;
  border-radius: 3px;
  outline: none;
}

.remote-zip-input:focus {
  border-color: #ffcc00;
  box-shadow: 0 0 5px rgba(255, 204, 0, 0.4);
}

.btn-enter {
  background: #192a4a;
  border-color: #ffcc00;
  color: #ffcc00;
  padding: 3px 6px;
  font-size: 10px;
}

.remote-zip-status {
  font-family: monospace;
  font-size: 9px;
  color: #64ff64;
  text-align: center;
  min-height: 12px;
}

.remote-select-row {
  width: 100%;
}

.remote-select {
  width: 100%;
  background: #0f121a;
  border: 1px solid #2d385f;
  color: #ffffff;
  font-family: monospace;
  font-size: 10px;
  padding: 3px 5px;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.remote-select:focus {
  border-color: #5a78c8;
}

.remote-pref-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.pref-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* Touch and Mobile Optimization (Preserving 100% desktop fidelity) */
.remote-btn, .btn-chassis-power, .btn-tv-power-big, .remote-range {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 600px) {
  body {
    padding: 6px 0 16px 0;
  }

  .living-room-deck {
    padding: 4px 6px 14px 6px;
    gap: 14px;
    width: 100%;
    max-width: 100%;
  }

  .tv-console {
    border-width: 6px;
    border-radius: 10px 10px 0 0;
    width: 100%;
    max-width: 100%;
  }

  .tv-chassis-panel {
    padding: 6px 8px;
    gap: 6px;
  }

  .tv-speaker-slits {
    display: none;
  }

  .tv-brand-plate .brand-name {
    font-size: 11px;
    letter-spacing: 1px;
  }

  .tv-brand-plate .brand-sub {
    font-size: 8px;
  }

  .btn-chassis-power {
    font-size: 10px;
    padding: 4px 8px;
  }

  .retro-remote {
    width: 100%;
    max-width: 330px;
    padding: 12px 10px 18px 10px;
    border-radius: 20px 20px 24px 24px;
  }

  .remote-btn {
    min-height: 34px;
    font-size: 11px;
  }

  .btn-power, .btn-mute, .btn-page {
    min-height: 38px;
    font-size: 11px;
  }

  .remote-zip-input {
    font-size: 16px; /* Prevents auto-zoom in iOS Safari */
    height: 34px;
  }

  .btn-enter {
    height: 34px;
    padding: 0 10px;
  }

  .remote-select {
    height: 32px;
    font-size: 11px;
  }

  .remote-range {
    height: 8px;
  }

  .remote-range::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
  }

  .remote-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 360px) {
  .retro-remote {
    max-width: 300px;
    padding: 10px 8px 16px 8px;
  }

  .remote-pref-grid {
    gap: 3px;
  }

  .remote-brand {
    font-size: 10px;
  }
}



