:root {
    --bg-color: #1e1e2e;
    --card-bg: #2a2a3c;
    --text-color: #ffffff;
    --highlight: #fab1a0;
    --green: #2ecc71;
    --red: #e74c3c;
    --border: #444;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

.screen { display: none; padding: 20px; min-height: 100vh; box-sizing: border-box; }
.screen.active { display: flex; flex-direction: column; align-items: center; }

/* Menu */
.logo { font-size: 3rem; font-weight: 900; letter-spacing: -2px; margin-bottom: 20px; text-align: center;}
.logo.small { font-size: 1.5rem; margin: 0; }
.highlight { color: var(--highlight); }

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 900px;
}

.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    cursor: pointer;
    transition: 0.2s;
    text-align: center;
    border: 1px solid var(--border);
}
.card:hover { transform: translateY(-5px); background: #35354a; border-color: var(--highlight); }
.card-icon { font-size: 3rem; margin-bottom: 10px; font-weight: bold; }
.card-title { font-size: 1.2rem; font-weight: bold; margin-bottom: 5px; }
.card-desc { color: #aaa; font-size: 0.8rem; }

/* Jeu */
header { width: 100%; max-width: 1000px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.back-btn { background: none; border: 1px solid #aaa; color: white; padding: 5px 15px; border-radius: 20px; cursor: pointer; }

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

.search-container { position: relative; width: 100%; max-width: 500px; margin-bottom: 30px; }
input {
    width: 100%; padding: 15px; border-radius: 8px; border: 2px solid var(--border);
    background: #111; color: white; font-size: 1.1rem; outline: none;
}
.suggestions-list {
    position: absolute; top: 100%; left: 0; width: 100%;
    background: #2a2a3c; border: 1px solid var(--border);
    max-height: 200px; overflow-y: auto; z-index: 100;
}
.suggestion-item { padding: 10px; cursor: pointer; border-bottom: 1px solid #333; display: flex; justify-content: space-between; }
.suggestion-item:hover { background: var(--highlight); color: black; }

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

.headers, .guess-row {
    display: grid;
    gap: 5px;
    margin-bottom: 5px;
    text-align: center;
}
.headers div { font-weight: bold; color: #888; font-size: 0.75rem; text-transform: uppercase; }

.cell {
    background: var(--card-bg);
    padding: 10px 5px;
    border-radius: 4px;
    display: flex;
    flex-direction: column; /* Pour afficher science en dessous */
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
    animation: flipIn 0.5s;
    border: 1px solid rgba(255,255,255,0.05);
}

.correct { background-color: var(--green); }
.wrong { background-color: var(--red); }

#winMessage {
    background: linear-gradient(45deg, #00b894, #0984e3);
    padding: 20px; border-radius: 10px; margin-bottom: 20px;
    text-align: center; width: 100%; max-width: 500px;
}
.result-identity { font-size: 1.8rem; font-weight: 900; margin: 10px 0; }
button { padding: 10px 20px; border-radius: 5px; border: none; font-weight: bold; cursor: pointer; background: white; color: black; }
.hidden { display: none !important; }
@keyframes flipIn { from { transform: rotateX(-90deg); opacity: 0; } to { transform: rotateX(0); opacity: 1; } }
