:root {
    --bg-color: #0d1117;
    --card-bg: #161b22;
    --text-color: #ffffff;
    --highlight: #a371f7; /* Violet Twitch/GenZ */
    --green: #2ecc71;
    --red: #e74c3c;
    --partial: #f1c40f;
    --border: #30363d;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
}

.logo { 
    font-family: 'Comic Neue', cursive; /* Ironique */
    font-size: 3rem; 
    font-weight: 900; 
    margin-top: 20px;
    text-align: center;
    text-shadow: 2px 2px 0px #000;
}
.highlight { color: var(--highlight); }
p { text-align: center; color: #8b949e; margin-bottom: 30px; }

.game-container { width: 100%; max-width: 800px; padding: 20px; display: flex; flex-direction: column; align-items: center; }

.search-container { position: relative; width: 100%; max-width: 400px; margin-bottom: 20px; }
input {
    width: 100%; padding: 15px; border-radius: 12px; border: 2px solid var(--border);
    background: #000; color: white; font-size: 1.1rem; outline: none; font-weight: bold;
}
input:focus { border-color: var(--highlight); box-shadow: 0 0 15px rgba(163, 113, 247, 0.3); }

.suggestions-list {
    position: absolute; top: 100%; left: 0; width: 100%;
    background: var(--card-bg); border: 1px solid var(--border);
    max-height: 200px; overflow-y: auto; z-index: 100; border-radius: 0 0 10px 10px;
}
.suggestion-item { padding: 12px; cursor: pointer; border-bottom: 1px solid #333; }
.suggestion-item:hover { background: var(--highlight); color: black; font-weight: bold; }

/* Tableau */
.table-container { width: 100%; overflow-x: auto; }
.guesses-container { display: flex; flex-direction: column; gap: 8px; width: 100%; }

.headers, .guess-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 5px;
    text-align: center;
    min-width: 600px; /* Force le scroll sur mobile */
}

.headers div { font-weight: bold; color: #8b949e; font-size: 0.8rem; text-transform: uppercase; }

.cell {
    background: var(--card-bg);
    padding: 15px 5px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    animation: flipIn 0.5s ease;
    border: 1px solid rgba(255,255,255,0.05);
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

.correct { background-color: var(--green); }
.wrong { background-color: var(--red); }
.partial { background-color: var(--partial); color: black; text-shadow: none; }

/* Victoire */
#winMessage {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    padding: 20px; border-radius: 15px; margin-bottom: 20px;
    text-align: center; width: 100%; animation: popIn 0.5s;
    border: 2px solid white;
}
.result-identity { font-size: 2.5rem; font-weight: 900; margin: 10px 0; text-transform: uppercase; letter-spacing: 2px; }
button { padding: 12px 25px; border-radius: 30px; border: none; font-weight: bold; cursor: pointer; background: black; color: white; font-size: 1rem; transition: 0.2s; }
button:hover { transform: scale(1.05); background: #333; }

.hidden { display: none !important; }
@keyframes flipIn { from { transform: rotateX(-90deg); opacity: 0; } to { transform: rotateX(0); opacity: 1; } }
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
