/* Modern Quiz Container */
.quiz-modern-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 0;
    margin: 1.5rem 0;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
    overflow: hidden;
    position: relative;
}

.quiz-modern-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
}

/* Quiz Header */
.quiz-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.quiz-progress-wrapper {
    flex: 1;
    margin-right: 1.5rem;
}

.quiz-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.375rem;
    position: relative;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 8px;
    width: 0%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.quiz-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

.quiz-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-size: 0.8rem;
}

.progress-current {
    font-weight: 600;
}

.progress-stats {
    opacity: 0.85;
}

/* Timer */
.quiz-timer-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-family: 'Monaco', monospace;
    font-size: 0.85rem;
}

.timer-icon {
    font-size: 1rem;
    animation: pulse 2s infinite;
}

.timer-display {
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

/* Content Area */
.quiz-content-area {
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Quiz Introduction */
.quiz-intro-section {
    text-align: center;
    color: white;
    animation: fadeInUp 0.8s ease-out;
}

.quiz-intro-icon {
    margin-bottom: 1rem;
}

.icon-circle {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: bounce 3s infinite;
}

.brain-icon {
    width: 32px;
    height: 32px;
    color: white;
}

.quiz-intro-title {
    font-size: 1.875rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quiz-intro-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* Quiz Stats Grid - جمع‌وجور */
.quiz-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.quiz-stat-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 0.875rem 0.5rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.quiz-stat-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
}

.stat-icon {
    font-size: 1.375rem;
    margin-bottom: 0.25rem;
    display: block;
}

.stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.125rem;
    color: #4facfe;
}

.stat-label {
    font-size: 0.7rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Instructions - جمع‌تر */
.quiz-instructions {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.instructions-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.625rem;
    color: #4facfe;
}

.instructions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.instructions-list li {
    padding: 0.1875rem 0;
    position: relative;
    padding-left: 1.375rem;
    font-size: 0.8rem;
    line-height: 1.3;
}

.instructions-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4facfe;
    font-weight: bold;
    font-size: 0.875rem;
}

/* Start Button */
.quiz-start-button {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    border-radius: 12px;
    padding: 0.875rem 2.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
}

.quiz-start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(79, 172, 254, 0.6);
}

.quiz-start-button:active {
    transform: translateY(0);
}

.button-content {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    position: relative;
    z-index: 2;
}

.button-icon {
    width: 18px;
    height: 18px;
}

