:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --success-color: #22c55e;
    --error-color: #ef4444;
    --spacing-unit: 1rem;
    --border-radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-unit);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    margin-bottom: 2rem;
    text-align: center;
}

h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-secondary);
}

/* Exam List Styles */
.exam-list {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.exam-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-background);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.exam-link:active {
    transform: scale(0.98);
}

.exam-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.exam-icon {
    color: var(--primary-color);
}

/* Quiz Styles */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    background: var(--card-background);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.progress {
    font-weight: 600;
    color: var(--primary-color);
}

.score {
    font-weight: 600;
}

.question-card {
    background: var(--card-background);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.question-text {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.question-text p {
    margin-bottom: 1rem;
}

.options-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-item {
    position: relative;
}

.option-btn {
    width: 100%;
    text-align: left;
    padding: 1rem 1.25rem;
    background: #f1f5f9;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-color);
    transition: all 0.2s;
    display: flex;
    align-items: flex-start;
}

.option-btn:hover:not(:disabled) {
    background: #e2e8f0;
}

.option-btn.selected {
    border-color: var(--primary-color);
    background: #eff6ff;
    color: var(--primary-color);
}

.option-btn.correct {
    background-color: #dcfce7;
    border-color: var(--success-color);
    color: #166534;
}

.option-btn.incorrect {
    background-color: #fee2e2;
    border-color: var(--error-color);
    color: #991b1b;
}

.option-label {
    margin-right: 0.75rem;
    font-weight: 600;
    min-width: 1.5rem;
}

.feedback-section {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.3s ease-in;
}

.feedback-section h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.explanation {
    font-size: 0.95rem;
}

.controls {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: white;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.error {
    text-align: center;
    padding: 2rem;
    color: var(--error-color);
    background: #fef2f2;
    border-radius: var(--border-radius);
}
