/* ==========================================================================
   OOREDOO 5G VILLAGE QUIZ - STYLESHEET
   Design System: Premium Glassmorphism, Dynamic 5G Crimson Accents
   ========================================================================== */

:root {
    --ooredoo-red: #ED1C24;
    --ooredoo-dark-red: #B70E15;
    --ooredoo-light-red: #FF4A52;
    --ooredoo-glow: rgba(237, 28, 36, 0.4);
    --ooredoo-glow-subtle: rgba(237, 28, 36, 0.15);
    
    --bg-dark: #0a0d14;
    --card-bg: rgba(20, 24, 38, 0.85);
    --card-border: rgba(255, 255, 255, 0.12);
    --card-hover-border: rgba(237, 28, 36, 0.6);
    
    --text-primary: #FFFFFF;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-xl: 30px;
    --radius-full: 9999px;
    
    --font-sans: 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    background-image: linear-gradient(180deg, rgba(10, 13, 20, 0.72) 0%, rgba(10, 13, 20, 0.88) 100%), url('../images/ooredoo_bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Écran d'accueil 100% pur : vue verticale (portrait 9:16) pour écran totem, smartphone ou borne */
body.home-page {
    background-image: url('../images/ooredoo_bg_vertical.jpg?v=2') !important;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    cursor: pointer;
    margin: 0;
    padding: 0;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

@media (orientation: portrait) {
    body {
        background-image: linear-gradient(180deg, rgba(10, 13, 20, 0.78) 0%, rgba(10, 13, 20, 0.92) 100%), url('../images/ooredoo_bg_vertical.jpg?v=2') !important;
        background-position: center top;
    }
    body.home-page {
        background-image: url('../images/ooredoo_bg_vertical.jpg?v=2') !important;
        background-position: center top;
    }
}

.fullscreen-clickable-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    z-index: 99999;
    cursor: pointer;
    display: block;
    background: transparent;
    border: none;
    outline: none;
}

/* Atmospheric Glow Background Elements */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}
.ambient-glow-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(237, 28, 36, 0.28) 0%, transparent 70%);
    top: -100px;
    left: -100px;
}
.ambient-glow-2 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(237, 28, 36, 0.2) 0%, transparent 70%);
    bottom: -150px;
    right: -100px;
}

/* Navigation / Brand Bar */
.top-navbar {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2.5rem;
    background: rgba(10, 13, 20, 0.45);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #fff;
}

.brand-logo-text {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--ooredoo-red);
    text-transform: lowercase;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.brand-tag {
    background: var(--ooredoo-red);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 0 14px var(--ooredoo-glow);
}

.village-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: var(--ooredoo-red);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--ooredoo-red);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* Main Container Layout */
.main-wrapper {
    position: relative;
    z-index: 5;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
}

body.home-page .main-wrapper {
    padding: 0 !important;
    margin: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
}

.container-narrow {
    width: 100%;
    max-width: 720px;
}

.container-quiz {
    width: 100%;
    max-width: 860px;
}

/* Glassmorphism Card System */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(237, 28, 36, 0.08);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card-header {
    text-align: center;
    margin-bottom: 2rem;
}

/* Hero Section (Home) */
.hero-container {
    text-align: center;
    max-width: 820px;
    margin: 0 auto;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(237, 28, 36, 0.15);
    border: 1px solid rgba(237, 28, 36, 0.35);
    color: #ff6b72;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 20px rgba(237, 28, 36, 0.2);
}

.hero-title {
    font-size: clamp(2.5rem, 5.5vw, 4.2rem);
    font-weight: 900;
    line-height: 1.08;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.text-gradient-red {
    background: linear-gradient(135deg, #FFFFFF 20%, #FF9E9E 50%, var(--ooredoo-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2.75rem;
}

.feature-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Super Animated Play Button */
.btn-play-hero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--ooredoo-red) 0%, var(--ooredoo-dark-red) 100%);
    color: #FFFFFF;
    font-size: 1.4rem;
    font-weight: 800;
    padding: 1.2rem 3.5rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 10px 30px rgba(237, 28, 36, 0.5), 0 0 40px rgba(237, 28, 36, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.25);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-play-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.btn-play-hero:hover::before {
    left: 100%;
}

.btn-play-hero:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 15px 40px rgba(237, 28, 36, 0.7), 0 0 60px rgba(237, 28, 36, 0.5);
    color: #fff;
}

.btn-play-hero:active {
    transform: translateY(1px) scale(0.99);
}

