body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    text-align: center;
}

header {
    background-color: #222;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

nav ul li {
    margin: 0 10px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    background: #444;
    border-radius: 5px;
}

nav ul li a.active {
    background: #777;
}

/* Style des boutons uniformisé */
button {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.nav-links button {
    background: #333;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.nav-links .active {
    background: #888;
}

.game-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px;
}

.style-selector {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

.chess-board img {
    width: 300px;
    height: auto;
    border: 5px solid #222;
    border-radius: 10px;
}

.move-list {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    width: 250px;
}

.move-list h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

#moves-history {
    list-style-position: inside;
    padding-left: 10px;
}

#moves-history li {
    margin-bottom: 8px;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

#moves-history li:nth-child(odd) {
    background-color: #f5f5f5;
}

#moves-history li:hover {
    background-color: #e9e9e9;
}

#moves-history .white-move {
    color: #333;
}

#moves-history .black-move {
    color: #555;
    font-weight: bold;
}

#moves-history .capture {
    color: #d32f2f;
}

.game-controls {
    margin-top: 15px;
}

.control-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.control-btn:hover {
    background-color: #45a049;
}

#chessBoard {
  display: grid;
  grid-template-columns: repeat(8, 50px);
  grid-template-rows: repeat(8, 50px);
  gap: 0;
}

.square {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.piece {
 font-size: 30px;
}

.style {
    width: 250px;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
}

select {
    width: 100%;
    padding: 5px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.style-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px;
    border: 1px solid #ccc;
    margin: 5px 0;
    border-radius: 5px;
}

.color-box {
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

.edit-icon {
    cursor: pointer;
}

#styleEdit {
    cursor: pointer;
}

#styleCreate {
    margin-top: 10px;
    background: #00aaff;
    color: white;
    padding: 8px;
    cursor: pointer;
    border-radius: 5px;
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    width: 400px;
    height: 400px;
    padding: 20px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    display: none; /* La popup est cachée par défaut */
    z-index: 1000;
}
  
.popup-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
  
.close-button {
    cursor: pointer;
    font-size: 20px;
    align-self: flex-end;
}

/* Style pour les boutons dans la popup */
.popup-content button {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#saveButton {
    background: #00aaff;
    color: white;
}

#cancelButton {
    background: #888;
    color: white;
}

/* Styles uniformisés avec accueil.css */
.auth-buttons button {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.auth-buttons .register {
    background: #00aaff;
    color: white;
}

.auth-buttons img {
    width: 35px;
    height: 35px; 
    object-fit: cover; 
    border-radius: 50%;
}