/* ===========================================================
   PREMIUM QUIZ WRAPPER STYLES
   World-class design for quiz content area
   Timer modal removed
   =========================================================== */

/* --- Main Quiz Wrapper --- */
.quiz-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 6rem;
    position: relative;
}

/* Decorative background elements */
.quiz-wrapper::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.quiz-wrapper::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

#quiz-form {
    position: relative;
    z-index: 1;
}

/* --- Questions Grid --- */
.questions-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* --- Premium Question Cards --- */
.question-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.02),
        0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.5s ease backwards;
}

/* Staggered animation for cards */
.question-card:nth-child(1) { animation-delay: 0.05s; }
.question-card:nth-child(2) { animation-delay: 0.1s; }
.question-card:nth-child(3) { animation-delay: 0.15s; }
.question-card:nth-child(4) { animation-delay: 0.2s; }
.question-card:nth-child(5) { animation-delay: 0.25s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gradient accent bar */
.question-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.question-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.03),
        0 20px 50px rgba(0, 0, 0, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
}

.question-card:hover::before {
    opacity: 1;
}

/* Correct/Incorrect states */
.question-card.correct {
    border-color: rgba(16, 185, 129, 0.4) !important;
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
}

.question-card.incorrect {
    border-color: rgba(239, 68, 68, 0.4) !important;
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}

/* --- Question Header --- */
.question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.question-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.6;
    flex: 1;
    letter-spacing: -0.01em;
}

.q-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    color: white;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 800;
    margin-right: 1rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

/* --- Clear Answer Button --- */
.clear-answer-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
  background: rgba(233, 213, 176, 0.372);
    color: #dc2626;
    border: 1.5px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9);
    white-space: nowrap;
}

