:root {
    --pinnacle-gold: #F8C300;
    --pinnacle-blue: #101245;
    --charcoal: #11172E;
    --white: #FFFFFF;
    --green-earth: #008E78;
    --wheat: #F6D36A;
    --blue-sky: #13A9C8;
    --vibrant-green: #00A877;
    --harvest-orange: #C50094;
    --golden-wheat: #FFDB2F;
    --blue-accent: #13A9C8;
    --cpl-magenta: #C50094;
    --cpl-cyan: #13A9C8;
}

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

html, body {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    font-family: "Lucida Grande", sans-serif;
    color: var(--charcoal);
    min-height: 100vh;
    background: #f3f9fb;
}

.bg-pattern {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(19, 169, 200, 0.10) 0%, transparent 48%),
        radial-gradient(circle at 90% 80%, rgba(197, 0, 148, 0.08) 0%, transparent 48%),
        radial-gradient(circle at 50% 50%, rgba(248, 195, 0, 0.06) 0%, transparent 60%),
        linear-gradient(145deg, #f4fbfd 0%, #ffffff 48%, #faf3fb 100%);
}

.screen {
    display: none;
    width: 100%;
    min-height: 100vh;
    position: relative;
}

.screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.screen-transition {
    animation: screenSlideIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes screenSlideIn {
    from { opacity: 0; transform: translateY(40px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo-container {
    text-align: center;
    margin-bottom: 12px;
    animation: fadeInUp 0.7s ease 0.1s backwards;
}

.logo-container img {
    max-width: 260px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.game-title {
    font-family: 'Anton', sans-serif;
    font-size: 4.5rem;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 4px;
    line-height: 1;
    animation: fadeInUp 0.7s ease 0.2s backwards;
}

.game-title .pig {
    color: var(--pinnacle-blue);
    display: inline;
    text-shadow: 2px 2px 4px rgba(0, 87, 184, 0.15);
}

.game-title .smart {
    background: linear-gradient(135deg, var(--pinnacle-gold), var(--golden-wheat), var(--pinnacle-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline;
}

.game-title-sub {
    font-family: 'Anton', sans-serif;
    font-size: 2.2rem;
    color: var(--pinnacle-blue);
    text-transform: uppercase;
    letter-spacing: 12px;
    text-align: center;
    margin-bottom: 8px;
    animation: fadeInUp 0.7s ease 0.3s backwards;
}

.game-subtitle {
    font-size: 1.1rem;
    color: #777;
    text-align: center;
    margin-bottom: 28px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: fadeInUp 0.7s ease 0.35s backwards;
}

.divider-line {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--pinnacle-gold), var(--pinnacle-blue));
    border-radius: 2px;
    margin: 0 auto 24px;
    animation: fadeInUp 0.7s ease 0.35s backwards;
}

.card {
    background: #ffffff;
    border-radius: 20px;
    padding: 36px 40px;
    max-width: 520px;
    width: 92%;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.7s ease 0.4s backwards;
    border: 1px solid rgba(210, 144, 34, 0.15);
    border-top: 4px solid var(--pinnacle-gold);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 700;
    color: var(--pinnacle-blue);
    margin-bottom: 8px;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.form-group label::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 12px;
    background: var(--pinnacle-gold);
    border-radius: 2px;
    margin-right: 8px;
    vertical-align: middle;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e0dcd4;
    border-radius: 12px;
    font-size: 1.05rem;
    font-family: 'Source Sans 3', sans-serif;
    transition: all 0.3s ease;
    background: #fafaf8;
    color: var(--charcoal);
    -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--pinnacle-gold);
    box-shadow: 0 0 0 4px rgba(210, 144, 34, 0.15);
    background: #fff;
}

.form-group input::placeholder { color: #aaa; }

.error-msg {
    color: var(--harvest-orange);
    font-size: 0.82rem;
    margin-top: 5px;
    display: none;
    font-weight: 600;
}

.form-group.error input,
.form-group.error select { border-color: var(--harvest-orange) !important; }

.form-group.error .error-msg { display: block; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 44px;
    border: none;
    border-radius: 16px;
    font-family: 'Anton', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

.btn:hover::after { left: 100%; }

.btn-primary {
    background: linear-gradient(135deg, var(--pinnacle-gold) 0%, #b87a0e 100%);
    color: var(--white);
    box-shadow: 0 8px 30px rgba(210, 144, 34, 0.4);
    width: 100%;
    margin-top: 14px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(210, 144, 34, 0.6);
}

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

.btn-blue {
    background: linear-gradient(135deg, var(--pinnacle-blue) 0%, #003d80 100%);
    color: var(--white);
    box-shadow: 0 8px 30px rgba(0, 87, 184, 0.5);
}

.btn-blue:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(0, 87, 184, 0.6);
}

.quiz-container {
    max-width: 780px;
    width: 94%;
    z-index: 1;
    animation: screenSlideIn 0.5s ease;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 4px;
}

.quiz-header-logo img {
    height: 48px;
    filter: drop-shadow(0 2px 8px rgba(210, 144, 34, 0.3));
}

.quiz-stats {
    display: flex;
    gap: 14px;
    align-items: center;
}

.stat-box {
    background: rgba(255,255,255,0.9);
    border-radius: 16px;
    padding: 12px 22px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border: 1px solid rgba(210, 144, 34, 0.15);
    min-width: 90px;
}

.stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
    font-weight: 700;
}

.stat-value {
    font-family: 'Anton', sans-serif;
    font-size: 1.8rem;
    color: var(--pinnacle-blue);
    line-height: 1.2;
}

.stat-value.timer { color: var(--pinnacle-gold); }

.stat-value.timer.warning {
    color: var(--harvest-orange);
    animation: timerPulse 0.5s ease infinite;
}

@keyframes timerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.timer-ring {
    width: 70px;
    height: 70px;
    position: relative;
}

.timer-ring svg {
    transform: rotate(-90deg);
    width: 70px;
    height: 70px;
}

.timer-ring .ring-bg {
    fill: none;
    stroke: rgba(210, 144, 34, 0.15);
    stroke-width: 4;
}

.timer-ring .ring-fill {
    fill: none;
    stroke: var(--pinnacle-gold);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 188.5;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}

.timer-ring .ring-fill.warning {
    stroke: var(--harvest-orange);
}

.timer-ring .timer-text {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Anton', sans-serif;
    font-size: 1.5rem;
    color: var(--pinnacle-gold);
}

.timer-ring .timer-text.warning {
    color: var(--harvest-orange);
    animation: timerTextPulse 0.5s ease infinite;
}

@keyframes timerTextPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(210, 144, 34, 0.15);
    border-radius: 3px;
    margin-bottom: 24px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--pinnacle-gold), var(--golden-wheat));
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(210, 144, 34, 0.4);
}

.question-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 36px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(210, 144, 34, 0.12);
}

.question-card.animate-in {
    animation: cardSlideIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cardSlideIn {
    from { opacity: 0; transform: translateX(50px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

.question-category {
    display: inline-block;
    background: linear-gradient(135deg, var(--pinnacle-blue), #003d80);
    color: var(--white);
    padding: 6px 18px;
    border-radius: 24px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 14px;
}

.question-number {
    font-family: 'Anton', sans-serif;
    font-size: 0.85rem;
    color: var(--pinnacle-gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 12px;
}

.question-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--charcoal);
    line-height: 1.45;
    margin-bottom: 30px;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.option-btn {
    display: flex;
    align-items: center;
    padding: 22px 22px;
    border: 2.5px solid #e0dcd4;
    border-radius: 16px;
    background: #fafaf8;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--charcoal);
    text-align: left;
    gap: 14px;
    min-height: 70px;
}

.option-btn:hover {
    border-color: var(--pinnacle-gold);
    background: rgba(210, 144, 34, 0.06);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.option-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pinnacle-blue), #003d80);
    color: var(--white);
    font-family: 'Anton', sans-serif;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0, 87, 184, 0.3);
}

.option-btn.correct {
    border-color: var(--vibrant-green);
    background: rgba(0, 176, 80, 0.12);
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(0, 176, 80, 0.2);
}

.option-btn.correct .option-letter {
    background: linear-gradient(135deg, var(--vibrant-green), #008c3e);
}

.option-btn.incorrect {
    border-color: var(--harvest-orange);
    background: rgba(241, 88, 34, 0.1);
    animation: shake 0.5s ease;
}

.option-btn.incorrect .option-letter {
    background: linear-gradient(135deg, var(--harvest-orange), #c0441a);
}

.option-btn.disabled {
    pointer-events: none;
    opacity: 0.55;
}

.option-btn.disabled.correct,
.option-btn.disabled.incorrect {
    opacity: 1;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

.results-container {
    max-width: 640px;
    width: 94%;
    text-align: center;
    z-index: 1;
}

.result-icon {
    font-size: 6rem;
    margin-bottom: 12px;
    animation: trophyBounce 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: inline-block;
}

.winner-icon-animate {
    font-size: 7rem;
    animation: winnerTrophy 2.5s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(210, 144, 34, 0.6));
}

@keyframes trophyBounce {
    0% { transform: scale(0) rotate(-10deg); opacity: 0; }
    50% { transform: scale(1.25) rotate(5deg); }
    70% { transform: scale(0.95) rotate(-2deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes winnerTrophy {
    0% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 20px rgba(210, 144, 34, 0.6)); }
    15% { transform: scale(1.2) rotate(-8deg); filter: drop-shadow(0 0 40px rgba(210, 144, 34, 0.9)); }
    30% { transform: scale(1.1) rotate(8deg); filter: drop-shadow(0 0 30px rgba(255, 198, 39, 0.8)); }
    45% { transform: scale(1.25) rotate(-5deg); filter: drop-shadow(0 0 45px rgba(210, 144, 34, 1)); }
    60% { transform: scale(1.05) rotate(5deg); }
    75% { transform: scale(1.15) rotate(-3deg); filter: drop-shadow(0 0 35px rgba(255, 198, 39, 0.9)); }
    100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 20px rgba(210, 144, 34, 0.6)); }
}

.result-title {
    font-family: 'Anton', sans-serif;
    font-size: 3.5rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 6px;
    line-height: 1.1;
}

.result-title.winner {
    font-size: 4.5rem;
    background: linear-gradient(135deg, #FFD700, var(--pinnacle-gold), #FFC627, #D29022, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 300% auto;
    animation: shimmerGold 2s linear infinite, winnerPulse 1.5s ease-in-out infinite;
    text-shadow: none;
    letter-spacing: 8px;
}

@keyframes shimmerGold {
    0% { background-position: 0% center; }
    100% { background-position: 300% center; }
}

@keyframes winnerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.winner-celebration {
    position: relative;
}

.winner-celebration::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at center, rgba(255, 215, 0, 0.08) 0%, transparent 70%);
    animation: celebrationGlow 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes celebrationGlow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.result-title.try-again {
    color: var(--pinnacle-blue);
}

.result-subtitle {
    font-size: 1.1rem;
    color: #777;
    margin-bottom: 24px;
    letter-spacing: 1px;
}

.winner-prize-banner {
    display: none;
    background: linear-gradient(135deg, rgba(0, 176, 80, 0.15), rgba(210, 144, 34, 0.15));
    border: 2px solid rgba(0, 176, 80, 0.4);
    border-radius: 16px;
    padding: 16px 24px;
    margin-bottom: 24px;
    animation: prizeGlow 1.5s ease infinite alternate;
}

.winner-prize-banner p {
    color: var(--charcoal);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 1px;
}

.winner-prize-banner .prize-icon {
    font-size: 1.6rem;
    margin-right: 8px;
}

@keyframes prizeGlow {
    from { box-shadow: 0 0 20px rgba(0, 176, 80, 0.1); }
    to { box-shadow: 0 0 40px rgba(0, 176, 80, 0.25); }
}

.result-score-card {
    background: rgba(255,255,255,0.9);
    border-radius: 20px;
    padding: 28px 36px;
    margin-bottom: 28px;
    border: 1px solid rgba(210, 144, 34, 0.15);
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.result-score-number {
    font-family: 'Anton', sans-serif;
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 4px;
}

.result-score-number .big { color: var(--pinnacle-gold); }
.result-score-number .divider { color: #ccc; font-size: 3rem; margin: 0 6px; }
.result-score-number .total { color: #999; }

.result-score-label {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
}

.score-breakdown {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.score-dot {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 900;
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) backwards;
}

.score-dot.correct {
    background: rgba(0, 176, 80, 0.2);
    color: var(--vibrant-green);
    border: 2px solid rgba(0, 176, 80, 0.5);
    box-shadow: 0 0 15px rgba(0, 176, 80, 0.15);
}

.score-dot.wrong {
    background: rgba(241, 88, 34, 0.15);
    color: var(--harvest-orange);
    border: 2px solid rgba(241, 88, 34, 0.4);
}

@keyframes popIn {
    from { transform: scale(0) rotate(-20deg); opacity: 0; }
    to { transform: scale(1) rotate(0); opacity: 1; }
}

.result-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.result-actions .btn {
    padding: 16px 40px;
    font-size: 1.15rem;
}

.leaderboard-section {
    background: rgba(255,255,255,0.9);
    border-radius: 24px;
    padding: 28px;
    border: 1px solid rgba(210, 144, 34, 0.12);
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    width: 100%;
}

.leaderboard-title {
    font-family: 'Anton', sans-serif;
    font-size: 1.3rem;
    color: var(--pinnacle-gold);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 18px;
    text-align: center;
}

.leaderboard-list { list-style: none; }

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 6px;
    transition: background 0.3s ease;
    gap: 12px;
}

.leaderboard-item:nth-child(1) {
    background: linear-gradient(135deg, rgba(210, 144, 34, 0.15), rgba(255, 198, 39, 0.08));
    border: 1px solid rgba(210, 144, 34, 0.2);
}

.leaderboard-item:nth-child(2) {
    background: rgba(125, 187, 230, 0.08);
    border: 1px solid rgba(125, 187, 230, 0.15);
}

.leaderboard-item:nth-child(3) {
    background: rgba(74, 124, 58, 0.08);
    border: 1px solid rgba(74, 124, 58, 0.15);
}

.leaderboard-rank {
    font-family: 'Anton', sans-serif;
    font-size: 1.1rem;
    color: var(--pinnacle-gold);
    min-width: 28px;
    text-align: center;
}

.leaderboard-name {
    flex: 1;
    font-weight: 600;
    color: var(--charcoal);
}

.leaderboard-time {
    font-size: 0.85rem;
    color: #999;
    font-weight: 600;
    min-width: 40px;
    text-align: right;
}

.leaderboard-score-val {
    font-family: 'Anton', sans-serif;
    font-size: 1.1rem;
    color: var(--pinnacle-gold);
    min-width: 42px;
    text-align: right;
}

.leaderboard-badge { font-size: 1.3rem; }

.leaderboard-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 0 8px;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(210, 144, 34, 0.25);
    border-radius: 10px;
    background: #fff;
    color: var(--charcoal);
    font-family: 'Anton', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.pagination-btn:hover:not(:disabled):not(.active) {
    border-color: var(--pinnacle-gold);
    background: rgba(210, 144, 34, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(210, 144, 34, 0.15);
}

.pagination-btn.active {
    background: linear-gradient(135deg, var(--pinnacle-gold), #b87a0e);
    color: #fff;
    border-color: var(--pinnacle-gold);
    box-shadow: 0 4px 16px rgba(210, 144, 34, 0.35);
}

.pagination-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.branded-footer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(135deg, var(--pinnacle-blue) 0%, #002d60 100%);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 10;
    border-top: 2px solid rgba(210, 144, 34, 0.3);
}

.branded-footer img {
    height: 26px;
    filter: brightness(0) invert(1);
}

.branded-footer span {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-weight: 600;
    text-transform: uppercase;
}

.confetti-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    top: -20px;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(100vh) rotate(1080deg) scale(0.5); opacity: 0; }
}

#fireworks-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 99;
    overflow: hidden;
}

.firework-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: fireworkBurst 1.2s ease-out forwards;
}

@keyframes fireworkBurst {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

#starburst-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 98;
    overflow: hidden;
}

.floating-star {
    position: absolute;
    animation: floatStar ease-in-out infinite;
    opacity: 0;
}

@keyframes floatStar {
    0% { transform: translateY(0) scale(0); opacity: 0; }
    20% { transform: translateY(-15px) scale(1.2); opacity: 1; }
    50% { transform: translateY(-35px) scale(1); opacity: 0.9; }
    80% { transform: translateY(-55px) scale(1.3); opacity: 0.6; }
    100% { transform: translateY(-80px) scale(0); opacity: 0; }
}

.feedback-overlay {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 50;
    font-family: 'Anton', sans-serif;
    font-size: 4rem;
    text-transform: uppercase;
    letter-spacing: 6px;
    pointer-events: none;
    animation: feedbackPop 1s ease forwards;
}

.feedback-overlay.correct-feedback {
    color: var(--vibrant-green);
    text-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.feedback-overlay.incorrect-feedback {
    color: var(--harvest-orange);
    text-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

@keyframes feedbackPop {
    0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0; }
    30% { transform: translate(-50%, -50%) scale(1.4); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0; }
}

.loading-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.7s linear infinite;
    margin-right: 10px;
}

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

.screen#welcome-screen {
    padding-bottom: 90px;
    padding-top: 28px;
}

.screen#quiz-screen {
    padding: 24px 0 80px;
    justify-content: flex-start;
}

.screen#result-screen {
    padding-bottom: 80px;
    padding-top: 24px;
}

.empty-leaderboard {
    color: #aaa;
    padding: 16px;
    font-style: italic;
    text-align: center;
}

.country-search-wrapper {
    position: relative;
}

.country-search-input {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e0dcd4;
    border-radius: 12px;
    font-size: 1.05rem;
    font-family: 'Source Sans 3', sans-serif;
    transition: all 0.3s ease;
    background: #fafaf8;
    color: var(--charcoal);
    cursor: pointer;
}

.country-search-input:focus {
    outline: none;
    border-color: var(--pinnacle-gold);
    box-shadow: 0 0 0 4px rgba(210, 144, 34, 0.15);
    background: #fff;
}

.country-search-input::placeholder { color: #aaa; }

.country-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    border: 2px solid var(--pinnacle-gold);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 20;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.country-dropdown.open { display: block; }

.country-option {
    padding: 12px 18px;
    cursor: pointer;
    font-size: 1rem;
    font-family: 'Source Sans 3', sans-serif;
    color: var(--charcoal);
    transition: background 0.15s ease;
    border-bottom: 1px solid #f0ece4;
}

.country-option:last-child { border-bottom: none; }

.country-option:hover,
.country-option.highlighted {
    background: rgba(210, 144, 34, 0.1);
    color: var(--pinnacle-blue);
}

.country-option.hidden { display: none; }

/* ==================== SPLASH SCREEN ==================== */
#splash-screen {
    background: linear-gradient(135deg, #f8f6f0 0%, #eee8d5 30%, #f0ead6 60%, #f8f6f0 100%);
    position: relative;
    padding: 30px 20px 70px;
}

#splash-screen.active {
    justify-content: center;
}

#splash-screen .floating-elements,
#splash-screen .sparkle-container {
    overflow: hidden;
}

#splash-screen::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(0, 87, 184, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(210, 144, 34, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(241, 88, 34, 0.04) 0%, transparent 60%);
    animation: bgShift 8s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes bgShift {
    0% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 0.8; transform: scale(1.02); }
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    position: relative;
}

.splash-logo {
    margin-bottom: 10px;
    animation: fadeInUp 0.5s ease both;
}

.splash-logo img {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.12));
}

