* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables for Light/Dark Theme */
:root {
    /* Light Theme Colors */
    --bg-gradient-start: #0078d4;
    --bg-gradient-end: #005a9e;
    --container-bg: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-accent: #0078d4;
    --border-color: #e0e0e0;
    --border-light: #f0f0f0;
    --card-bg: #f8f9fa;
    --card-border: #e9ecef;
    --hover-bg: #e8f4fd;
    --option-selected: #cce5ff;
    --option-correct: #d4edda;
    --option-wrong: #f8d7da;
    --modal-bg: rgba(0, 0, 0, 0.7);
    --shadow-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --bg-gradient-start: #1e1e1e;
    --bg-gradient-end: #2d2d30;
    --container-bg: #252526;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-accent: #569cd6;
    --border-color: #3e3e42;
    --border-light: #3e3e42;
    --card-bg: #2d2d30;
    --card-border: #3e3e42;
    --hover-bg: #37373d;
    --option-selected: #264f78;
    --option-correct: #0e5a1a;
    --option-wrong: #5a1e1e;
    --modal-bg: rgba(0, 0, 0, 0.8);
    --shadow-color: rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 20px;
}

header {
    background: var(--container-bg);
    border-radius: 15px 15px 0 0;
    padding: 30px;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Header Layout for Theme Toggle */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

h1 {
    color: var(--text-accent);
    margin: 0;
    flex: 1;
    transition: color 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 20px;
}

.theme-toggle:hover {
    background: var(--hover-bg);
    transform: scale(1.1);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.theme-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(15deg);
}

.score-container {
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    border-top: 2px solid var(--border-light);
    transition: border-color 0.3s ease;
}

.score, .streak, .question-count {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.score span, .streak span, .question-count span {
    color: var(--text-accent);
    font-weight: bold;
    transition: color 0.3s ease;
}

main {
    background: var(--container-bg);
    padding: 30px;
    min-height: 400px;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

#startScreen {
    text-align: center;
}

#startScreen h2 {
    color: var(--text-accent);
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

#startScreen p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 18px;
    transition: color 0.3s ease;
}

.exam-selector, .difficulty-selector, .mode-selector, .questions-selector, .ai-selector {
    margin: 20px 0;
}

.exam-selector label, .difficulty-selector label, .mode-selector label, .questions-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #444;
}

