* {
    transition: background-color 0.3s ease, color 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f1f5f9;
    color: #0f172a;
}
body.dark {
    background-color: #0b1120;
    color: #e2e8f0;
}
.exam-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 32px;
    box-shadow: 0 25px 40px -12px rgba(0,0,0,0.2);
    overflow: hidden;
    padding: 28px 32px 40px;
}
body.dark .exam-container {
    background-color: #1e293b;
    box-shadow: 0 20px 30px -8px rgba(0,0,0,0.6);
}
.header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 24px;
    border-bottom: 2px solid #cbd5e1;
    padding-bottom: 16px;
}
body.dark .header {
    border-bottom-color: #334155;
}
h1 {
    margin: 0;
    font-size: 1.7rem;
    background: linear-gradient(135deg, #0f3b5f, #1e7b6e);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}
body.dark h1 {
    background: linear-gradient(135deg, #7dd3fc, #5ee0be);
    background-clip: text;
    -webkit-background-clip: text;
}
.theme-toggle {
    background: #e2e8f0;
    border: none;
    border-radius: 60px;
    padding: 8px 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
    color: #0f172a;
}
body.dark .theme-toggle {
    background: #334155;
    color: #f1f5f9;
}
.info-bar {
    display: flex;
    justify-content: space-between;
    background: #eef2ff;
    padding: 12px 20px;
    border-radius: 60px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
    font-weight: 500;
}
body.dark .info-bar {
    background: #0f172a;
    border: 1px solid #334155;
}
.badge {
    background: #cbd5e1;
    padding: 4px 14px;
    border-radius: 40px;
}
body.dark .badge {
    background: #2d3a4e;
}
.question-card {
    background: #f9fafb;
    border-radius: 28px;
    padding: 22px;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
}
body.dark .question-card {
    background: #0f172a;
    border-color: #334155;
}
.question-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 18px;
}
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.option {
    display: flex;
    align-items: center;
    gap: 14px;
    background: white;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid #cbd5e1;
    cursor: pointer;
}
body.dark .option {
    background: #1e293b;
    border-color: #475569;
}
.option:hover {
    background: #e6f7ff;
}
body.dark .option:hover {
    background: #2d3b4f;
}
input[type="radio"] {
    accent-color: #1e7b6e;
    width: 18px;
    height: 18px;
}
.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin: 20px 0 15px;
}
button {
    background: #1e7b6e;
    border: none;
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    font-size: 1rem;
}
button:hover {
    background: #0f5b50;
    transform: translateY(-1px);
}
.btn-secondary {
    background: #475569;
}
.btn-secondary:hover {
    background: #334155;
}
.submit-exam {
    background: #2c5f8a;
    width: 100%;
    margin-top: 10px;
}
.result-area {
    margin-top: 32px;
    background: #e9f5e9;
    border-radius: 28px;
    padding: 20px;
    display: none;
}
body.dark .result-area {
    background: #0c4a6e;
}
.feedback-item {
    border-bottom: 1px solid #b9d8c1;
    padding: 14px 0;
}
.correct-ans {
    color: #166534;
    font-weight: 500;
}
.wrong-ans {
    color: #b91c1c;
}
body.dark .correct-ans {
    color: #86efac;
}
body.dark .wrong-ans {
    color: #fca5a5;
}
.restart-btn {
    background: #1e3a5f;
    margin-bottom: 20px;
}
@media (max-width: 680px) {
    .exam-container { padding: 18px; }
    .question-text { font-size: 1rem; }
}
footer {
    text-align: center;
    font-size: 0.75rem;
    margin-top: 20px;
    opacity: 0.7;
}