.splash-title {
    font-family: 'Anton', sans-serif;
    font-size: 4.5rem;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 0;
    line-height: 1;
    animation: splashTitleIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.splash-pig {
    color: var(--pinnacle-blue);
    text-shadow: 2px 2px 8px rgba(0, 87, 184, 0.2);
}

.splash-smart {
    color: var(--harvest-orange);
    text-shadow: 2px 2px 8px rgba(241, 88, 34, 0.2);
}

@keyframes splashTitleIn {
    0% { opacity: 0; transform: scale(0.5) rotate(-5deg); letter-spacing: 20px; }
    60% { transform: scale(1.1) rotate(2deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); letter-spacing: normal; }
}

.splash-subtitle {
    font-family: 'Anton', sans-serif;
    font-size: 2rem;
    color: var(--harvest-orange);
    text-transform: uppercase;
    letter-spacing: 12px;
    text-align: center;
    margin-bottom: 6px;
    animation: fadeInUp 0.5s ease 0.2s both;
}

.splash-tagline {
    font-size: 1rem;
    color: #777;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
    animation: fadeInUp 0.5s ease 0.3s both;
}

.splash-pig-icon {
    margin-bottom: 20px;
    animation: pigBounce 2s ease-in-out infinite, fadeInUp 0.5s ease 0.4s both;
}

.pig-svg-animated {
    width: 90px;
    height: 90px;
    filter: drop-shadow(0 4px 12px rgba(0, 87, 184, 0.3));
}

@keyframes pigBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-12px) rotate(-3deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(-8px) rotate(3deg); }
}

