:root {
    --bg-color: #08060c;
    --card-bg: rgba(22, 16, 30, 0.8);
    --card-border: rgba(249, 83, 198, 0.15);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --accent-color: #7153f9;
    --accent-glow: rgba(43, 205, 70, 0.3);

    --success-color: #00ff87;
    --error-color: #ff3860;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Ambient Glows */
.background-glows {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
}

.glow-1 {
    top: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: linear-gradient(135deg, #f953c6 0%, #b91d73 100%);
}

.glow-2 {
    bottom: -15%;
    left: -15%;
    width: 50vw;
    height: 50vw;
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100vh;
    justify-content: space-between;
}

/* Game Header */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
    padding: 8px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.back-link:hover {
    color: var(--accent-color);
    background: rgba(249, 83, 198, 0.05);
    border-color: rgba(249, 83, 198, 0.2);
}

.game-title {
    position: relative;
}

.player-badge {
    background: var(--accent-color);
    color: #fff;
    padding: 2px 12px;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.8rem;
    box-shadow: 0 0 15px var(--accent-glow);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    vertical-align: middle;
}

.game-title h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
}

.highlight {
    background: var(--accent-glow);
    color: var(--accent-color);
    padding: 2px 8px;
    border-radius: 8px;
    text-shadow: 0 0 10px var(--accent-glow);
}

.score-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.score-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.score-value {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* Main Game Area */
.game-area {
    display: flex;
    flex-direction: column;
    gap: 25px;
    flex-grow: 1;
    justify-content: center;
    padding: 15px 0;
}

.section-title {
    text-align: center;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 600;
}

/* Player Card Section */
.target-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.player-card {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 2px solid var(--accent-color);
    border-radius: 24px;
    padding: 30px 40px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 15px 35px rgba(249, 83, 198, 0.20), 0 0 25px rgba(249, 83, 198, 0.05);
    position: relative;
    gap: 40px;
}

/* Player controls */
.player-controls {
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 20px;
}

.song-info h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}

.song-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0;
    font-weight: 500;
}

.song-info .playback-status {
    color: var(--accent-color);
    font-size: 0.8rem;
    margin-top: 6px;
    font-weight: 600;
}

.control-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-shrink: 0;
}

.control-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-color);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--accent-glow);
    transition: all 0.3s ease;
}

.control-btn:hover:not(:disabled) {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(249, 83, 198, 0.5);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.control-btn svg {
    width: 24px;
    height: 24px;
}

.secondary-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    box-shadow: none;
}

.secondary-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.secondary-btn svg {
    width: 18px;
    height: 18px;
}

/* Music Timeline */
.timeline-section {
    width: 100%;
}

.timeline-scroll-container {
    width: 100%;
    overflow-x: auto;
    padding: 20px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(249, 83, 198, 0.3) rgba(255, 255, 255, 0.02);
}

.timeline-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.timeline-scroll-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}

.timeline-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(249, 83, 198, 0.3);
    border-radius: 3px;
}

.timeline-container {
    display: inline-flex;
    align-items: center;
    min-width: 100%;
    padding: 0 40px;
    gap: 12px;
}

/* Placed Cassette Cards */
.timeline-card {
    width: 170px;
    flex-shrink: 0;
    background: rgba(20, 15, 30, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 15px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 120px;
    animation: cardEnter 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.timeline-card.just-added {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(249, 83, 198, 0.3);
}

.timeline-card .card-info {
    overflow: hidden;
}

.timeline-card h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.timeline-card p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-card .year-badge {
    align-self: flex-start;
    background: rgba(249, 83, 198, 0.9);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.85rem;
    padding: 2px 8px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(249, 83, 198, 0.3);
    margin-top: 10px;
}

/* Cassette details decoration */
.timeline-card::after {
    content: '';
    position: absolute;
    bottom: 12px;
    right: 15px;
    width: 24px;
    height: 12px;
    background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05) 2px, transparent 2px, transparent 4px);
    border-radius: 2px;
}

