/* Local Fonts */
@font-face {font-display: swap; font-family: 'Inter'; font-style: normal; font-weight: 400; src: url('/fonts/inter-v20-latin-regular.woff2') format('woff2');}
@font-face {font-display: swap; font-family: 'Inter'; font-style: normal; font-weight: 600; src: url('/fonts/inter-v20-latin-600.woff2') format('woff2');}
@font-face {font-display: swap; font-family: 'Inter'; font-style: normal; font-weight: 700; src: url('/fonts/inter-v20-latin-700.woff2') format('woff2');}
@font-face {font-display: swap; font-family: 'Orbitron'; font-style: normal; font-weight: 400; src: url('/fonts/orbitron-v35-latin-regular.woff2') format('woff2');}
@font-face {font-display: swap; font-family: 'Orbitron'; font-style: normal; font-weight: 600; src: url('/fonts/orbitron-v35-latin-600.woff2') format('woff2');}
@font-face {font-display: swap; font-family: 'Orbitron'; font-style: normal; font-weight: 700; src: url('/fonts/orbitron-v35-latin-700.woff2') format('woff2');}

:root { 
    --menu-width: 200px; 
    --accent-color: #00C9FF; 
    --bg-main: #0f172a; 
    --bg-card: #1e293b; 
    --border-color: #334155; 
    --text-color: #f8fafc; 
    --text-muted: #94a3b8; 
    --gold: #facc15; 
    --red: #ef4444; 
    --green: #10b981; 
    --purple: #a855f7;
    --board-blue: #1e40af;
}

html, body { height: 100%; width: 100%; overflow-x: hidden; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg-main); background-image: radial-gradient(circle at top center, rgba(0, 201, 255, 0.05) 0%, transparent 70%); color: var(--text-color); display: flex; flex-direction: row; -webkit-tap-highlight-color: transparent;}
body.menu-open { overflow: hidden; }
.hidden { display: none !important; }

