.mastermind-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.mastermind-container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
}

.game-mode-selector {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 2px solid #ddd;
}

.game-mode-selector h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
}

.mode-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.mode-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 30px;
    background: #fff;
    color: #333;
    border: 2px solid #007bff;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
}

.mode-button:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.mode-button strong {
    font-size: 18px;
}

.mode-button span {
    font-size: 14px;
    opacity: 0.8;
}

.player-info {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #e8f4fd;
    border-radius: 8px;
    border: 2px solid #007bff;
}

.current-player {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.game-instructions {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.5;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.game-board {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.secret-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    border: 2px dashed #ccc;
}

.attempts-container {
    margin-bottom: 20px;
}

.attempt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 10px;
    background: #fafafa;
    border-radius: 6px;
}

.guess-pegs {
    display: flex;
    gap: 8px;
}

.code-peg {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.2s ease;
}

.code-peg.hidden {
    background: #ccc;
    border-color: #999;
    color: #666;
}

.code-peg.selectable {
    cursor: pointer;
    background: #f0f0f0;
}

.code-peg.selectable:hover {
    border-color: #666;
    transform: scale(1.05);
}

.code-peg.selected {
    border-color: #007bff;
    border-width: 4px;
    box-shadow: 0 0 10px rgba(0,123,255,0.5);
}

/* Color styles */
.code-peg.red { background-color: #e74c3c; }
.code-peg.blue { background-color: #3498db; }
.code-peg.green { background-color: #2ecc71; }
.code-peg.yellow { background-color: #f1c40f; }
.code-peg.purple { background-color: #9b59b6; }
.code-peg.orange { background-color: #e67e22; }

.current-guess {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px;
    background: #e8f4fd;
    border-radius: 8px;
    border: 2px solid #007bff;
}

.color-palette {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.color-option {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-option:hover {
    transform: scale(1.1);
    border-width: 4px;
}

.color-option[data-color="red"] { background-color: #e74c3c; }
.color-option[data-color="blue"] { background-color: #3498db; }
.color-option[data-color="green"] { background-color: #2ecc71; }
.color-option[data-color="yellow"] { background-color: #f1c40f; }
.color-option[data-color="purple"] { background-color: #9b59b6; }
.color-option[data-color="orange"] { background-color: #e67e22; }

.feedback {
    display: flex;
    gap: 4px;
    align-items: center;
}

.feedback-peg {
    font-size: 16px;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.attempts-left {
    font-weight: bold;
    color: #333;
}

button {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

button:hover:not(:disabled) {
    background: #0056b3;
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#submit-guess {
    background: #28a745;
}

#submit-guess:hover:not(:disabled) {
    background: #1e7e34;
}

#new-game {
    background: #6c757d;
}

#new-game:hover {
    background: #545b62;
}

#reveal-code {
    background: #dc3545;
    font-size: 14px;
    padding: 8px 16px;
}

#reveal-code:hover {
    background: #c82333;
}

.game-result {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #007bff;
    margin-top: 20px;
}

.game-result h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
}

.game-result p {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #666;
}

#play-again {
    background: #28a745;
}

#play-again:hover {
    background: #1e7e34;
}

/* Responsive design */
@media (max-width: 600px) {
    .mastermind-container {
        padding: 10px;
    }
    
    .mode-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .mode-button {
        min-width: 200px;
    }
    
    .code-peg {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .color-option {
        width: 40px;
        height: 40px;
    }
    
    .color-palette {
        gap: 10px;
    }
    
    .current-guess {
        flex-direction: column;
        gap: 15px;
    }
    
    .game-info {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .player-info {
        font-size: 16px;
    }
}