/* ===== GK Master - Comprehensive SSC GK Study Website ===== */

:root {
    /* Color palette */
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #f59e0b;
    --success: #10b981;
    --success-dark: #059669;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --warning: #f59e0b;
    --info: #3b82f6;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Subject colors */
    --c-history: #dc2626;
    --c-geography: #059669;
    --c-polity: #2563eb;
    --c-economy: #d97706;
    --c-science: #7c3aed;
    --c-static: #0891b2;
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    
    /* Border radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px 0 rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    
    /* Transitions */
    --transition: all 0.2s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Header / Navigation ===== */
.site-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
}

.site-logo:hover {
    color: white;
    text-decoration: none;
}

.site-logo .logo-icon {
    font-size: 1.5rem;
}

.site-nav {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    flex-wrap: wrap;
}

.site-nav a {
    color: rgba(255,255,255,0.9);
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.site-nav a:hover {
    background-color: rgba(255,255,255,0.15);
    color: white;
    text-decoration: none;
}

.site-nav a.active {
    background-color: rgba(255,255,255,0.2);
    color: white;
}

/* Mobile menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        flex-direction: column;
        padding: 1rem;
        gap: 0.25rem;
    }
    .site-nav.open {
        display: flex;
    }
    .site-nav a {
        padding: 0.75rem 1rem;
        width: 100%;
    }
}

/* ===== Layout ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-narrow {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 3rem 0;
}

.section-sm {
    padding: 1.5rem 0;
}

.bg-light {
    background-color: var(--gray-100);
}

.bg-white {
    background-color: white;
}

.text-center {
    text-align: center;
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat .number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.hero-stat .label {
    font-size: 0.875rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .hero {
        padding: 3rem 0;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .hero-stats {
        gap: 1.5rem;
    }
    .hero-stat .number {
        font-size: 2rem;
    }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

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

.btn-primary:hover {
    background-color: var(--gray-100);
    color: var(--primary-dark);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background-color: transparent;
    color: white;
    border-color: rgba(255,255,255,0.5);
}

.btn-outline:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: white;
    color: white;
    text-decoration: none;
}

.btn-dark {
    background-color: var(--gray-800);
    color: white;
}

.btn-dark:hover {
    background-color: var(--gray-900);
    color: white;
    text-decoration: none;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1.05rem;
}

/* ===== Cards ===== */
.card {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-grid {
    display: grid;
    gap: 1.5rem;
}

.card-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Subject card */
.subject-card {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    border-top: 4px solid;
    text-decoration: none;
    color: inherit;
    display: block;
}

.subject-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
    text-decoration: none;
    color: inherit;
}

.subject-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.subject-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.subject-card p {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.subject-card .count {
    display: inline-block;
    padding: 0.25rem 0.875rem;
    background-color: var(--gray-100);
    border-radius: 9999px;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--gray-700);
}

/* ===== Section Headers ===== */
.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 700px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .section-header h2 {
        font-size: 1.75rem;
    }
    .section-header p {
        font-size: 1rem;
    }
}

/* ===== Subject Page Layout ===== */
.subject-header {
    padding: 3rem 0 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.subject-header::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.subject-header .container {
    position: relative;
    z-index: 1;
}

.subject-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.subject-header .icon {
    font-size: 3rem;
}

.subject-header .description {
    font-size: 1.125rem;
    opacity: 0.95;
    max-width: 700px;
    margin-bottom: 1.5rem;
}

.subject-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.subject-stat {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.2);
}

.subject-stat .num {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

.subject-stat .lbl {
    font-size: 0.825rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .subject-header h1 {
        font-size: 1.75rem;
    }
    .subject-header .icon {
        font-size: 2rem;
    }
    .subject-stats {
        gap: 1rem;
    }
}

/* Era section */
.era-section {
    margin-bottom: 2.5rem;
}

.era-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-200);
}

.era-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
}

.era-header .count {
    background-color: var(--gray-100);
    padding: 0.25rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
}

/* Chapter list */
.chapter-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.chapter-card {
    background-color: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}

.chapter-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}

.chapter-card .num {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 0.75rem;
}

.chapter-card .name {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.95rem;
    display: inline;
}

.chapter-card .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-100);
}

.chapter-card .qcount {
    font-size: 0.825rem;
    color: var(--gray-500);
}

.chapter-card .links {
    display: flex;
    gap: 0.75rem;
    font-size: 0.825rem;
}

.chapter-card .links a {
    color: var(--primary);
    font-weight: 500;
}

/* ===== MCQ Practice Page ===== */
.chapter-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem 0;
}

