@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

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

:root {
    /* === THEME COLORS (neutral defaults, overridden by theme CSS files) === */
    --theme-primary: #888888;
    --theme-secondary: #666666;
    --theme-accent: #aaaaaa;

    /* Raw RGB values for alpha compositing */
    --theme-primary-rgb: 136, 136, 136;
    --theme-secondary-rgb: 102, 102, 102;
    --theme-accent-rgb: 170, 170, 170;

    /* Background tones (neutral dark) */
    --theme-bg-darkest: #050505;
    --theme-bg-darker: #0a0a0a;
    --theme-bg-dark: #151515;
    --theme-bg-dark-rgb: 21, 21, 21;
    --theme-bg-darker-rgb: 10, 10, 10;

    /* === COMPUTED (auto-derived from above, no per-theme override needed) === */
    --theme-glow: rgba(var(--theme-primary-rgb), 0.7);
    --panel-bg: rgba(var(--theme-bg-dark-rgb), 0.9);
    --panel-border: rgba(var(--theme-primary-rgb), 0.4);
    --panel-dark: rgba(var(--theme-bg-darker-rgb), 0.98);

    /* === THEME FONTS (overridden by theme CSS files) === */
    --theme-font-heading: 'Orbitron', sans-serif;
    --theme-font-body: 'Rajdhani', sans-serif;

    /* === LEGACY ALIASES === */
    --primary-blue: var(--theme-primary);
    --secondary-blue: var(--theme-secondary);
    --dark-blue: var(--theme-bg-dark);
    --darker-blue: var(--theme-bg-darker);
    --accent-cyan: var(--theme-accent);
    --glow-blue: var(--theme-glow);
}

/* Theme transition: smooth color changes when switching modes */
body,
h1,
.audio-player,
.play-button,
.progress-bar,
.progress-fill,
.time-labels,
.result-message,
.result-info h2,
.guess-box,
.search-input,
.submit-button,
.skip-button,
.give-up-button,
.share-action-btn,
.scope-btn,
.countdown,
.mode-tab,
.daily-game-banner,
.result-play-button,
.result-progress-bar,
.credits-box a,
.endless-button,
.restart-button,
.endless-mode-label {
    transition: background 0.8s ease, border-color 0.8s ease,
                box-shadow 0.8s ease, text-shadow 0.8s ease,
                color 0.8s ease;
}

body {
    font-family: var(--theme-font-body);
    background: #000000;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* ============================================ */
/* BACKGROUND LAYER (blurred game artwork)      */
/* ============================================ */

#backgroundLayer {
    position: fixed;
    top: -20px;
    left: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(8px);
    opacity: 0;
    transition: opacity 0.1s ease;
}

/* Dark overlay on top of background for readability */
#backgroundLayer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(to bottom, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.2) 35%, rgba(0,0,0,0.2) 65%, rgba(0,0,0,0.95) 100%),
        rgba(0, 0, 0, 0.4);
}

#backgroundLayer.active {
    opacity: 1;
}


h1 {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 3rem;
    font-weight: 900;
    font-style: oblique;
    margin-bottom: 40px;
    text-align: center;
    letter-spacing: -3px;
    position: relative;
    z-index: 1;
    text-shadow:
        0 0 10px var(--glow-blue),
        0 0 20px var(--glow-blue),
        0 0 30px var(--primary-blue),
        0 0 40px var(--primary-blue);
}


.game-container {
    max-width: 700px;
    width: 100%;
    position: relative;
    z-index: 1000;
}

.result-message {
    background: var(--panel-bg);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 2px solid var(--panel-border);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 20px rgba(var(--theme-accent-rgb), 0.2),
        inset 0 0 20px rgba(var(--theme-accent-rgb), 0.05);
}

/* Result header: cover + info side by side */
.result-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Cover 3D card */
.result-cover-wrapper {
    flex-shrink: 0;
    perspective: 600px;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-cover {
    max-width: 120px;
    max-height: 120px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(var(--theme-accent-rgb), 0.15);
    will-change: transform;
}

.result-cover:hover {
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.6),
        0 0 25px rgba(var(--theme-accent-rgb), 0.3);
}

.result-cover img {
    display: block;
    max-width: 120px;
    max-height: 120px;
    width: auto;
    height: auto;
    pointer-events: none;
}

.result-cover-glare {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    border-radius: 10px;
}