/* Timeline Slots (Interactive) */
.timeline-slot {
    width: 48px;
    height: 120px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slot-line {
    position: absolute;
    width: 2px;
    height: 50px;
    background: rgba(255, 255, 255, 0.12);
    transition: all 0.3s ease;
}

.slot-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(20, 15, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.slot-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

/* Slot Hover styling */
.timeline-slot:hover {
    width: 80px;
}

.timeline-slot:hover .slot-line {
    height: 90px;
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-slot:hover .slot-btn {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    transform: scale(1.2);
    box-shadow: 0 0 15px var(--accent-glow);
}

.timeline-slot:hover .slot-btn svg {
    transform: rotate(90deg);
}

/* Overlay & Modals */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 4, 8, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: rgba(22, 16, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    width: 90%;
    max-width: 480px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.overlay.active .modal {
    transform: scale(1);
}

.modal.card-music-theme {
    border-color: rgba(255, 56, 96, 0.3);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 56, 96, 0.1);
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--error-color);
    margin-bottom: 8px;
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 25px;
}

.setup-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.setup-field label {
    font-family: var(--font-heading);
    font-weight: 600;
}

.setup-select {
    width: min(100%, 260px);
    padding: 10px 12px;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    background: #1a1f35;
    color: #fff;
    font: inherit;
}

.setup-description {
    max-width: 320px;
    min-height: 2.8em;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.daily-mode-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 8px 0 16px;
    font-family: var(--font-heading);
    font-weight: 600;
}

.setup-error {
    min-height: 1.4em;
    color: var(--error-color);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Result Reveal Details */
.result-details {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.result-card {
    width: 190px;
    background: rgba(255, 56, 96, 0.05);
    border: 2px solid var(--error-color);
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 8px 24px rgba(255, 56, 96, 0.15);
    animation: shake 0.6s ease both;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 120px;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    15%,
    45%,
    75% {
        transform: translateX(-8px);
    }

    30%,
    60%,
    90% {
        transform: translateX(8px);
    }
}

.result-card h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.result-card p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-card .year-reveal {
    background: var(--error-color);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1rem;
    padding: 4px 10px;
    text-align: center;
    border-radius: 8px;
    margin-top: 15px;
    align-self: flex-start;
}

/* Stat Grid */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.daily-share {
    margin: 0 0 24px;
    padding: 14px;
    text-align: left;
    border: 1px solid rgba(113, 83, 249, 0.4);
    border-radius: 14px;
    background: rgba(113, 83, 249, 0.08);
}

.daily-share-copy strong {
    display: block;
    margin-bottom: 8px;
    color: #c4b5fd;
}

.daily-share-actions {
    display: flex;
    gap: 8px;
}

.daily-share-actions .modal-btn {
    padding: 9px 10px;
    font-size: 0.82rem;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.stat-box:first-child .stat-num {
    color: var(--accent-color);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
    white-space: nowrap;
}

/* Modal buttons */
.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hidden {
    display: none !important;
}

.modal-btn {
    width: 100%;
    padding: 15px;
    border-radius: 14px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--accent-color);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(249, 83, 198, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* YouTube player background container */
.yt-background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    background-color: var(--bg-color);
}

.yt-background-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(8, 6, 12, 0.4) 0%, rgba(8, 6, 12, 0.5) 100%);
    pointer-events: none;
    z-index: 2;
}

#yt-player {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw;
    /* 16:9 ratio */
    min-height: 100vh;
    min-width: 177.77vh;
    /* 16:9 ratio */
    transform: translate(-50%, -50%);
    z-index: 1;
    border: none;
}

#yt-player iframe {
    width: 100% !important;
    height: 100% !important;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .game-title h1 {
        font-size: 1.4rem;
    }

    .score-container {
        padding: 6px 12px;
    }

    .score-value {
        font-size: 1.1rem;
    }

    .player-card {
        padding: 20px;
        gap: 20px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        max-width: 100%;
    }

    .player-controls {
        align-items: center;
    }

    .control-buttons {
        justify-content: center;
    }

    .timeline-slot {
        width: 36px;
    }

    .timeline-slot:hover {
        width: 60px;
    }
}

/* Hint Badges & Lifelines */
.hint-badge {
    background: linear-gradient(135deg, #00ff87 0%, #00b8ff 100%);
    color: #05090f;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 135, 0.4);
    margin-right: 8px;
    vertical-align: middle;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hint-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 255, 135, 0.6);
}

.hint-badge.hidden {
    display: none !important;
}

/* Hint Highlight Effect */
.hint-highlight {
    animation: hintPulse 1.5s infinite alternate !important;
    border-color: #00b8ff !important;
}

@keyframes hintPulse {
    0% {
        box-shadow: 0 0 10px rgba(0, 184, 255, 0.3);
        transform: scale(1);
    }

    100% {
        box-shadow: 0 0 25px rgba(0, 184, 255, 0.8);
        transform: scale(1.05);
    }
}

#btn-hint-margin {
    background: linear-gradient(135deg, #ff007f 0%, #ff7f00 100%);
}

.hint-badge.margin-active {
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.8);
    transform: scale(1.1);
    border: 1px solid #fff;
    opacity: 0.8;
}

