body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background-color: #f0f0f0;
    font-family: Arial, sans-serif;
}

#menu {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#menu h1 {
    margin-bottom: 20px;
    color: #333;
}

#menu button {
    margin: 10px;
    padding: 10px 20px;
    font-size: 18px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#menu button:hover {
    background-color: #45a049;
}

#game {
    display: none;
    width: 100%;
    height: 100vh;
    flex-direction: column;
}

#top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #ddd;
    font-size: 16px;
}

#top-bar button {
    padding: 5px 10px;
    cursor: pointer;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 3px;
}

#board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    width: 90vmin;
    height: 90vmin;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    background-color: #fff;
    margin: auto;
}

.square {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6vmin;
    cursor: pointer;
    transition: background-color 0.3s;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5), -1px -1px 2px rgba(255,255,255,0.3);
}

.light {
    background-color: #f0d9b5;
}

.dark {
    background-color: #b58863;
}

.selected {
    background-color: #ffff99 !important;
}

.possible {
    background-color: #99ff99 !important;
}

@keyframes moveAnim {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.move-animation {
    animation: moveAnim 0.5s ease-in-out;
}

#promotion-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    text-align: center;
    z-index: 1000;
}

#promotion-modal h2 {
    margin-bottom: 15px;
}

#promotion-modal button {
    margin: 5px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#promotion-modal button:hover {
    background-color: #45a049;
}