/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    color: #333;
}

h1 {
    text-align: center;
    font-size: 2rem;
}

#suggestion {
    text-align: center;
}

.creator {
    text-align: center;
    margin-top: 10px;
}

.creator a {
    color: #007bff;
    text-decoration: none;
}

.creator a:hover {
    text-decoration: underline;
}

/* Game Board */
#game-board {
    display: grid;
    grid-template-rows: repeat(6, 1fr);
    gap: 10px;
    margin: 20px auto;
    width: 100%;
    max-width: 300px;
}

/* Guess Row */
.guess-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}

/* Guess Box */
.guess-box {
    width: 100%;
    height: 50px;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
    line-height: 50px;
    border: 2px solid #ccc;
    background-color: white;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
}

/* Feedback Colors */
.guess-box.green {
    background-color: #6aaa64;
    color: white;
}

.guess-box.yellow {
    background-color: #c9b458;
    color: white;
}

.guess-box.gray {
    background-color: #787c7e;
    color: white;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    margin: 20px;
    gap: 10px;
    flex-wrap: wrap; /* Ensures buttons wrap on smaller screens */
}

.color-button {
    padding: 10px 15px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    flex: 1 1 calc(33.33% - 10px); /* Flexible buttons for mobile */
    max-width: 100px;
    text-align: center;
}

.color-button.green {
    background-color: #6aaa64;
    color: white;
}

.color-button.yellow {
    background-color: #c9b458;
    color: white;
}

.color-button.gray {
    background-color: #787c7e;
    color: white;
}

/* Submit Button */
#submit-guess {
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    display: block;
}

#submit-guess:hover {
    background-color: #0056b3;
}

/* Statistics Section */
#stats {
    margin-top: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-width: 300px;
    margin: 20px auto;
    font-size: 14px;
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .guess-box {
        height: 45px;
        font-size: 16px;
        line-height: 45px;
    }

    #submit-guess {
        font-size: 14px;
        padding: 8px 15px;
    }

    .color-button {
        font-size: 12px;
        padding: 8px 10px;
        flex: 1 1 calc(50% - 10px); /* Buttons adjust for smaller screens */
    }

    #game-board {
        max-width: 90%; /* Adjust width for smaller screens */
    }
}

@media (max-width: 480px) {
    .guess-box {
        height: 40px;
        font-size: 14px;
        line-height: 40px;
    }

    .color-button {
        font-size: 12px;
        padding: 5px 8px;
        flex: 1 1 calc(100% - 10px); /* Full-width buttons for very small screens */
    }
}