.margin-snap-effect {
    animation: marginSnap 1s ease-out !important;
    border-color: #ff007f !important;
}

@keyframes marginSnap {
    0% {
        transform: scale(1.1) translateY(-10px) rotate(-5deg);
        box-shadow: 0 0 30px rgba(255, 0, 127, 0.8);
    }

    50% {
        transform: scale(1.05) translateY(5px) rotate(3deg);
    }

    100% {
        transform: scale(1) translateY(0) rotate(0);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    }
}

#btn-hint-swap {
    background: linear-gradient(135deg, #a200ff 0%, #e000ff 100%);
}

.swap-snap-effect {
    animation: swapSnap 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

@keyframes swapSnap {
    0% {
        transform: translateX(50px) scale(0.9);
        opacity: 0;
    }

    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* Language selector */
.lang-selector {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.06);
    padding: 4px 6px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary, #9ca3af);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.flag-icon {
    display: inline-block;
    width: 1.2em;
    height: 0.8em;
    margin-left: 0.25em;
    vertical-align: -0.08em;
    border-radius: 1px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.flag-sv {
    background:
        linear-gradient(to right, transparent 0 38%, #ffcd00 38% 50%, transparent 50%),
        linear-gradient(to bottom, transparent 0 40%, #ffcd00 40% 60%, transparent 60%),
        #006aa7;
}

.flag-en {
    background:
        linear-gradient(26deg, transparent 43%, #fff 43% 48%, #c8102e 48% 52%, #fff 52% 57%, transparent 57%),
        linear-gradient(-26deg, transparent 43%, #fff 43% 48%, #c8102e 48% 52%, #fff 52% 57%, transparent 57%),
        linear-gradient(to right, transparent 0 40%, #fff 40% 60%, transparent 60%),
        linear-gradient(to bottom, transparent 0 35%, #fff 35% 65%, transparent 65%),
        linear-gradient(to right, transparent 0 45%, #c8102e 45% 55%, transparent 55%),
        linear-gradient(to bottom, transparent 0 42%, #c8102e 42% 58%, transparent 58%),
        #012169;
}

.lang-btn:hover {
    color: #fff;
}

.lang-btn.active {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ===== Spanish Flag Intro Overlay ===== */
.spain-intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: spainFadeIn 0.3s ease-out forwards;
}

.spain-intro-overlay.fade-out {
    animation: spainFadeOut 0.6s ease-in forwards;
}

/* Flag stripes */
.spain-flag-bg {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
}

.spain-stripe {
    flex: 1;
}

.spain-stripe-red-top {
    background: #c60b1e;
    animation: stripeSlideDown 0.4s ease-out both;
}

.spain-stripe-yellow {
    flex: 2;
    background: #ffc400;
    animation: stripeScaleUp 0.5s 0.15s ease-out both;
}

.spain-stripe-red-bottom {
    background: #c60b1e;
    animation: stripeSlideUp 0.4s ease-out both;
}

/* Coat of arms emoji */
.spain-emblem {
    position: relative;
    z-index: 2;
    font-size: clamp(60px, 15vw, 120px);
    animation: emblemPop 0.5s 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.3));
    text-shadow: 0 0 30px rgba(255,196,0,0.5);
}

/* Vamos text */
.spain-vamos {
    position: relative;
    z-index: 2;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(42px, 12vw, 90px);
    color: #fff;
    text-shadow:
        0 2px 0 #c60b1e,
        0 4px 0 #a00a18,
        0 6px 20px rgba(0,0,0,0.4);
    letter-spacing: 4px;
    animation: vamosBounce 0.6s 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Sparkle particles */
.spain-sparkle {
    position: absolute;
    z-index: 3;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    animation: sparkleFly var(--fly-duration, 1.5s) var(--fly-delay, 0s) ease-out both;
}

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

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

@keyframes stripeSlideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

@keyframes stripeSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes stripeScaleUp {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

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

@keyframes vamosBounce {
    0% { opacity: 0; transform: translateY(40px) scale(0.5); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes sparkleFly {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--fly-x, 100px), var(--fly-y, -200px)) scale(0);
    }
}

/* ===== Swedish Flag Intro Overlay ===== */
.sweden-intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
    animation: swedenFadeIn 0.3s ease-out forwards;
}

.sweden-intro-overlay.fade-out {
    animation: swedenFadeOut 0.6s ease-in forwards;
}

.sweden-flag-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #006aa7;
}

.sweden-flag-cross-v,
.sweden-flag-cross-h {
    position: absolute;
    background: #fecc00;
}

.sweden-flag-cross-v {
    top: 0;
    bottom: 0;
    left: 31.25%;
    width: 8%;
    transform: scaleY(0);
    transform-origin: top;
    animation: swedenCrossDown 0.55s 0.1s ease-out both;
}

.sweden-flag-cross-h {
    top: 43.75%;
    left: 0;
    right: 0;
    height: 12.5%;
    transform: scaleX(0);
    transform-origin: left;
    animation: swedenCrossAcross 0.65s 0.3s ease-out both;
}

.sweden-flower,
.sweden-lets-go {
    position: relative;
    z-index: 2;
}

.sweden-flower {
    font-size: clamp(60px, 15vw, 120px);
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
    animation: swedenFlowerPop 0.55s 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.sweden-lets-go {
    max-width: 96vw;
    color: #fff;
    font-family: var(--font-heading);
    font-size: clamp(38px, 11vw, 84px);
    font-weight: 800;
    text-align: center;
    text-shadow: 0 3px 0 #fecc00, 0 6px 20px rgba(0, 0, 0, 0.4);
    animation: swedenTextPop 0.6s 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.sweden-sparkle {
    position: absolute;
    z-index: 3;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    animation: sparkleFly var(--fly-duration, 1.5s) var(--fly-delay, 0s) ease-out both;
}

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

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

@keyframes swedenCrossDown {
    to { transform: scaleY(1); }
}

@keyframes swedenCrossAcross {
    to { transform: scaleX(1); }
}

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

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

/* ===== World Hits Intro Overlay ===== */
.world-intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    overflow: hidden;
    color: #fff;
    background: radial-gradient(ellipse at 50% 45%, #174d68 0, #102b46 48%, #101a2c 100%);
    animation: worldFadeIn 0.35s ease-out both;
}

.world-intro-overlay.fade-out {
    animation: worldFadeOut 0.6s ease-in both;
}

.world-starfield {
    position: absolute;
    inset: 0;
    opacity: 0.7;
    background-image:
        radial-gradient(circle, #fff 1px, transparent 1.6px),
        radial-gradient(circle, #ffd166 1px, transparent 1.8px);
    background-position: 0 0, 23px 31px;
    background-size: 53px 53px, 79px 79px;
    animation: starDrift 12s linear infinite;
}

.world-stage {
    position: relative;
    display: grid;
    width: min(76vw, 340px);
    aspect-ratio: 1;
    place-items: center;
    animation: globeArrive 0.8s 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.world-globe {
    position: relative;
    width: min(49vw, 220px);
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 50%;
    background:
        radial-gradient(ellipse at 34% 28%, rgba(126, 231, 235, 0.95), transparent 36%),
        radial-gradient(circle at 62% 67%, #0876ac 0, #075487 59%, #052f5b 100%);
    box-shadow: 0 0 38px rgba(58, 210, 220, 0.42), inset -18px -12px 30px rgba(2, 18, 43, 0.55);
}

.world-land {
    position: absolute;
    z-index: 1;
    background: linear-gradient(140deg, #81d6a4, #2d9c78);
    filter: drop-shadow(0 2px 1px rgba(0, 30, 40, 0.2));
}

.world-land-americas {
    top: 21%;
    left: 17%;
    width: 26%;
    height: 61%;
    clip-path: polygon(8% 0, 88% 6%, 100% 19%, 70% 32%, 88% 45%, 63% 54%, 60% 73%, 36% 100%, 31% 78%, 8% 63%, 20% 49%, 0 31%);
}

.world-land-eurasia {
    top: 23%;
    right: 12%;
    width: 45%;
    height: 47%;
    clip-path: polygon(0 24%, 16% 7%, 40% 14%, 53% 0, 85% 8%, 100% 32%, 82% 47%, 94% 64%, 65% 72%, 46% 100%, 34% 72%, 17% 68%, 19% 48%);
}

.world-grid {
    position: absolute;
    inset: -2%;
    border: 1px solid rgba(194, 244, 245, 0.55);
    border-radius: 50%;
    background:
        repeating-linear-gradient(0deg, transparent 0 24px, rgba(194, 244, 245, 0.24) 25px 26px, transparent 27px 50px),
        repeating-linear-gradient(90deg, transparent 0 25px, rgba(194, 244, 245, 0.28) 26px 27px, transparent 28px 51px);
    transform: rotate(-17deg) scaleX(0.78);
    animation: gridRotate 16s linear infinite;
}

.world-orbit {
    position: absolute;
    inset: 15% 0;
    border: 1px solid rgba(255, 209, 102, 0.54);
    border-radius: 50%;
    transform: rotate(-20deg);
    animation: planeOrbit 4.2s linear infinite;
}

.world-orbit span {
    position: absolute;
    top: -20px;
    left: 50%;
    font-size: clamp(24px, 7vw, 36px);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.world-flag {
    position: absolute;
    z-index: 2;
    width: clamp(34px, 9vw, 46px);
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
    animation: flagPop 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) both, flagFloat 2.5s ease-in-out infinite alternate;
}

.world-flag-japan {
    background: #fff;
}

.world-flag-japan::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #bc002d;
    content: "";
    transform: translate(-50%, -50%);
}

.world-flag-sweden {
    background-color: #006aa7;
    background-image:
        linear-gradient(to right, transparent 31.25%, #fecc00 31.25% 43.75%, transparent 43.75%),
        linear-gradient(to bottom, transparent 40%, #fecc00 40% 60%, transparent 60%);
}

.world-flag-usa {
    background: repeating-linear-gradient(to bottom, #b22234 0 7.7%, #fff 7.7% 15.4%);
}

.world-flag-usa::before,
.world-flag-usa::after {
    position: absolute;
    top: 0;
    left: 0;
    width: 43%;
    height: 54%;
    content: "";
}

.world-flag-usa::before {
    background: #3c3b6e;
}

.world-flag-usa::after {
    background-image: radial-gradient(circle, #fff 1px, transparent 1.4px);
    background-size: 5px 4px;
}

.world-flag-uk {
    background-color: #012169;
    background-image:
        linear-gradient(31deg, transparent 42%, #fff 42% 58%, transparent 58%),
        linear-gradient(-31deg, transparent 42%, #fff 42% 58%, transparent 58%),
        linear-gradient(31deg, transparent 46%, #c8102e 46% 54%, transparent 54%),
        linear-gradient(-31deg, transparent 46%, #c8102e 46% 54%, transparent 54%),
        linear-gradient(to right, transparent 40%, #fff 40% 60%, transparent 60%),
        linear-gradient(to bottom, transparent 35%, #fff 35% 65%, transparent 65%),
        linear-gradient(to right, transparent 45%, #c8102e 45% 55%, transparent 55%),
        linear-gradient(to bottom, transparent 42%, #c8102e 42% 58%, transparent 58%);
}

.world-flag-japan { top: 7%; left: 10%; animation-delay: 0.65s, 1.3s; }
.world-flag-sweden { top: 14%; right: 7%; animation-delay: 0.85s, 1.5s; }
.world-flag-usa { bottom: 12%; left: 6%; animation-delay: 1.05s, 1.7s; }
.world-flag-uk { right: 8%; bottom: 8%; animation-delay: 1.25s, 1.9s; }

.world-title {
    position: relative;
    z-index: 2;
    max-width: 96vw;
    color: #fff;
    font-family: var(--font-heading);
    font-size: clamp(34px, 9vw, 72px);
    font-weight: 800;
    text-align: center;
    text-shadow: 0 3px 0 #ef8354, 0 6px 22px rgba(0, 0, 0, 0.55);
    animation: worldTitlePop 0.7s 0.95s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

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

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

@keyframes globeArrive {
    from { opacity: 0; transform: scale(0.45) rotate(-14deg); }
    to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes gridRotate {
    to { transform: rotate(343deg) scaleX(0.78); }
}

@keyframes planeOrbit {
    to { transform: rotate(340deg); }
}

@keyframes flagPop {
    from { opacity: 0; transform: scale(0.2) rotate(-18deg); }
    to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes flagFloat {
    to { translate: 0 -8px; }
}

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

@media (prefers-reduced-motion: reduce) {
    .world-intro-overlay *,
    .world-intro-overlay::before,
    .world-intro-overlay::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}