/**
 * De Slimste Mens - Main Stylesheet
 * Authentic TV show styling
 */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Roboto:wght@400;500;700&display=swap');

/* CSS Variables */
:root {
    --bg-dark: #1a0000;
    --bg-gradient: linear-gradient(135deg, #4a0000 0%, #2a0000 50%, #1a0000 100%);
    --bg-red: linear-gradient(135deg, #8B0000 0%, #660000 100%);
    --bg-red-solid: #8B0000;
    --bg-orange: linear-gradient(180deg, #cc4400 0%, #aa3300 100%);
    
    --color-gold: #ffcc00;
    --color-orange: #ff6600;
    --color-orange-light: #ff8800;
    --color-red: #cc0000;
    --color-red-light: #ff4444;
    --color-green: #00cc66;
    --color-green-dark: #006600;
    --color-white: #ffffff;
    --color-gray: #888888;
    --color-gray-dark: #444444;
    
    --border-orange: 2px solid #ff6600;
    --border-gold: 3px solid #ffcc00;
    
    --shadow-text: 2px 2px 4px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 20px rgba(255,204,0,0.5);
    --shadow-box: 0 4px 15px rgba(0,0,0,0.3);
    
    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base */
html {
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-gradient);
    color: var(--color-white);
    min-height: 100vh;
    line-height: 1.5;
}

/* Typography */
h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-gold);
    text-shadow: var(--shadow-text);
}

h1 { font-size: 3rem; letter-spacing: 4px; }
h2 { font-size: 2rem; letter-spacing: 3px; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes glow {
    0%, 100% { box-shadow: var(--shadow-glow); }
    50% { box-shadow: 0 0 30px rgba(255,204,0,0.8); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.fade-in { animation: fadeIn 0.5s ease-out; }
.pulse { animation: pulse 1s infinite; }
.glow { animation: glow 2s infinite; }
.shake { animation: shake 0.5s ease-in-out; }

/* Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.container-sm { max-width: 600px; }
.container-md { max-width: 800px; }

/* Cards */
.card {
    background: var(--bg-red);
    border-radius: var(--radius-lg);
    border: var(--border-orange);
    padding: 1.5rem;
    box-shadow: var(--shadow-box);
}

.card-dark {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--color-gray-dark);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--color-gold);
    color: #000;
}

.btn-primary:hover {
    background: #e6b800;
}

.btn-success {
    background: var(--color-green);
    color: #fff;
}

.btn-danger {
    background: var(--color-red);
    color: #fff;
}

.btn-orange {
    background: var(--color-orange);
    color: #fff;
}

.btn-secondary {
    background: var(--color-gray-dark);
    color: #fff;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.2rem;
}

.btn-block {
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-gold);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0,0,0,0.4);
    border: 2px solid var(--color-orange);
    border-radius: var(--radius-md);
    color: var(--color-white);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 10px rgba(255,204,0,0.3);
}

.form-control::placeholder {
    color: var(--color-gray);
}

/* Timer Display */
.timer {
    font-family: var(--font-display);
    font-size: 4rem;
    text-shadow: var(--shadow-text);
}

.timer-active {
    color: var(--color-white);
    animation: glow 2s infinite;
}

.timer-warning {
    color: var(--color-red-light);
    animation: shake 0.5s infinite;
}

.timer-container {
    background: var(--bg-red);
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    border: var(--border-gold);
    display: inline-block;
}

.timer-container.active {
    box-shadow: var(--shadow-glow);
}

