/* --- Base --- */
body {
    background-color: #0b0b0b; /* Noir profond */
    color: #fcee0a; /* Cyberpunk Yellow */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    text-transform: uppercase;
}

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

/* --- Header & Logo --- */
.logo {
    width: 100px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 5px #ff003c);
}

h1 {
    font-size: 3rem;
    margin: 0;
    letter-spacing: 5px;
    color: #fcee0a;
    text-shadow: 2px 2px #00f0ff;
}

.glitch {
    color: #00f0ff;
    text-shadow: -2px 0 #ff003c;
}

p {
    color: #fff;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

/* --- Input & Suggestions --- */
.search-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin-bottom: 30px;
}

input {
    width: 100%;
    padding: 15px;
    background: #000;
    border: 2px solid #fcee0a;
    color: #fcee0a;
    font-size: 1.2rem;
    outline: none;
    text-transform: uppercase;
    font-weight: bold;
}

input:focus {
    box-shadow: 0 0 15px #fcee0a;
}

.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #fcee0a;
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #333;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.suggestion-item:hover {
    background: #fcee0a;
    color: #000;
}

.mini-img {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 50%;
}

/* --- Game Board --- */
.game-board {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.headers {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 1fr;
    gap: 5px;
    margin-bottom: 10px;
    font-weight: bold;
    color: #00f0ff;
    text-align: center;
    font-size: 0.8rem;
}

.guess-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 1fr;
    gap: 5px;
    animation: fadeIn 0.5s ease;
}

.cell {
    background: #1a1a1a;
    border: 1px solid #333;
    height: 60px; /* Hauteur fixe pour alignement */
    display: flex;
    flex-direction: column; /* Pour empiler img et text */
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.8rem;
    color: white;
    padding: 2px;
    overflow: hidden;
}

/* Image dans la première case */
.cell-img {
    width: 35px;
    height: 35px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 2px;
}

/* --- Couleurs de validation --- */
.correct {
    background-color: #21a366 !important; /* Vert */
    border-color: #2eff94;
    color: white;
}

.wrong {
    background-color: #a32121 !important; /* Rouge */
    border-color: #ff2e2e;
}

.partial {
    background-color: #d68f1c !important; /* Orange/Jaune */
    border-color: #ffae00;
}

/* --- Message de Victoire --- */
#winMessage {
    text-align: center;
    margin-bottom: 20px;
    background: rgba(0, 240, 255, 0.1);
    padding: 20px;
    border: 1px solid #00f0ff;
}

.hidden {
    display: none;
}

button {
    margin-top: 15px;
    padding: 10px 20px;
    background: #fcee0a;
    border: none;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
}

button:hover {
    background: #fff;
    box-shadow: 0 0 10px #fff;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile responsive */
@media (max-width: 600px) {
    .headers, .guess-row {
        grid-template-columns: 1fr; /* Stack vertical sur mobile ou scroll horizontal */
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        border-bottom: 2px solid #333;
        padding-bottom: 10px;
    }
    .cell {
        width: 30%; /* 3 par ligne sur mobile */
        height: auto;
        padding: 10px;
    }
    .headers { display: none; } /* On cache les headers sur mobile pour simplifier */
}
