/**
 * Monty Hall Simulator Styles
 */

.monty-hall {
    padding: 1.5rem 0 3rem;
}

.title-section {
    text-align: center;
    margin-bottom: 1.25rem;
}

.title-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 500;
    color: var(--text-primary);
}

.control-group input[type="number"] {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
}

.control-group button {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.control-group button:hover {
    background: var(--primary-dark);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Game Status */
.game-status {
    text-align: center;
    margin-bottom: 1.25rem;
}

.game-status h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

/* Doors Container */
.doors-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    padding: 1.25rem 0;
}

/* Door */
.door {
    width: 120px;
    height: 180px;
    background: linear-gradient(135deg, #8b7355 0%, #6b5a45 100%);
    border: 4px solid #5a4936;
    border-radius: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.door.clickable {
    cursor: pointer;
}

.door.clickable:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.door.selected {
    border-color: var(--primary-color);
    border-width: 5px;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.door-number {
    position: absolute;
    top: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
}

.door-content {
    font-size: 4rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.door.revealed .door-content,
.door.opened .door-content {
    opacity: 1;
}

.door.revealed {
    background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
    border-color: #999;
}

.door.opened {
    background: linear-gradient(135deg, #f0f0f0 0%, #d0d0d0 100%);
}

.door.opened.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Probability display */
.probability {
    position: absolute;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Action Buttons */
.action-buttons {
    display: none;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.action-btn {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.action-btn.stay {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.action-btn.stay:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.action-btn.switch {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.action-btn.switch:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Statistics */
.statistics {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--surface-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.statistics h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.75rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--background-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-percentage {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Simulation Controls */
.simulation-controls {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--surface-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.simulation-controls h2 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.75rem;
}

.simulation-description {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.simulation-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.sim-btn {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sim-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.sim-btn:active {
    transform: translateY(0);
}

.sim-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.sim-btn.reset {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.sim-btn.reset:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.sim-btn.stay {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.sim-btn.stay:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.sim-btn.switch {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.sim-btn.switch:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Explanation */
.explanation {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--surface-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.explanation h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.explanation p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.explanation ol {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.explanation li {
    margin-bottom: 0.5rem;
}

.explanation strong {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .title-section h1 {
        font-size: 2rem;
    }
    
    .doors-container {
        gap: 1rem;
    }
    
    .door {
        width: 100px;
        height: 150px;
    }
    
    .door-content {
        font-size: 3rem;
    }
    
    .action-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .door {
        width: 80px;
        height: 120px;
    }
    
    .door-content {
        font-size: 2rem;
    }
    
    .door-number {
        font-size: 0.875rem;
        padding: 0.2rem 0.5rem;
    }
    
    .probability {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
}
