/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 900px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

/* === HEADER === */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.pool-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* === STATISTICS === */
.stats {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
}

.stat-value.success {
    color: #10b981;
}

.stat-value.error {
    color: #ef4444;
}

/* === PROBLEM BOX === */
.problem-box {
    padding: 30px;
    border-bottom: 2px solid #e2e8f0;
}

.equation-display {
    font-size: 1.8rem;
    text-align: center;
    padding: 20px;
    margin-bottom: 15px;
    background: #f8fafc;
    border-radius: 12px;
}

.question-text {
    font-size: 1.2rem;
    text-align: center;
    color: #334155;
    padding: 10px;
}

/* === POOL 1: SCHEMA FORMAT (a, b, c identification) === */
.choices.schema-format {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.parameter-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.parameter-label {
    font-size: 1.5rem;
    font-weight: 700;
    min-width: 60px;
    text-align: right;
}

.parameter-choices {
    display: flex;
    gap: 10px;
    flex: 1;
}

.param-btn {
    flex: 1;
    padding: 15px;
    font-size: 1.2rem;
    background: white;
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.param-btn:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.param-btn.selected {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.param-btn.correct {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.param-btn.incorrect {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

/* Submit button for Pool 1 */
.submit-btn {
    margin: 20px auto;
    display: block;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-btn:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-2px);
}

.submit-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

/* === POOL 2-3: STANDARD MC FORMAT === */
.choices.standard-format {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 30px;
}

.choice-btn {
    padding: 20px;
    font-size: 1.1rem;
    background: white;
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.choice-btn:hover:not(:disabled) {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.choice-btn:disabled {
    cursor: not-allowed;
}

.choice-btn.correct {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.choice-btn.incorrect {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

/* === MODALS === */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    text-align: center;
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #1e293b;
}

.modal-content p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #64748b;
}

/* === BUTTONS === */
.btn-primary {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-danger {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-secondary {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary:disabled:hover {
    background: #94a3b8;
    transform: none;
    box-shadow: none;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .choices.standard-format {
        grid-template-columns: 1fr;
    }
    
    .parameter-choices {
        flex-wrap: wrap;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}
