/* Hollywood Slop - Retro CRT Multimedia Trivia Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;700;900&family=VT323&family=Orbitron:wght@600;900&display=swap');

:root {
  --bg-deep: #07070d;
  --tv-cabinet: #2b1810;
  --tv-bezel: #1b120c;
  --tv-gold: #c6923b;
  --team-a: #ff2d55;
  --team-a-glow: rgba(255, 45, 85, 0.45);
  --team-b: #00e5ff;
  --team-b-glow: rgba(0, 229, 255, 0.45);
  --slop-yellow: #ffd700;
  --slop-green: #39ff14;
  --font-display: 'Chakra Petch', 'Impact', sans-serif;
  --font-digital: 'VT323', monospace;
  --font-logo: 'Orbitron', 'Impact', sans-serif;
}

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

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: #f0f0f5;
  font-family: var(--font-display);
}

/* Master Grid Structure strictly following Prompt specifications:
   - Top 12%: Textual Question
   - Middle 53%: Retro TV Shell (74% wide, 13% margins)
   - Bottom 35%: Score Board with Team A (left), Team B (right), Center Logo
*/
#game-viewport {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #141324 0%, #07060d 100%);
  position: relative;
}

/* ========================================================
   1. TOP 12%: FULL WIDTH QUESTION AREA
   ======================================================== */
#question-strip {
  width: 100vw;
  height: 12vh;
  min-height: 75px;
  background: linear-gradient(180deg, #181729 0%, #0f0e1a 100%);
  border-bottom: 3px solid #2d2a45;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: relative;
  z-index: 10;
}

.question-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-pill {
  background: #ff2d55;
  color: #fff;
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 4px;
  box-shadow: 0 0 12px var(--team-a-glow);
  white-space: nowrap;
}

.question-counter {
  font-family: var(--font-digital);
  font-size: 1.4rem;
  color: var(--slop-yellow);
  background: #000;
  padding: 2px 10px;
  border-radius: 4px;
  border: 1px solid #443e1c;
}

.question-text-box {
  flex: 1;
  text-align: center;
  padding: 0 32px;
}

#question-text {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.question-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-btn-pill {
  background: #25233d;
  color: #00e5ff;
  border: 1px solid #00e5ff;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-btn-pill:hover {
  background: #00e5ff;
  color: #000;
  box-shadow: 0 0 15px var(--team-b-glow);
}

/* ========================================================
   2. MIDDLE 53%: RETRO TV & 13% MARGINS
   ======================================================== */
#tv-stage {
  width: 100vw;
  height: 53vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

/* 13% Side Metrics Gutters */
.metric-gutter {
  width: 13vw;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 12px 16px;
  z-index: 5;
}

.gutter-card {
  background: rgba(18, 17, 30, 0.85);
  border: 1px solid #2e2b47;
  border-radius: 6px;
  padding: 10px 12px;
  backdrop-filter: blur(4px);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.gutter-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #8b87a8;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.gutter-value {
  font-family: var(--font-digital);
  font-size: 1.6rem;
  color: #00e5ff;
  line-height: 1;
}

/* Buzz Log in Left Gutter */
.buzz-log-list {
  list-style: none;
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.buzz-log-item {
  display: flex;
  justify-content: space-between;
  padding: 2px 4px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 3px;
  font-family: monospace;
}

.buzz-log-item.team-A { color: var(--team-a); }
.buzz-log-item.team-B { color: var(--team-b); }

/* VU Meter in Right Gutter */
.vu-meter-bar {
  display: flex;
  gap: 3px;
  height: 18px;
  align-items: flex-end;
}

.vu-segment {
  flex: 1;
  height: 100%;
  background: #25233d;
  border-radius: 1px;
  transition: height 0.1s ease;
}

.vu-segment.lit { background: var(--slop-green); box-shadow: 0 0 6px var(--slop-green); }
.vu-segment.warn { background: var(--slop-yellow); }
.vu-segment.hot { background: var(--team-a); }

/* 74% Retro TV Cabinet */
#retro-tv-shell {
  width: 74vw;
  height: 94%;
  background: linear-gradient(135deg, #3d2314 0%, #201108 50%, #150a04 100%);
  border: 8px solid #5a3821;
  border-radius: 28px;
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.9),
    inset 0 4px 10px rgba(255, 255, 255, 0.15),
    inset 0 -8px 20px rgba(0, 0, 0, 0.8);
  display: flex;
  padding: 14px 24px;
  position: relative;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

/* Authentic 4:3 Curved CRT Screen Housing */
.crt-bezel {
  height: 96%;
  aspect-ratio: 4 / 3; /* Strict 4:3 classic television aspect ratio */
  max-width: calc(100% - 110px);
  background: radial-gradient(circle at center, #181920 0%, #08080c 100%);
  border-radius: 52px / 36px; /* Barrel curvature convex geometry */
  border: 14px solid #1a120c;
  outline: 4px solid #3d2314;
  box-shadow: 
    inset 0 0 50px rgba(0, 0, 0, 0.95),
    inset 0 0 20px rgba(0, 0, 0, 0.9),
    0 4px 15px rgba(0, 0, 0, 0.8);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#tv-canvas {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: 38px / 26px;
}

/* Glass Reflection & Convex Curvature Optical Overlay */
.crt-glass-reflection {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 32% 18%, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.05) 35%, rgba(255, 255, 255, 0) 65%),
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.75) 100%);
  pointer-events: none;
  border-radius: 38px / 26px;
  box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.85);
}

