/**
 * ═══════════════════════════════════════════════════════════════
 * QUIZ MODERN - CSS Principal
 * ═══════════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════════════════
   CSS VARIABLES (Design System)
   ═══════════════════════════════════════════════════════════════ */

:root {
    /* Colors - Primary */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    
    /* Colors - Accent */
    --accent-purple: #8b5cf6;
    --accent-purple-glow: rgba(139, 92, 246, 0.5);
    --accent-orange: #f97316;
    --accent-orange-glow: rgba(249, 115, 22, 0.5);
    --accent-green: #10b981;
    --accent-red: #ef4444;
    
    /* Colors - Background */
    --bg-dark: #0f172a;
    --bg-dark-lighter: #1e293b;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-glass: rgba(255, 255, 255, 0.1);
    --bg-glass-hover: rgba(255, 255, 255, 0.15);
    
    /* Colors - Text */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 30px var(--accent-purple-glow);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* Z-index */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 500;
    --z-toast: 600;
    --z-loading: 1000;
}

/* ═══════════════════════════════════════════════════════════════
   RESET & BASE STYLES
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 20px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.quiz-body {
    background: var(--gradient-dark);
}

/* ═══════════════════════════════════════════════════════════════
   SCREEN SYSTEM
   ═══════════════════════════════════════════════════════════════ */

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    transition: opacity var(--transition-slow);
    z-index: var(--z-base);
}

.screen.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    z-index: var(--z-sticky);
}

/* Splash screen - centrat complet */
.splash-screen.active {
    align-items: center;
    justify-content: center;
}

/* STILURI PENTRU LOGO IMAGINE PBEA */
.logo-image {
    /* Dimensiunea: inlocuieste font-size: 4rem a vechii iconite */
    width: 270px;  /* Ajustati aceasta valoare dupa preferinta (ex: 80px, 120px) */
    height: auto; 
    display: block;
    
    /* Centrarea: splash-logo este deja centrat, dar asigurați-vă că elementul este bloc */
    margin: 0 auto; 
    
    /* Spațierea: Copiază spațiul de sub vechea iconiță */
    margin-bottom: var(--space-md); /* space-md este 1rem */
    
    /* Animația: O păstrăm dacă doriți să "plutească" */
    animation: float 3s ease-in-out infinite; 
}

/* Dacă doriți ca logo-ul text să fie mai aproape de imagine, ar trebui să eliminați 
   margin-bottom-ul de la .logo-icon, dar cum l-am înlocuit, nu este necesar */

/* Mode screen - centrat complet */
.mode-screen.active {
    align-items: center;
    justify-content: center;
}

/* Selection screens - centrat complet */
.selection-screen.active {
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

/* Quiz screen - aliniat sus pentru scroll */
.quiz-screen.active {
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

/* Countdown screen - centrat complet */
.countdown-screen.active {
    align-items: center;
    justify-content: center;
}

/* Results screen - aliniat sus pentru scroll */
.results-screen.active {
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

/* Container pentru quiz player */
#quizPlayerContainer {
    width: 100%;
    max-width: 900px;
}

.screen.transitioning-out {
    opacity: 0;
    pointer-events: none;
}

#quizPlayerContainer {
    width: 100%;
    max-width: 900px;
}

.screen.transitioning-in {
    display: flex;
    opacity: 0;
}

/* ═══════════════════════════════════════════════════════════════
   LOADING SCREEN
   ═══════════════════════════════════════════════════════════════ */

.loading-screen {
    background: var(--bg-dark);
    justify-content: center;
    align-items: center;
    z-index: var(--z-loading);
}

.loader-container {
    text-align: center;
}

.loader-ring {
    width: 60px;
    height: 60px;
    border: 3px solid var(--bg-glass);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-lg);
}

.loader-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════
   SPLASH SCREEN
   ═══════════════════════════════════════════════════════════════ */

/* SPLASH SCREEN - FIX */
.splash-screen {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
}

.vanta-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
}

