/* Main Container */
.adv-quiz-wrapper {
    max-width: 800px;
    margin: 40px auto;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #333;
}

/* Common Card Styles */
.quiz-setup, .quiz-question-card, .quiz-results {
    background: #ffffff;
    border: 0;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative; 
}

/* Timer */
.quiz-timer {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
    background: #f8f9fa;
    padding: 8px 18px;
    border-radius: 20px;
    border: 2px solid #e0e0e0;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.quiz-timer.danger {
    color: #e74c3c;
    border-color: #e74c3c;
    background: #fff5f5;
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* --- SETUP SCREEN --- */
.quiz-setup h4 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: #2c3e50;
    text-align: center;
}

.qz-setting {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.qz-circles {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 20px 0;
}

.qz-circle-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e0e0e0;
    color: #555;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.qz-circle-btn:hover { border-color: #3498db; color: #3498db; }
.qz-circle-btn.active {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.qz-group-list {
    background: #fdfdfd;
    padding: 20px;
    border-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #eee;
    margin-bottom: 25px;
}
.qz-subgroup-list {
    margin-left: 28px;
    padding-left: 12px;
    border-left: 2px solid #e0e0e0;
    margin-top: 5px;
}

/* --- ACTIVE QUIZ --- */
.quiz-status {
    background: #e1f5fe;
    color: #0288d1;
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.quiz-body {
    font-size: 1.4rem;
    line-height: 1.5;
    color: #2c3e50;
    margin: 20px 0 30px 0;
    font-weight: 500;
}

.quiz-opt-btn {
    background: #fff;
    border: 2px solid #e9ecef;
    padding: 18px 20px;
    margin-bottom: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: transform 0.1s, border-color 0.2s, background 0.2s;
    position: relative;
}

.quiz-opt-btn:hover:not(.disabled) {
    border-color: #3498db;
    background: #f0f8ff;
    transform: translateX(5px);
}

.quiz-opt-btn.correct { background: #d4edda; border-color: #28a745; color: #155724; }
.quiz-opt-btn.wrong { background: #f8d7da; border-color: #dc3545; color: #721c24; opacity: 0.9; }

.quiz-text-input {
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1.2rem;
    transition: border-color 0.3s;
}
.quiz-text-input:focus { border-color: #3498db; outline: none; }

.qz-start-btn, .qz-next-btn, .qz-submit-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    display: block;
    width: 100%;
    margin-top: 20px;
    transition: transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.qz-start-btn:hover, .qz-next-btn:hover, .qz-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.qz-next-btn { display: none; background: linear-gradient(135deg, #27ae60 0%, #219150 100%); }

.feedback-msg {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
}
.feedback-msg.correct { background: #d4edda; color: #155724; }
.feedback-msg.wrong { background: #f8d7da; color: #721c24; }

.quiz-expl {
    margin-top: 15px;
    padding: 15px;
    background: #fff3cd;
    color: #856404;
    border-radius: 8px;
    border-left: 5px solid #ffeeba;
}

.quiz-results { text-align: center; }
.quiz-pass { border-top: 6px solid #2ecc71; }
.quiz-fail { border-top: 6px solid #e74c3c; }

.tts-btn {
    background: transparent;
    border: 1px solid #ccc;
    color: #666;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    float: right;
    margin-bottom: 10px;
}
.tts-btn:hover { background: #f0f0f0; color: #333; }