.ai-selector {
    text-align: center;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 2px solid var(--card-border);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.ai-selector label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.ai-selector input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

select {
    padding: 10px 20px;
    border: 2px solid var(--text-accent);
    border-radius: 5px;
    font-size: 16px;
    background: var(--container-bg);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

select:hover {
    background: var(--hover-bg);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    margin-bottom: 30px;
    overflow: hidden;
    transition: background 0.3s ease;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0078d4, #00bcf2);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

.question-container h2 {
    color: var(--text-primary);
    margin-bottom: 30px;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option {
    padding: 20px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    color: var(--text-primary);
}

.option:hover:not(.disabled) {
    background: var(--hover-bg);
    border-color: var(--text-accent);
    transform: translateX(5px);
}

.option.selected {
    background: var(--option-selected);
    border-color: var(--text-accent);
}

.option.correct {
    background: var(--option-correct);
    border-color: #28a745;
    animation: correctPulse 0.5s ease;
}

.option.wrong {
    background: var(--option-wrong);
    border-color: #dc3545;
    animation: wrongShake 0.5s ease;
}

.option.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.timer {
    text-align: center;
    font-size: 20px;
    margin-top: 20px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.timer.warning {
    color: #ff6b6b;
    font-weight: bold;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.btn {
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #0078d4, #00bcf2);
    color: white;
}

/* Welcome Screen Styles */
.welcome-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.welcome-tagline {
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
    line-height: 1.6;
}

.features-overview {
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--card-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.feature-card h4 {
    color: var(--text-accent);
    margin-bottom: 10px;
    font-size: 16px;
    transition: color 0.3s ease;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.quick-start {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: left;
    transition: background 0.3s ease;
}

.quick-start h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-accent);
    transition: color 0.3s ease;
}

.instructions-list {
    counter-reset: step-counter;
    list-style: none;
    padding-left: 0;
}

.instructions-list li {
    counter-increment: step-counter;
    margin-bottom: 15px;
    position: relative;
    padding-left: 40px;
    line-height: 1.6;
}

.instructions-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: var(--text-accent);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.exam-highlights {
    margin-bottom: 30px;
}

.popular-exams {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.exam-badge {
    background: linear-gradient(135deg, #0078d4, #00bcf2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.3);
}

.welcome-actions {
    margin-top: 40px;
}

.welcome-actions-top {
    margin: 30px 0;
    text-align: center;
}

.btn-large {
    padding: 18px 50px;
    font-size: 20px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 120, 212, 0.3);
    transition: all 0.3s ease;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 120, 212, 0.4);
}

.tip {
    margin-top: 20px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* Responsive adjustments for welcome screen */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: 15px;
    }
    
    .quick-start {
        padding: 20px;
    }
    
    .popular-exams {
        gap: 8px;
    }
    
    .exam-badge {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .btn-large {
        padding: 15px 35px;
        font-size: 18px;
    }
}


/* Share Button Styles */
.btn-share {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    margin-right: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.btn-share:hover {
    background: linear-gradient(135deg, #218838, #1ba085);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.btn-share:active {
    transform: translateY(0);
}


/* Disabled pause button styling */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #6c757d !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Comment Button Styles */
.btn-comment {
    background: linear-gradient(135deg, #6f42c1, #8b5bc8);
    color: white;
    border: none;
    margin: 0 5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.3);
    font-size: 14px;
    padding: 12px 20px;
}

.btn-comment:hover {
    background: linear-gradient(135deg, #5a359a, #6f42c1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.4);
}

.btn-comment:active {
    transform: translateY(0);
}

/* Game Controls Styling */
.game-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Explanation Box Styling */
.explanation {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    color: #856404;
    line-height: 1.5;
}

/* Dark mode explanation styling */
[data-theme="dark"] .explanation {
    background-color: #3d3d1f;
    border-color: #4d4d28;
    color: #f4e79d;
}


/* Contact Info Styles */
.contact-info {
    background: #e8f4fd;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    text-align: center;
    border-left: 4px solid #0078d4;
}

.contact-info h3 {
    color: #0078d4;
    margin-bottom: 15px;
    font-size: 18px;
}

.contact-info p {
    color: #555;
    margin-bottom: 10px;
    font-size: 15px;
    line-height: 1.6;
}

.contact-link {
    color: #0078d4;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #005a9e;
    text-decoration: underline;
}

.contact-note {
    font-size: 14px;
    color: #666;
    font-style: italic;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 120, 212, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    margin-left: 10px;
}

.btn-secondary:hover {
    background: #5a6268;
}

#resultScreen {
    text-align: center;
}

#resultScreen h2 {
    color: #0078d4;
    margin-bottom: 30px;
    font-size: 32px;
}

.result-stats {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
}

.result-stats p {
    font-size: 20px;
    margin: 15px 0;
    color: #333;
}

.result-stats span {
    color: #0078d4;
    font-weight: bold;
}

#configScreen {
    max-width: 500px;
    margin: 0 auto;
}

#configScreen h2 {
    color: #0078d4;
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #0078d4;
}

footer {
    background: var(--container-bg);
    border-radius: 0 0 15px 15px;
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.footer-links {
    margin-top: 10px;
    font-size: 14px;
}

.footer-link {
    color: var(--text-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    text-decoration: underline;
}

.ai-notice {
    color: var(--text-secondary);
    font-style: italic;
}

/* Mobile and tablet styles */
@media (max-width: 768px) {
    .container {
        margin: 5px;
        max-width: 100%;
    }
    
    header {
        padding: 20px 15px;
        border-radius: 10px 10px 0 0;
    }
    
    main {
        padding: 20px 15px;
    }
    
    footer {
        padding: 15px;
        border-radius: 0 0 10px 10px;
    }
    
    h1 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .score-container {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .score, .streak, .question-count {
        font-size: 16px;
    }
    
    .question-container h2 {
        font-size: 18px;
        margin-bottom: 20px;
        line-height: 1.5;
    }
    
    .option {
        padding: 15px;
        font-size: 15px;
        margin: 0 5px;
    }
    
    .option:hover:not(.disabled) {
        transform: none; /* Remove slide effect on mobile */
    }
    
    .btn {
        width: 100%;
        margin: 8px 0;
        padding: 12px 20px;
        font-size: 16px;
        touch-action: manipulation; /* Improve touch response */
    }
    
    .btn-secondary {
        margin-left: 0;
    }
    
    select {
        width: 100%;
        padding: 12px 15px;
        font-size: 16px;
        -webkit-appearance: none; /* Remove iOS styling */
    }
    
    .timer {
        font-size: 18px;
        margin-top: 15px;
    }
    
    .progress-bar {
        margin-bottom: 20px;
        height: 10px;
    }
    
    #resultScreen h2 {
        font-size: 24px;
    }
    
    .result-stats {
        padding: 20px 15px;
    }
    
    .result-stats p {
        font-size: 16px;
        margin: 10px 0;
    }
}

/* Small mobile phones */
@media (max-width: 480px) {
    .container {
        margin: 2px;
    }
    
    header, main, footer {
        padding: 15px 10px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    .question-container h2 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .option {
        padding: 12px;
        font-size: 14px;
        margin: 0 2px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .score, .streak, .question-count {
        font-size: 14px;
    }
    
    .timer {
        font-size: 16px;
    }
    
    select {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .result-stats {
        padding: 15px 10px;
    }
    
    .result-stats p {
        font-size: 14px;
    }
    
    #resultScreen h2 {
        font-size: 20px;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    transition: background 0.3s ease;
}

.modal-content {
    background: var(--container-bg);
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px var(--shadow-color);
    animation: modalSlideIn 0.3s ease-out;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.modal-header h3 {
    margin: 0;
    font-size: 22px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 30px;
    background: var(--container-bg);
    transition: background 0.3s ease;
}

.results-summary {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    border-left: 4px solid var(--text-accent);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.results-summary h4 {
    color: var(--text-accent);
    margin-bottom: 15px;
    font-size: 18px;
    transition: color 0.3s ease;
}

.results-summary p {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.results-summary .summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.results-summary .stat-item {
    background: var(--container-bg);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.results-summary .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.results-summary .stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-accent);
    transition: color 0.3s ease;
}

.share-options h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.share-buttons .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: white;
}

.btn-teams {
    background: linear-gradient(135deg, #464775 0%, #5b5d9e 100%);
}

.btn-teams:hover {
    background: linear-gradient(135deg, #5b5d9e 0%, #464775 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(70, 71, 117, 0.3);
}

.btn-email {
    background: linear-gradient(135deg, #0078d4 0%, #005a9e 100%);
}

.btn-email:hover {
    background: linear-gradient(135deg, #005a9e 0%, #0078d4 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

.btn-copy {
    background: linear-gradient(135deg, #107c10 0%, #0e6e0e 100%);
}

.btn-copy:hover {
    background: linear-gradient(135deg, #0e6e0e 0%, #107c10 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 124, 16, 0.3);
}

.btn-copy.copied {
    background: linear-gradient(135deg, #2d7d32 0%, #388e3c 100%);
}

/* Help Modal Styles */
.help-section {
    margin-bottom: 30px;
}

.help-section h3 {
    color: var(--text-accent);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instructions-list {
    list-style: decimal;
    margin-left: 20px;
    line-height: 1.8;
}

.instructions-list li {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.instructions-list strong {
    color: var(--text-accent);
}

/* Mobile responsive modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h3 {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .results-summary .summary-stats {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .share-buttons .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* Pause Overlay Styles */
.pause-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.pause-overlay.active {
    display: flex;
}

.pause-content {
    background: white;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: pauseSlideIn 0.3s ease-out;
}

.pause-content h3 {
    color: #0078d4;
    margin-bottom: 15px;
    font-size: 24px;
}

.pause-content p {
    color: #666;
    margin-bottom: 25px;
    font-size: 16px;
}

@keyframes pauseSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Session Statistics Styles */
.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #17a2b8 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.btn-export {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
}

.btn-export:hover {
    background: linear-gradient(135deg, #218838 0%, #28a745 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.modal-large {
    max-width: 900px;
    width: 95%;
}

.stats-summary {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    border-left: 4px solid #17a2b8;
    transition: background 0.3s ease;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--container-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px var(--shadow-color);
    border-top: 3px solid var(--text-accent);
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.stat-card h4 {
    color: var(--text-accent);
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    transition: border-color 0.3s ease;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.3s ease;
}

.stat-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
    transition: color 0.3s ease;
}

.stat-value.positive {
    color: #28a745;
}

.stat-value.negative {
    color: #dc3545;
}

.stats-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.progress-bar-container {
    background: var(--border-color);
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin: 5px 0;
    transition: background 0.3s ease;
}

.progress-bar-fill {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    height: 100%;
    transition: width 0.3s ease, background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 5px;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

/* Disclaimer Page Styles */
.disclaimer-content {
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.disclaimer-content h2 {
    color: var(--text-accent);
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    transition: color 0.3s ease;
}

.disclaimer-section {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    border-left: 4px solid var(--text-accent);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.disclaimer-section h3 {
    color: var(--text-accent);
    margin-bottom: 15px;
    font-size: 20px;
    transition: color 0.3s ease;
}

.disclaimer-section h4 {
    color: var(--text-primary);
    margin: 15px 0 10px 0;
    font-size: 16px;
    transition: color 0.3s ease;
}

.disclaimer-section p {
    color: var(--text-primary);
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.disclaimer-section ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.disclaimer-section li {
    color: var(--text-primary);
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.ai-features, .storage-details, .content-notes, .privacy-controls {
    background: var(--container-bg);
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
    border: 1px solid var(--border-color);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.disclaimer-actions {
    text-align: center;
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.disclaimer-actions .btn {
    margin: 5px;
    min-width: 200px;
}

@media (max-width: 768px) {
    .modal-large {
        max-width: 95%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stats-actions {
        flex-direction: column;
    }
    
    .disclaimer-content {
        padding: 0 10px;
    }
    
    .disclaimer-section {
        padding: 20px 15px;
    }
    
    .disclaimer-content h2 {
        font-size: 24px;
    }
    
    .disclaimer-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .disclaimer-actions .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .footer-links {
        font-size: 12px;
    }
}

/* Enhanced Question Types Styles */

/* Scenario Display */
.question-scenario {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.scenario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--text-accent);
    color: white;
    cursor: pointer;
}

.scenario-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.scenario-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s ease;
}

.question-scenario.collapsed .scenario-toggle {
    transform: rotate(-90deg);
}

.scenario-content {
    padding: 20px;
    line-height: 1.6;
    transition: all 0.3s ease;
}

.question-scenario.collapsed .scenario-content {
    display: none;
}

.question-text h3 {
    color: var(--text-accent);
    margin-bottom: 10px;
    font-size: 18px;
}

.question-instruction {
    background: #e3f2fd;
    border-left: 4px solid var(--text-accent);
    padding: 10px 15px;
    margin: 15px 0;
    font-style: italic;
    border-radius: 4px;
}

[data-theme="dark"] .question-instruction {
    background: rgba(86, 156, 214, 0.1);
    border-left-color: var(--text-accent);
}

/* Multiple Choice Styles */
.multiple-choice-container {
    margin-top: 20px;
}

.option.multiple-choice {
    cursor: pointer;
    border: 2px solid var(--border-color);
    margin-bottom: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.option.multiple-choice:hover {
    border-color: var(--text-accent);
    background: var(--hover-bg);
}

.option-checkbox {
    display: none;
}

.option-label-multi {
    display: flex;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    position: relative;
}

.option-label-multi::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-right: 12px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.option-checkbox:checked + .option-label-multi::before {
    background: var(--text-accent);
    border-color: var(--text-accent);
}

.option-checkbox:checked + .option-label-multi::after {
    content: '✓';
    position: absolute;
    left: 19px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.option-letter {
    font-weight: bold;
    margin-right: 8px;
    color: var(--text-accent);
}

.option-text {
    flex: 1;
    line-height: 1.4;
}

/* Multiple Choice Feedback Styles */
.option.correct-selected {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.option.wrong-selected {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.option.should-be-selected {
    border-color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
    position: relative;
}

.option.should-be-selected::after {
    content: '← Should be selected';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #856404;
    font-weight: bold;
}

/* Submit Container */
.submit-container {
    margin-top: 20px;
    text-align: center;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 8px;
}

.selection-count, .sequence-count {
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Drag and Drop Styles */
.drag-drop-container {
    margin-top: 20px;
}

.drag-drop-instructions {
    background: #e3f2fd;
    border: 1px solid var(--text-accent);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

[data-theme="dark"] .drag-drop-instructions {
    background: rgba(86, 156, 214, 0.1);
}

.drag-drop-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .drag-drop-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.available-items, .sequence-items {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    min-height: 300px;
}

.available-items h4, .sequence-items h4 {
    margin: 0 0 15px 0;
    color: var(--text-accent);
    text-align: center;
    font-size: 16px;
}

.items-list {
    min-height: 200px;
    position: relative;
}

.draggable-item, .sequence-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: grab;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .draggable-item,
[data-theme="dark"] .sequence-item {
    background: var(--card-bg);
    color: var(--text-primary);
}

.draggable-item:hover {
    border-color: var(--text-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.draggable-item.dragging {
    opacity: 0.5;
    transform: scale(1.05);
    cursor: grabbing;
}

.drag-handle {
    color: var(--text-secondary);
    margin-right: 10px;
    font-size: 16px;
    user-select: none;
}

.sequence-item {
    cursor: pointer;
    position: relative;
}

.sequence-item::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--text-accent);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.sequence-list {
    counter-reset: step-counter;
    padding-left: 40px;
}

.sequence-item:hover {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.sequence-item:hover::after {
    content: '✗';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #dc3545;
    font-weight: bold;
}

.drop-placeholder {
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .drop-placeholder {
    background: rgba(255, 255, 255, 0.02);
}

/* Sequence Item Controls */
.sequence-item {
    position: relative;
    padding-right: 120px; /* Make room for controls */
}

.sequence-controls {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sequence-item:hover .sequence-controls {
    opacity: 1;
}

.sequence-btn {
    width: 24px;
    height: 24px;
    border: 1px solid var(--border-color);
    background: var(--container-bg);
    color: var(--text-primary);
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sequence-btn:hover {
    background: var(--text-accent);
    color: white;
    border-color: var(--text-accent);
    transform: scale(1.1);
}

.sequence-btn.move-up:hover {
    background: #28a745;
    border-color: #28a745;
}

.sequence-btn.move-down:hover {
    background: #17a2b8;
    border-color: #17a2b8;
}

.sequence-btn.remove-item:hover {
    background: #dc3545;
    border-color: #dc3545;
}

/* Enhanced drag and drop visual feedback */
.sequence-item.dragging {
    opacity: 0.7;
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.sequence-item:hover {
    border-color: var(--text-accent);
    background: rgba(86, 156, 214, 0.05);
}

/* Remove the old click-to-remove hover styles */
.sequence-item:hover::after {
    display: none;
}

/* Drag and Drop Feedback */
.sequence-item.correct-position {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.sequence-item.wrong-position {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

/* Enhanced Explanation Styles */
.explanation .source-link {
    color: var(--text-accent);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.explanation .source-link:hover {
    text-decoration: underline;
}

/* Enhanced Options for Single Choice */
.option.single-choice {
    position: relative;
}

.option.single-choice::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

.option.single-choice.selected::before {
    background: var(--text-accent);
    border-color: var(--text-accent);
}

.option.single-choice .option-label {
    margin-left: 35px;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .question-scenario {
        margin-bottom: 15px;
    }
    
    .scenario-content {
        padding: 15px;
    }
    
    .option-label-multi {
        padding: 12px;
    }
    
    .drag-drop-instructions {
        padding: 12px;
        font-size: 14px;
    }
    
    .available-items, .sequence-items {
        padding: 12px;
        min-height: 250px;
    }
    
    .draggable-item, .sequence-item {
        padding: 10px;
        padding-right: 100px; /* Adjust for mobile controls */
    }
    
    .sequence-controls {
        right: 5px;
        gap: 2px;
    }
    
    .sequence-btn {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    .sequence-list {
        padding-left: 30px;
    }
    
    .sequence-item::before {
        left: -25px;
        width: 20px;
        height: 20px;
        font-size: 11px;
    }
}