  /* Reset default margin and padding */
  * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* Body styling */
        body {
            display: flex;
            flex-direction: column;
            height: 100vh; /* Full height */
            background-image: url('bg.jpg'); /* Background image */
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            font-family: Arial, sans-serif;
        }

        /* Copyright section in the footer */
        .copyright-message {
            margin-top: 10px;
            color: white;
        }

        .copyright-message a {
            text-decoration: none;
            color: white;
        }

        /* Main content area */
        .content {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-grow: 1; /* Takes up the remaining vertical space */
        }
        .game-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
            max-width: 960px;
        }

        .game-controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            text-align: center;
            border: 2px solid #b58863;
            border-radius: 10px;
            width: 100%;
            padding: 5px;
            background-color: #f0d9b5;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); /* Optional shadow */
        }

        .game-title {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            text-align: center;
            color: #654938;
            text-transform: uppercase;
            border: 2px solid #b58863;
            border-radius: 10px;
            width: 100%;
            padding: 5px;
            background-color: #f0d9b5;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); /* Optional shadow */
        }

        .game-title div {
            display: flex;
            flex-direction: column;  /* Stack the image and text vertically */
            align-items: center;     /* Center align both image and text */
        }
        
        .game-title img {
            margin-bottom: 5px;  /* Optional spacing between image and text */
        }

        .game-board {
            width: 100%;
            aspect-ratio: 16 / 8;        /* Aspect ratio for 16 columns and 8 rows */
            display: grid;
            grid-template-columns: repeat(16, 1fr); /* Dynamically set width based on aspect ratio */
            grid-template-rows: repeat(8, 1fr);     /* Dynamically set height based on aspect ratio */
            gap: 1px;
            background-color: #fcf5e3;
            border: 2px solid #b58863;
            border-radius: 10px;
            padding: 10px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); /* Optional shadow */
        }

        .cell {
            position: relative;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 30px;
        }
        .cell.light {
            background-color: #f0d9b5;
            border: 2px solid #b58863;
        }
        .cell.dark {
            background-color: #b58863;
            border: 2px solid #b58863;
        }
        .cell.power-up {
            background-color: gold !important;
        }
        
        .cell.power-up.light {
            background-color: #ffd700 !important;
        }
        
        .cell.power-up.dark {
            background-color: #daa520 !important;
        }
        .wall {
            background-image: url('muur.png');
            background-size: cover;
            border: 2px solid #b58863;
        }
        .knight-white {
            background-image: url('horse1.png');
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center;
        }
        
        .knight-black {
            background-image: url('horse2.png');
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center;
        }
        .selected {
            box-shadow: 0 0 10px 3px yellow;
            border: 2px solid yellow;
        }

        p {
            margin-bottom: 1.1em;
        }

        button {
            background-color: #654938;
            border: 2px solid #b58863;
            color: #fff;
            padding: 5px 10px;
            border-radius: 5px;
            font-size: 1rem;
            cursor: pointer;
          }
          
        button:hover {
            background-color: #b58863;
            border: 2px solid #654938;
          }

          input {
            height: 30px;
            text-align: center;
          }

          label {
            font-size: 1em;
            color: #654938;
            text-transform: uppercase;
          }

          select {
            height: 30px;
            text-align: center;
          }

        .score-display {
            font-size: 1.5em;
            color: #654938;
            text-transform: uppercase;
        }

        #playerScore {
            font-weight: bold;
        }

        #computerScore {
            font-weight: bold;
        }

          .modal {
            display: none; /* Ensure it's hidden initially */
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            align-items: center;
            justify-content: center;
        }
        
        .modal-content {
            background-color: #fff;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            width: 400px;
            max-width: 90%;
            text-align: center;
            position: relative;
        }      
        
        .modal-button {
            margin-top: 15px;
            background-color: #654938;
            border: 2px solid #b58863;
            color: #fff;
            padding: 10px 20px;
            border-radius: 5px;
            font-size: 1rem;
            cursor: pointer;
        }
        
        .modal-button:hover {
            background-color: #b58863;
            border: 2px solid #654938;
        }
        
        .close {
            position: absolute;
            top: 10px;
            right: 15px;
            font-size: 20px;
            font-weight: bold;
            color: #aaa;
            cursor: pointer;
        }
        
        .close:hover {
            color: #000;
        }

/* Help Modal */
.help-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.help-modal-content {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: auto;
    /* Remove fixed width and height */
}

.help-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    z-index: 1001; /* Ensure it's above scrollable content */
}

.help-close:hover {
    color: #000;
}

/* Add any additional styles for the help modal content */
.help-modal-content h2 {
    color: #654938;
    margin-bottom: 15px;
}

.help-modal-content p, .help-modal-content ol {
    color: #333;
    line-height: 1.6;
}

.help-modal-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
}
.center {
    display: block;
    margin-left: auto;
    margin-right: auto;
  }


@media (max-width: 768px) {
.game-title h1 {
    font-size: 1.25rem;
}
.game-title img {
    height: 30px; /* Adjust as needed */
}
.game-controls {
    flex-direction: column;
    align-items: stretch;
}
.game-controls div {
    margin-bottom: 10px;
}
.help-modal-content h2 {
    font-size: 1.2rem;
}
.help-modal-content p, .help-modal-content ol {
    font-size: 0.9rem;
}
.modal-content, .help-modal-content {
    width: 90%;
    padding: 10px;
}
.modal-content img {
    width: 50px; /* Adjust as needed */
}
.help-modal-content {
    max-height: 80vh;
    overflow-y: auto;
}
button, input {
    padding: 10px;
    font-size: 1rem;
}
.cell {
    font-size: 24px; /* Medium screens */
}
}
@media screen and (max-width: 576px) {
    .cell {
        font-size: 18px; /* Small screens */
    }
}

@media screen and (max-width: 375px) {
    .cell {
        font-size: 14px; /* Very small screens */
    }
}