/* Info section: left-aligned text */
.result-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.result-info h2 {
    margin-bottom: 8px;
    font-size: 1.4rem;
    font-family: var(--theme-font-heading);
    color: var(--primary-blue);
    text-shadow: 0 0 10px var(--glow-blue);
}

.song-credit {
    font-size: 0.95rem;
    color: #aaaaaa;
    margin: 4px 0;
    font-weight: 400;
    font-style: italic;
}

.result-message p {
    font-size: 1rem;
    color: #cccccc;
    font-weight: 500;
    margin-top: 15px;
}

.result-separator {
    border: none;
    border-top: 1px solid var(--panel-border);
    margin: 15px 0 0;
}

/* Result outcome styles */
.result-outcome {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 18px;
    letter-spacing: 0.3px;
}

.result-won {
    color: #b0b0b0;
}

.result-won .result-attempts {
    color: var(--primary-blue);
    font-weight: 800;
    text-shadow: 0 0 12px var(--glow-blue);
}

.result-lost {
    color: #f87171;
    font-weight: 700;
    font-size: 1.15rem;
}

.guess-boxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
    position: relative;
}

.special-img {
    position: absolute;
    right: 0;
    top: 0;
    max-width: 250px;
    max-height: 250px;
    z-index: 999;
    pointer-events: none;
    animation: floatEffect 3s ease-in-out infinite;
}

@keyframes floatEffect {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.guess-box {
    background: var(--panel-bg);
    border: 2px solid var(--panel-border);
    border-radius: 12px;
    padding: 12px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    position: relative;
    transition: all 0.3s ease;
    box-shadow:
        0 0 15px rgba(var(--theme-accent-rgb), 0.1),
        inset 0 0 15px rgba(var(--theme-accent-rgb), 0.05);
}

.guess-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-blue), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.guess-box:hover::before {
    opacity: 1;
}

.guess-box.skipped {
    background: rgba(100, 100, 100, 0.2);
    border-color: rgba(150, 150, 150, 0.4);
    box-shadow: inset 0 0 15px rgba(100, 100, 100, 0.1);
    animation: fadeIn 0.4s ease-out;
}

.guess-box.wrong {
    background: rgba(255, 50, 50, 0.15);
    border-color: rgba(255, 100, 100, 0.5);
    box-shadow:
        0 0 20px rgba(255, 50, 50, 0.3),
        inset 0 0 20px rgba(255, 50, 50, 0.1);
    animation: fadeIn 0.4s ease-out;
}

.guess-box.correct {
    background: rgba(0, 255, 150, 0.15);
    border-color: rgba(0, 255, 150, 0.6);
    box-shadow:
        0 0 25px rgba(0, 255, 150, 0.4),
        inset 0 0 25px rgba(0, 255, 150, 0.1);
    animation: pulseCorrect 0.6s ease-out, fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes shakeWrong {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

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

.audio-player {
    background: var(--panel-bg);
    padding: 20px 30px 0;
    border-radius: 20px;
    margin-bottom: 30px;
    border: 2px solid var(--panel-border);
    position: relative;
    box-shadow:
        0 0 30px rgba(var(--theme-accent-rgb), 0.2),
        inset 0 0 30px rgba(var(--theme-accent-rgb), 0.05);
    display: flex;
    flex-direction: column;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(var(--theme-primary-rgb), 0.1);
    border-radius: 5px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--panel-border);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-blue), var(--primary-blue), var(--accent-cyan));
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
    box-shadow: 
        0 0 15px var(--glow-blue),
        0 0 25px var(--primary-blue);
}

.time-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--primary-blue);
    margin-bottom: 0;
    font-family: var(--theme-font-heading);
    font-weight: 600;
    text-shadow: 0 0 5px var(--glow-blue);
}

.play-button {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--dark-blue), var(--darker-blue));
    border: 3px solid var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow:
        0 0 20px var(--glow-blue),
        inset 0 0 20px rgba(var(--theme-accent-rgb), 0.1);
}

.play-button:hover {
    transform: scale(1.1);
    box-shadow:
        0 0 30px var(--glow-blue),
        0 0 40px var(--primary-blue),
        inset 0 0 30px rgba(var(--theme-accent-rgb), 0.2);
}

.play-button:active {
    transform: scale(1.05);
}

.play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 18px solid var(--primary-blue);
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    margin-left: 4px;
    filter: drop-shadow(0 0 5px var(--glow-blue));
}