.gradient-bg-fallback {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--gradient-primary);
    opacity: 0;
    z-index: 0;
    transition: opacity var(--transition-slow);
}


.gradient-bg-fallback.active {
    opacity: 1;
}

.splash-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: var(--space-xl);
}

.splash-logo {
    margin-bottom: var(--space-2xl);
}

.logo-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: var(--space-md);
    animation: float 3s ease-in-out infinite;
}

.logo-text {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    margin-bottom: var(--space-sm);
}

.logo-badge {
    display: inline-block;
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.splash-subtitle {
    margin-bottom: var(--space-2xl);
}

.typing-text {
    font-size: 1.25rem;
    color: var(--text-secondary);
    min-height: 1.5em;
}

.splash-features {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(20px);
}

.feature-item.visible {
    opacity: 1;
    transform: translateY(0);
    transition: all var(--transition-slow);
}

.feature-icon {
    font-size: 1.25rem;
}

.feature-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Skip Button */
.skip-btn {
    position: absolute;
    bottom: var(--space-xl);
    right: var(--space-xl);
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-base);
    z-index: 10;
}

.skip-btn:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.skip-icon {
    margin-left: var(--space-xs);
}

/* Splash Progress */
.splash-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
}

.progress-bar {
    height: 100%;
    background: var(--primary-500);
    width: 0%;
    transition: width 0.1s linear;
}

/* ═══════════════════════════════════════════════════════════════
   MODE SELECTOR SCREEN
   ═══════════════════════════════════════════════════════════════ */

.mode-screen {
    background: var(--gradient-dark);
    justify-content: center;
    align-items: center;
    padding: var(--space-xl);
}

.mode-container {
    width: 100%;
    max-width: 900px;
}

.mode-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-2xl);
    color: var(--text-primary);
}

.title-icon {
    margin-right: var(--space-sm);
}

.mode-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

/* Mode Card */
.mode-card {
    position: relative;
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-base);
}

.mode-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.2);
}

.mode-card:hover .card-glow {
    opacity: 1;
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.mode-card[data-mode="testeaza"] .card-glow {
    background: radial-gradient(circle at center, var(--accent-orange-glow), transparent 70%);
}

.mode-card[data-mode="invata"] .card-glow {
    background: radial-gradient(circle at center, var(--accent-purple-glow), transparent 70%);
}

.card-content {
    position: relative;
    z-index: 1;
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.mode-card:hover .card-image img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, var(--bg-dark), transparent);
}

.card-info {
    padding: var(--space-lg);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.mode-card[data-mode="testeaza"] .card-title {
    color: var(--accent-orange);
}

.mode-card[data-mode="invata"] .card-title {
    color: var(--accent-purple);
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--space-md);
}

.card-features {
    list-style: none;
}

.card-features li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--space-xs);
}

.card-features li span {
    font-size: 1rem;
}

.card-select-indicator {
    position: absolute;
    bottom: var(--space-md);
    right: var(--space-md);
    background: var(--bg-glass);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition-base);
}

.mode-card:hover .card-select-indicator {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   CONTENT SELECTOR SCREEN
   ═══════════════════════════════════════════════════════════════ */

.content-screen {
    background: var(--gradient-dark);
    justify-content: center;
    align-items: center;
    padding: var(--space-xl);
    overflow-y: auto;
}

.content-container {
    width: 100%;
    max-width: 1200px;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--space-2xl);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.step-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-weight: 600;
    transition: all var(--transition-base);
}

.step.active .step-number {
    background: var(--primary-500);
    border-color: var(--primary-500);
}

.step.completed .step-number {
    background: var(--accent-green);
    border-color: var(--accent-green);
}

.step-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.step.active .step-label,
.step.completed .step-label {
    color: var(--text-secondary);
}

.step-connector {
    width: 60px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 var(--space-sm);
    margin-bottom: var(--space-lg);
}