.splash-start-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 22px 60px;
    border: none;
    border-radius: 60px;
    font-family: 'Anton', sans-serif;
    font-size: 1.8rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    cursor: pointer;
    color: var(--white);
    background: linear-gradient(135deg, var(--pinnacle-gold) 0%, var(--harvest-orange) 50%, var(--pinnacle-gold) 100%);
    background-size: 200% auto;
    box-shadow:
        0 8px 32px rgba(241, 88, 34, 0.4),
        0 0 60px rgba(241, 88, 34, 0.15);
    overflow: hidden;
    animation: splashBtnIn 0.5s ease 0.4s both, btnGradientShift 3s ease infinite, btnPulseGlow 2s ease-in-out infinite;
    z-index: 2;
    transition: transform 0.2s ease;
}

.splash-start-btn:hover {
    transform: scale(1.08);
}

.splash-start-btn:active {
    transform: scale(0.95);
}

.splash-start-btn .btn-text {
    position: relative;
    z-index: 1;
}

.splash-start-btn .btn-glow {
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: btnShimmer 2.5s ease infinite;
}

@keyframes splashBtnIn {
    from { opacity: 0; transform: translateY(30px) scale(0.8); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes btnGradientShift {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

@keyframes btnPulseGlow {
    0%, 100% { box-shadow: 0 8px 32px rgba(241, 88, 34, 0.4), 0 0 60px rgba(241, 88, 34, 0.15); }
    50% { box-shadow: 0 8px 48px rgba(241, 88, 34, 0.6), 0 0 100px rgba(241, 88, 34, 0.3), 0 0 140px rgba(210, 144, 34, 0.1); }
}

@keyframes btnShimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* Floating elements */
.floating-elements {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-el {
    position: absolute;
    opacity: 0.2;
}

.floating-el svg {
    width: 40px;
    height: 50px;
}

.float-feed1 {
    top: 10%; left: 5%;
    animation: floatDrift1 7s ease-in-out infinite;
}

.float-wheat1 {
    top: 20%; right: 8%;
    animation: floatDrift2 9s ease-in-out infinite 1s;
}

.float-pig1 {
    bottom: 25%; left: 8%;
    animation: floatDrift3 8s ease-in-out infinite 0.5s;
}

.float-feed2 {
    bottom: 15%; right: 5%;
    animation: floatDrift1 10s ease-in-out infinite 2s;
}

.float-wheat2 {
    top: 50%; left: 3%;
    animation: floatDrift2 11s ease-in-out infinite 3s;
}

.float-pig2 {
    top: 35%; right: 4%;
    animation: floatDrift3 9s ease-in-out infinite 1.5s;
}

@keyframes floatDrift1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(15px, -20px) rotate(5deg); }
    50% { transform: translate(-10px, -35px) rotate(-3deg); }
    75% { transform: translate(20px, -15px) rotate(8deg); }
}

@keyframes floatDrift2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-20px, -25px) rotate(-8deg); }
    66% { transform: translate(15px, -40px) rotate(5deg); }
}

