/* Game mode styles */

.game-container {
    max-width: 700px;
    margin: 0 auto;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.game-timer {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: var(--primary);
}

.game-timer.warning {
    color: var(--warning);
}

.game-timer.danger {
    color: var(--error);
    animation: pulse 0.5s ease-in-out infinite alternate;
}

.game-score {
    text-align: center;
}

.game-score-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.game-score-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.game-streak {
    text-align: center;
}

.game-streak-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.game-streak-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Streak animation */
.streak-fire {
    animation: streakPop 0.3s ease;
}

@keyframes streakPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Correct/incorrect flash */
.game-flash-correct {
    animation: flashGreen 0.5s ease;
}

.game-flash-incorrect {
    animation: flashRed 0.5s ease;
}

@keyframes flashGreen {
    0% { background-color: transparent; }
    30% { background-color: rgba(34, 197, 94, 0.15); }
    100% { background-color: transparent; }
}

@keyframes flashRed {
    0% { background-color: transparent; }
    30% { background-color: rgba(239, 68, 68, 0.15); }
    100% { background-color: transparent; }
}

/* Game results */
.game-results {
    text-align: center;
    padding: 2rem;
}

.game-results h2 {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.result-stat {
    background: var(--base-200);
    padding: 1rem;
    border-radius: 0.75rem;
}

.result-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.result-stat-label {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Game start screen */
.game-start {
    text-align: center;
    padding: 3rem 2rem;
    max-width: 500px;
    margin: 2rem auto;
}

.game-start h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.game-start p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.time-options {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.time-option {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--base-300);
    border-radius: 0.75rem;
    background: white;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--neutral);
}

.time-option:hover,
.time-option.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

/* Badge earned animation */
.badge-earned {
    animation: badgePop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #f59e0b;
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
    margin-top: 1rem;
}

@keyframes badgePop {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
    from { opacity: 1; }
    to { opacity: 0.5; }
}

/* Code blocks in game cards */
#game-card-area .card-content code {
    background: rgba(255,255,255,0.2) !important;
    color: white !important;
    padding: 0.15rem 0.4rem;
    border-radius: 0.3rem;
    font-size: 0.9em;
}
#game-card-area .card-content pre {
    background: rgba(255,255,255,0.15) !important;
    color: white !important;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    overflow-x: auto;
    text-align: left;
    width: 100%;
}
#game-card-area .card-content pre code {
    background: transparent !important;
    padding: 0;
}

/* MCQ option buttons */
.game-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
}

.game-option {
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 0.5rem;
    background: rgba(255,255,255,0.1);
    color: white;
    cursor: pointer;
    font-size: 1rem;
    text-align: left;
    transition: all 0.15s;
}

.game-option:hover {
    background: rgba(255,255,255,0.25);
    border-color: white;
}

/* Question report */
.report-card { background: white; border-radius: 0.75rem; padding: 1rem 1.25rem; }
.report-card h3 { font-size: 1rem; margin-bottom: 0.75rem; color: #374151; }
.report-card table { width: 100%; }
.report-card td { padding: 0.4rem 0.5rem; border-bottom: 1px solid #f3f4f6; font-size: 0.9rem; }
.report-correct { display: inline-block; width: 1.4rem; height: 1.4rem; line-height: 1.4rem; text-align: center; border-radius: 50%; background: #dcfce7; color: #16a34a; font-weight: 700; font-size: 0.75rem; }
.report-incorrect { display: inline-block; width: 1.4rem; height: 1.4rem; line-height: 1.4rem; text-align: center; border-radius: 50%; background: #fef2f2; color: #dc2626; font-weight: 700; font-size: 0.75rem; }

/* Mobile */
@media (max-width: 768px) {
    .game-header {
        flex-direction: row;
        padding: 0.75rem 1rem;
    }

    .game-timer {
        font-size: 1.5rem;
    }

    .results-stats {
        grid-template-columns: 1fr;
    }

    .time-options {
        flex-direction: column;
        align-items: center;
    }
}