.play-icon-circle {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-control,
.form-input-field,
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
input[type="password"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.07);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    padding: 1.05rem 1.25rem;
    font-size: 1.1rem;
    font-family: var(--font-sans);
    color: #FFFFFF;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
    -webkit-appearance: none;
    appearance: none;
}

.form-control:hover,
.form-input-field:hover,
input[type="text"]:hover,
input[type="tel"]:hover {
    border-color: rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.1);
}

.form-control:focus,
.form-input-field:focus,
input[type="text"]:focus,
input[type="tel"]:focus {
    border-color: var(--ooredoo-red);
    box-shadow: 0 0 0 4px var(--ooredoo-glow-subtle), 0 8px 24px rgba(237, 28, 36, 0.2);
    background: rgba(20, 24, 38, 0.95);
    color: #FFFFFF;
}

.form-control::placeholder,
.form-input-field::placeholder,
input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

.form-error-list {
    color: #EF4444;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.45rem;
    list-style: none;
}

/* Petit point discret de synchronisation en haut à droite */
.discrete-sync-dot {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    z-index: 999999;
    pointer-events: none;
    transition: background-color 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease;
}
.discrete-sync-dot.synced {
    background-color: #10B981; /* Vert discret quand synchronisé */
    opacity: 0.35;
    box-shadow: none;
}
.discrete-sync-dot.pending {
    background-color: #F59E0B; /* Jaune discret quand en attente */
    opacity: 0.65;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.45);
}

.btn-submit-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--ooredoo-red) 0%, var(--ooredoo-dark-red) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 1.15rem;
    font-size: 1.15rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(237, 28, 36, 0.4);
    transition: all 0.25s ease;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
}

.btn-submit-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(237, 28, 36, 0.6);
}

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

/* Quiz Styles */
.quiz-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.quiz-player-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.player-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--ooredoo-red), var(--ooredoo-dark-red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 0 12px var(--ooredoo-glow);
}

.player-greeting {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.player-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.quiz-badge-count {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    color: #ff9a9e;
}

/* Question Card */
.question-block {
    background: rgba(14, 18, 30, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    position: relative;
}

.question-block:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.question-top-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.question-number-pill {
    font-size: 0.8rem;
    font-weight: 800;
    background: var(--ooredoo-red);
    color: #fff;
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.question-category {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.question-text-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 1.5rem;
    color: #FFFFFF;
}

/* Custom Interactive Options (Radio Cards) */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.option-item {
    position: relative;
    cursor: pointer;
    display: block;
}

.option-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-card-label {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.22s ease;
    user-select: none;
}

.option-letter {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    margin-right: 1.1rem;
    color: var(--text-secondary);
    transition: all 0.22s ease;
    flex-shrink: 0;
}

.option-text {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-secondary);
    flex: 1;
    transition: color 0.22s ease;
}

/* Hover & Active States */
.option-item:hover .option-card-label {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateX(4px);
}

.option-input:checked + .option-card-label {
    background: rgba(237, 28, 36, 0.14);
    border-color: var(--ooredoo-red);
    box-shadow: 0 0 20px rgba(237, 28, 36, 0.35);
}

.option-input:checked + .option-card-label .option-letter {
    background: var(--ooredoo-red);
    color: #fff;
    box-shadow: 0 0 10px var(--ooredoo-glow);
}

.option-input:checked + .option-card-label .option-text {
    color: #FFFFFF;
    font-weight: 600;
}

/* ==========================================================================
   RESULTS SCREEN STYLES
   ========================================================================== */
.result-header {
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2.5rem;
}

.result-emoji-bubble {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    margin: 0 auto 1.5rem auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    animation: bounceResult 1.5s ease infinite alternate;
}

@keyframes bounceResult {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-8px) scale(1.05); }
}

/* Radial Gauge / Percentage Circle */
.score-radial-wrapper {
    position: relative;
    width: 170px;
    height: 170px;
    margin: 0 auto 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-radial-svg {
    transform: rotate(-90deg);
    width: 170px;
    height: 170px;
}

.score-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 12;
}