.play-button.playing::after {
    border: none;
    width: 22px;
    height: 20px;
    background: linear-gradient(to right,
        var(--primary-blue) 0%,
        var(--primary-blue) 35%,
        transparent 35%,
        transparent 65%,
        var(--primary-blue) 65%,
        var(--primary-blue) 100%);
    margin-left: 0;
    filter: drop-shadow(0 0 8px var(--glow-blue));
}

/* ===== GAME FILTER CHIPS ===== */

.game-filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.game-filter-chip {
    padding: 8px 12px;
    border-radius: 20px;
    border: 2px solid var(--chip-color);
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--theme-font-body);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    text-align: center;
}

.game-filter-chip.active {
    background: var(--chip-color);
    color: #fff;
    box-shadow: 0 0 12px color-mix(in srgb, var(--chip-color) 50%, transparent);
}

.game-filter-chip:not(.active):hover {
    background: color-mix(in srgb, var(--chip-color) 20%, transparent);
    color: rgba(255, 255, 255, 0.7);
}

/* ===== SEARCH SECTION ===== */

.search-section {
    margin-bottom: 10px;
}

/* ===== SEARCH ===== */

.search-container {
    position: relative;
    margin-bottom: 20px;
    z-index: 10000;
}

.search-input {
    width: 100%;
    padding: 18px 18px 18px 55px;
    font-size: 1.1rem;
    border: 2px solid var(--panel-border);
    border-radius: 12px;
    background: var(--panel-bg);
    color: var(--primary-blue);
    font-family: var(--theme-font-body);
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow:
        0 0 15px rgba(var(--theme-accent-rgb), 0.1),
        inset 0 0 15px rgba(var(--theme-accent-rgb), 0.05);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow:
        0 0 25px rgba(var(--theme-accent-rgb), 0.3),
        inset 0 0 20px rgba(var(--theme-accent-rgb), 0.1);
}

.search-input::placeholder {
    color: rgba(var(--theme-accent-rgb), 0.5);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    color: var(--primary-blue);
    filter: drop-shadow(0 0 5px var(--glow-blue));
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--panel-dark);
    border: 2px solid var(--panel-border);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 350px;
    overflow-y: auto;
    z-index: 10000;
    display: none;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(var(--theme-primary-rgb), 0.2);
}

.autocomplete-list.active {
    display: block;
    animation: dropDown 0.3s ease-out;
}

@keyframes dropDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.autocomplete-list::-webkit-scrollbar {
    width: 8px;
}

.autocomplete-list::-webkit-scrollbar-track {
    background: rgba(var(--theme-bg-dark-rgb), 0.5);
}

.autocomplete-list::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 4px;
    box-shadow: 0 0 10px var(--glow-blue);
}

.autocomplete-item {
    padding: 15px 18px;
    cursor: pointer;
    border-bottom: 1px solid rgba(var(--theme-accent-rgb), 0.1);
    transition: all 0.2s ease;
    position: relative;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.autocomplete-game-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--badge-color) 25%, transparent);
    color: var(--badge-color);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.autocomplete-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-blue);
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 0 10px var(--glow-blue);
}

.autocomplete-item:hover {
    background: rgba(var(--theme-primary-rgb), 0.1);
    color: var(--primary-blue);
    padding-left: 25px;
}

