@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@400;600;700;800&display=swap');

:root {
    --primary: #1a237e; /* Navy */
    --accent: #ff9800; /* Orange */
    --bg-color: #f8f9fa;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #e0e0e0;
    --hindi-color: #2c3e50;
    --english-color: #0056b3;
    --box-bg: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: 900px;
    margin: 20px auto;
    background: var(--box-bg);
    padding: 30px 40px;
    border: 6px double var(--primary);
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    min-height: 800px;
}

.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    opacity: 0.04;
    z-index: 0;
    pointer-events: none;
}

.content-wrapper {
    position: relative;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

header img.logo {
    max-height: 80px;
    margin-bottom: 15px;
}

header h1 {
    font-family: 'Outfit', sans-serif;
    color: var(--primary);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 5px;
}

header h2 {
    font-family: 'Outfit', sans-serif;
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    color: var(--primary);
    margin-bottom: 20px;
}

.lesson-title {
    text-align: center;
    font-size: 1.8rem;
    color: var(--primary);
    border-bottom: 2px dashed var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.lesson-title .hindi-title {
    display: block;
    font-size: 1.5rem;
    color: var(--hindi-color);
    font-weight: 600;
    margin-top: 10px;
}

.author-credit {
    text-align: center;
    font-style: italic;
    color: var(--text-muted);
    margin-top: -20px;
    margin-bottom: 40px;
}

/* Layouts */
.bilingual-pair {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 8px 15px;
    background: #f9fbff;
    border-left: 4px solid var(--primary);
    border-radius: 4px;
}

.hindi-text {
    font-weight: 500;
    color: var(--hindi-color);
    font-size: 1.1rem;
    width: 48%;
}

.english-text {
    font-weight: 600;
    color: var(--english-color);
    width: 48%;
}

/* Vocabulary Tables */
.vocab-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: white;
    table-layout: fixed;
}

.vocab-table th, .vocab-table td {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.vocab-table th {
    background-color: var(--primary);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
}

.vocab-table td.hindi {
    font-weight: 500;
    color: var(--hindi-color);
    width: 50%;
}

.vocab-table td.english {
    font-weight: 600;
    color: var(--english-color);
    width: 50%;
}

/* Grammar Explanations */
.grammar-note {
    background: #fff8e1;
    border: 1px solid #ffe082;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.grammar-note h4 {
    color: #f57f17;
    margin-bottom: 10px;
}

/* Exercises */
.exercise-box {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.exercise-number {
    font-family: 'Outfit', sans-serif;
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.exercise-list {
    list-style-position: inside;
    margin-left: 10px;
}

.exercise-list li {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: var(--hindi-color);
    font-weight: 500;
}

/* Navigation */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #121858;
}

.btn.outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Print Settings */
@media print {
    body {
        background-color: white;
    }
    .container {
        box-shadow: none;
        margin: 0;
        padding: 0;
        max-width: 100%;
    }
    .nav-buttons {
        display: none;
    }
    .lesson-title {
        page-break-before: always;
    }
    .vocab-table {
        page-break-inside: avoid;
    }
    .exercise-box {
        page-break-inside: avoid;
    }
}

/* Table of Contents */
.toc-list {
    list-style: none;
    padding: 0;
}

.toc-list li {
    margin-bottom: 10px;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 10px;
}

.toc-list a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
}

.toc-list a:hover {
    color: var(--accent);
}

/* Layout Classes */
.examples {
    column-count: 2;
    column-gap: 40px;
}

.vocabulary {
    column-count: 3;
    column-gap: 30px;
}

@media (max-width: 800px) {
    .vocabulary {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .examples, .vocabulary {
        column-count: 1;
    }
}