/* Answering HUD inside CRT Screen */
#crt-answer-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 7, 18, 0.92);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
  z-index: 20;
}

#crt-answer-hud.active {
  display: flex;
}

.answer-hud-title {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 88%;
}

.option-btn {
  background: #1c1a2e;
  color: #fff;
  border: 2px solid #3c385c;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.option-btn:hover {
  background: #2b2749;
  border-color: #00e5ff;
  box-shadow: 0 0 15px var(--team-b-glow);
  transform: translateY(-2px);
}

.option-btn .letter-badge {
  background: #000;
  color: var(--slop-yellow);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-weight: 900;
}

/* Fill In The Blank HUD */
.fill-blank-box {
  width: 70%;
  display: flex;
  gap: 10px;
}

.fill-blank-input {
  flex: 1;
  background: #000;
  border: 2px solid #00e5ff;
  color: #fff;
  padding: 12px 18px;
  font-size: 1.2rem;
  font-family: var(--font-digital);
  letter-spacing: 2px;
  border-radius: 6px;
  outline: none;
}

.fill-blank-submit {
  background: #00e5ff;
  color: #000;
  font-weight: 900;
  border: none;
  padding: 0 24px;
  border-radius: 6px;
  cursor: pointer;
}

/* TV Controls & Wood Trim on Right of TV Shell */
.tv-control-panel {
  width: 90px;
  height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  padding: 6px;
  background: #1e130c;
  border-radius: 12px;
  border: 2px solid #3f2718;
}

.tv-dial {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle, #555 0%, #1a1a1a 80%);
  border: 4px solid #8c8c8c;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tv-dial-notch {
  width: 4px;
  height: 18px;
  background: #ff2d55;
  border-radius: 2px;
}

.tv-label {
  font-size: 0.65rem;
  font-weight: 900;
  color: #a88d6b;
  letter-spacing: 1px;
}

.tv-speaker-grille {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 60px;
}

.speaker-slit {
  height: 3px;
  background: #0a0604;
  border-radius: 2px;
}

/* ========================================================
   3. BOTTOM 35%: LOWER SCORE BOARD & CENTER LOGO
   ======================================================== */
#scoreboard-tray {
  width: 100vw;
  height: 35vh;
  min-height: 180px;
  background: linear-gradient(180deg, #100f1c 0%, #080710 100%);
  border-top: 4px solid #282442;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  position: relative;
  z-index: 10;
}

/* Team Panels */
.team-panel {
  flex: 1;
  max-width: 32vw;
  height: 90%;
  background: rgba(19, 18, 33, 0.9);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 2px solid #2b2747;
  position: relative;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
  transition: all 0.3s ease;
}

.team-panel.team-a-side {
  border-left: 6px solid var(--team-a);
}

.team-panel.team-b-side {
  border-right: 6px solid var(--team-b);
}

.team-panel.buzzed-in {
  transform: scale(1.02);
  border-color: #ffd700;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
}

.team-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.team-name {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 1px;
}

.team-a-side .team-name { color: var(--team-a); text-shadow: 0 0 10px var(--team-a-glow); }
.team-b-side .team-name { color: var(--team-b); text-shadow: 0 0 10px var(--team-b-glow); }

.team-strikes {
  display: flex;
  gap: 6px;
}

.strike-box {
  width: 24px;
  height: 24px;
  background: #141324;
  border: 2px solid #383457;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.9rem;
  color: #383457;
}

.strike-box.struck {
  background: var(--team-a);
  border-color: #ff2d55;
  color: #fff;
  box-shadow: 0 0 10px var(--team-a-glow);
}

.team-score-readout {
  font-family: var(--font-digital);
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  background: #000;
  padding: 8px 16px;
  border-radius: 8px;
  letter-spacing: 4px;
}

