* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f4f7fa;
    color: #333;
    line-height: 1.6;
}

.test-container {
    max-width: 1000px;
    margin: 30px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.hidden {
    display: none;
}

/* Login Required Section */
.login-required {
    text-align: center;
    padding: 50px 20px;
}

.login-required h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.login-required p {
    margin-bottom: 20px;
    color: #666;
}

.login-required button {
    padding: 10px 25px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-required button:hover {
    background-color: #2980b9;
}

/* Test Instructions Section */
.test-instructions h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.instructions {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.instructions h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.instructions ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.instructions li {
    margin-bottom: 10px;
}

#start-test {
    display: block;
    margin: 0 auto;
    padding: 12px 30px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#start-test:hover {
    background-color: #219653;
}

/* Test Area Section */
.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.test-header h1 {
    font-size: 24px;
    color: #2c3e50;
}

.timer {
    background-color: #f1f8ff;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    color: #2980b9;
    border: 1px solid #d1e7ff;
}

/* Question Navigation */
.question-navigation {
    margin-bottom: 20px;
}

.question-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.question-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eee;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.question-number:hover {
    background-color: #ddd;
}

.question-number.active {
    background-color: #3498db;
    color: white;
}

.question-number.attempted {
    background-color: #27ae60;
    color: white;
}

/* Question Container */
.question-container {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    min-height: 300px;
}

.question {
    font-size: 18px;
    margin-bottom: 20px;
    color: #2c3e50;
    line-height: 1.6;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.option:hover {
    background-color: #f1f8ff;
    border-color: #b8daff;
}

.option.selected {
    background-color: #d1e7ff;
    border-color: #b8daff;
}

.option input[type="radio"] {
    margin-right: 15px;
}

/* Navigation Buttons */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.nav-btn {
    padding: 12px 25px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.nav-btn:hover {
    background-color: #2980b9;
}

.submit-btn {
    padding: 12px 25px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #c0392b;
}

/* Test Result Section */
.test-result h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.result-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.result-item {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.result-item h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #666;
}

.result-item p {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.question-analysis {
    margin-bottom: 30px;
}

.analysis-item {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.analysis-item .question-text {
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
}

.analysis-item .user-answer {
    margin-bottom: 5px;
}

.analysis-item .correct-answer {
    color: #27ae60;
    font-weight: bold;
}

.analysis-item.correct {
    border-left: 5px solid #27ae60;
}

.analysis-item.incorrect {
    border-left: 5px solid #e74c3c;
}

.analysis-item.unattempted {
    border-left: 5px solid #f39c12;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.button-group button {
    padding: 12px 25px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.button-group button:hover {
    background-color: #2980b9;
}

/* Responsive styles */
@media (max-width: 768px) {
    .test-container {
        margin: 10px;
        padding: 15px;
    }
    
    .test-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .navigation-buttons {
        flex-direction: column;
    }
    
    .result-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Custom Popup Styles */
.custom-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-popup.hidden {
    display: none !important;
}

.custom-popup.active {
    opacity: 1;
    visibility: visible;
    display: flex !important;
}

.popup-content {
    background-color: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s;
    position: relative;
}

.custom-popup.active .popup-content {
    transform: scale(1);
}

.popup-content h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
}

.popup-content p {
    margin-bottom: 20px;
    color: #555;
    font-size: 16px;
    line-height: 1.6;
}

.marking-scheme {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: left;
}

.marking-scheme h3 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.marking-scheme ul {
    list-style: none;
    margin-left: 0;
}

.marking-scheme li {
    margin-bottom: 8px;
    font-size: 15px;
}

.highlight {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    margin-right: 5px;
}

.highlight.positive {
    background-color: #e3f9e5;
    color: #27ae60;
}

.highlight.negative {
    background-color: #ffeaea;
    color: #e74c3c;
}

.highlight.neutral {
    background-color: #f1f8ff;
    color: #3498db;
}

.popup-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.btn-cancel, .btn-confirm {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-cancel {
    background-color: #e0e0e0;
    color: #555;
}

.btn-cancel:hover {
    background-color: #d0d0d0;
}

.btn-confirm {
    background-color: #e74c3c;
    color: white;
}

.btn-confirm:hover {
    background-color: #c0392b;
}

/* Enhanced UI Styles */
.test-container {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 16px;
}

.question-container {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eaeaea;
}

.question {
    font-size: 20px;
    line-height: 1.7;
}

.option {
    transition: all 0.2s;
    border: 1px solid #ddd;
}

.option:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
}

.option.selected {
    background-color: #d1e7ff;
    border-color: #b8daff;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
}

.timer {
    font-size: 20px;
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
    border: none;
    box-shadow: 0 3px 10px rgba(41, 128, 185, 0.3);
}

.nav-btn, .submit-btn {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.nav-btn:hover, .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.question-number {
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.question-number:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.question-number.active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.4);
}

.question-number.attempted {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.4);
}

/* Enhanced Result Styles */
.result-summary {
    gap: 25px;
}

.result-item {
    background: linear-gradient(to bottom, #fff, #f8f9fa);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 20px;
    border: 1px solid #eee;
    transition: all 0.3s;
}

.result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.result-item h3 {
    color: #2c3e50;
    font-size: 18px;
    margin-bottom: 15px;
}

.result-item p {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
}

.analysis-item {
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    transition: all 0.3s;
}

.analysis-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.analysis-item.correct {
    border-left: 5px solid #27ae60;
    background: linear-gradient(to right, #e3f9e5 0%, #f8f9fa 10%);
}

.analysis-item.incorrect {
    border-left: 5px solid #e74c3c;
    background: linear-gradient(to right, #ffeaea 0%, #f8f9fa 10%);
}

.analysis-item.unattempted {
    border-left: 5px solid #f39c12;
    background: linear-gradient(to right, #fff7e6 0%, #f8f9fa 10%);
}

.button-group button {
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
    transition: all 0.3s;
}

.button-group button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
} 