/* host-chrome: header, timer, ticker, fx, studio, modals */
/* ==========================================================================
   FAKE NEWS - TV Game Show Broadcast Big Screen Styles
   High-Production Studio Stage, Spotlights, Holographic Host, 3D Cards, Podiums
   ========================================================================== */

/* STUDIO LIGHTING FX */
.studio-spotlight-left,
.studio-spotlight-right {
  position: fixed;
  top: -150px;
  width: 450px;
  height: 900px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.16;
  transform-origin: top center;
}

@media (prefers-reduced-motion: reduce) {
  .studio-spotlight-left,
  .studio-spotlight-right {
    animation: none;
  }
}

.studio-spotlight-left {
  left: 5%;
  background: radial-gradient(ellipse at top, rgba(0, 242, 254, 0.8), transparent 70%);
  animation: spotlightSwayLeft 20s ease-in-out infinite alternate;
}

.studio-spotlight-right {
  right: 5%;
  background: radial-gradient(ellipse at top, rgba(255, 0, 127, 0.8), transparent 70%);
  animation: spotlightSwayRight 24s ease-in-out infinite alternate;
}

@keyframes spotlightSwayLeft {
  0% { transform: rotate(-20deg) scaleY(1); }
  100% { transform: rotate(-6deg) scaleY(1.08); }
}

@keyframes spotlightSwayRight {
  0% { transform: rotate(20deg) scaleY(1); }
  100% { transform: rotate(6deg) scaleY(1.08); }
}

/* SMOOTH AMBIENT IMPACT FOR REVEALS */
.screen-shake {
  animation: smoothImpact 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes smoothImpact {
  0% { transform: scale(1.012); }
  100% { transform: scale(1); }
}

/* HOST HEADER */
.host-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  min-height: 52px;
  background: rgba(14, 18, 34, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1.5px solid var(--border-neon);
  border-radius: 16px;
  margin-bottom: 12px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.65), 0 0 30px rgba(0, 242, 254, 0.12);
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  gap: 16px;
}

.header-actions {
  position: relative;
  z-index: 30;
}

.tv-menu {
  position: relative;
}

.tv-menu-toggle {
  min-width: 44px;
  padding: 8px 12px;
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 900;
}

.tv-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: rgba(10, 14, 28, 0.96);
  border: 1.5px solid rgba(0, 242, 254, 0.4);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75);
}

.tv-menu-panel[hidden] {
  display: none !important;
}

.tv-menu-item {
  appearance: none;
  border: none;
  background: transparent;
  color: #fff;
  text-align: left;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.tv-menu-item:hover,
.tv-menu-item:focus {
  background: rgba(0, 242, 254, 0.16);
}

.tv-menu-account {
  padding: 10px 12px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 4px;
}

.tv-menu-host-name {
  font-weight: 900;
  font-size: 1.05rem;
  color: #fff;
  line-height: 1.2;
}

.tv-menu-credits {
  margin-top: 4px;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--accent-yellow);
}

.tv-menu-item[hidden] {
  display: none !important;
}

.tv-menu-exit {
  color: #ff8080;
}

.zero-credits-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(255, 189, 0, 0.18), rgba(255, 0, 127, 0.12));
  border: 1.5px solid rgba(255, 189, 0, 0.55);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.zero-credits-banner[hidden] {
  display: none !important;
}

.zero-credits-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.zero-credits-copy strong {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--accent-yellow);
}

.zero-credits-copy span {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.zero-credits-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.zero-credits-link {
  font-weight: 800;
  color: var(--accent-cyan);
  text-decoration: underline;
}

.host-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.host-brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.host-title-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.host-header .logo-sub {
  display: none;
}

/* Grok Mascot & Live Voice Visualizer */
.host-mascot-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.4);
  border-radius: var(--radius-full);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.2);
}

.host-mascot-avatar {
  font-size: 1.8rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px var(--accent-cyan));
  animation: floatAnim 4s ease-in-out infinite;
}

.spectrum-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
  width: 34px;
}