.team-a-side .team-score-readout {
  color: var(--team-a);
  border: 1px solid #4a1320;
  text-shadow: 0 0 15px var(--team-a-glow);
}

.team-b-side .team-score-readout {
  color: var(--team-b);
  border: 1px solid #0f3d4a;
  text-shadow: 0 0 15px var(--team-b-glow);
}

.team-roster {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #a4a0c2;
  overflow-x: auto;
  padding-top: 4px;
}

.roster-chip {
  background: #25223d;
  padding: 3px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

/* ========================================================
   CENTER MASS: LARGE HOLLYWOOD SLOP LOGO & BUZZER
   ======================================================== */
#center-mass-logo-zone {
  width: 28vw;
  height: 95%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 16px;
}

.logo-badge {
  text-align: center;
  position: relative;
  cursor: pointer;
  margin-bottom: 8px;
}

.logo-main-text {
  font-family: var(--font-logo);
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(180deg, #ffffff 0%, #ffd700 45%, #ff2d55 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 45, 85, 0.6));
  line-height: 1;
}

.logo-sub-text {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: #00e5ff;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Huge Arcade Buzz-In Button */
#master-buzz-btn {
  width: 85%;
  height: 64px;
  background: radial-gradient(circle at 50% 20%, #ff5277 0%, #d60029 60%, #800018 100%);
  border: 4px solid #ffa3b5;
  border-radius: 35px;
  box-shadow: 
    0 8px 25px rgba(255, 0, 50, 0.5),
    0 4px 0 #5e0012,
    inset 0 4px 6px rgba(255, 255, 255, 0.5);
  color: #ffffff;
  font-family: var(--font-logo);
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  outline: none;
  transition: all 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#master-buzz-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255, 0, 50, 0.7);
}

#master-buzz-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 10px rgba(255, 0, 50, 0.4);
}

#master-buzz-btn.disabled {
  background: #333142;
  border-color: #55526e;
  box-shadow: none;
  cursor: not-allowed;
  color: #7a7796;
}

.buzzer-hint {
  font-size: 0.7rem;
  color: #797696;
  margin-top: 6px;
  letter-spacing: 1px;
}

/* ========================================================
   MODALS (AUTH, ADMIN, TEAM SELECT)
   ======================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 3, 8, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-overlay.open {
  display: flex;
}

.modal-dialog {
  background: #141224;
  border: 2px solid #3d3961;
  border-radius: 16px;
  width: 90%;
  max-width: 480px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  position: relative;
}

.modal-title {
  font-family: var(--font-logo);
  font-size: 1.4rem;
  color: var(--slop-yellow);
  margin-bottom: 16px;
  text-align: center;
}

.modal-close-x {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 1.5rem;
  color: #8c89ad;
  cursor: pointer;
}

/* Social Buttons */
.social-auth-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.social-btn {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.2s;
}

.social-btn.google-btn {
  background: #ffffff;
  color: #1f1f1f;
}

.social-btn.google-btn:hover {
  background: #f1f1f1;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.social-btn.facebook-btn {
  background: #1877f2;
  color: #ffffff;
}

.social-btn.facebook-btn:hover {
  background: #166fe5;
  box-shadow: 0 0 15px rgba(24, 119, 242, 0.5);
}

.divider-line {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 16px 0;
  color: #635f85;
  font-size: 0.8rem;
}

.divider-line::before, .divider-line::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #2e2b47;
}

.divider-line span {
  padding: 0 12px;
}

/* Forms */
.auth-form-field {
  margin-bottom: 14px;
}

.auth-form-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #a8a4c9;
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  background: #090812;
  border: 1px solid #332f52;
  border-radius: 6px;
  padding: 10px 14px;
  color: #fff;
  font-size: 1rem;
  outline: none;
}

.auth-input:focus {
  border-color: #00e5ff;
}

.submit-auth-btn {
  width: 100%;
  background: #ff2d55;
  color: #fff;
  border: none;
  padding: 12px;
  font-size: 1rem;
  font-weight: 900;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 8px;
}

/* Quick Demo Login Shortcuts */
.quick-login-pills {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.quick-pill {
  flex: 1;
  background: #201d36;
  border: 1px solid #413c6b;
  color: var(--slop-yellow);
  padding: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
}

.quick-pill:hover {
  background: #2f2a52;
  border-color: var(--slop-yellow);
}

/* Admin Modal Layout */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-btn {
  background: #25223d;
  color: #00e5ff;
  border: 1px solid #00e5ff;
  padding: 10px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

.admin-btn:hover {
  background: #00e5ff;
  color: #000;
}
