./* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 10px;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 20px;
}

/* Header styles */
header {
    background: linear-gradient(to right, #2c3e50, #4a6491);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    text-align: center;
}

header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-top: 10px;
}

.subtitle p {
    margin: 5px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.video-link a {
    color: #ffcc00;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.video-link a:hover {
    color: #ffdd44;
    text-decoration: underline;
}

/* Instructions */
.instructions {
    background-color: #e8f4fc;
    border-left: 5px solid #3498db;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 1rem;
}

.instructions i {
    color: #3498db;
    margin-right: 8px;
}

/* User info section */
.user-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    border: 2px dashed #bbb;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.input-group input {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border 0.3s;
}

.input-group input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Button styles */
.btn {
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.start-btn {
    background: linear-gradient(to right, #27ae60, #2ecc71);
    color: white;
}

.start-btn:hover {
    background: linear-gradient(to right, #219653, #27ae60);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.nav-btn {
    background-color: #3498db;
    color: white;
    flex: 1;
}

.nav-btn:hover:not(:disabled) {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.nav-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
}

.submit-btn {
    background: linear-gradient(to right, #e74c3c, #c0392b);
    color: white;
    flex: 2;
}

.submit-btn:hover {
    background: linear-gradient(to right, #c0392b, #a93226);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

/* Quiz container */
.quiz-container {
    background-color: #fff;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.quiz-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.quiz-header h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-container {
    width: 100%;
    background-color: #ecf0f1;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, #3498db, #2ecc71);
    width: 5%;
    border-radius: 6px;
    transition: width 0.5s ease;
}

#progressText {
    display: block;
    text-align: center;
    margin-top: 8px;
    font-weight: 500;
    color: #7f8c8d;
}

/* Questions styling */
.question-card {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 5px solid #3498db;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.question-number {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.question-text {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #34495e;
    line-height: 1.5;
}

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

.option {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: white;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.option:hover {
    border-color: #3498db;
    background-color: #f0f8ff;
}

.option.selected {
    border-color: #3498db;
    background-color: #e1f0fa;
}

.option input {
    margin-right: 15px;
    transform: scale(1.3);
}

.option-label {
    font-weight: 600;
    color: #2c3e50;
    min-width: 30px;
}

.option-text {
    flex: 1;
}

/* Navigation buttons */
.navigation {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Results container */
.results-container {
    background-color: #fff;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.results-container h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .score-display {
        flex-direction: row;
        justify-content: space-around;
    }
}

.score-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: conic-gradient(#2ecc71 0%, #ecf0f1 0%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 10px 25px rgba(46, 204, 113, 0.3);
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background-color: white;
    border-radius: 50%;
}

#scorePercent {
    font-size: 2.8rem;
    font-weight: 800;
    color: #2c3e50;
    z-index: 1;
}

.score-label {
    font-size: 1.2rem;
    color: #7f8c8d;
    z-index: 1;
    margin-top: 5px;
}

.score-details {
    flex: 1;
    max-width: 400px;
}

.score-details p {
    font-size: 1.2rem;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.score-details strong {
    color: #2c3e50;
    min-width: 160px;
    display: inline-block;
}

.status-pass {
    color: #27ae60;
    font-weight: 700;
    background-color: #d5f4e6;
    padding: 5px 15px;
    border-radius: 20px;
}

.status-fail {
    color: #e74c3c;
    font-weight: 700;
    background-color: #fadbd8;
    padding: 5px 15px;
    border-radius: 20px;
}

/* Answer controls */
.answer-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.answer-btn {
    background: linear-gradient(to right, #9b59b6, #8e44ad);
    color: white;
    flex: 1;
}

.answer-btn:hover {
    background: linear-gradient(to right, #8e44ad, #7d3c98);
    transform: translateY(-3px);
}

.retry-btn {
    background: linear-gradient(to right, #f39c12, #e67e22);
    color: white;
    flex: 1;
}

.retry-btn:hover {
    background: linear-gradient(to right, #e67e22, #d35400);
    transform: translateY(-3px);
}

/* Answer key */
.answer-key {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border-top: 5px solid #9b59b6;
}

.answer-key h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.key-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.key-item {
    background-color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.key-question {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.key-answer {
    font-size: 1.3rem;
    font-weight: 800;
    color: #27ae60;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

.footer-note {
    font-style: italic;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #95a5a6;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        border-radius: 15px;
    }
    
    header h1 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 5px;
    }
    
    .subtitle {
        font-size: 0.85rem;
    }
    
    .navigation {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .key-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .score-circle {
        width: 150px;
        height: 150px;
    }
    
    .score-circle::before {
        width: 120px;
        height: 120px;
    }
    
    #scorePercent {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .question-card {
        padding: 15px;
    }
    
    .option {
        padding: 12px;
    }
    
    .results-container {
        padding: 20px;
    }
    
    .answer-controls {
        flex-direction: column;
    }
}