/* Quiz Questions Section */
.quiz-questions-section {
    animation: slideInUp 0.6s ease-out;
    color: white;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.question-meta {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.question-counter {
    font-size: 1rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.4375rem 0.875rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.question-type-badge {
    background: rgba(79, 172, 254, 0.3);
    padding: 0.4375rem;
    border-radius: 7px;
    font-size: 1.125rem;
}

/* Question Content */
.question-content {
    margin-bottom: 1.5rem;
}

.question-text {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.code-block {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 1.125rem;
    margin: 1.125rem 0;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Options */
.options-container {
    display: grid;
    gap: 0.875rem;
}

.option-item {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.option-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(79, 172, 254, 0.5);
    transform: translateX(3px);
}

.option-item.selected {
    background: rgba(79, 172, 254, 0.2);
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
}

.option-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.option-content {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.option-indicator {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.option-item.selected .option-indicator {
    border-color: #4facfe;
    background: #4facfe;
}

.option-item.selected .option-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 7px;
    height: 7px;
    background: white;
    border-radius: 50%;
}

.option-text {
    flex: 1;
    font-size: 0.9375rem;
    line-height: 1.4;
}

/* Submit Button */
.question-actions {
    text-align: center;
    margin-top: 1.5rem;
}

.submit-answer-btn {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    border: none;
    border-radius: 12px;
    padding: 0.875rem 2.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 160px;
}

.submit-answer-btn:disabled {
    background: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    transform: none;
}

.submit-answer-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 242, 254, 0.4);
}

.btn-text {
    transition: opacity 0.3s ease;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.loader-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Quiz Results Section */
.quiz-results-section {
    animation: fadeInUp 0.8s ease-out;
    color: white;
    text-align: center;
}

.result-header {
    margin-bottom: 1.5rem;
}

.result-status-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.result-status-icon.passed {
    background: rgba(34, 197, 94, 0.3);
    border-color: #22c55e;
}

.result-status-icon.failed {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
}

.result-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
}

.result-subtitle {
    font-size: 1.0625rem;
    opacity: 0.9;
}

.score-display {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.75rem;
    margin: 1.75rem 0;
    backdrop-filter: blur(10px);
}

.score-percentage {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.375rem;
}

.score-percentage.passed {
    color: #4ade80;
}

.score-percentage.failed {
    color: #f87171;
}

.score-details {
    font-size: 1.0625rem;
    opacity: 0.9;
    margin-bottom: 0.875rem;
}

.score-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 0.875rem;
}

.score-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 2s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e);
}

.result-actions {
    display: flex;
    gap: 0.875rem;
    justify-content: center;
    margin-top: 1.75rem;
}

.result-btn {
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-btn.primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.result-btn.secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.result-btn:hover {
    transform: translateY(-2px);
}

/* Loading Section */
.quiz-loading-section {
    text-align: center;
    color: white;
    padding: 3rem 0;
}

.loading-animation {
    margin-bottom: 1.25rem;
}

.loading-spinner {
    width: 45px;
    height: 45px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #4facfe;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 0.4375rem;
}

.loading-dots span {
    width: 7px;
    height: 7px;
    background: #4facfe;
    border-radius: 50%;
    animation: wave 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

.loading-text {
    font-size: 1.0625rem;
    opacity: 0.9;
}

/* Error Display */
.quiz-error-display {
    position: absolute;
    top: 0.875rem;
    left: 0.875rem;
    right: 0.875rem;
    z-index: 10;
    animation: slideDown 0.3s ease-out;
}

.error-content {
    background: rgba(239, 68, 68, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 0.875rem 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    color: white;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.error-icon {
    font-size: 1.125rem;
}

.error-message {
    flex: 1;
    font-weight: 500;
}

.error-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.125rem;
    cursor: pointer;
    padding: 0.1875rem;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.error-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -1px, 0);
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes wave {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-modern-container {
        border-radius: 12px;
        margin: 1rem 0;
    }
    
    .quiz-header {
        padding: 0.875rem 1.125rem;
        flex-direction: column;
        gap: 0.875rem;
    }
    
    .quiz-progress-wrapper {
        margin-right: 0;
    }
    
    .quiz-content-area {
        padding: 1.5rem 1.125rem;
    }
    
    .quiz-intro-title {
        font-size: 1.5rem;
    }
    
    .quiz-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
    }
    
    .quiz-stat-card {
        padding: 0.75rem 0.4375rem;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .result-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .quiz-content-area {
        padding: 1.25rem 0.875rem;
    }
    
    .quiz-intro-title {
        font-size: 1.3125rem;
    }
    
    .quiz-intro-subtitle {
        font-size: 0.9375rem;
    }
    
    .quiz-start-button {
        width: 100%;
        padding: 0.875rem;
    }
    
    .option-item {
        padding: 0.875rem;
    }
    
    .submit-answer-btn {
        width: 100%;
    }
    
    .score-percentage {
        font-size: 2.25rem;
    }
}

/* Answer Sheet Styles */
.answer-sheet-section {
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    animation: slideInUp 0.5s ease-out;
}

.answer-sheet-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.answer-sheet-header h4 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #4facfe;
}

.close-answer-sheet {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.close-answer-sheet:hover {
    background: rgba(255, 255, 255, 0.1);
}

.answer-sheet-content {
    padding: 1.25rem;
    max-height: 60vh;
    overflow-y: auto;
}

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

.answer-item {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 1rem;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.answer-item.correct {
    border-left-color: #22c55e;
    background: rgba(34, 197, 94, 0.08);
}

.answer-item.incorrect {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.answer-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.question-number {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    backdrop-filter: blur(5px);
}

.question-details {
    margin-right: 2.5rem;
}

.question-text {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.95);
}

.answer-comparison {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-answer,
.correct-answer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.label {
    font-weight: 500;
    opacity: 0.8;
    min-width: 80px;
}

.value {
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.75rem;
}

.value.correct {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.value.incorrect {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.result-icon {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    font-size: 1.125rem;
}

/* Summary Stats */
.answer-summary {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: center;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.summary-stat .number {
    font-size: 1.5rem;
    font-weight: 700;
}

.summary-stat .label {
    font-size: 0.75rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-stat.correct .number {
    color: #4ade80;
}

.summary-stat.incorrect .number {
    color: #f87171;
}

.summary-stat.total .number {
    color: #60a5fa;
}

/* Responsive adjustments for answer sheet */
@media (max-width: 768px) {
    .answer-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .answer-item {
        padding: 0.875rem;
    }
    
    .question-details {
        margin-right: 2rem;
    }
    
    .answer-comparison {
        gap: 0.375rem;
    }
    
    .user-answer,
    .correct-answer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .label {
        min-width: auto;
        font-size: 0.75rem;
    }
    
    .answer-summary {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        text-align: left;
    }
    
    .summary-stat {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .answer-sheet-content {
        padding: 1rem;
        max-height: 50vh;
    }
    
    .answer-sheet-header {
        padding: 0.875rem;
    }
    
    .answer-sheet-header h4 {
        font-size: 1rem;
    }
    
    .question-text {
        font-size: 0.8125rem;
        margin-bottom: 0.625rem;
    }
    
    .result-actions {
        flex-direction: column;
        gap: 0.625rem;
    }
    
    .result-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Scrollbar styling for answer sheet */
.answer-sheet-content::-webkit-scrollbar {
    width: 6px;
}

.answer-sheet-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.answer-sheet-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.answer-sheet-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}


.explanation {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(79, 172, 254, 0.1);
    border-radius: 6px;
    border-left: 3px solid #4facfe;
}

.explanation .label {
    color: #4facfe;
    font-weight: 600;
}

.explanation-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    font-family: inherit;
}

.error-message {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.8);
}

.error-message p {
    margin: 0;
    font-size: 0.9rem;
}

/* DARK MODE FOR QUIZ */
.dark .quiz-modern-container {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.5);
}

.dark .quiz-modern-container::before {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.1) 0%, rgba(148, 163, 184, 0.05) 100%);
}

.dark .quiz-header {
    background: rgba(30, 41, 59, 0.6);
    border-bottom-color: rgba(71, 85, 105, 0.3);
}

.dark .quiz-progress-track {
    background: rgba(71, 85, 105, 0.4);
}

.dark .quiz-progress-fill {
    background: linear-gradient(90deg, #3b82f6 0%, #06b6d4 100%);
}

.dark .quiz-timer-wrapper {
    background: rgba(30, 41, 59, 0.7);
}

.dark .icon-circle {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(71, 85, 105, 0.5);
}

.dark .quiz-intro-title {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dark .quiz-stat-card {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(71, 85, 105, 0.4);
}

.dark .quiz-stat-card:hover {
    background: rgba(30, 41, 59, 0.8);
}

.dark .stat-value {
    color: #60a5fa;
}

.dark .quiz-instructions {
    background: rgba(30, 41, 59, 0.5);
}

.dark .instructions-title {
    color: #60a5fa;
}

.dark .instructions-list li::before {
    color: #60a5fa;
}

.dark .quiz-start-button {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.dark .quiz-start-button:hover {
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.6);
}

.dark .question-counter {
    background: rgba(30, 41, 59, 0.7);
}

.dark .question-type-badge {
    background: rgba(59, 130, 246, 0.4);
}

.dark .code-block {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(71, 85, 105, 0.3);
}

.dark .option-item {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(71, 85, 105, 0.4);
}

.dark .option-item:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(59, 130, 246, 0.6);
}

.dark .option-item.selected {
    background: rgba(59, 130, 246, 0.3);
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.dark .option-indicator {
    border-color: rgba(148, 163, 184, 0.6);
}

.dark .option-item.selected .option-indicator {
    border-color: #60a5fa;
    background: #60a5fa;
}

.dark .submit-answer-btn {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
}

.dark .submit-answer-btn:disabled {
    background: rgba(71, 85, 105, 0.4);
}

.dark .submit-answer-btn:not(:disabled):hover {
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
}

.dark .result-status-icon.passed {
    background: rgba(34, 197, 94, 0.4);
    border-color: #4ade80;
}

.dark .result-status-icon.failed {
    background: rgba(239, 68, 68, 0.4);
    border-color: #f87171;
}

.dark .score-display {
    background: rgba(30, 41, 59, 0.5);
}

.dark .score-bar {
    background: rgba(71, 85, 105, 0.4);
}

.dark .result-btn.primary {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
}

.dark .result-btn.secondary {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(71, 85, 105, 0.5);
}

.dark .loading-spinner {
    border-color: rgba(71, 85, 105, 0.4);
    border-top-color: #60a5fa;
}

.dark .loading-dots span {
    background: #60a5fa;
}

.dark .quiz-error-display .error-content {
    background: rgba(239, 68, 68, 0.95);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.dark .answer-sheet-section {
    background: rgba(30, 41, 59, 0.4);
}

.dark .answer-sheet-header {
    background: rgba(30, 41, 59, 0.6);
    border-bottom-color: rgba(71, 85, 105, 0.3);
}

.dark .answer-sheet-header h4 {
    color: #60a5fa;
}

.dark .close-answer-sheet:hover {
    background: rgba(71, 85, 105, 0.4);
}

.dark .answer-sheet-content::-webkit-scrollbar-track {
    background: rgba(71, 85, 105, 0.3);
}

.dark .answer-sheet-content::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.5);
}

.dark .answer-sheet-content::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.7);
}

.dark .answer-item {
    background: rgba(30, 41, 59, 0.4);
}

.dark .answer-item.correct {
    border-left-color: #4ade80;
    background: rgba(34, 197, 94, 0.2);
}

.dark .answer-item.incorrect {
    border-left-color: #f87171;
    background: rgba(239, 68, 68, 0.2);
}

.dark .answer-item:hover {
    background: rgba(30, 41, 59, 0.6);
}

.dark .question-number {
    background: rgba(30, 41, 59, 0.7);
}

.dark .question-text {
    color: rgba(248, 250, 252, 0.95);
}

.dark .value.correct {
    background: rgba(34, 197, 94, 0.3);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.4);
}

.dark .value.incorrect {
    background: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.4);
}

.dark .answer-summary {
    background: rgba(30, 41, 59, 0.5);
}

.dark .summary-stat.correct .number {
    color: #86efac;
}

.dark .summary-stat.incorrect .number {
    color: #fca5a5;
}

.dark .summary-stat.total .number {
    color: #93c5fd;
}

.dark .explanation {
    background: rgba(59, 130, 246, 0.2);
    border-left-color: #60a5fa;
}

.dark .explanation .label {
    color: #60a5fa;
}

.dark .explanation-text {
    color: rgba(248, 250, 252, 0.9);
}

.dark .error-message {
    color: rgba(248, 250, 252, 0.8);
}