* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

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

.header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.stats-panel {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    color: #666;
    margin-top: 5px;
}

.topic-progress {
    margin-top: 20px;
}

.topic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 6px;
}

.topic-name {
    font-weight: 500;
}

.topic-score {
    font-weight: bold;
}

.topic-score.good {
    color: #28a745;
}

.topic-score.average {
    color: #ffc107;
}

.topic-score.poor {
    color: #dc3545;
}

.question-panel {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-height: 400px;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.question-number {
    font-size: 1.2em;
    font-weight: bold;
    color: #667eea;
}

.question-topic {
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
}

.question-text {
    font-size: 1.3em;
    margin-bottom: 25px;
    line-height: 1.5;
}

.options {
    margin-bottom: 25px;
}

.option {
    margin-bottom: 15px;
}

.option-button {
    width: 100%;
    text-align: left;
    padding: 15px 20px;
    border: 2px solid #ddd;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
}

.option-button:hover {
    border-color: #667eea;
    background: #e6efff;
}

.option-button.selected {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.option-button.correct {
    border-color: #28a745;
    background: #28a745;
    color: white;
}

.option-button.incorrect {
    border-color: #dc3545;
    background: #dc3545;
    color: white;
}

.option-button:disabled {
    cursor: not-allowed;
}

.feedback {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
    display: none;
}

.feedback.show {
    display: block;
}

.feedback.correct {
    border-left-color: #28a745;
    background: #d4edda;
}

.feedback.incorrect {
    border-left-color: #dc3545;
    background: #f8d7da;
}

.feedback-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.explanation {
    line-height: 1.5;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.start-screen {
    text-align: center;
    color: white;
}

.start-screen h2 {
    margin-bottom: 20px;
    font-size: 2em;
}

.start-screen p {
    margin-bottom: 30px;
    font-size: 1.1em;
    opacity: 0.9;
}

.hidden {
    display: none;
}

.paper-selection {
    text-align: center;
    margin-bottom: 20px;
}

.paper-dropdown {
    padding: 10px 20px;
    font-size: 1.1em;
    border: 2px solid white;
    border-radius: 6px;
    background: white;
    color: #333;
    cursor: pointer;
    outline: none;
}

.paper-dropdown:focus {
    border-color: #764ba2;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header h1 {
        font-size: 2em;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .question-panel {
        padding: 20px;
    }

    .controls {
        flex-direction: column;
    }
}

/* New styles for flagged questions functionality */
.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
}

.bottom-controls {
    text-align: center;
    margin-top: 30px;
    padding: 20px 0;
}

/* Flagged questions modal styles */
.flagged-questions-modal .modal-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.flagged-questions-modal h2 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.flagged-questions-modal p {
    color: #666;
    margin-bottom: 20px;
    text-align: center;
}

.flagged-question-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
}

.question-preview {
    flex: 1;
    margin-right: 15px;
}

.question-preview strong {
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.question-preview small {
    color: #666;
    font-style: italic;
}

.modal-actions {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}