/* main.css — Style de la page d'accueil Snakube.io | Sanjai */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap');

/* ═══════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════ */

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

body {
    background: #0a0a1a;
    color: #f0f0f0;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 12px;
}

body::before {
    content: '';
    position: fixed;
    top: 30px;
    right: 30px;
    bottom: 30px;
    left: 30px;
    border-radius: 22px;
    border: 2px solid rgba(78, 204, 163, 0.15);
    pointer-events: none;
    z-index: 9999;
    box-shadow:
        inset 0 0 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.04),
        inset 0 0 200px rgba(78, 204, 163, 0.03);
}

/* ═══════════════════════════════════════════
   CANVAS FOND ANIMÉ
   ═══════════════════════════════════════════ */

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* ═══════════════════════════════════════════
   CONTENU PRINCIPAL
   ═══════════════════════════════════════════ */

#accueil {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 40px;
}

/* ═══════════════════════════════════════════
   LOGO / TITRE
   ═══════════════════════════════════════════ */

#logo-section {
    margin-bottom: 40px;
}

#titre {
    font-size: 64px;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 12px;
}

.titre-snake {
    background: linear-gradient(135deg, #4ecca3, #7dd3c0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.titre-io {
    color: #e94560;
    text-shadow: 0 0 30px rgba(233, 69, 96, 0.4);
}

#sous-titre {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* ═══════════════════════════════════════════
   FORMULAIRE JOIN
   ═══════════════════════════════════════════ */

#join-section {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
}

#pseudo-input {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #f0f0f0;
    background: rgba(18, 18, 32, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 24px;
    width: 260px;
    outline: none;
    transition: border-color 0.2s;
}

#pseudo-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

#pseudo-input:focus {
    border-color: rgba(78, 204, 163, 0.4);
    box-shadow: 0 0 20px rgba(78, 204, 163, 0.1);
}

#btn-jouer {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #0a0a1a;
    background: linear-gradient(135deg, #4ecca3, #7dd3c0);
    border: none;
    border-radius: 14px;
    padding: 14px 40px;
    cursor: pointer;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 4px 24px rgba(78, 204, 163, 0.3);
    transition: all 0.2s ease;
}

#btn-jouer:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(78, 204, 163, 0.5);
}

#btn-jouer:active {
    transform: translateY(0);
}

/* ═══════════════════════════════════════════
   TOP SCORES
   ═══════════════════════════════════════════ */

#top-scores {
    background: rgba(14, 14, 28, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    padding: 20px 28px;
    max-width: 340px;
    margin: 0 auto 32px;
}

#top-scores h3 {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 14px;
}

#top-scores-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: rank;
}

#top-scores-list li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    counter-increment: rank;
}

#top-scores-list li:last-child {
    border-bottom: none;
}

#top-scores-list li::before {
    content: counter(rank) ".";
    color: rgba(255, 255, 255, 0.25);
    font-weight: 700;
    font-size: 11px;
    width: 24px;
    flex-shrink: 0;
}

.ts-name {
    flex: 1;
    color: rgba(255, 255, 255, 0.6);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ts-score {
    font-weight: 700;
    color: #f0a050;
    margin-left: 12px;
}

/* ═══════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════ */

#nav-links {
    display: flex;
    justify-content: center;
    gap: 24px;
}

#nav-links a {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color 0.2s;
}

#nav-links a:hover {
    color: #4ecca3;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 600px) {
    #titre {
        font-size: 42px;
    }

    #join-section {
        flex-direction: column;
        align-items: center;
    }

    #pseudo-input {
        width: 100%;
        max-width: 300px;
    }

    #btn-jouer {
        width: 100%;
        max-width: 300px;
    }
}