/* Sidebar Menu */
.left-menu { width: var(--menu-width); min-width: var(--menu-width); height: 100vh; position: fixed; top: 0; left: 0; background: rgba(10, 10, 10, 0.95); box-shadow: 2px 0 15px rgba(0, 0, 0, 0.5); padding: 0 20px; z-index: 1001; font-family: 'Orbitron', sans-serif; display: flex; flex-direction: column; justify-content: center; }
.left-menu ul { list-style: none; padding: 0; margin: 0; } .left-menu li { margin-bottom: 20px; }
.left-menu a { font-size: 24px; font-weight: 600; color: var(--accent-color); text-decoration: none; display: block; padding: 8px 0; transition: all 0.3s ease; text-shadow: 0 0 2px var(--accent-color);}
.left-menu a:hover, .left-menu a:focus { color: #fff; text-shadow: 0 0 8px #fff; transform: translateX(5px); }
.left-menu a.active-page-link { color: #fff; background-color: rgba(0, 190, 255, 0.15); border-radius: 8px; padding-left: 15px; padding-right: 15px; }
.mobile-header, .menu-overlay { display: none; }

/* Main Layout */
.main-content-wrapper { flex-grow: 1; padding: 40px 20px; padding-left: calc(var(--menu-width) + 40px); display: flex; flex-direction: column; align-items: center; min-height: 100vh; box-sizing: border-box; }
.breadcrumbs { width: 100%; max-width: 1000px; margin-bottom: 1.5rem; } 
.breadcrumbs ol { display: flex; list-style: none; padding: 0; margin: 0; font-size: 0.9rem; color: var(--text-muted); font-weight: 600;} 
.breadcrumbs li:not(:last-child)::after { content: '>'; margin: 0 0.75rem; } 
.breadcrumbs a { color: var(--text-muted); text-decoration: none; transition: 0.2s;} 
.breadcrumbs a:hover { color: var(--accent-color); }

.screen-container { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 1000px; animation: fadeIn 0.5s ease; flex-grow: 1;}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* TV Show Typography */
.game-logo { font-family: 'Orbitron', sans-serif; font-size: 3.5rem; color: var(--gold); text-align: center; text-shadow: 0 0 20px rgba(250, 204, 21, 0.4), 0 5px 0 #854d0e; margin-top: 0; margin-bottom: 2rem; letter-spacing: 2px;}

/* Buttons */
.giant-btn { font-family: 'Orbitron', sans-serif; font-size: 2.5rem; font-weight: 700; padding: 1.5rem 4rem; border-radius: 16px; border: none; cursor: pointer; background: linear-gradient(135deg, var(--gold), #ca8a04); color: #000; box-shadow: 0 10px 0 #854d0e, 0 15px 25px rgba(0,0,0,0.5); transition: all 0.2s ease; margin-bottom: 2rem; display: flex; align-items: center; gap: 15px;}
.giant-btn:hover { transform: translateY(5px); box-shadow: 0 5px 0 #854d0e, 0 10px 15px rgba(0,0,0,0.5); }
.giant-btn:active { transform: translateY(10px); box-shadow: 0 0 0 #854d0e; }

.action-btn { font-family: 'Orbitron', sans-serif; font-weight: 700; padding: 1rem 2rem; font-size: 1.2rem; border-radius: 8px; border: none; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 10px; text-transform: uppercase;}
.btn-primary { background: var(--accent-color); color: #000; box-shadow: 0 5px 0 #0284c7;}
.btn-primary:hover { transform: translateY(2px); box-shadow: 0 3px 0 #0284c7;}
.btn-primary:active { transform: translateY(5px); box-shadow: 0 0 0 #0284c7;}

.nav-btn { font-family: 'Inter', sans-serif; font-weight: 700; padding: 10px 20px; border-radius: 8px; border: none; cursor: pointer; transition: 0.2s; font-size: 1rem; display: inline-flex; align-items: center; gap: 8px; color: #fff;}
.nav-btn:hover:not(:disabled) { filter: brightness(1.2); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.3);}
.nav-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background: var(--border-color); }
.btn-wood { background: #d97706; }
.btn-gold { background: var(--gold); color: #000; }
.btn-purple { background: var(--purple); }
.btn-green { background: var(--green); color: #000; }
.btn-red { background: var(--red); }
.btn-print { background: #cbd5e1; color: #0f172a; margin-bottom: 20px;}

.w-100 { width: 100%; } .mt-3 { margin-top: 1.5rem; } .flex-center { justify-content: center; }
.text-gold { color: var(--gold); }

/* Instructions & Setup */
.instructions-container { background-color: var(--bg-card); border-radius: 1rem; padding: 2.5rem; box-shadow: 0 15px 35px rgba(0,0,0,0.5); border: 1px solid var(--border-color); width: 100%; max-width: 800px; box-sizing: border-box; text-align: left; line-height: 1.7; }
.instructions-container h2 { font-family: 'Orbitron', sans-serif; font-size: 1.8rem; color: var(--accent-color); margin-top: 0; margin-bottom: 1rem; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
.instructions-container h3 { font-family: 'Orbitron', sans-serif; color: var(--gold); margin-top: 1.5rem; font-size: 1.2rem;}
.instructions-container ul { padding-left: 20px; color: var(--text-muted);}
.instructions-container li { margin-bottom: 8px; }
.instructions-container strong { color: #fff; }

.setup-card { background-color: var(--bg-card); border-radius: 1rem; padding: 2.5rem; box-shadow: 0 15px 35px rgba(0,0,0,0.5); border: 1px solid var(--border-color); width: 100%; max-width: 600px; text-align: center; }
.setup-card h2 { font-family: 'Orbitron', sans-serif; font-size: 2rem; color: var(--accent-color); margin: 0 0 2rem 0; }
.team-inputs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }
.team-input-group { display: flex; flex-direction: column; text-align: left; }
.team-input-group label { font-family: 'Orbitron', sans-serif; font-size: 0.85rem; color: var(--gold); margin-bottom: 0.5rem; text-transform: uppercase;}
.app-input { background-color: var(--bg-main); color: var(--text-color); border: 2px solid var(--border-color); border-radius: 8px; padding: 1rem; font-size: 1.2rem; font-weight: 600; width: 100%; box-sizing: border-box; outline: none; transition: 0.2s; font-family: 'Inter', sans-serif;}
.app-input:focus { border-color: var(--accent-color); }

/* Scoreboard */
.scoreboard { display: flex; justify-content: space-between; gap: 15px; width: 100%; margin-bottom: 2rem; }
.team-score { flex: 1; background-color: var(--bg-card); padding: 1rem; border-radius: 12px; text-align: center; border: 2px solid var(--border-color); transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: inset 0 0 20px rgba(0,0,0,0.5);}
.team-score h3 { font-family: 'Orbitron', sans-serif; margin: 0 0 10px 0; font-size: 1.2rem; color: var(--text-muted); text-transform: uppercase;}
.score-display { font-family: 'Orbitron', sans-serif; font-size: 3rem; font-weight: 700; color: #fff; margin-bottom: 10px; text-shadow: 0 0 15px rgba(255,255,255,0.3);}
.score-controls { display: flex; justify-content: center; gap: 10px; }
.adj-btn { background: var(--bg-main); color: var(--text-muted); border: 1px solid var(--border-color); width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s;}
.adj-btn:hover { background: var(--accent-color); color: #000; border-color: var(--accent-color);}

/* Active / Winner States */
.team-score.active-team { border-color: var(--gold); box-shadow: 0 0 20px rgba(250, 204, 21, 0.3), inset 0 0 20px rgba(250,204,21,0.1); transform: scale(1.05); z-index: 5;}
.team-score.active-team h3 { color: var(--gold); }
.team-score.active-team .score-display { color: var(--gold); text-shadow: 0 0 15px var(--gold);}
.team-score.eliminated { filter: grayscale(1); opacity: 0.3; }
.team-score.winner { background: linear-gradient(135deg, var(--gold), #ca8a04); border-color: #fff; box-shadow: 0 0 30px rgba(250, 204, 21, 0.6); transform: scale(1.1); z-index: 10;}
.team-score.winner h3, .team-score.winner .score-display { color: #000; text-shadow: none;}
.team-score.winner .adj-btn { display: none;}

/* Game Board (The Show) */
.game-board-container { width: 100%; max-width: 900px; display: flex; flex-direction: column; gap: 20px;}
.question-page { display: none; width: 100%; animation: fadeIn 0.4s ease;}
.question-page.active { display: block; }

.question-card { background: var(--board-blue); border-radius: 12px; padding: 2rem; text-align: center; border: 4px solid #fff; box-shadow: 0 10px 25px rgba(0,0,0,0.6), inset 0 0 30px rgba(0,0,0,0.8); margin-bottom: 20px;}
.question-card h3 { font-family: 'Inter', sans-serif; font-size: 1rem; color: #93c5fd; text-transform: uppercase; letter-spacing: 2px; margin: 0 0 10px 0; font-weight: 700;}
.question-card h2 { font-family: 'Orbitron', sans-serif; font-size: 2rem; color: #fff; margin: 0; line-height: 1.3; text-shadow: 0 2px 5px rgba(0,0,0,0.8);}

/* 3D Mechanical Answer Board */
.answer-board { display: grid; gap: 15px; }
.grid-2-cols { grid-template-columns: 1fr 1fr; }
.grid-1-col { grid-template-columns: 1fr; max-width: 600px; margin: 0 auto;}

.answer-card { background-color: transparent; height: 70px; perspective: 1000px; cursor: pointer; border-radius: 8px;}
.game-board-container.locked .answer-card:not(.answered) { cursor: not-allowed; opacity: 0.5; }

.answer-card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1); transform-style: preserve-3d; border-radius: 8px; box-shadow: 0 8px 15px rgba(0,0,0,0.5);}
.answer-card.answered .answer-card-inner { transform: rotateX(180deg); }

/* The Suspense Flash */
.answer-card.suspense .answer-card-front { animation: flashYellow 1.5s ease-in-out forwards; }
@keyframes flashYellow { 0%, 100% { background: linear-gradient(to bottom, #1e40af, #1e3a8a); } 20%, 80% { background: linear-gradient(to bottom, #eab308, #ca8a04); border-color: #fff; box-shadow: 0 0 20px #eab308; } }

.answer-card-front, .answer-card-back { position: absolute; width: 100%; height: 100%; -webkit-backface-visibility: hidden; backface-visibility: hidden; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; border-radius: 8px; box-sizing: border-box; border: 2px solid #fff;}
.answer-card-front { background: linear-gradient(to bottom, #1e40af, #1e3a8a); }
.answer-card-front .number-badge { background: #fff; color: #1e3a8a; font-family: 'Orbitron', sans-serif; font-size: 1.5rem; font-weight: 700; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto;}

.answer-card-back { background: linear-gradient(to bottom, var(--accent-color), #0284c7); color: #000; transform: rotateX(180deg); }
.answer-card-back .answer-text { font-family: 'Inter', sans-serif; font-size: 1.3rem; font-weight: 700; text-transform: uppercase;}
.answer-card-back .points { font-family: 'Orbitron', sans-serif; font-size: 1.8rem; font-weight: 700; background: #000; color: #fff; padding: 5px 15px; border-radius: 6px; box-shadow: inset 0 0 10px rgba(255,255,255,0.2);}

/* Strike Buttons */
.strikes-container { display: flex; justify-content: center; gap: 20px; margin: 30px 0; }
.strike-btn { font-family: 'Inter', sans-serif; font-size: 3.5rem; font-weight: 900; width: 90px; height: 90px; border-radius: 12px; display: flex; justify-content: center; align-items: center; cursor: pointer; background: var(--bg-card); color: var(--border-color); border: 2px solid var(--border-color); transition: all 0.2s ease; user-select: none;}
.game-board-container.locked .strike-btn:not(.active) { opacity: 0.3; cursor: not-allowed; }
.strike-btn.active { background: var(--red); color: #fff; border-color: #fff; box-shadow: 0 0 30px rgba(239, 68, 68, 0.8); transform: scale(1.1); }

/* Host Soundboard */
.host-soundboard { background: rgba(0,0,0,0.3); padding: 15px; border-radius: 12px; margin-bottom: 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; border: 1px solid var(--border-color);}
.host-soundboard h4 { margin: 0; font-family: 'Orbitron', sans-serif; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px;}
.sound-btn-group { display: flex; gap: 15px; }
.sound-btn { background: var(--bg-card); border: 1px solid var(--border-color); color: var(--accent-color); width: 50px; height: 50px; border-radius: 50%; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; box-shadow: 0 4px 10px rgba(0,0,0,0.3);}
.sound-btn:hover { background: var(--accent-color); color: #000; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0,201,255,0.4);}
.sound-btn:active { transform: translateY(2px); }

/* Navigation Bar */
.navigation-bar { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border-color); width: 100%;}
.round-badge { background: var(--bg-card); color: var(--text-muted); font-family: 'Orbitron', sans-serif; font-weight: 700; padding: 10px 20px; border-radius: 8px; border: 1px solid var(--border-color); display: flex; align-items: center;}

/* Giant Strike Overlay (TV Effect) */
.strike-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 9999; display: flex; justify-content: center; align-items: center; pointer-events: none; }
.strike-overlay i { font-size: 35rem; color: var(--red); filter: drop-shadow(0 0 50px rgba(239,68,68,0.8)); opacity: 0; transform: scale(0.5); transition: 0.1s;}
.strike-overlay.flash i { animation: strikeFlash 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
@keyframes strikeFlash { 0% { opacity: 0; transform: scale(0.5); } 20% { opacity: 1; transform: scale(1); } 80% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.5); } }

/* Modals */
.modal { position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(5px); display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: 0.3s ease; }
.modal.visible { opacity: 1; pointer-events: auto; }
.modal-content { background: var(--bg-card); border-radius: 1rem; padding: 2.5rem; width: 90%; max-width: 500px; box-shadow: 0 15px 35px rgba(0,0,0,0.6); text-align: center; border: 1px solid var(--border-color); transform: scale(0.9); transition: 0.3s;}
.modal.visible .modal-content { transform: scale(1); }
.modal-title { font-family: 'Orbitron', sans-serif; font-size: 2rem; margin: 0 0 10px; color: #fff; }
.modal-desc { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 25px; line-height: 1.5;}
.finalist-select-group { display: flex; flex-direction: column; text-align: left; gap: 8px;}
.finalist-select-group label { font-weight: 700; color: var(--text-muted); text-transform: uppercase; font-size: 0.85rem;}
.custom-select { background: var(--bg-main); color: #fff; border: 2px solid var(--border-color); padding: 1rem; border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 1.1rem; outline: none; cursor: pointer; font-weight: 600; width: 100%; box-sizing: border-box;}

/* Win Screen */
.win-title { font-family: 'Orbitron', sans-serif; font-size: 4rem; color: #fff; text-shadow: 0 0 30px var(--gold); margin-bottom: 2rem; animation: glow 2s infinite alternate;}
@keyframes glow { from { opacity: 0.8; transform: scale(0.95);} to { opacity: 1; transform: scale(1.05);} }
.confetti-canvas { position: absolute; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: -1;}

/* Mobile Scaling */
@media (max-width: 900px) {
    :root { --menu-width: 250px; }
    body { flex-direction: column; padding: 0; } body.menu-open { overflow: hidden; }
    .mobile-header { display: flex; align-items: center; justify-content: space-between; padding: 0 20px; height: 60px; background: rgba(15, 23, 42, 0.95); border-bottom: 1px solid var(--border-color); position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; }
    .hamburger-btn { background: none; border: none; padding: 10px; cursor: pointer; color: #fff; font-size: 1.5rem; margin-left: -10px;}
    .mobile-title { font-family: 'Orbitron', sans-serif; font-size: 1.3rem; color: #fff; font-weight: 700; }
    .left-menu { transform: translateX(-100%); transition: 0.3s; width: var(--menu-width); min-width: var(--menu-width); } .left-menu.menu-open { transform: translateX(0); }
    .menu-overlay { display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000; opacity: 0; pointer-events: none; transition: 0.3s; } .menu-overlay.menu-open { opacity: 1; pointer-events: auto; }
    
    .main-content-wrapper { padding: 80px 10px 20px; margin-left: 0; }
    .giant-btn { font-size: 1.8rem; padding: 1.2rem 2rem; width: 100%; justify-content: center;}
    .instructions-container { padding: 1.5rem; }
    .setup-card { padding: 1.5rem; }
    .team-inputs-grid { grid-template-columns: 1fr; gap: 1rem; }
    
    .game-logo { font-size: 2.2rem; }
    .scoreboard { gap: 10px; padding: 10px; flex-wrap: wrap;}
    .team-score { min-width: 40%; padding: 10px;}
    .team-score h3 { font-size: 1rem; }
    .score-display { font-size: 2rem; }
    .adj-btn { width: 30px; height: 30px; }
    
    .question-card { padding: 1.5rem 1rem; }
    .question-card h2 { font-size: 1.3rem; }
    .answer-card { height: 60px; }
    .answer-card-front, .answer-card-back { padding: 0 15px; }
    .answer-card-back .answer-text { font-size: 1rem; }
    .answer-card-back .points { font-size: 1.3rem; padding: 3px 10px; }
    
    .strike-btn { width: 60px; height: 60px; font-size: 2.5rem; }
    .strike-overlay i { font-size: 20rem; }
    
    .win-title { font-size: 2.5rem; }
}