/* ------------------------------
      GLOBAL STYLE RÉTRO GAMING
------------------------------ */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Press Start 2P", monospace;
    background: #1b1b1b;
    color: #e8e8e8;
    text-rendering: optimizeLegibility;
    image-rendering: pixelated;
}

/* Fond CRT rétro */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(rgba(255, 255, 255, 0.03) 0px,
            rgba(255, 255, 255, 0.03) 2px,
            transparent 3px,
            transparent 4px);
    pointer-events: none;
    z-index: 99;
}

/* ------------------------------
          APP
------------------------------ */

#app {
    width: 100%;
    max-width: 760px;
    padding: 20px;
    margin: 0 auto;
}

/* ------------------------------
          SCREENS
------------------------------ */

.screen {
    display: none;
    background: #111;
    border: 4px solid #8bac0f;
    padding: 30px;
    border-radius: 6px;
    box-shadow: 0px 0px 0px 4px #0f380f inset,
        0px 0px 15px #0f380f;
}

.screen.active {
    display: block;
}

/* ------------------------------
          TITRES
------------------------------ */

h1,
h2 {
    text-transform: uppercase;
    letter-spacing: 2px;
}

h1 {
    font-size: 22px;
    margin-bottom: 14px;
    color: #9bbc0f;
}

h2 {
    font-size: 14px;
    margin-bottom: 20px;
}

/* ------------------------------
          INPUT
------------------------------ */

#playerName {
    font-family: "Press Start 2P", monospace;
    background: #0f380f;
    border: 3px solid #8bac0f;
    padding: 12px;
    width: 90%;
    color: #fff;
    border-radius: 4px;
    margin-top: 12px;
}

#playerName:focus {
    outline: none;
    border-color: #9bbc0f;
}

/* ------------------------------
          BOUTONS
------------------------------ */

button {
    background: #306230;
    border: 3px solid #8bac0f;
    padding: 14px 18px;
    color: white;
    font-family: "Press Start 2P", monospace;
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
    text-transform: uppercase;
}

button:hover {
    background: #8bac0f;
    border-color: #9bbc0f;
    transform: translateY(-2px);
}

/* ------------------------------
          RÉPONSES
------------------------------ */

#answers {
    margin-top: 20px;
    display: grid;
    gap: 12px;
}

.answer-btn {
    text-align: left;
    font-size: 12px;
    padding: 14px;
    background: #0f380f;
    border: 3px solid #306230;
}

.answer-btn:hover {
    background: #306230;
}

/* États correct / incorrect */
.answer-btn.btn-correct {
    background: #8bac0f !important;
    border-color: #9bbc0f !important;
    color: #111 !important;
}

.answer-btn.btn-wrong {
    background: #8f0f0f !important;
    border-color: #bf1f1f !important;
}

/* ------------------------------
             TIMER
------------------------------ */

#timer {
    font-size: 14px;
    margin-top: 16px;
    color: #9bbc0f;
}

/* ------------------------------
         EXPLICATION
------------------------------ */

#explanation {
    background: #111;
    border: 3px solid #306230;
    padding: 18px;
    margin-top: 20px;
    border-radius: 4px;
}

#explanation-text {
    font-size: 12px;
    line-height: 1.6;
    color: #e8e8e8;
}

/* Bouton "suivant" */
#next-question-btn {
    margin-top: 14px;
    float: right;
}

/* Nettoyage du float */
#explanation::after {
    content: "";
    display: block;
    clear: both;
}

/* ------------------------------
         LEADERBOARD
------------------------------ */

#leaderboard {
    text-align: left;
    margin-top: 20px;
    font-size: 11px;
}

#leaderboard li {
    padding: 8px 0;
    border-bottom: 1px dashed #306230;
}

/* ------------------------------
         RESPONSIVE
------------------------------ */

@media (max-width: 520px) {
    button {
        font-size: 10px;
        padding: 10px;
    }

    .answer-btn {
        font-size: 10px;
        padding: 10px;
    }
}

/* Effet clignotement arcade */
@keyframes arcade-blink {

    0%,
    100% {
        opacity: 1;
        text-shadow: 0 0 6px #ff0077, 0 0 12px #ff00aa, 0 0 20px #ff33cc;
    }

    50% {
        opacity: 0.3;
        text-shadow: 0 0 2px #ff0077;
    }
}

.arcade-title {
    color: #ff55cc;
    font-family: "Press Start 2P", monospace;
    /* si tu veux le look arcade */
    text-transform: uppercase;
    animation: arcade-blink 0.9s infinite;
}

.home-link {
    display: block;
    margin-top: 10px;
    color: #8bac0f;
    text-decoration: none;
    font-size: 12px;
    text-transform: uppercase;
}

.home-link:hover {
    color: #9bbc0f;
    text-decoration: underline;
}