/* General Styling */
#mastermind-game {
    font-family: Arial, sans-serif;
    max-width: 500px;
    margin: 30px auto;
    padding: 20px;
    border-radius: 12px;
    background: #d2a679;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    color: #333;
    text-align: center;
}

#mastermind-game h2 {
    color: #5a3725;
    font-size: 1.8em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* Game Board */
#game-board {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
    background: #f5e0cc;
    padding: 10px;
    border-radius: 8px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
    min-height: 400px;
}

/* Each Row in the Game Board */
.game-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #d2a679;
}

/* Guess Pegs */
.guess {
    display: flex;
    gap: 10px;
    flex: 1;
}

.guess .peg {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #5a3725;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.3s ease;
}

.guess .peg[data-color="R"] {
    background: red;
}

.guess .peg[data-color="G"] {
    background: green;
}

.guess .peg[data-color="B"] {
    background: blue;
}

.guess .peg[data-color="Y"] {
    background: yellow;
}

.guess .peg[data-color="O"] {
    background: orange;
}

.guess .peg[data-color="P"] {
    background: purple;
}

/* Feedback Pegs */
.feedback {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
    width: 50px;
}

.feedback .peg {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #5a3725;
    border: 1px solid #333;
}

.feedback .peg.white {
    background: #fff;
}

.feedback .peg.black {
    background: #000;
}

/* Controls */
#game-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

#game-controls input {
    flex: 1;
    padding: 8px;
    border: 2px solid #5a3725;
    border-radius: 6px;
    font-size: 1em;
    margin-right: 10px;
    text-transform: uppercase;
}

#game-controls button {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    background: #5a3725;
    color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background 0.2s ease;
}

#game-controls button:hover {
    background: #804d29;
}

/* Game Message */
#game-message {
    margin-top: 15px;
    font-size: 1.2em;
    font-weight: bold;
    color: green;
}

/* Active Row Highlight */
.game-row.active .peg {
    border-color: #ff9f43;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}