.spectrum-bar {
  width: 3px;
  height: 16px;
  background: linear-gradient(to top, var(--accent-cyan), var(--accent-magenta));
  border-radius: 2px;
  transform-origin: bottom;
  animation: spectrumIdle 1.2s ease-in-out infinite;
}
.spectrum-bar:nth-child(2) { animation-delay: 0.1s; }
.spectrum-bar:nth-child(3) { animation-delay: 0.2s; }
.spectrum-bar:nth-child(4) { animation-delay: 0.15s; }
.spectrum-bar:nth-child(5) { animation-delay: 0.25s; }
.spectrum-bar:nth-child(6) { animation-delay: 0.05s; }
.spectrum-bar:nth-child(7) { animation-delay: 0.3s; }
@keyframes spectrumIdle {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

.game-logo {
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
}

.logo-sub {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-magenta);
  letter-spacing: 0.16em;
  margin-top: 2px;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.round-pill {
  padding: 7px 20px;
  background: linear-gradient(135deg, rgba(255, 0, 127, 0.18), rgba(0, 242, 254, 0.18));
  border: 1.5px solid var(--border-neon);
  border-radius: var(--radius-full);
  font-weight: 900;
  font-size: 0.95rem;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 0 18px rgba(0, 242, 254, 0.2);
  white-space: nowrap;
}

.header-pill-select {
  padding: 7px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  color: #fff;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.header-pill-select:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-chip {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 800;
  background: rgba(255, 189, 0, 0.12);
  border: 1px solid rgba(255, 189, 0, 0.4);
  color: #ffd000;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.header-chip-btn {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.header-chip-btn:hover {
  transform: translateY(-2px);
}

.header-chip-btn.btn-exit {
  border-color: rgba(255, 100, 100, 0.35);
  color: #ff8080;
}

/* Big Timer Dial */
.timer-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 54px;
  height: 54px;
}

.stage-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 168px;
  height: 168px;
  margin: 8px auto 0;
  flex-shrink: 0;
}

.stage-timer[hidden] {
  display: none !important;
}

.stage-timer-svg {
  transform: rotate(-90deg);
  width: 168px;
  height: 168px;
}

.stage-timer .timer-circle-bg {
  stroke-width: 8;
}

.stage-timer .timer-circle-progress {
  stroke-width: 8;
  stroke-dasharray: 364.4;
}

.stage-timer-seconds {
  position: absolute;
  font-family: var(--font-heading);
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1;
  color: #fff;
}

.host-stage-tools {
  position: absolute;
  right: 24px;
  bottom: calc(var(--ticker-h, 48px) + 18px);
  z-index: 40;
}

.host-stage-tools[hidden] {
  display: none !important;
}

.beta-only[hidden] {
  display: none !important;
}

.timer-svg {
  transform: rotate(-90deg);
  width: 54px;
  height: 54px;
}

.timer-circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 5;
}

.timer-circle-progress {
  fill: none;
  stroke: var(--accent-cyan);
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.9s linear, stroke 0.3s ease;
}

.timer-circle-progress.urgent {
  stroke: var(--accent-magenta);
  animation: urgentPulse 1.2s ease-in-out infinite;
}

.timer-number {
  position: absolute;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 900;
}

/* In-game shell: one viewport above the ticker */
#app-container.container {
  position: relative;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  padding: 12px 20px calc(var(--ticker-h) + 10px);
  box-sizing: border-box;
  overflow: auto;
}

/* TV BROADCAST LOWER THIRD NEWS TICKER */
.broadcast-lower-third {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: rgba(10, 13, 24, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 2px solid var(--accent-magenta);
  display: flex;
  align-items: center;
  z-index: 100;
  box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.8);
}

.ticker-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  height: 100%;
  background: linear-gradient(90deg, #ff0055, var(--accent-magenta));
  color: #ffffff;
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.ticker-track {
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
  position: relative;
}

.ticker-content {
  display: inline-block;
  white-space: nowrap;
  animation: tickerSlide 32s linear infinite;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

@keyframes tickerSlide {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* FLOATING LIVE EMOTE PARTICLES */
.floating-emote {
  position: fixed;
  bottom: 60px;
  font-size: 3.2rem;
  pointer-events: none;
  z-index: 200;
  animation: floatEmoteUp 2.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes floatEmoteUp {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5) rotate(0deg);
  }
  15% {
    opacity: 1;
    transform: translateY(-40px) scale(1.3) rotate(-8deg);
  }
  80% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translateY(-500px) scale(1) rotate(15deg);
  }
}

/* FULLSCREEN FX CANVAS */
#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 150;
}