@keyframes floatDrift3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    30% { transform: translate(10px, -30px) rotate(10deg) scale(1.1); }
    60% { transform: translate(-15px, -20px) rotate(-5deg) scale(0.95); }
}

/* Sparkle particles */
.sparkle-container {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: sparkleAnim ease-in-out infinite;
}

.sparkle::before {
    content: '';
    position: absolute;
    top: -1px; left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 8px;
    background: inherit;
    border-radius: 1px;
}

.sparkle::after {
    content: '';
    position: absolute;
    left: -1px; top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 2px;
    background: inherit;
    border-radius: 1px;
}

.s1 { top: 15%; left: 12%; background: var(--pinnacle-gold); animation-duration: 3s; animation-delay: 0s; }
.s2 { top: 25%; right: 15%; background: var(--harvest-orange); animation-duration: 2.5s; animation-delay: 0.5s; }
.s3 { top: 45%; left: 20%; background: var(--pinnacle-blue); animation-duration: 4s; animation-delay: 1s; }
.s4 { top: 60%; right: 10%; background: var(--golden-wheat); animation-duration: 3.5s; animation-delay: 0.3s; }
.s5 { top: 70%; left: 8%; background: var(--harvest-orange); animation-duration: 2.8s; animation-delay: 1.5s; }
.s6 { top: 35%; left: 85%; background: var(--pinnacle-gold); animation-duration: 3.2s; animation-delay: 0.8s; }
.s7 { top: 80%; left: 30%; background: var(--blue-sky); animation-duration: 3.8s; animation-delay: 2s; }
.s8 { top: 10%; right: 25%; background: var(--pinnacle-blue); animation-duration: 2.6s; animation-delay: 1.2s; }