/* Selection Area */
.selection-area {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1.5fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.selection-column {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    max-height: 400px;
    overflow-y: auto;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.column-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.column-header .column-title {
    margin-bottom: 0;
}

.select-all-btn {
    background: var(--primary-500);
    color: white;
    border: none;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.select-all-btn:hover {
    background: var(--primary-600);
}

/* Selection List & Grid */
.selection-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: var(--space-sm);
}

/* Selection Items */
.selection-item {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.selection-item:hover {
    background: var(--bg-glass-hover);
    border-color: rgba(255, 255, 255, 0.2);
}

.selection-item.selected {
    background: var(--primary-500);
    border-color: var(--primary-500);
    color: white;
}

.selection-item .item-name {
    font-weight: 500;
}

.selection-item .item-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.selection-item.selected .item-count {
    color: rgba(255, 255, 255, 0.8);
}

/* Selection Summary */
.selection-summary {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.summary-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.summary-icon {
    font-size: 1.5rem;
}

.summary-text {
    flex: 1;
    color: var(--text-secondary);
}

.summary-count {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-400);
}

.quiz-options {
    display: flex;
    gap: var(--space-lg);
}

.option-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}

.option-checkbox input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm);
    position: relative;
    transition: all var(--transition-fast);
}

.option-checkbox input:checked + .checkbox-custom {
    background: var(--primary-500);
    border-color: var(--primary-500);
}

.option-checkbox input:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
}

.option-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Content Actions */
.content-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: var(--z-modal);
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--bg-dark-lighter);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-red);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Verse Modal Specific */
.verse-reference {
    color: var(--primary-400);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.verse-text {
    background: var(--bg-glass);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-500);
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-glass);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-glass-hover);
}

/* ═══════════════════════════════════════════════════════════════
   COUNTDOWN SCREEN STYLES
   ═══════════════════════════════════════════════════════════════ */

.countdown-screen {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.countdown-container {
    text-align: center;
}

.countdown-number {
    font-size: 12rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 60px rgba(59, 130, 246, 0.8),
                 0 0 120px rgba(59, 130, 246, 0.4);
    animation: countdownPulse 1s ease-in-out infinite;
    line-height: 1;
}

.countdown-text {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

@keyframes countdownPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.9; }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .countdown-number {
        font-size: 8rem;
    }
    .countdown-text {
        font-size: 1.2rem;
    }
}

/* ═══════════════════════════════════════════════════════════════ */
/* VOICE RECORDING ANIMATION */
/* ═══════════════════════════════════════════════════════════════ */

.voice-btn.recording,
button.recording {
    animation: pulse-recording 1s ease-in-out infinite !important;
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6) !important;
    border-color: #ef4444 !important;
}

@keyframes pulse-recording {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 35px rgba(239, 68, 68, 0.9);
    }
}

/* Mic icon pulse when recording */
.recording .mic-icon {
    animation: mic-pulse 0.6s ease-in-out infinite;
}

@keyframes mic-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* Input opacity for interim results */
#answerInput {
    transition: opacity 0.2s ease;
}

/* Quiz Stats in Header */
.quiz-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-glass);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
}

.stat-item.score-current {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.2));
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.stat-item.score-current .stat-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fbbf24;
}

.stat-item.score-total {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.stat-item.score-total .stat-value {
    font-weight: 600;
    color: #60a5fa;
}

.stat-item.score-loc1 {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.stat-item.score-loc1 .stat-value {
    font-weight: 600;
    color: #a78bfa;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.stat-icon {
    font-size: 1rem;
}

/* Mobile Landscape Optimization */
@media (max-height: 500px) {
    .quiz-header {
        padding: 8px 0;
        margin-bottom: 12px;
    }
    
    .stat-item {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .stat-item.score-current .stat-value {
        font-size: 0.9rem;
    }
    
    .progress-text {
        font-size: 0.75rem;
    }
}

/* Very small screens - stack vertically */
@media (max-width: 500px) {
    .quiz-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .quiz-stats {
        width: 100%;
        justify-content: center;
    }
}