.clear-answer-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.clear-answer-btn:hover {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.clear-answer-btn i {
    font-size: 0.875rem;
}

/* --- Options Container --- */
.options-container {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* --- Premium Option Labels --- */
.option-label {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.05rem;
    color: #475569;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

/* Subtle gradient overlay on hover */
.option-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.option-label:hover {
    border-color: #cbd5e0;
    transform: translateX(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.option-label:hover::before {
    opacity: 1;
}

/* Selected state */
.option-label:has(input:checked) {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
    border-color: #3b82f6;
    color: #1e40af;
    font-weight: 600;
    box-shadow: 
        0 0 0 3px rgba(59, 130, 246, 0.1),
        0 4px 16px rgba(59, 130, 246, 0.15);
    transform: translateX(8px);
}

.option-label:has(input:checked)::before {
    opacity: 1;
}

/* Radio button styling */
.option-label input[type="radio"] {
    position: relative;
    width: 22px;
    height: 22px;
    margin-right: 1rem;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #3b82f6;
}

.option-label span {
    position: relative;
    z-index: 1;
    line-height: 1.5;
}

/* --- Feedback Areas --- */
.feedback-area {
    margin-top: 1.5rem;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    font-size: 1rem;
    line-height: 1.7;
    display: none;
    position: relative;
    backdrop-filter: blur(10px);
}

.feedback-area.show {
    display: block;
    animation: feedbackSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes feedbackSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feedback-area.success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #6ee7b7;
    color: #065f46;
}

.feedback-area.success::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    border-radius: 16px 0 0 16px;
}

.feedback-area.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #fca5a5;
    color: #991b1b;
}

.feedback-area.error::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
    border-radius: 16px 0 0 16px;
}

.feedback-area strong {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.feedback-area i {
    font-size: 1.25rem;
}

.feedback-area em {
    font-weight: 600;
    font-style: normal;
    color: inherit;
    padding: 0.125rem 0.375rem;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 6px;
}

.feedback-area small {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* --- Quiz Actions Footer --- */
.quiz-actions {
    margin-top: 4rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

/* --- Submit Button --- */
.submit-all-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 3rem;
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.125rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 12px rgba(59, 130, 246, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.submit-all-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.submit-all-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 24px rgba(59, 130, 246, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.15);
}

.submit-all-btn:hover::before {
    left: 100%;
}

.submit-all-btn:active {
    transform: translateY(-1px);
}

.submit-all-btn i {
    font-size: 1.25rem;
}

/* --- Reset Button --- */
.reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 2.5rem;
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    color: #ffffff;
    border: 2px solid #cbd5e0;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.reset-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.reset-btn i {
    font-size: 1.125rem;
}

/* --- Performance Card --- */
.performance-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 2px solid #e2e8f0;
    animation: slideDown 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.performance-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
}

.performance-card.gold::before {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
}

.performance-card.silver::before {
    background: linear-gradient(90deg, #cbd5e0 0%, #94a3b8 100%);
}

.performance-card.bronze::before {
    background: linear-gradient(90deg, #fb923c 0%, #ea580c 100%);
}

.performance-header {
    text-align: center;
    margin-bottom: 2rem;
}

.performance-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.performance-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.performance-body {
    text-align: center;
}

.performance-score {
    font-size: 4rem;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.performance-card.gold .performance-score {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.performance-message {
    font-size: 1.25rem;
    color: #475569;
    margin-bottom: 2rem;
    font-weight: 600;
}

.performance-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-box {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
}

.stat-box i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.stat-box:nth-child(1) i {
    color: #10b981;
}

.stat-box:nth-child(2) i {
    color: #ef4444;
}

.stat-box:nth-child(3) i {
    color: #3b82f6;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Floating Progress Indicator --- */
.floating-progress {
    position: fixed;
    right: 2rem;
    z-index: 998;
    cursor: move;
    user-select: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-progress.dragging {
    cursor: grabbing;
    scale: 1.1;
}

.progress-ring {
    position: relative;
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-ring svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
    display: block;
}


.progress-ring-bg {
    fill: none;
    stroke: #e2e8f0;
}

.progress-ring-fill {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-progress.low .progress-ring-fill {
    stroke: #ef4444;
}

.floating-progress.medium .progress-ring-fill {
    stroke: #f59e0b;
}

.floating-progress.high .progress-ring-fill {
    stroke: #10b981;
}

.progress-ring-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    z-index: 1;
}

.progress-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
}

.progress-total {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 600;
}

.progress-tooltip {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 41, 59, 0.95);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.floating-progress:hover .progress-tooltip {
    opacity: 1;
}

/* --- Celebration Overlay --- */
.celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.celebration-overlay.show {
    opacity: 1;
    visibility: visible;
}

.celebration-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 2;
}

.celebration-emoji {
    font-size: 8rem;
    margin-bottom: 1rem;
    animation: celebrationPulse 1s ease-in-out infinite;
}

@keyframes celebrationPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.celebration-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.celebration-message {
    font-size: 1.5rem;
    opacity: 0.9;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #f0f0f0;
    animation: confettiFall linear forwards;
    z-index: 1;
}

@keyframes confettiFall {
    0% {
        top: -10%;
        transform: translateX(0) rotateZ(0deg);
    }
    100% {
        top: 110%;
        transform: translateX(100px) rotateZ(360deg);
    }
}

/* --- Notification System --- */
.notification {
    position: fixed;
    top: 100px;
    right: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    z-index: 9998;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid #10b981;
    color: #065f46;
}

.notification.success i {
    color: #10b981;
}

.notification.warning {
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.notification.warning i {
    color: #f59e0b;
}

.notification.info {
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

.notification.info i {
    color: #3b82f6;
}

.notification i {
    font-size: 1.25rem;
}

/* --- Enhanced Action Buttons --- */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.action-btn:hover::before {
    width: 300px;
    height: 300px;
}

.action-btn span,
.action-btn i {
    position: relative;
    z-index: 1;
}

.secondary-btn {
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    color: #ffffff;
    border: 2px solid #3b82f6;
}

.secondary-btn:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* --- Answered State --- */
.question-card.answered {
    border-left: 3px solid #3b82f6;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .quiz-wrapper {
        padding: 3rem 1.5rem 5rem;
    }
    
    .question-card {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .quiz-wrapper {
        padding: 2rem 1rem 4rem;
    }
    
    .quiz-wrapper::before,
    .quiz-wrapper::after {
        display: none;
    }
    
    .questions-grid {
        gap: 1.5rem;
    }
    
    .question-card {
        padding: 1.5rem;
        border-radius: 20px;
    }
    
    .question-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .question-text {
        font-size: 1.125rem;
        width: 100%;
    }
    
    .q-number {
        min-width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }
    
    .clear-answer-btn {
        align-self: flex-start;
    }
    
    .option-label {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }
    
    .option-label:hover {
        transform: translateX(4px);
    }
    
    .quiz-actions {
        flex-direction: column;
        padding: 2rem 1.5rem;
        gap: 1rem;
    }
    
    .submit-all-btn,
    .reset-btn {
        width: 100%;
        padding: 1.125rem 2rem;
    }
    
    .performance-card {
        padding: 2rem 1.5rem;
    }
    
    .performance-title {
        font-size: 1.5rem;
    }
    
    .performance-score {
        font-size: 3rem;
    }
    
    .performance-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .floating-progress {
        bottom: 6rem;
        right: 1rem;
    }
    
    .progress-ring {
        width: 70px;
        height: 70px;
    }
    
    .celebration-title {
        font-size: 2.5rem;
    }
    
    .celebration-emoji {
        font-size: 5rem;
    }
    
    .notification {
        right: 1rem;
        left: 1rem;
    }
    
    .quiz-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .quiz-wrapper {
        padding: 1.5rem 0.75rem 3rem;
    }
    
    .question-card {
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    .question-text {
        font-size: 1.05rem;
    }
    
    .option-label {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
    
    .feedback-area {
        padding: 1.25rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .quiz-actions {
        padding: 1.5rem 1rem;
    }
    
    .performance-icon {
        font-size: 3.5rem;
    }
    
    .performance-score {
        font-size: 2.5rem;
    }
    
    .stat-box {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}


/* ===========================================================
   PREMIUM QUIZ TIMER CONFIGURATION SECTION
   Add this to your quiz-content.css file
   =========================================================== */

/* --- Timer Configuration Section --- */
.timer-config-section {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

.timer-config-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.timer-config-section::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.timer-config-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* --- Timer Header --- */
.timer-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.6s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timer-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    border-radius: 50%;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(59, 130, 246, 0.4);
    }
}

.timer-icon-wrapper i {
    font-size: 2.5rem;
    color: white;
}

.timer-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.timer-subtitle {
    font-size: 1.125rem;
    color: #64748b;
    font-weight: 500;
}

/* --- Timer Options Grid --- */
.timer-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* --- Timer Option Cards --- */
.timer-option-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    border: 3px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease backwards;
}

.timer-option-card:nth-child(1) { animation-delay: 0.1s; }
.timer-option-card:nth-child(2) { animation-delay: 0.2s; }
.timer-option-card:nth-child(3) { animation-delay: 0.3s; }
.timer-option-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timer-option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.timer-option-card:hover {
    transform: translateY(-8px);
    border-color: #3b82f6;
    box-shadow: 0 20px 50px rgba(59, 130, 246, 0.2);
}

.timer-option-card:hover::before {
    opacity: 1;
}

.timer-option-card.selected {
    border-color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 20px 50px rgba(59, 130, 246, 0.25);
    transform: translateY(-8px);
}

.timer-option-card.selected::before {
    opacity: 1;
}

/* --- Card Icon --- */
.timer-card-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    position: relative;
    z-index: 1;
}

.timer-card-icon.speed {
    background: linear-gradient(135deg, #ef4444 0%, #f59e0b 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.timer-card-icon.balanced {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.timer-card-icon.normal {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.timer-card-icon.unlimited {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

/* --- Card Content --- */
.timer-card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.timer-card-time {
    font-size: 1.25rem;
    font-weight: 700;
    color: #3b82f6;
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.timer-card-desc {
    font-size: 0.95rem;
    color: #64748b;
    text-align: center;
    margin-bottom: 1rem;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.timer-card-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 1;
}

.speed-badge {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
    border: 2px solid #fca5a5;
}

.balanced-badge {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1e40af;
    border: 2px solid #93c5fd;
}

.normal-badge {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #065f46;
    border: 2px solid #6ee7b7;
}

.unlimited-badge {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    color: #5b21b6;
    border: 2px solid #c4b5fd;
}

/* --- Timer Action Area --- */
.timer-action-area {
    text-align: center;
}

.start-quiz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 4rem;
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.start-quiz-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.start-quiz-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.4);
}

.start-quiz-btn:hover::before {
    left: 100%;
}

.start-quiz-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.start-quiz-btn i {
    font-size: 1.5rem;
}

.timer-note {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.timer-note i {
    color: #3b82f6;
}

/* --- Floating Timer Display (During Quiz) --- */
.floating-timer {
    position: fixed;
    top: 100px;
    z-index: 999;
    background: white;
    border-radius: 16px;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 2px solid #e2e8f0;
    min-width: 200px;
    animation: slideInLeft 0.5s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timer-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.timer-icon-small {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    color: white;
    flex-shrink: 0;
}

.timer-text {
    flex: 1;
}

.timer-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.timer-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
}

/* Timer value color states */
.timer-value.warning {
    color: #f59e0b;
}

.timer-value.danger {
    color: #ef4444;
    animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* --- Timer Progress Bar --- */
.timer-progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.timer-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
    border-radius: 10px;
    transition: width 1s linear, background 0.3s ease;
}

.timer-progress-fill.warning {
    background: linear-gradient(90deg, #f59e0b 0%, #fb923c 100%);
}

.timer-progress-fill.danger {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

/* --- Hidden State (Before Quiz Starts) --- */
.quiz-wrapper.hidden {
    display: none;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .timer-config-section {
        padding: 3rem 1rem;
    }
    
    .timer-title {
        font-size: 2rem;
    }
    
    .timer-subtitle {
        font-size: 1rem;
    }
    
    .timer-options-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .timer-option-card {
        padding: 1.5rem;
    }
    
    .start-quiz-btn {
        width: 100%;
        padding: 1.25rem 2rem;
        font-size: 1.125rem;
margin-top: 1rem;
    }

}

@media (max-width: 480px) {
    .timer-icon-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .timer-icon-wrapper i {
        font-size: 2rem;
    }
    
    .timer-card-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .timer-card-title {
        font-size: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .floating-timer {
        top: 10px;
        right: 2rem;
    }
    .floating-progress{
        bottom: 8rem;
    }
    .question-card {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .floating-progress {
        bottom: 6rem;
        right: 1rem;
    }
    
    .progress-ring {
        width: 70px;
        height: 70px;
    }
    
    .progress-number {
        font-size: 1.25rem;
    }
    
    .progress-total {
        font-size: 0.75rem;
    }
}


@media (max-width: 480px) {
    .floating-progress {
        bottom: 5rem;
        right: 0.75rem;
    }
    
    .progress-ring {
        width: 60px;
        height: 60px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    }
    
    .progress-number {
        font-size: 1.125rem;
    }
    
    .progress-total {
        font-size: 0.7rem;
    }
    
    .progress-tooltip {
        font-size: 0.7rem;
        padding: 0.375rem 0.75rem;
        bottom: -40px;
    }
}
/* Tablet (768px and below) */
@media (max-width: 768px) {

    .floating-timer {
        top: 0px;
        left: 30%;
        right: auto;        
        padding: 0.75rem 1rem;
        min-width: auto;
        max-width: 240px;
        border-radius: 12px;
    }
    
    .timer-display {
        gap: 0.75rem;
        margin-bottom: 0.625rem;
    }
    
    .timer-icon-small {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .timer-label {
        font-size: 0.7rem;
        margin-bottom: 0.2rem;
    }
    
    .timer-value {
        font-size: 1.25rem;
    }
    
    .timer-progress-bar {
        height: 5px;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    .floating-timer {
        top: 0px;
        left: 30%;
        right: auto;        
        padding: 0.75rem 1rem;
        min-width: auto;
        max-width: 240px;
        border-radius: 12px;
    }
    
    .timer-display {
        gap: 0.625rem;
        margin-bottom: 0.5rem;
    }
    
    .timer-icon-small {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .timer-label {
        font-size: 0.65rem;
        margin-bottom: 0.15rem;
    }
    
    .timer-value {
        font-size: 1.125rem;
    }
    
    .timer-progress-bar {
        height: 4px;
    }
}
.print-container {
    display: flex;
    justify-content: center;
}

    .print-button {
    color: #ffffff; 
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    border: none; 
    padding: 0.8rem 1.5rem; 
    border-radius: 8px; 
    font-weight: 600; 
    cursor: pointer; 
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    font-size: 1.2rem;
    gap: 1rem;
}

/* ============================================================
   THE NUCLEAR PRINT FIX (Universal)
   ============================================================ */
/* 1. Default: Hide the printable area on the screen */
#printable-area {
    display: none;
}

@media print {
    /* 2. Hide EVERYTHING on the page (Sidebar, Quiz Wrapper, Timers)... */
    body > *:not(#printable-area) {
        display: none !important;
    }

    /* 3. ...Except our dedicated print area */
    #printable-area {
        display: block !important;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        background: white;
        z-index: 9999;
        font-family: 'Times New Roman', serif; 
        color: #000;
        padding: 20px;
    }

    /* 4. Simple Styling for the printout */
    .print-header {
        text-align: center;
        border-bottom: 2px solid #000;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }
    
    .print-item {
        page-break-inside: avoid; /* Prevents splitting questions */
        border-bottom: 1px solid #ccc;
        padding: 15px 0;
    }

    .print-q-text {
        font-size: 14pt;
        font-weight: bold;
        margin-bottom: 10px;
    }

    .print-options {
        margin-left: 20px;
        font-size: 12pt;
    }

    .p-opt {
        margin-bottom: 5px;
    }
    
    .radio {
        display: inline-block;
        width: 15px;
        font-size: 14px;
    }

    .print-answer-key {
        margin-top: 10px;
        background: #f0f0f0 !important; 
        padding: 10px;
        border: 1px solid #999;
        font-size: 11pt;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;

    }
    
    /* RESET BODY SETTINGS FOR IOS */
    html, body {
        height: auto !important;
        overflow: visible !important;
        margin: 0 !important;
        background: #fff !important;
    }
}