@keyframes sparkleAnim {
    0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
    20% { opacity: 1; transform: scale(1.2) rotate(45deg); }
    40% { opacity: 0.8; transform: scale(0.8) rotate(90deg); }
    60% { opacity: 1; transform: scale(1.4) rotate(135deg); }
    80% { opacity: 0.5; transform: scale(0.6) rotate(180deg); }
}

/* Result screen SVG pig icons */
.result-icon svg {
    width: 100px;
    height: 100px;
    filter: drop-shadow(0 4px 12px rgba(0, 87, 184, 0.25));
}

.winner-icon-animate svg {
    width: 120px;
    height: 120px;
}

@media (max-width: 700px) {
    .game-title { font-size: 3rem; }
    .game-title-sub { font-size: 1.5rem; letter-spacing: 6px; }
    .card { padding: 28px 22px; }
    .options-grid { grid-template-columns: 1fr; }
    .question-text { font-size: 1.2rem; }
    .question-card { padding: 28px 24px; }
    .quiz-header { flex-direction: column; gap: 12px; }
    .result-title { font-size: 2.5rem; }
    .result-score-number { font-size: 3.5rem; }
    .option-btn { padding: 18px 18px; min-height: 60px; }
    .splash-title { font-size: 3.5rem; }
    .splash-subtitle { font-size: 1.8rem; letter-spacing: 8px; }
    .splash-start-btn { padding: 18px 44px; font-size: 1.4rem; letter-spacing: 3px; }
    .pig-svg-animated { width: 100px; height: 100px; }
    .splash-logo img { max-width: 160px; }
}