.chapter-hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.chapter-hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.chapter-hero .breadcrumb {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.chapter-hero .breadcrumb a {
    color: rgba(255,255,255,0.9);
}

.chapter-hero .breadcrumb a:hover {
    color: white;
}

.chapter-hero .stats {
    display: flex;
    gap: 1.5rem;
}

.chapter-hero .stat {
    text-align: center;
}

.chapter-hero .stat .num {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.chapter-hero .stat .lbl {
    font-size: 0.75rem;
    opacity: 0.9;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

/* MCQ Card */
.mcq-container {
    max-width: 850px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.mcq-card {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.mcq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.mcq-number {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.825rem;
    font-weight: 700;
}

.mcq-source {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-style: italic;
    text-align: right;
}

.mcq-question {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.mcq-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mcq-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    background-color: white;
    font-size: 1rem;
    color: var(--gray-700);
    text-align: left;
    width: 100%;
    font-family: inherit;
}

.mcq-option:hover:not(.answered) {
    border-color: var(--primary-light);
    background-color: var(--gray-50);
}

.mcq-option .letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--gray-100);
    color: var(--gray-700);
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.mcq-option .text {
    flex: 1;
    line-height: 1.5;
}

/* Answered states */
.mcq-option.answered {
    cursor: default;
}

.mcq-option.correct {
    border-color: var(--success);
    background-color: #ecfdf5;
    color: var(--success-dark);
}

.mcq-option.correct .letter {
    background-color: var(--success);
    color: white;
}

.mcq-option.incorrect {
    border-color: var(--danger);
    background-color: #fef2f2;
    color: var(--danger-dark);
}

.mcq-option.incorrect .letter {
    background-color: var(--danger);
    color: white;
}

.mcq-option.show-correct {
    border-color: var(--success);
    background-color: #ecfdf5;
    color: var(--success-dark);
    animation: pulse 0.5s;
}

.mcq-option.show-correct .letter {
    background-color: var(--success);
    color: white;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Explanation */
.mcq-explanation {
    margin-top: 1.25rem;
    padding: 1.25rem;
    background-color: #f0f9ff;
    border-left: 4px solid var(--info);
    border-radius: var(--radius-sm);
    display: none;
}

.mcq-explanation.show {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mcq-explanation h4 {
    color: var(--info);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mcq-explanation p {
    color: var(--gray-700);
    font-size: 0.95rem;
    line-height: 1.6;
}

.mcq-answer-badge {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.25rem 0.75rem;
    background-color: var(--success);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.825rem;
    font-weight: 600;
}

/* MCQ Navigation */
.mcq-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.mcq-nav .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Progress bar */
.progress-container {
    margin-bottom: 1.5rem;
}

.progress-bar {
    height: 8px;
    background-color: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 9999px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* ===== Theory Page ===== */
.theory-content {
    max-width: 850px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.theory-section {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.theory-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-200);
}

.theory-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.theory-section p {
    color: var(--gray-700);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.theory-section ul, .theory-section ol {
    margin: 0.5rem 0 1rem 1.5rem;
}

.theory-section li {
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.theory-section .info-box {
    background-color: #fef3c7;
    border-left: 4px solid var(--warning);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

.theory-section .info-box h4 {
    color: #92400e;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.theory-section .key-facts {
    background-color: #ecfdf5;
    border-left: 4px solid var(--success);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

.theory-section .key-facts h4 {
    color: var(--success-dark);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* ===== Analysis Page ===== */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.chart-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.chart-container {
    position: relative;
    height: 300px;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.stats-table th, .stats-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.stats-table th {
    background-color: var(--gray-100);
    font-weight: 700;
    color: var(--gray-700);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stats-table td {
    color: var(--gray-700);
}

.stats-table tr:last-child td {
    border-bottom: none;
}

.stats-table tr:hover td {
    background-color: var(--gray-50);
}

.stats-table .count-cell {
    font-weight: 600;
    color: var(--primary);
}

.stats-table .bar-cell {
    width: 200px;
}

.stats-table .bar {
    height: 8px;
    background-color: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
}

.stats-table .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 9999px;
}

/* ===== Footer ===== */
.site-footer {
    background-color: var(--gray-900);
    color: var(--gray-300);
    padding: 2.5rem 0 1.5rem;
    margin-top: 3rem;
}

.site-footer .container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .site-footer .container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.site-footer h4 {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.site-footer ul {
    list-style: none;
    padding: 0;
}

.site-footer li {
    margin-bottom: 0.5rem;
}

.site-footer a {
    color: var(--gray-400);
    font-size: 0.875rem;
}

.site-footer a:hover {
    color: white;
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid var(--gray-800);
    padding-top: 1.5rem;
    margin-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* ===== Utilities ===== */
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-gray { color: var(--gray-500); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary { background-color: var(--primary); color: white; }
.badge-success { background-color: var(--success); color: white; }
.badge-danger { background-color: var(--danger); color: white; }
.badge-warning { background-color: var(--warning); color: white; }
.badge-info { background-color: var(--info); color: white; }
.badge-gray { background-color: var(--gray-500); color: white; }

/* Subject color backgrounds */
.bg-history { background-color: var(--c-history); }
.bg-geography { background-color: var(--c-geography); }
.bg-polity { background-color: var(--c-polity); }
.bg-economy { background-color: var(--c-economy); }
.bg-science { background-color: var(--c-science); }
.bg-static { background-color: var(--c-static); }

.border-history { border-top-color: var(--c-history) !important; }
.border-geography { border-top-color: var(--c-geography) !important; }
.border-polity { border-top-color: var(--c-polity) !important; }
.border-economy { border-top-color: var(--c-economy) !important; }
.border-science { border-top-color: var(--c-science) !important; }
.border-static { border-top-color: var(--c-static) !important; }

/* Hide elements */
.hidden { display: none !important; }

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--gray-900);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Print styles */
@media print {
    .site-header, .site-footer, .mcq-nav, .chapter-hero {
        display: none;
    }
    body {
        background: white;
    }
    .mcq-card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
        page-break-inside: avoid;
    }
}
