body {
    background-color: #1a1a1a;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* Login Overlay */
#login-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
}
.login-box {
    background: #2d2d2d;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0,255,127, 0.2);
}
input {
    display: block; margin: 10px auto; padding: 10px;
    background: #404040; border: none; color: white; border-radius: 5px;
}
button {
    background: #00b894; color: white; border: none;
    padding: 10px 20px; cursor: pointer; border-radius: 5px; font-weight: bold;
}
button:hover { background: #00a383; }

/* Layout Jeu */
.main-container {
    display: flex;
    gap: 40px;
    display: none; /* Caché avant login */
}

.sidebar {
    background: #2d2d2d;
    padding: 20px;
    border-radius: 10px;
    width: 250px;
}

.score-box {
    background: #404040;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    font-size: 1.2em;
}

.shop-btn {
    width: 100%;
    margin-bottom: 10px;
    background: #6c5ce7;
}
.shop-btn:hover { background: #5a4ad1; }

#status {
    margin-top: 10px;
    text-align: center;
    font-style: italic;
    color: #888;
}

/* Couleur pour la case sélectionnée */
.highlight-selected {
  box-shadow: inset 0 0 3px 3px rgba(255, 255, 0, 0.7);
}

/* Couleur pour les mouvements possibles */
.highlight-hint {
  background-color: rgba(0, 255, 127, 0.3) !important;
  border-radius: 50%; /* Pour faire un petit cercle au milieu de la case */
  transform: scale(0.3);
}

.highlight-hint {
    background: radial-gradient(circle, rgba(0, 255, 127, 0.4) 20%, transparent 25%) !important;
}

/* Animation quand une pièce bouge */
.chessboard-63f59 { /* Classe interne de chessboard.js */
    transition: all 0.3s ease-in-out;
}

/* Donne un aspect néon au plateau */
#myBoard {
    border: 5px solid #333;
    border-radius: 8px;
    box-shadow: 0 0 25px rgba(108, 92, 231, 0.4); /* Lueur violette */
    overflow: hidden;
}

/* Animation sur les pièces lors du survol */
.piece-417db:hover {
    filter: drop-shadow(0 0 8px rgba(0, 255, 127, 0.8));
    cursor: grab;
    transform: scale(1.1);
    transition: transform 0.2s;
}

/* Animation de "secousse" si on essaie un coup invalide */
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.invalid-move {
    animation: shake 0.3s;
}

.square-check {
  background: radial-gradient(circle, rgba(255,0,0,1) 0%, rgba(255,0,0,0) 70%) !important;
  animation: pulse-red 1s infinite;
}

@keyframes pulse-red {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* Animation sur la case survolée */
.square-55d63:hover {
    filter: brightness(1.2);
    transition: all 0.2s ease;
}

/* Effet sur les pièces pour donner l'impression qu'elles flottent */
.piece-417db {
    transition: transform 0.2s ease-out;
}

.piece-417db:active {
    transform: scale(1.2) rotate(5deg); /* La pièce grossit et penche quand on la porte */
}