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

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

.container {
    max-width: 800px;
    margin: 0 auto;
}

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

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

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

.section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: fadeIn 0.5s ease-in;
}

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

.hidden {
    display: none !important;
}

/* Login Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

/* Quiz Container Styles */
.quiz-header {
    margin-bottom: 30px;
}

.quiz-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 600;
    color: #555;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e1e5e9;
    border-radius: 4px;
    overflow: hidden;
}

#progressFill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    width: 0%;
}

#questionText {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.6;
}

.option {
    margin-bottom: 15px;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

.option label {
    cursor: pointer;
    font-size: 16px;
    line-height: 1.4;
}

.option input[type="radio"]:checked + label {
    font-weight: 600;
    color: #667eea;
}

/* Result Styles */
.result-card {
    background: #f8f9ff;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.result-card h3 {
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

.score-display {
    text-align: center;
    margin-bottom: 15px;
}

#scorePercentage {
    font-size: 3rem;
    font-weight: bold;
    color: #667eea;
    display: block;
}

#scoreDetails {
    font-size: 1.2rem;
    color: #666;
    margin-top: 10px;
}

.status-pass {
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    background-color: #e8f5e8;
    border: 1px solid #4CAF50;
}

.status-fail {
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    background-color: #ffeaea;
    border: 1px solid #F44336;
}

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

.result-actions button {
    width: auto;
    padding: 12px 20px;
}

/* Answer Review Styles */
.review-item {
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.review-item.correct {
    border-left: 4px solid #4CAF50;
    background-color: #f0f8f0;
}

.review-item.incorrect {
    border-left: 4px solid #F44336;
    background-color: #fff5f5;
}

.review-question {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.review-answer {
    margin-left: 15px;
}

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

.correct-answer {
    color: #4CAF50;
    font-weight: 600;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

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

.modal-actions button {
    width: auto;
    padding: 10px 20px;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .section {
        padding: 20px;
    }
    
    .quiz-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .result-actions {
        grid-template-columns: 1fr;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    #questionText {
        font-size: 1.1rem;
    }
    
    #scorePercentage {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .section {
        padding: 15px;
    }
    
    .option {
        padding: 12px;
    }
    
    .modal-content {
        padding: 20px;
        width: 95%;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .container {
        max-width: none;
    }
    
    .section {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    button {
        display: none;
    }
    
    .modal {
        display: none;
    }
}