/* Import a professional chess-like font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

/* General Styling */
body {
    font-family: 'Inter', sans-serif;
    text-align: center;
    background: #1e1e1e;
    color: #f0f0f0;
    margin: 0;
    padding: 0;
}

/* Title */
h1 {
    font-size: 32px;
    margin-top: 20px;
    font-weight: 600;
    color: #ffffff;
}

/* Difficulty Selector */
#difficulty {
    font-size: 16px;
    padding: 6px;
    margin-bottom: 15px;
    background: #303030;
    color: #ffffff;
    border: 1px solid #444;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

#difficulty:hover {
    background: #444;
}

/* Chessboard & Captured Pieces Layout */
.game-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
}

/* Captured Pieces */
.captured-container {
    width: 160px;
    min-height: 120px;
    background: #282828;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #444;
    text-align: center;
}

.captured-container h2 {
    font-size: 16px;
    color: #bbb;
    margin-bottom: 8px;
}

#captured-white, #captured-black {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    min-height: 40px;
}

#captured-white img, #captured-black img {
    width: 40px;
    margin: 3px;
}

/* Chessboard */
#board {
    width: 550px;
    margin: 15px;
    border: 2px solid #444;
    border-radius: 5px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
}

/* Restart Button */
button {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    background: #303030;
    color: #ffffff;
    border: 1px solid #444;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    background: #444;
}

/* Move Highlighting */
.square-55d63 {
    position: relative;
}

.square-highlight {
    background-color: rgba(0, 255, 0, 0.4) !important; /* Green for move highlights */
}

.square-capture {
    background-color: rgba(255, 0, 0, 0.4) !important; /* Red for captures */
}

/* Rules Section */
.rules-container {
    max-width: 700px;
    margin: 30px auto;
    padding: 15px;
    background: #282828;
    border-radius: 8px;
    border: 1px solid #444;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
}

.rules-container h2, h3 {
    color: #ffffff;
    text-align: center;
}

.rules-container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.rules-container th, .rules-container td {
    padding: 10px;
    border: 1px solid #444;
    text-align: center;
}

.rules-container th {
    background: #333;
    color: #fff;
}

.rules-container td {
    background: #222;
    color: #ccc;
}

/* Special Rules List */
.rules-container ul {
    list-style-type: none;
    padding: 0;
    margin-top: 10px;
}

.rules-container li {
    padding: 5px 0;
    border-bottom: 1px solid #444;
    color: #ddd;
    font-size: 14px;
}

.rules-container li:last-child {
    border-bottom: none;
}

/* Home Button */
.home-button {
    display: inline-block;
    margin: 20px auto;
    padding: 10px 20px;
    font-size: 18px;
    background: #303030;
    color: white;
    border: 2px solid #555;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    transition: 0.3s;
}

.home-button:hover {
    background: #444;
    border-color: #777;
}