.score-strip {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
    color: white;
    padding: 12px 15px;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-right: max(15px, env(safe-area-inset-right));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    padding-left: max(15px, env(safe-area-inset-left));
    flex-shrink: 0;
    display: none;
    align-items: center;
    gap: 15px;
    position: relative;
}

.score-strip .back-btn {
    position: absolute;
    left: 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.score-strip .back-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.score-strip .back-btn svg {
    width: 20px;
    height: 20px;
}

/* Score strip content with pills */
.score-strip-content {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-left: 45px;
}

/* Pill styling */
.score-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    white-space: nowrap;
}

.stage-pill {
    background: rgba(255, 255, 255, 0.12);
}

.score-display-pill {
    background: rgba(102, 255, 163, 0.15);
    border-color: rgba(102, 255, 163, 0.3);
}

.pill-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
    font-weight: 600;
}

.pill-value {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Reaction timer - center element */
.reaction-timer {
    flex: 1;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    font-family: 'Rajdhani', sans-serif;
}

#reaction-timer-value {
    color: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .score-pill {
    background: rgba(14, 18, 53, 0.08);
    border-color: rgba(14, 18, 53, 0.15);
}

[data-theme="light"] .score-display-pill {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.25);
}

.screen-title {
    flex: 1;
    text-align: center;
    font-size: 1.3em;
    font-weight: 600;
    margin: 0;
    padding: 0 50px;
}

.header-spacer {
    width: 32px;
    flex-shrink: 0;
}

[data-theme="light"] .score-strip .back-btn {
    background: rgba(51, 51, 51, 0.1);
    border-color: rgba(51, 51, 51, 0.3);
}

[data-theme="light"] .score-strip .back-btn:hover {
    background: rgba(51, 51, 51, 0.15);
}

.active-game-screen[style*="display: flex"] .score-strip {
    display: flex;
}

.score-strip.visible {
    display: flex;
}

.header-icons {
    display: flex;
    flex-direction: column;
    gap: 4px;
    order: 2;
}

.info-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.info-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

[data-theme="light"] .info-btn {
    background: rgba(51, 51, 51, 0.1);
    border-color: rgba(51, 51, 51, 0.3);
    color: #333;
}

/* ===============================================
   Fullscreen Button
   =============================================== */
.fullscreen-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    width: 22px;
    height: 22px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.fullscreen-btn svg {
    width: 16px;
    height: 16px;
}

[data-theme="light"] .fullscreen-btn {
    background: rgba(51, 51, 51, 0.1);
    border-color: rgba(51, 51, 51, 0.3);
    color: #333;
}

[data-theme="light"] .fullscreen-btn:hover {
    background: rgba(51, 51, 51, 0.15);
}

[data-theme="light"] .info-btn:hover {
    background: rgba(51, 51, 51, 0.15);
}

.back-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

[data-theme="light"] .back-btn {
    background: rgba(51, 51, 51, 0.1);
    border-color: rgba(51, 51, 51, 0.3);
    color: #333;
}

[data-theme="light"] .back-btn:hover {
    background: rgba(51, 51, 51, 0.15);
}

.theme-toggle {
    cursor: pointer;
    padding: 3px;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.theme-icon {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-circle {
    width: 12px;
    height: 12px;
    border: 1.5px solid #333;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    background: transparent;
}

[data-theme="dark"] .theme-circle {
    border-color: white;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-circle {
        border-color: white;
    }
}

.theme-half {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    transition: background-color 0.3s ease;
}

.theme-left {
    left: 0;
    background: transparent;
}

.theme-right {
    right: 0;
    background: transparent;
}

/* Theme states */
.theme-toggle.light .theme-left {
    background: #333;
}

.theme-toggle.dark .theme-right {
    background: white;
}

[data-theme="dark"] .theme-toggle.light .theme-left {
    background: white;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle.light .theme-left {
        background: white;
    }
}

/* System theme uses transparent background (natural fill) */

/* Old level label - legacy support */
#level-label {
    display: none;
}

.header h1 {
    margin-bottom: 15px;
    font-size: 2em;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .score-strip-content {
        gap: 10px;
        margin-left: 40px;
    }
    
    .score-pill {
        padding: 5px 10px;
        gap: 6px;
    }
    
    .pill-label {
        font-size: 0.65rem;
    }
    
    .pill-value {
        font-size: 0.95rem;
    }
    
    .reaction-timer {
        font-size: 1rem;
    }
}

/* Progress bar container */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(128, 128, 128, 0.15);
    overflow: visible;
    margin: 0;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #66bb6a, #4CAF50);
    width: 0%;
    transition: width 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 0 3px 3px 0;
}

/* Score progress bar - different color to distinguish from hit progress */
.score-progress-bar {
    background: linear-gradient(90deg, #1565C0, #0D47A1);
    height: 80%;
    top: 10%;
    z-index: 1;
    border-radius: 0 3px 3px 0;
}

[data-theme="dark"] .progress-bar {
    background: linear-gradient(90deg, #81c784, #66bb6a);
}

[data-theme="dark"] .score-progress-bar {
    background: linear-gradient(90deg, #1976D2, #0D47A1);
}
/* Flicker animations for miss/foul */
@keyframes flicker-miss {
    0%, 100% { background: linear-gradient(90deg, #4CAF50, #66bb6a); }
    25%, 75% { background: linear-gradient(90deg, #FFA726, #FFB74D); }
}

@keyframes flicker-foul {
    0%, 100% { background: linear-gradient(90deg, #4CAF50, #66bb6a); }
    25%, 75% { background: linear-gradient(90deg, #f44336, #e57373); }
}

@keyframes flicker-miss-score {
    0%, 100% { background: linear-gradient(90deg, #0D47A1, #1565C0); }
    25%, 75% { background: linear-gradient(90deg, #FFA726, #FFB74D); }
}

@keyframes flicker-foul-score {
    0%, 100% { background: linear-gradient(90deg, #0D47A1, #1565C0); }
    25%, 75% { background: linear-gradient(90deg, #f44336, #e57373); }
}

.progress-bar.flicker-miss {
    animation: flicker-miss 0.4s ease-in-out;
}

.progress-bar.flicker-foul {
    animation: flicker-foul 0.4s ease-in-out;
}

.score-progress-bar.flicker-miss {
    animation: flicker-miss-score 0.4s ease-in-out;
}

.score-progress-bar.flicker-foul {
    animation: flicker-foul-score 0.4s ease-in-out;
}

[data-theme="dark"] .progress-bar.flicker-miss {
    animation: flicker-miss 0.4s ease-in-out;
}

[data-theme="dark"] .progress-bar.flicker-foul {
    animation: flicker-foul 0.4s ease-in-out;
}

[data-theme="dark"] .score-progress-bar.flicker-miss {
    animation: flicker-miss-score 0.4s ease-in-out;
}

[data-theme="dark"] .score-progress-bar.flicker-foul {
    animation: flicker-foul-score 0.4s ease-in-out;
}