/* FULLSCREEN ASSET & AUDIO PRELOADER */
.preloader-overlay {
  position: fixed;
  inset: 0;
  background: #080a14;
  background-image: 
    radial-gradient(circle at 50% 40%, rgba(0, 242, 254, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 50% 60%, rgba(255, 0, 127, 0.12) 0%, transparent 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.preloader-overlay.loaded {
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
}

.preloader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 44px;
  max-width: 520px;
  width: 90%;
  border: 1.5px solid var(--border-neon);
  box-shadow: 0 0 50px rgba(0, 242, 254, 0.25);
  animation: breatheGlow 6s ease-in-out infinite;
}

.preloader-mascot {
  font-size: 3.8rem;
  line-height: 1;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 16px var(--accent-cyan));
  animation: floatAnim 4s ease-in-out infinite;
}

.preloader-progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.preloader-progress-fill {
  height: 100%;
  width: 10%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-magenta));
  border-radius: var(--radius-full);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.6);
  transition: width 0.35s ease;
}

.preloader-status-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  min-height: 24px;
}

/* TV STUDIO LIGHTING & APPLAUSE */
.studio-on-air-bug {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(255, 0, 80, 0.2);
  border: 1px solid rgba(255, 0, 80, 0.6);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 900;
  color: #ff3366;
  letter-spacing: 0.06em;
  animation: pulseOnAir 2s infinite;
}

.studio-applause-sign {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 28px;
  background: rgba(255, 189, 0, 0.95);
  color: #000;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  border-radius: var(--radius-full);
  box-shadow: 0 0 40px rgba(255, 189, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.studio-applause-sign.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  animation: flashApplause 0.6s infinite alternate;
}

@keyframes flashApplause {
  0% { filter: brightness(1) drop-shadow(0 0 15px rgba(255, 189, 0, 0.6)); }
  100% { filter: brightness(1.3) drop-shadow(0 0 35px rgba(255, 230, 0, 0.9)); }
}

@keyframes pulseOnAir {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(0.97); }
}

/* AMBIENT STUDIO STAGE BACKDROP */
.studio-ambient-backdrop {
  position: fixed;
  inset: 0;
  background: url('/img/tv-stage-hero.jpg') center center / cover no-repeat;
  opacity: 0.14;
  pointer-events: none;
  z-index: 0;
  filter: saturate(1.4) blur(4px);
}

/* ==========================================================================
   MODAL DIALOGS - PERFECT VIEWPORT CENTERING
   ========================================================================== */
.modal-backdrop {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(5, 7, 18, 0.88) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  z-index: 99999 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
}

.modal-backdrop.active,
.modal-backdrop.open {
  display: flex !important;
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-card {
  max-width: 480px !important;
  width: 100% !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  margin: auto !important;
  padding: 36px 32px !important;
  text-align: center !important;
  position: relative !important;
  z-index: 1 !important;
  border-radius: var(--radius-lg) !important;
  border: 1.5px solid var(--border-neon) !important;
  background: rgba(18, 24, 42, 0.94) !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 45px rgba(0, 242, 254, 0.3) !important;
  animation: modalPopCenter 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes modalPopCenter {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.finale-banner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #ffbd00, #ff007f);
  box-shadow: 0 0 22px rgba(255, 189, 0, 0.35);
}

.celebration-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  flex: 1;
  min-height: 0;
  gap: 18px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  overflow: auto;
  text-align: center;
  padding-bottom: 8px;
}

.celebration-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.celebration-kicker {
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-yellow);
}

.celebration-avatar {
  font-size: 6.5rem;
  line-height: 1;
  filter: drop-shadow(0 8px 24px rgba(255, 189, 0, 0.45));
}

.celebration-name {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 900;
  margin: 0;
  line-height: 1.05;
}

.celebration-score {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--accent-yellow);
}

.celebration-recap {
  margin: 4px 0 0;
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 720px;
}

.greatest-hits {
  width: 100%;
}

.greatest-hits-title {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin: 0 0 10px;
}

.greatest-hits-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.hit-card {
  background: rgba(14, 18, 36, 0.82);
  border: 1.5px solid rgba(255, 0, 127, 0.28);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  text-align: left;
}

.hit-author {
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.hit-lie {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

.hit-fools {
  margin-top: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-yellow);
}

.celebration-again {
  margin-top: 8px;
  font-size: 1.15rem;
  padding: 14px 36px;
}