@media (min-width: 1200px) {
    .game-title { font-size: 5.5rem; }
    .game-title-sub { font-size: 2.6rem; }
    .question-text { font-size: 1.7rem; }
    .option-btn { font-size: 1.2rem; padding: 26px 26px; }
    .quiz-container { max-width: 860px; }
}

/* ==================== REPUBLIC BANK CPL THEME ==================== */
body,
button,
input,
select,
.game-title,
.game-title-sub,
.splash-title,
.splash-subtitle,
.result-title,
.result-score-number,
.leaderboard-title,
.leaderboard-rank,
.leaderboard-score-val,
.pagination-btn,
.stat-value,
.question-category,
.option-letter {
    font-family: "Lucida Grande", sans-serif !important;
}

.logo-container img,
.splash-logo img,
.quiz-header-logo img {
    width: auto;
    object-fit: contain;
    background: #fff;
    border-radius: 14px;
    padding: 7px 12px;
    border: 1px solid rgba(19, 169, 200, 0.16);
}

.logo-container img {
    max-width: min(520px, 88vw);
}

.quiz-header-logo img {
    max-width: min(340px, 70vw);
}

#splash-screen {
    background:
        radial-gradient(circle at 18% 20%, rgba(19, 169, 200, 0.18), transparent 34%),
        radial-gradient(circle at 84% 76%, rgba(197, 0, 148, 0.12), transparent 34%),
        radial-gradient(circle at 50% 50%, rgba(248, 195, 0, 0.08), transparent 42%),
        linear-gradient(145deg, #eaf8fb 0%, #ffffff 47%, #fbf0f9 100%);
}

