:root {
    --bg: #f0f4f8;
    --surface: #ffffff;
    --surface2: #e8eef5;
    --border: #d0dce8;
    --text-primary: #1a2b3c;
    --text-secondary: #5a7a99;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-glow: rgba(37, 99, 235, 0.25);
    --winner: #059669;
    --select-bg: #f5f8fc;
    --shadow: 0 4px 24px rgba(30, 60, 100, 0.10);
    --shadow-lg: 0 8px 40px rgba(30, 60, 100, 0.14);
    --btn-shadow: 0 4px 16px rgba(37, 99, 235, 0.30);
}

.dark-style {
    --bg: #0a1628;
    --surface: #111e35;
    --surface2: #0d1f38;
    --border: #1e3555;
    --text-primary: #ffffff;
    --text-secondary: #7a9cc0;
    --accent: #3b9cff;
    --accent-hover: #5aaeff;
    --accent-glow: rgba(59, 156, 255, 0.25);
    --winner: #1dbe8a;
    --select-bg: #0d1f38;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.40);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.50);
    --btn-shadow: 0 4px 16px rgba(52, 152, 219, 0.40);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
/*
body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    transition: background 0.35s ease;
}
*/
/* HEADER */
/*
.header {
    width: 100%;
    max-width: 600px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.header-text h1 {
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.5px;
    line-height: 1.1;
    transition: color 0.35s;
}

.header-text .subtitle {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.35s;
}
*/

/* DARK MODE TOGGLE */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 50px;
    padding: 6px 14px 6px 10px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.25s ease;
    box-shadow: var(--shadow);
    white-space: nowrap;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.toggle-icon {
    font-size: 16px;
    transition: transform 0.4s ease;
}

.theme-toggle:hover .toggle-icon {
    transform: rotate(20deg);
}

/* GAME CARD */
#game {
    background: var(--surface);
    border-radius: 24px;
    padding: 2rem 1.5rem 1.75rem;
    width: 100%;
    max-width: 600px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1.5px solid var(--border);
    transition: background 0.35s, border-color 0.35s, box-shadow 0.35s;
}

/* Subtle texture overlay */
#game::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, var(--accent-glow) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    transition: background 0.35s;
}

#arena {
    display: flex;
    justify-content: space-between;
    position: relative;
    min-height: 350px;
    margin-bottom: 1.5rem;
    z-index: 1;
}

.team-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 120px;
    z-index: 5;
    padding-top: 20px;
}

.flag {
    font-size: 68px;
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.country-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: center;
    transition: color 0.35s;
}

.winner-label {
    font-size: 14px;
    font-weight: 800;
    color: var(--winner);
    opacity: 0;
    text-align: center;
    letter-spacing: 0.5px;
    transition: color 0.35s;
}

.winner-label.show {
    opacity: 1;
    animation: bounce 0.5s ease infinite alternate;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-5px);
    }
}

/* OCTOPUS */
#octopus-wrapper {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 85px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    transition: top 2.5s ease-in-out, left 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes swim {

    0%,
    100% {
        transform: translateX(-50%) scale(1) translateY(0);
    }

    50% {
        transform: translateX(-50%) scale(1.1, 0.9) translateY(-10px);
    }
}

.swimming {
    animation: swim 0.6s ease-in-out infinite;
}

#blindfold {
    position: absolute;
    top: 32px;
    width: 75px;
    height: 22px;
    background: var(--text-primary);
    color: var(--surface);
    font-size: 9px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    z-index: 12;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: opacity 0.5s ease, transform 0.5s ease, background 0.35s, color 0.35s;
    letter-spacing: 1.5px;
}

#blindfold.removed {
    opacity: 0;
    transform: scaleX(1.5) translateY(-20px);
}

.eyes-container {
    position: absolute;
    top: 32px;
    display: flex;
    gap: 12px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.eyes-container.revealed {
    opacity: 1;
}

.eye {
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.eye::after {
    content: '';
    position: absolute;
    width: 7px;
    height: 7px;
    background: #000;
    border-radius: 50%;
    top: 3px;
    left: 4px;
}

.mouth {
    position: absolute;
    top: 48px;
    width: 24px;
    height: 12px;
    border-bottom: 4px solid #4a0000;
    border-radius: 0 0 24px 24px;
    opacity: 0;
}

.mouth.happy {
    opacity: 1;
}

/* DIVIDER */
.arena-divider {
    position: absolute;
    left: 50%;
    top: 20px;
    bottom: 20px;
    width: 1px;
    background: var(--border);
    transform: translateX(-50%);
    z-index: 2;
    transition: background 0.35s;
}

/* CONTROLS */
#controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
    position: relative;
    z-index: 1;
}

#teams-selector {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    width: 100%;
    align-items: center;
}

.vs-badge {
    background: var(--surface2);
    color: var(--text-secondary);
    font-weight: 900;
    font-size: 12px;
    letter-spacing: 1.5px;
    padding: 8px 10px;
    border-radius: 8px;
    text-align: center;
    border: 1.5px solid var(--border);
    transition: background 0.35s, color 0.35s, border-color 0.35s;
}

select {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: var(--select-bg);
    color: var(--text-primary);
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a7a99' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: all 0.25s ease;
    outline: none;
}

select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

#predict-btn {
    padding: 15px 44px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
    font-weight: 700;
    font-size: 15px;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    box-shadow: var(--btn-shadow);
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

#predict-btn:hover:not(:disabled) {
    transform: scale(1.04) translateY(-1px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

#predict-btn:active:not(:disabled) {
    transform: scale(0.98);
}

#predict-btn:disabled {
    background: var(--surface2);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

#result-msg {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    min-height: 22px;
    text-align: center;
    transition: color 0.35s;
    letter-spacing: 0.2px;
}

#result-msg.active {
    color: var(--text-primary);
    font-weight: 600;
}

#confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
}