:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --bg-gradient: linear-gradient(135deg, #4f46e5 0%, #9333ea 50%, #ec4899 100%);
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --border-color: #e5e7eb;
    --success: #10b981;
    --danger: #ef4444;
}

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

body {
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
}

.site-header, .site-footer {
    text-align: center;
    color: white;
    padding: 10px;
}

.site-header h1 {
    font-size: 1.6rem;
    margin-bottom: 4px;
    font-weight: 700;
}

.site-header p, .site-footer p {
    font-size: 0.95rem;
    opacity: 0.9;
}

.main-container {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card {
    background: var(--card-bg);
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    padding: 25px;
    margin: 10px 0;
    transition: all 0.3s ease;
}

.hidden-section {
    display: none !important;
}

.active-section {
    display: block !important;
}

.book-info {
    text-align: center;
    margin-bottom: 20px;
}

.badge {
    background: #e0e7ff;
    color: var(--primary-dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.book-info h2 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin: 10px 0;
}

.book-info p {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 4px 0;
}

.creator-tag {
    margin-top: 10px !important;
    font-weight: 600;
    color: var(--secondary) !important;
}

.divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}

.student-form h3 {
    margin-bottom: 15px;
    color: var(--text-main);
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-muted);
}

input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

input[type="text"]:focus {
    border-color: var(--primary);
}

.btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.primary-btn {
    background: var(--primary);
    color: white;
}

.primary-btn:hover {
    background: var(--primary-dark);
}

.secondary-btn {
    background: #f3f4f6;
    color: var(--text-main);
}

.secondary-btn:hover {
    background: #e5e7eb;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.timer-box {
    background: #fee2e2;
    color: #991b1b;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.95rem;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--secondary);
    width: 0%;
    transition: width 0.3s ease;
}

.question-container h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.option-item {
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    background: #fafafa;
}

.option-item:hover {
    background: #f3f4f6;
    border-color: #cbd5e1;
}

.option-item.selected {
    background: #e0e7ff;
    border-color: var(--primary);
    color: var(--primary-dark);
    font-weight: 600;
}

.quiz-footer-nav {
    display: flex;
    gap: 15px;
}

.quiz-footer-nav button {
    flex: 1;
}

.result-header {
    text-align: center;
    margin-bottom: 20px;
}

.result-header h2 {
    color: var(--primary-dark);
}

.student-summary {
    background: #f8fafc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    border-left: 4px solid var(--primary);
}

.student-summary p {
    margin: 4px 0;
}

.score-card-grid {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.score-box {
    flex: 1;
    background: #f1f5f9;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.score-box h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.score-box p {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.review-container h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.review-list {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 20px;
}

.review-item {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.review-item:last-child {
    border-bottom: none;
}

.review-q {
    font-weight: 600;
    margin-bottom: 4px;
}

.review-ans span {
    font-weight: 600;
}

.ans-correct {
    color: var(--success);
}

.ans-incorrect {
    color: var(--danger);
}

.result-actions {
    display: flex;
    gap: 15px;
}

.result-actions button {
    flex: 1;
}

@media(max-width: 480px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .card {
        padding: 15px;
    }
    .score-card-grid, .result-actions, .quiz-footer-nav {
        flex-direction: column;
        gap: 10px;
    }
}