/* Scoreboard */
.scoreboard {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.player-score {
    background: rgba(50,25,25,0.5);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    text-align: center;
    min-width: 120px;
}

.player-score.active {
    background: var(--color-gold);
    color: #000;
    border-color: var(--color-gold);
}

.player-score.starter {
    border-color: var(--color-orange);
}

.player-name {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.player-seconds {
    font-family: var(--font-display);
    font-size: 1.8rem;
}

/* Question Display */
.question-box {
    background: var(--bg-red);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: var(--border-orange);
    text-align: center;
    margin-bottom: 1rem;
}

.question-text {
    font-size: 1.5rem;
    color: var(--color-white);
}

.topic-text {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--color-white);
    letter-spacing: 3px;
}

/* Answer Grid */
.answer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.answer-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.answer-item {
    background: var(--bg-orange);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: var(--border-orange);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.answer-item.revealed {
    background: rgba(0,204,102,0.2);
    border-color: var(--color-green);
}

.answer-item.blurred .answer-text {
    filter: blur(6px);
    user-select: none;
}

.answer-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #884400;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    flex-shrink: 0;
}

.answer-item.revealed .answer-number {
    background: var(--color-green);
}

.answer-text {
    flex: 1;
    font-weight: 500;
}

/* Photo Number Display */
.photo-number {
    font-family: var(--font-display);
    font-size: 10rem;
    color: var(--color-white);
    text-shadow: 4px 4px 8px rgba(0,0,0,0.5);
    line-height: 1;
}

/* Progress Indicators */
.progress-dots {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.progress-dot {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    background: rgba(100,50,0,0.5);
    border: 1px solid #884400;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: bold;
}

.progress-dot.current {
    background: var(--color-gold);
    color: #000;
    border: 2px solid #fff;
}

.progress-dot.correct {
    background: var(--color-green);
    color: #fff;
}

.progress-dot.wrong {
    background: var(--color-red);
    color: #fff;
}

.progress-dot.pending {
    background: var(--color-orange);
    color: #fff;
}

/* Round Navigation */
.round-nav {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    flex-wrap: wrap;
    padding: 0.5rem;
    background: rgba(0,0,0,0.3);
}

.round-btn {
    padding: 0.4rem 0.8rem;
    background: transparent;
    border: 1px solid var(--color-orange);
    border-radius: var(--radius-sm);
    color: var(--color-gold);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.round-btn:hover {
    background: rgba(255,102,0,0.2);
}

.round-btn.active {
    background: #000;
    color: var(--color-gold);
    border-color: var(--color-gold);
}

/* Header */
.header {
    background: rgba(80,0,0,1);
    padding: 0.75rem 1rem;
    text-align: center;
    border-bottom: 3px solid var(--color-orange);
}

.header h1 {
    font-size: 2rem;
    margin: 0;
}

/* Status Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-xl);
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-success {
    background: rgba(0,204,102,0.2);
    border: 1px solid var(--color-green);
    color: var(--color-green);
}

.badge-warning {
    background: rgba(255,136,0,0.2);
    border: 1px solid var(--color-orange);
    color: var(--color-orange);
}

.badge-danger {
    background: rgba(255,68,68,0.2);
    border: 1px solid var(--color-red-light);
    color: var(--color-red-light);
}

/* Finale VS Display */
.finale-vs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.finale-player {
    background: rgba(50,25,25,0.5);
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 2px solid #663300;
    min-width: 150px;
    text-align: center;
}

.finale-player.active {
    background: var(--bg-red);
    border-color: var(--color-gold);
    box-shadow: var(--shadow-glow);
}

.finale-vs-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-gold);
}

/* Winner Display */
.winner-display {
    text-align: center;
    padding: 3rem;
}

.winner-name {
    font-family: var(--font-display);
    font-size: 5rem;
    color: var(--color-green);
    text-shadow: var(--shadow-text);
    letter-spacing: 5px;
}

.trophy {
    font-size: 6rem;
    margin-bottom: 1rem;
}

/* Utilities */
.text-center { text-align: center; }
.text-gold { color: var(--color-gold); }
.text-green { color: var(--color-green); }
.text-orange { color: var(--color-orange); }
.text-gray { color: var(--color-gray); }
.text-white { color: var(--color-white); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.flex { display: flex; }
.flex-center { justify-content: center; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

.hidden { display: none !important; }

/* Quizmaster Panel */
.qm-panel {
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--color-gray-dark);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
}

.qm-label {
    font-size: 0.8rem;
    color: var(--color-gray);
    margin-bottom: 0.5rem;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,204,0,0.3);
    border-top-color: var(--color-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    html { font-size: 14px; }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .timer { font-size: 3rem; }
    .photo-number { font-size: 6rem; }
    .winner-name { font-size: 3rem; }
    
    .answer-grid {
        grid-template-columns: 1fr;
    }
    
    .answer-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .finale-vs {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container { padding: 0.5rem; }
    .card { padding: 1rem; }
    
    .btn { padding: 0.5rem 1rem; }
    
    .scoreboard {
        flex-direction: column;
        align-items: center;
    }
    
    .player-score {
        width: 100%;
        max-width: 200px;
    }
}