#splash-screen::before {
    background:
        linear-gradient(115deg, transparent 0 44%, rgba(255,255,255,.68) 50%, transparent 56%),
        repeating-linear-gradient(90deg, transparent 0 70px, rgba(19,169,200,.025) 70px 71px);
}

.splash-logo {
    margin-bottom: 2px;
}

.splash-logo img {
    max-width: min(500px, 88vw);
}

.splash-title {
    font-size: clamp(2.7rem, 8vw, 4.8rem);
    font-weight: 900;
    letter-spacing: -0.055em;
}

.splash-pig {
    color: var(--pinnacle-blue);
    text-shadow: 0 5px 20px rgba(16, 18, 69, 0.16);
}

.splash-smart {
    color: var(--cpl-cyan);
    margin-left: .16em;
    text-shadow: 0 5px 20px rgba(19, 169, 200, 0.22);
}

.splash-subtitle {
    color: var(--cpl-magenta);
    font-size: clamp(1.15rem, 4vw, 1.85rem);
    font-weight: 900;
    letter-spacing: .42em;
    margin-left: .42em;
}

.splash-tagline {
    color: rgba(16, 18, 69, 0.72);
    font-weight: 700;
    letter-spacing: .13em;
    margin-top: 5px;
    margin-bottom: 8px;
}

.splash-cricket-animation {
    width: min(420px, 92vw);
    margin: 0 auto 9px;
    animation: fadeInUp .6s ease .28s both;
}

.cricket-batting-svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 14px 18px rgba(16, 18, 69, .09));
    animation: hitCameraPunch 3.1s ease-in-out infinite;
}

.ball-flight {
    transform-origin: 54px 116px;
    animation: ballDelivery 3.1s cubic-bezier(.22,.61,.36,1) infinite;
}

.bat-swing {
    transform-origin: 246px 137px;
    transform-box: view-box;
    animation: batStrike 3.1s cubic-bezier(.2,.76,.35,1) infinite;
}

.impact-flash {
    transform-origin: 220px 108px;
    transform-box: view-box;
    opacity: 0;
    animation: impactBurst 3.1s ease-out infinite;
}

.ball-trail {
    animation: trailPulse 3.1s ease infinite;
}

.ball-speed-lines {
    opacity: 0;
    animation: speedLines 3.1s ease-out infinite;
}

.impact-core {
    animation: coreFlash 3.1s ease-out infinite;
}

.animation-caption {
    font-family: "Lucida Grande", sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.2px;
    text-anchor: middle;
    fill: rgba(16, 18, 69, .64);
}

@keyframes ballDelivery {
    0% { transform: translate(-30px, 10px) rotate(0deg) scale(.92); opacity: 0; }
    8% { opacity: 1; }
    42% { transform: translate(154px, -7px) rotate(440deg) scale(1); opacity: 1; }
    47% { transform: translate(166px, -8px) rotate(485deg) scale(1.02); opacity: 1; }
    50% { transform: translate(174px, -14px) rotate(535deg) scale(.98); opacity: 1; }
    68% { transform: translate(242px, -82px) rotate(780deg) scale(.72); opacity: 1; }
    82%, 100% { transform: translate(315px, -128px) rotate(1020deg) scale(.42); opacity: 0; }
}

@keyframes batStrike {
    0%, 30% { transform: rotate(13deg); }
    41% { transform: rotate(7deg); }
    47% { transform: rotate(-17deg); }
    52% { transform: rotate(-29deg); }
    67% { transform: rotate(-22deg); }
    83%, 100% { transform: rotate(13deg); }
}

@keyframes impactBurst {
    0%, 44% { opacity: 0; transform: scale(.2) rotate(0deg); }
    47% { opacity: 1; transform: scale(.75) rotate(10deg); }
    53% { opacity: .55; transform: scale(1.45) rotate(30deg); }
    59%, 100% { opacity: 0; transform: scale(1.8) rotate(45deg); }
}

@keyframes trailPulse {
    0%, 8%, 58%, 100% { opacity: 0; stroke-dashoffset: 24; }
    22%, 45% { opacity: 1; stroke-dashoffset: 0; }
}

@keyframes speedLines {
    0%, 8%, 54%, 100% { opacity: 0; transform: translateX(-7px); }
    16%, 39% { opacity: .5; transform: translateX(0); }
    46% { opacity: .12; transform: translateX(8px); }
}