.score-circle-progress {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.stroke-perfect { stroke: #10B981; filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.6)); }
.stroke-good { stroke: #F59E0B; filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.6)); }
.stroke-average { stroke: #3B82F6; filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.6)); }
.stroke-low { stroke: var(--ooredoo-red); filter: drop-shadow(0 0 10px rgba(237, 28, 36, 0.6)); }

.score-radial-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-percentage-number {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    color: #FFFFFF;
}

.score-fraction-sub {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Result Badges */
.result-badge {
    display: inline-block;
    padding: 0.4rem 1.25rem;
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.result-perfect {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.result-good {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.result-average {
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.result-low {
    background: rgba(237, 28, 36, 0.15);
    color: #F87171;
    border: 1px solid rgba(237, 28, 36, 0.3);
}

.result-main-title {
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: #FFFFFF;
}

.result-custom-message {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Answers Breakdown */
.breakdown-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breakdown-item {
    background: rgba(10, 13, 20, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.breakdown-q-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.breakdown-status-correct {
    color: #34D399;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.breakdown-status-wrong {
    color: #F87171;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.breakdown-explanation {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* Action Buttons */
.result-actions-grid {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn-action-replay {
    flex: 1;
    background: linear-gradient(135deg, var(--ooredoo-red) 0%, var(--ooredoo-dark-red) 100%);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 6px 20px rgba(237, 28, 36, 0.4);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-action-replay:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(237, 28, 36, 0.6);
    color: #fff;
}

.btn-action-new {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-action-new:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Timer / Chronomètre Styles */
.quiz-timer-pill {
    background: rgba(237, 28, 36, 0.12);
    border: 1px solid rgba(237, 28, 36, 0.35);
    padding: 0.45rem 1.1rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #FFFFFF;
    box-shadow: 0 0 15px rgba(237, 28, 36, 0.2);
    transition: all 0.3s ease;
}

.timer-icon {
    font-size: 1.1rem;
    animation: timerTick 1s infinite alternate;
}

@keyframes timerTick {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

.timer-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timer-value {
    color: #FF5A62;
    font-family: monospace, var(--font-sans);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.result-time-badge {
    display: inline-block;
    margin-top: 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.4rem 1.2rem;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   ADVANCED RESPONSIVE DESIGN (Mobile, Tablet, Touch Kiosk)
   ========================================================================== */

/* Fix mobile viewport & background attachment */
@media (max-width: 768px) {
    body {
        background-attachment: scroll !important;
    }

    body.home-page {
        height: 100dvh !important;
        width: 100dvw !important;
    }

    .main-wrapper {
        padding: 1.5rem 1rem !important;
    }

    .glass-card {
        padding: 1.75rem 1.25rem !important;
        border-radius: 18px !important;
    }

    .quiz-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .quiz-header-bar > div:last-child {
        width: 100%;
        display: flex;
        justify-content: space-between;
    }

    .quiz-player-info {
        width: 100%;
    }

    .quiz-timer-pill {
        align-self: flex-start;
        padding: 0.35rem 0.85rem;
        font-size: 0.88rem;
    }

    .question-block {
        padding: 1.25rem 1rem !important;
        margin-bottom: 1.25rem !important;
        border-radius: 14px !important;
    }

    .question-text-title {
        font-size: 1.1rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1.25rem !important;
    }

    .option-card-label {
        padding: 0.85rem 1rem !important;
    }

    .option-letter {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.88rem !important;
        margin-right: 0.75rem !important;
    }

    .option-text {
        font-size: 0.95rem !important;
        word-break: break-word;
    }

    /* Results Screen Mobile */
    .result-emoji-bubble {
        width: 80px;
        height: 80px;
        font-size: 2.75rem;
    }

    .score-radial-wrapper {
        width: 140px;
        height: 140px;
    }

    .score-radial-svg {
        width: 140px;
        height: 140px;
    }

    .score-percentage-number {
        font-size: 2.1rem;
    }

    .result-main-title {
        font-size: 1.4rem;
        line-height: 1.25;
    }

    .result-custom-message {
        font-size: 0.98rem;
    }

    .breakdown-item {
        padding: 1rem !important;
    }

    .result-actions-grid {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-action-replay, .btn-action-new {
        width: 100%;
        padding: 0.9rem 1rem;
        font-size: 0.98rem;
    }
}

/* Extra Small Phones (<= 480px) */
@media (max-width: 480px) {
    .glass-card {
        padding: 1.25rem 0.9rem !important;
    }

    .form-input-field {
        font-size: 16px !important; /* Prevents auto-zoom on iOS */
        padding: 0.85rem 1rem !important;
    }

    .btn-submit-primary {
        padding: 1rem !important;
        font-size: 1.05rem !important;
    }

    .question-top-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
}

/* Landscape Mode on Phones */
@media (max-height: 520px) and (orientation: landscape) {
    .main-wrapper {
        padding: 0.75rem !important;
    }
    .score-radial-wrapper {
        width: 110px;
        height: 110px;
    }
    .score-radial-svg {
        width: 110px;
        height: 110px;
    }
    .result-emoji-bubble {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
}