.autocomplete-item:hover::before {
    opacity: 1;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.button-container {
    display: flex;
    gap: 15px;
}

button {
    flex: 1;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--theme-font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::before {
    width: 300px;
    height: 300px;
}

.skip-button, .give-up-button {
    background: linear-gradient(135deg, rgba(var(--theme-bg-dark-rgb), 0.6), rgba(var(--theme-bg-darker-rgb), 0.8));
    color: #ffffff;
    border: 2px solid var(--panel-border);
    box-shadow:
        0 0 15px rgba(var(--theme-primary-rgb), 0.1),
        inset 0 0 15px rgba(var(--theme-primary-rgb), 0.05);
}

.skip-button:hover, .give-up-button:hover {
    border-color: var(--primary-blue);
    box-shadow:
        0 0 20px rgba(var(--theme-primary-rgb), 0.3),
        inset 0 0 20px rgba(var(--theme-primary-rgb), 0.1);
}

.skip-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.give-up-button {
    border-color: rgba(255, 100, 100, 0.4);
}

.give-up-button:hover {
    border-color: rgba(255, 100, 100, 0.7);
    box-shadow: 
        0 0 20px rgba(255, 100, 100, 0.3),
        inset 0 0 20px rgba(255, 100, 100, 0.1);
}

.submit-button {
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    color: #ffffff;
    border: 2px solid var(--primary-blue);
    box-shadow:
        0 0 20px var(--glow-blue),
        inset 0 0 20px rgba(var(--theme-accent-rgb), 0.1);
}

.submit-button:hover {
    box-shadow:
        0 0 30px var(--glow-blue),
        0 0 40px var(--primary-blue),
        inset 0 0 30px rgba(var(--theme-accent-rgb), 0.2);
}

.submit-button:disabled {
    background: linear-gradient(135deg, rgba(var(--theme-secondary-rgb), 0.3), rgba(var(--theme-primary-rgb), 0.3));
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Result screen audio player (full song) */
.result-audio-player {
    background: var(--panel-bg);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid var(--panel-border);
    margin: 25px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.result-play-button {
    width: 60px;
    height: 60px;
    min-width: 60px;
    margin-right: 15px;
    background: linear-gradient(135deg, var(--dark-blue), var(--darker-blue));
    border: 3px solid var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 0 20px var(--glow-blue),
        inset 0 0 20px rgba(var(--theme-accent-rgb), 0.1);
}

.result-play-button:hover {
    transform: scale(1.1);
    box-shadow:
        0 0 30px var(--glow-blue),
        0 0 40px var(--primary-blue),
        inset 0 0 30px rgba(var(--theme-accent-rgb), 0.2);
}

.result-play-button:active {
    transform: scale(1.05);
}

.result-play-button::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 18px solid var(--primary-blue);
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    margin-left: 4px;
    filter: drop-shadow(0 0 5px var(--glow-blue));
}

.result-play-button.playing::before {
    border: none;
    width: 22px;
    height: 20px;
    background: linear-gradient(to right,
        var(--primary-blue) 0%,
        var(--primary-blue) 35%,
        transparent 35%,
        transparent 65%,
        var(--primary-blue) 65%,
        var(--primary-blue) 100%);
    margin-left: 0;
    filter: drop-shadow(0 0 8px var(--glow-blue));
}

.result-progress-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-progress-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    position: relative;
    overflow: visible;
    cursor: pointer;
}

.result-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-cyan));
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px var(--glow-blue);
    position: relative;
}

.result-progress-bar::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: white;
    border: 2px solid var(--primary-blue);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.result-progress-bar-track:hover .result-progress-bar::after {
    transform: translateY(-50%) scale(1.2);
}

.result-time-labels {
    display: flex;
    justify-content: space-between;
    font-family: var(--theme-font-heading);
    font-size: 0.9rem;
    color: #cccccc;
}

/* Share section */
.share-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 0 auto 25px;
    max-width: 340px;
    width: 100%;
}

/* Scope toggle (these results / all results) */
.share-scope-toggle {
    display: flex;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 3px;
    gap: 3px;
}

.scope-btn {
    flex: 1;
    padding: 8px 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    border: none;
    border-radius: 6px;
    font-family: var(--theme-font-heading);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.scope-btn.active {
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    color: #ffffff;
    box-shadow: 0 0 10px var(--glow-blue);
}

.scope-btn:not(.active):hover {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.08);
}

/* Action buttons (copy / tweet) */
.share-actions {
    display: flex;
    gap: 10px;
    width: 100%;
}