@keyframes coreFlash {
    0%, 44%, 100% { opacity: 0; transform: scale(.3); }
    47% { opacity: 1; transform: scale(1); }
    51% { opacity: .2; transform: scale(1.65); }
    55% { opacity: 0; transform: scale(2); }
}

@keyframes hitCameraPunch {
    0%, 43%, 100% { transform: scale(1) translate(0, 0); }
    47% { transform: scale(1.018) translate(-1px, 1px); }
    52% { transform: scale(1.008) translate(1px, -1px); }
    58% { transform: scale(1) translate(0, 0); }
}

.splash-start-btn {
    padding: 18px 54px;
    border-radius: 14px;
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: .18em;
    background: linear-gradient(135deg, var(--cpl-cyan) 0%, #087da7 47%, var(--pinnacle-blue) 100%);
    box-shadow: 0 12px 34px rgba(19, 169, 200, .28), 0 0 0 1px rgba(255,255,255,.6) inset;
    animation: splashBtnIn .5s ease .4s both, cplButtonGlow 2.3s ease-in-out infinite;
}

@keyframes cplButtonGlow {
    0%, 100% { box-shadow: 0 12px 34px rgba(19,169,200,.28), 0 0 0 1px rgba(255,255,255,.6) inset; }
    50% { box-shadow: 0 15px 45px rgba(197,0,148,.25), 0 0 0 1px rgba(255,255,255,.75) inset; }
}

.card,
.question-card,
.result-score-card,
.leaderboard-section {
    border-color: rgba(19, 169, 200, .17);
}

.card {
    border-top-color: var(--cpl-cyan);
}

.btn-primary {
    background: linear-gradient(135deg, var(--cpl-cyan), #087da7 58%, var(--pinnacle-blue));
}

.divider-line,
.progress-fill {
    background: linear-gradient(90deg, var(--cpl-magenta), var(--pinnacle-gold), var(--cpl-cyan));
}

.question-category,
.leaderboard-title,
.leaderboard-score-val,
.leaderboard-rank,
.result-score-number .big {
    color: var(--cpl-cyan);
}

.result-title.winner {
    background: linear-gradient(110deg, var(--pinnacle-gold), var(--cpl-magenta), var(--cpl-cyan), var(--pinnacle-gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.winner-prize-banner {
    background: linear-gradient(135deg, rgba(19,169,200,.14), rgba(248,195,0,.17), rgba(197,0,148,.10));
    border-color: rgba(19,169,200,.38);
}

.branded-footer {
    background: linear-gradient(105deg, #0b0d3f, #11165d 52%, #077f9f);
    letter-spacing: .08em;
}

.result-icon svg {
    width: 150px;
    height: 125px;
    overflow: visible;
    filter: drop-shadow(0 8px 15px rgba(16,18,69,.18));
}

.result-ball-flight {
    transform-origin: 34px 97px;
    animation: resultBallHit 2.4s ease-in-out infinite;
}

.result-bat-swing {
    transform-origin: 126px 124px;
    transform-box: view-box;
    animation: resultBatHit 2.4s ease-in-out infinite;
}

.result-impact {
    transform-origin: 108px 91px;
    transform-box: view-box;
    animation: resultImpact 2.4s ease-out infinite;
}

@keyframes resultBallHit {
    0%, 10% { transform: translate(-14px, 4px) rotate(0); opacity: 0; }
    20% { opacity: 1; }
    47% { transform: translate(73px, -6px) rotate(300deg); opacity: 1; }
    70% { transform: translate(130px, -55px) rotate(580deg) scale(.65); opacity: 1; }
    88%, 100% { transform: translate(165px, -80px) rotate(760deg) scale(.4); opacity: 0; }
}

@keyframes resultBatHit {
    0%, 34%, 100% { transform: rotate(10deg); }
    49% { transform: rotate(-15deg); }
    63% { transform: rotate(-24deg); }
    82% { transform: rotate(4deg); }
}

@keyframes resultImpact {
    0%, 45%, 68%, 100% { opacity: 0; transform: scale(.2); }
    50% { opacity: 1; transform: scale(.9); }
    59% { opacity: .25; transform: scale(1.55); }
}

@media (prefers-reduced-motion: reduce) {
    .ball-flight,
    .bat-swing,
    .impact-flash,
    .ball-speed-lines,
    .impact-core,
    .cricket-batting-svg,
    .result-ball-flight,
    .result-bat-swing,
    .result-impact {
        animation-play-state: paused;
    }
}

@media (max-width: 700px) {
    #splash-screen { padding-top: 18px; }
    .splash-logo img { max-width: 88vw; }
    .splash-cricket-animation { width: min(360px, 96vw); }
    .splash-start-btn { padding: 16px 34px; font-size: 1rem; }
    .logo-container img { max-width: 90vw; }
    .quiz-header-logo img { max-width: 84vw; }
}
