* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'Arial Rounded MT';
    src: url('../fonts/ArialRoundedMT-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Arial Rounded MT';
    src: url('../fonts/ArialRoundedMT-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

:root {
    --primary-bg: #0a0e27;
    --text-white: #ffffff;
    --text-gray: #b8c1db;
    --font-family: 'Arial Rounded MT', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --gradient-blue: linear-gradient(135deg, #2b3a87 0%, #4a6fa5 100%);
    --card-bg: rgba(20, 26, 55, 0.6);
    --card-border: rgba(184, 193, 219, 0.12);
    --accent: #72a4f2;
}

body {
    font-family: var(--font-family);
    background: var(--primary-bg);
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    background: rgba(10, 14, 39, 0.95);
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.nav-logo:hover {
    opacity: 0.8;
}

.nav-logo img {
    width: 40px;
    height: 40px;
}

.lang-switcher {
    position: absolute;
    right: 0;
}

.lang-toggle {
    background: rgba(74, 111, 165, 0.15);
    border: 1px solid rgba(74, 111, 165, 0.3);
    border-radius: 8px;
    color: var(--text-white);
    cursor: pointer;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 500;
}

.lang-toggle:hover {
    background: rgba(74, 111, 165, 0.25);
    border-color: rgba(74, 111, 165, 0.5);
}

.globe-icon {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
}

.lang-toggle-text {
    min-width: 60px;
    text-align: left;
}

.lang-chevron {
    width: 10px;
    height: 10px;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.lang-switcher.open .lang-chevron {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    display: none;
    flex-direction: column;
    min-width: 130px;
    margin-top: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.lang-switcher.open .lang-dropdown {
    display: flex;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    font-family: var(--font-family);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-btn:hover {
    background: rgba(74, 111, 165, 0.2);
    color: var(--text-white);
}

.lang-btn.active {
    background: rgba(74, 111, 165, 0.3);
    color: var(--text-white);
}

.flag-icon {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-gray);
    font-size: 1.1rem;
    font-weight: 400;
    position: relative;
    z-index: 2;
    margin-top: auto;
    opacity: 40%;
}

/* Neige */
#snow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}

.game-wrapper {
    flex: 1;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    padding: 6rem 1rem 2rem;
}

.game-title {
    font-size: 4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.25rem;
}

.game-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    text-align: center;
    opacity: 40%;
    margin-top: -1.5rem;
}

.game-subtitle a {
    color: inherit;
    text-decoration: none;
    font-style: italic;
    transition: color 0.2s ease;
}

.game-subtitle a:hover {
    color: var(--text-white);
}

.score-section {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
}

.score-card,
.best-card {
    flex: 1;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: border-color 0.3s;
}

.score-card {
    border-color: rgba(114, 164, 242, 0.25);
}

.score-label,
.best-label {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.score-value {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1;
    transition: transform 0.15s ease;
}

.score-value.pop {
    transform: scale(1.25);
    color: var(--accent);
}

.best-value {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-gray);
    line-height: 1;
}

.spin-area,
.score-section,
.hint {
    user-select: none;
}

.spin-area {
    position: relative;
    width: 260px;
    height: 260px;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 600px;
}

.spin-area.dragging {
    cursor: grabbing;
}

.aiko-glow {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(114, 164, 242, 0.18) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.aiko-glow.active {
    opacity: 1;
}

#aiko {
    width: 240px;
    height: 240px;
    object-fit: contain;
    transition: filter 0.2s;
    will-change: transform;
}

.hint {
    font-size: 1rem;
    color: var(--text-gray);
    text-align: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.hint.hidden {
    opacity: 0;
}

@media (max-width: 480px) {
    .navbar {
        padding: 1rem;
    }

    .nav-logo {
        font-size: 1.2rem;
    }

    .nav-logo img {
        width: 35px;
        height: 35px;
    }

    .lang-toggle-text {
        display: none;
    }

    .lang-toggle {
        padding: 0.5rem;
    }

    .game-title {
        font-size: 3rem;
    }

    footer {
        font-size: 0.75rem;
        padding: 1.5rem 1rem;
    }

    .game-wrapper {
        gap: 2rem;
    }

    .score-card,
    .best-card {
        padding: 0.75rem 1.25rem;
    }

    .score-value,
    .best-value {
        font-size: 2.75rem;
    }

    .game-title {
        font-size: 2.5rem;
    }

    .spin-area {
        width: 220px;
        height: 220px;
    }

    #aiko {
        width: 200px;
        height: 200px;
    }

    .hint {
        font-size: 0.9rem;
    }
}