.share-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 0;
    border: 2px solid var(--primary-blue);
    border-radius: 10px;
    font-family: var(--theme-font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.share-action-btn:active::before {
    width: 300px;
    height: 300px;
}

.copy-btn {
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    color: #ffffff;
    box-shadow:
        0 0 15px var(--glow-blue),
        inset 0 0 15px rgba(var(--theme-accent-rgb), 0.1);
}

.copy-btn:hover {
    box-shadow:
        0 0 25px var(--glow-blue),
        0 0 35px var(--primary-blue),
        inset 0 0 25px rgba(var(--theme-accent-rgb), 0.2);
    transform: scale(1.03);
}

.tweet-btn {
    background: linear-gradient(135deg, #1a1a2e, #0f0f1a);
    color: #ffffff;
    box-shadow:
        0 0 15px rgba(var(--theme-accent-rgb), 0.1),
        inset 0 0 15px rgba(255, 255, 255, 0.03);
}

.tweet-btn:hover {
    background: linear-gradient(135deg, #2a2a3e, #1a1a2e);
    box-shadow:
        0 0 25px rgba(var(--theme-accent-rgb), 0.15),
        inset 0 0 25px rgba(255, 255, 255, 0.05);
    transform: scale(1.03);
}

.share-action-btn svg {
    flex-shrink: 0;
}

.countdown {
    text-align: center;
    font-size: 1.3rem;
    color: var(--primary-blue);
    font-family: var(--theme-font-heading);
    font-weight: 600;
    text-shadow: 0 0 10px var(--glow-blue);
    margin-bottom: 100px;
}

.countdown-break {
    display: none;
}

@media (max-width: 600px) {
    .countdown-break {
        display: block;
    }
}

/* Desktop layout: two columns */
@media (min-width: 601px) {
    .game-container:not(.results-screen) {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        align-items: start;
    }

    .game-container:not(.results-screen) .audio-player {
        grid-column: 1;
        grid-row: 1;
        margin-bottom: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .game-container:not(.results-screen) .search-section {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .game-container:not(.results-screen) .guess-boxes {
        grid-column: 2;
        grid-row: 1;
        margin-bottom: 0;
    }

    .credits-box {
        margin-top: 20px;
    }
}

/* Credits (bottom of page, fixed on desktop) */
.credits-box {
    max-width: 700px;
    width: 100%;
    padding: 20px;
    font-family: var(--theme-font-body);
    font-size: 0.85rem;
    color: #aaaaaa;
    text-align: center;
    z-index: 1;
    line-height: 1.8;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.credit-line {
    margin: 2px 0;
}

.credits-box a {
    color: var(--theme-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.credits-box a:hover {
    color: var(--theme-accent);
    text-shadow: 0 0 8px var(--theme-glow);
}

/* Responsive design */
@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }

    body {
        padding-bottom: 180px; /* Space for sticky search section */
    }

    .guess-box {
        padding: 10px;
        font-size: 0.9rem;
    }

    .audio-player {
        padding: 20px;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }

    .play-button {
        width: 60px;
        height: 60px;
        margin: 0;
        flex-shrink: 0;
    }

    .play-button::after {
        border-left-width: 18px;
        border-top-width: 11px;
        border-bottom-width: 11px;
        margin-left: 4px;
    }

    .play-button.playing::after {
        width: 22px;
        height: 20px;
    }

    .progress-container {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .audio-player .progress-bar {
        margin-bottom: 8px;
    }

    .audio-player .time-labels {
        margin-bottom: 0;
        font-size: 0.8rem;
    }

    .game-filters {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 6px;
    }

    .game-filter-chip {
        padding: 6px 8px;
        font-size: 0.75rem;
    }

    button {
        padding: 15px;
        font-size: 1rem;
    }

    .search-input {
        font-size: 1rem;
        padding: 15px 15px 15px 50px;
    }

    /* Sticky search section at bottom on mobile */
    .search-section {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, rgba(var(--theme-bg-darker-rgb), 0.98), rgba(var(--theme-bg-dark-rgb), 0.98));
        backdrop-filter: blur(10px);
        padding: 15px;
        margin-bottom: 0;
        z-index: 9000;
        border-top: 2px solid var(--panel-border);
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.8);
    }

    .search-container {
        margin-bottom: 12px;
    }

    .game-filters {
        margin-bottom: 12px;
        order: -1; /* Move filters above search */
    }

    .button-container {
        margin-bottom: 0;
    }

    /* Autocomplete dropdown appears ABOVE search on mobile */
    .autocomplete-list {
        position: fixed;
        top: auto;
        bottom: 100%;
        left: 15px;
        right: 15px;
        border-radius: 12px 12px 0 0;
        border: 2px solid var(--panel-border);
        border-bottom: none;
        max-height: 250px;
    }

    .autocomplete-list.active {
        animation: dropUp 0.3s ease-out;
    }

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

/* Loading animation for player */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    animation: spin 1s linear infinite;
}

/* Visual effect container */
.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -50px;
    color: #fff;
    text-shadow: 0 0 5px #fff;
    pointer-events: none;
    animation: fallEffect linear infinite;
}

@keyframes fallEffect {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* ============================================ */
/* MODE SELECTOR TABS */
/* ============================================ */

.mode-selector {
    max-width: 900px;
    width: 100%;
    margin: 0 auto 30px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    position: relative;
    z-index: 10;
}

.mode-tab {
    min-width: 0;
    padding: 8px 12px;
    background: var(--panel-bg);
    border: 2px solid var(--panel-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 900;
    font-style: oblique;
    font-size: 0.9rem;
    text-transform: capitalize;
    letter-spacing: -2px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 15px rgba(var(--theme-accent-rgb), 0.1),
        inset 0 0 15px rgba(var(--theme-accent-rgb), 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

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

.mode-tab:hover::before {
    left: 100%;
}

.mode-tab:hover {
    transform: translateY(-2px);
    border-color: var(--theme-primary);
    box-shadow:
        0 0 25px var(--theme-glow),
        inset 0 0 20px rgba(var(--theme-accent-rgb), 0.1);
}

.mode-tab.active {
    background: linear-gradient(135deg, var(--theme-secondary), var(--theme-primary));
    border-color: var(--theme-primary);
    color: #ffffff;
    box-shadow:
        0 0 30px var(--theme-glow),
        0 0 40px var(--theme-primary),
        inset 0 0 30px rgba(var(--theme-accent-rgb), 0.2);
}

.mode-tab-name {
    display: block;
    font-size: 1.2rem;
    line-height: 1.2;
}

.mode-tab-desc {
    display: block;
    font-size: 0.65rem;
    font-weight: 400;
    opacity: 0.8;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 0.5px;
    margin-top: 4px;
    line-height: 1.2;
    white-space: nowrap;
}

/* Daily Game Banner (for Random mode) */
.daily-game-banner {
    max-width: 700px;
    width: 100%;
    margin: 0 auto 30px;
    padding: 20px;
    background: linear-gradient(135deg, var(--panel-bg), rgba(0, 0, 0, 0.6));
    border: 2px solid var(--theme-primary);
    border-radius: 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 30px var(--theme-glow),
        inset 0 0 30px rgba(var(--theme-accent-rgb), 0.1);
}

.daily-game-title {
    font-family: var(--theme-font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--theme-accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
    text-shadow: 0 0 10px var(--theme-glow);
}

.daily-game-name {
    font-family: var(--theme-font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--theme-primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow:
        0 0 15px var(--theme-glow),
        0 0 25px var(--theme-glow),
        0 0 35px var(--theme-primary);
}

/* History Button (next to language selector) */
.history-button {
    position: fixed;
    bottom: 20px;
    left: 70px;
    z-index: 5000;
    width: 40px;
    height: 40px;
    border: 2px solid var(--panel-border);
    background: var(--panel-bg);
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.history-button:hover {
    background: rgba(var(--theme-primary-rgb), 0.2);
    border-color: var(--theme-primary);
    box-shadow: 0 4px 15px var(--theme-glow);
}

/* ============================================ */
/* TITLE WRAPPER & ENDLESS BADGE               */
/* ============================================ */

.title-wrapper {
    position: relative;
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
}

.endless-badge {
    display: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin-left: 10px;
    margin-top: -2px;
    pointer-events: none;
    text-shadow:
        0 0 10px var(--glow-blue),
        0 0 20px var(--primary-blue),
        0 0 30px var(--primary-blue);
    animation: badgePulse 2s ease-in-out infinite;
}

.endless-badge.visible {
    display: inline-block;
}

@keyframes badgePulse {
    0%, 100% {
        text-shadow:
            0 0 10px var(--glow-blue),
            0 0 20px var(--primary-blue),
            0 0 30px var(--primary-blue);
    }
    50% {
        text-shadow:
            0 0 15px var(--glow-blue),
            0 0 30px var(--primary-blue),
            0 0 50px var(--primary-blue),
            0 0 70px var(--primary-blue);
    }
}

/* Endless mode label (shown under title when active) */
.endless-mode-label {
    display: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    margin-top: -30px;
    margin-bottom: 30px;
    text-shadow:
        0 0 10px var(--glow-blue),
        0 0 20px rgba(255, 255, 255, 0.15),
        0 0 40px rgba(255, 255, 255, 0.08);
    opacity: 0.8;
}

.endless-mode-label.visible {
    display: block;
}

/* ============================================ */
/* ENDLESS BUTTON                              */
/* ============================================ */

.endless-button {
    position: fixed;
    bottom: 20px;
    left: 120px;
    z-index: 5000;
    width: 40px;
    height: 40px;
    border: 2px solid var(--panel-border);
    background: var(--panel-bg);
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1;
    padding: 0;
}

.endless-button:hover {
    background: rgba(var(--theme-primary-rgb), 0.2);
    border-color: var(--theme-primary);
    box-shadow: 0 4px 15px var(--theme-glow);
}

.endless-button.active {
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    border-color: var(--primary-blue);
    color: #ffffff;
    box-shadow:
        0 0 15px var(--glow-blue),
        0 0 25px var(--primary-blue);
    animation: endlessBtnGlow 2s ease-in-out infinite;
}

@keyframes endlessBtnGlow {
    0%, 100% {
        box-shadow:
            0 0 15px var(--glow-blue),
            0 0 25px var(--primary-blue);
    }
    50% {
        box-shadow:
            0 0 20px var(--glow-blue),
            0 0 35px var(--primary-blue),
            0 0 45px var(--primary-blue);
    }
}

/* ============================================ */
/* BUTTON TOOLTIPS (desktop only)              */
/* ============================================ */

@media (min-width: 601px) {
    .lang-toggle[data-tooltip] {
        overflow: visible;
        position: relative;
    }

    .history-button[data-tooltip],
    .endless-button[data-tooltip] {
        overflow: visible;
    }

    .lang-toggle[data-tooltip]::after,
    .history-button[data-tooltip]::after,
    .endless-button[data-tooltip]::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%) translateY(4px);
        background: rgba(0, 0, 0, 0.85);
        color: #ffffff;
        font-family: var(--theme-font-body);
        font-size: 0.75rem;
        font-weight: 600;
        letter-spacing: 0.5px;
        padding: 5px 10px;
        border-radius: 6px;
        white-space: nowrap;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.2s ease, transform 0.2s ease;
        border: 1px solid rgba(var(--theme-primary-rgb), 0.3);
        z-index: 10000;
        text-transform: none;
    }

    .lang-toggle[data-tooltip]:hover::after,
    .history-button[data-tooltip]:hover::after,
    .endless-button[data-tooltip]:hover::after {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ============================================ */
/* RESTART BUTTON (Endless results screen)     */
/* ============================================ */

.restart-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 340px;
    margin: 0 auto 25px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    color: #ffffff;
    border: 2px solid var(--primary-blue);
    border-radius: 12px;
    font-family: var(--theme-font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 20px var(--glow-blue),
        inset 0 0 20px rgba(var(--theme-accent-rgb), 0.1);
    transition: all 0.3s ease;
}

.restart-button:hover {
    box-shadow:
        0 0 30px var(--glow-blue),
        0 0 40px var(--primary-blue),
        inset 0 0 30px rgba(var(--theme-accent-rgb), 0.2);
    transform: scale(1.03);
}

.restart-button:active {
    transform: scale(0.98);
}

/* ============================================ */
/* STATS HEADER (Daily / Endless toggle)       */
/* ============================================ */

.stats-header {
    text-align: center;
    margin-bottom: 25px;
}

.stats-header .history-title {
    margin-bottom: 15px;
}

.stats-header .share-scope-toggle {
    max-width: 340px;
    margin: 0 auto;
}

/* Language Selector (bottom-left corner) */
.language-selector {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 5001;
}

.lang-toggle {
    width: 40px;
    height: 40px;
    border: 2px solid var(--panel-border);
    background: var(--panel-bg);
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    padding: 0;
    line-height: 1;
}

.lang-toggle:hover {
    background: rgba(var(--theme-primary-rgb), 0.2);
    border-color: var(--theme-primary);
    box-shadow: 0 4px 15px var(--theme-glow);
}

.lang-menu {
    position: absolute;
    bottom: 50px;
    left: 0;
    z-index: 5001;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: var(--panel-bg);
    border: none;
    border-radius: 8px;
    padding: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.lang-option {
    width: 40px;
    height: 35px;
    border: none;
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    font-family: var(--theme-font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-option:hover {
    background: rgba(var(--theme-primary-rgb), 0.3);
    border-color: var(--theme-primary);
}

.lang-option.active {
    background: var(--theme-primary);
    border-color: var(--theme-primary);
    color: var(--theme-dark);
    box-shadow: 0 0 15px var(--theme-glow);
}

/* Responsive tabs */
@media (max-width: 600px) {
    .mode-selector {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .mode-tab {
        padding: 6px 10px;
        font-size: 0.7rem;
        min-height: 52px;
    }

    .mode-tab-name {
        font-size: 1.2rem;
    }

    .mode-tab-desc {
        font-size: 0.55rem;
        margin-top: 3px;
    }

    .daily-game-banner {
        padding: 15px;
    }

    .daily-game-title {
        font-size: 0.8rem;
    }

    .daily-game-name {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }

    .language-selector {
        top: 10px;
        right: 10px;
        bottom: auto;
        left: auto;
    }

    .lang-toggle {
        width: 42px;
        height: 42px;
        font-size: 1.3rem;
    }

    .lang-menu {
        bottom: auto;
        top: 50px;
        left: auto;
        right: 0;
    }

    .lang-option {
        width: 42px;
        height: 35px;
        font-size: 0.75rem;
    }

    .credits-box {
        position: relative;
        left: auto;
        transform: none;
        font-size: 0.75rem;
        margin: 30px auto 150px;
        padding: 15px;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 12px rgba(0, 0, 0, 0.7);
    }

    .history-button {
        bottom: auto;
        top: 58px;
        left: auto;
        right: 10px;
    }

    .endless-button {
        bottom: auto;
        top: 10px;
        left: 10px;
        right: auto;
    }

    .endless-badge {
        font-size: 2.2rem;
    }

    .endless-mode-label {
        font-size: 0.75rem;
        letter-spacing: 2px;
        margin-top: -32px;
        margin-bottom: 25px;
    }

    .restart-button {
        font-size: 1rem;
        padding: 14px 20px;
    }

    .result-cover-wrapper {
        width: 90px;
        height: 90px;
    }

    .result-cover {
        max-width: 90px;
        max-height: 90px;
    }

    .result-cover img {
        max-width: 90px;
        max-height: 90px;
    }

    .result-header {
        gap: 15px;
    }

    .result-info h2 {
        font-size: 1.15rem;
    }
}

/* History Modal */
.history-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.history-modal.active {
    display: flex;
}

.history-content {
    background: linear-gradient(135deg, var(--panel-bg), rgba(var(--theme-bg-dark-rgb), 0.95));
    border: 2px solid var(--panel-border);
    border-radius: 15px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
    position: relative;
}

.history-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: 2px solid var(--panel-border);
    background: var(--panel-bg);
    color: var(--accent-cyan);
    font-size: 1.8rem;
    font-weight: 300;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-family: Arial, sans-serif;
    line-height: 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.history-close:hover {
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    border-color: var(--primary-blue);
    color: #ffffff;
    box-shadow: 0 0 20px var(--glow-blue);
}

.history-close:active {
    transform: scale(0.95);
}

.history-title {
    font-family: var(--theme-font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-shadow: 0 0 10px var(--glow-blue);
    margin-bottom: 25px;
    text-align: center;
}

.mode-stats {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid var(--panel-border);
}

.mode-stats:last-child {
    border-bottom: none;
}

.mode-name {
    font-family: var(--theme-font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(var(--theme-primary-rgb), 0.2);
}

.stat-value {
    font-family: var(--theme-font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-shadow: 0 0 10px var(--glow-blue);
}

.stat-label {
    font-family: var(--theme-font-body);
    font-size: 0.9rem;
    color: #aaaaaa;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.guess-distribution {
    margin-top: 20px;
}

.distribution-title {
    font-family: var(--theme-font-body);
    font-size: 1rem;
    color: #cccccc;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.distribution-bar {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 10px;
}

.bar-label {
    font-family: var(--theme-font-heading);
    font-size: 0.9rem;
    color: #aaaaaa;
    min-width: 20px;
}

.bar-container {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    height: 25px;
    position: relative;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-blue), var(--primary-blue));
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 8px;
    font-family: var(--theme-font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    min-width: 30px;
    transition: all 0.3s ease;
}

.bar-fill:hover {
    box-shadow: 0 0 15px var(--glow-blue);
}

.no-history {
    text-align: center;
    padding: 40px;
    font-family: var(--theme-font-body);
    font-size: 1.1rem;
    color: #888888;
}

@media (max-width: 600px) {
    .history-content {
        padding: 20px;
        max-height: 85vh;
    }

    .history-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .mode-name {
        font-size: 1.1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }
}
