/* ===========================
   LAYOUT PRINCIPAL
=========================== */

.neonss-main {
    padding: 40px 20px;
    max-width: 1000px;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

/* ===========================
   MENU DE DÉMARRAGE
=========================== */

.game-menu {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--accent);
    box-shadow: 0 0 25px rgba(76, 201, 240, 0.5);
    border-radius: 12px;
    padding: 25px 30px;
    text-align: center;
    max-width: 600px;
    animation: fadeIn 0.6s ease;
}

.game-title {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.game-subtitle {
    opacity: 0.85;
    margin-bottom: 20px;
}

.game-btn {
    margin-top: 10px;
}

/* ===========================
   ZONE DE JEU
=========================== */

.game-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
}

#gameCanvas {
    display: block;
    margin: auto;
    background: #000000dd;
    border: 2px solid var(--accent);
    box-shadow: 0 0 25px var(--accent);
    width: 100%;
    height: 600px;
}

/* ===========================
   HUD
=========================== */

.hud {
    position: absolute;
    top: 10px;
    left: 10px;
    color: var(--text);
    display: flex;
    gap: 20px;
    font-weight: bold;
    text-shadow: 0 0 8px #000;
}

/* ===========================
   MESSAGE BONOBO
=========================== */

.bonobo-message {
    display: none;
    text-align: center;
    margin-top: 20px;
    padding: 25px 30px;
    border-radius: 12px;
    border: 1px solid var(--accent);
    box-shadow: 0 0 25px rgba(76, 201, 240, 0.6);
    background: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.6s ease;
}

.bonobo-message h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--accent);
}

/* ===========================
   LEADERBOARD
=========================== */

.leaderboard {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--accent);
    border-radius: 10px;
    color: var(--text);
    box-shadow: 0 0 15px var(--accent);
    animation: fadeIn 0.6s ease;
}

/* ===========================
   ÉCRAN DE CHARGEMENT
=========================== */

#loading-screen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #0a0a0f, #000);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.6s ease;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-container {
    text-align: center;
    color: #4cc9f0;
    font-family: "Orbitron", sans-serif;
}

.loader-monkey {
    font-size: 90px;
    animation: monkeyBounce 1.4s infinite ease-in-out;
}

.loader-items {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.loader-items span {
    font-size: 40px;
    animation: spinItem 1.2s infinite linear;
}

.loader-items span:nth-child(2) { animation-delay: 0.2s; }
.loader-items span:nth-child(3) { animation-delay: 0.4s; }
.loader-items span:nth-child(4) { animation-delay: 0.6s; }

.loader-text {
    margin-top: 25px;
    font-size: 18px;
    color: #fff;
    text-shadow: 0 0 8px #4cc9f0;
    animation: blink 1.2s infinite;
}

/* ===========================
   ANIMATIONS
=========================== */

@keyframes monkeyBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-18px); }
}

@keyframes spinItem {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.3); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* ===========================
   RESPONSIVE
=========================== */

@media (max-width: 700px) {
    #gameCanvas {
        height: 420px;
    }

    .game-title {
        font-size: 1.8rem;
    }

    .loader-monkey {
        font-size: 70px;
    }

    .loader-items span {
        font-size: 32px;
    }
}

