* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.card h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.8em;
}

/* Color Selection */
.color-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.color-option {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 3px solid transparent;
    color: white;
    font-weight: bold;
    font-size: 1.5em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.color-option input {
    position: absolute;
    opacity: 0;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option input:checked ~ span {
    display: inline;
}

.color-option:has(input:checked) {
    border-color: #333;
    box-shadow: 0 0 0 3px white, 0 0 0 6px #333;
}

/* Guess Slots */
.guess-slots {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    justify-content: center;
}

.guess-slot {
    width: 80px;
    height: 80px;
    border: 3px dashed #ccc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    cursor: pointer;
    transition: all 0.3s;
    background: #f5f5f5;
    color: #999;
}

.guess-slot.filled {
    border-style: solid;
    border-color: #333;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.guess-slot.active {
    border-color: #667eea;
    border-width: 4px;
    transform: scale(1.05);
}

.guess-slot:hover {
    transform: scale(1.05);
}

/* Color Palette */
.color-palette {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0;
    justify-content: center;
}

.palette-color {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.palette-color:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Feedback Controls */
.feedback-controls {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.feedback-controls label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 600;
}

.feedback-controls input[type="number"] {
    width: 80px;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1.1em;
    text-align: center;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    margin: 5px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Guess History */
.guess-history {
    margin-top: 30px;
}

.guess-history h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.history-colors {
    display: flex;
    gap: 8px;
}

.history-color {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9em;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

.history-feedback {
    display: flex;
    gap: 5px;
}

.feedback-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #333;
}

.feedback-indicator.green {
    background: #44ff44;
}

.feedback-indicator.white {
    background: #ffffff;
}

.feedback-indicator.dark {
    background: #333;
}

/* Recommendations */
#recommendations-list {
    margin-top: 20px;
}

.recommendation-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recommendation-colors {
    display: flex;
    gap: 8px;
}

.recommendation-entropy {
    font-weight: 600;
    color: #667eea;
    font-size: 1.1em;
}

/* Possibilities */
#possibilities-list {
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.possibility-item {
    display: flex;
    gap: 8px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
}

/* Info Box */
.info-box {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.info-box p {
    font-size: 1.1em;
}

#remaining-count {
    color: #667eea;
    font-size: 1.3em;
    font-weight: bold;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .color-option {
        width: 60px;
        height: 60px;
    }
    
    .guess-slot {
        width: 60px;
        height: 60px;
    }
    
    .card {
        padding: 20px;
    }
}
