/* Interactive Hindi Lesson: Chapter 3 - Main Styles */

/* ======= Base Styles ======= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8B4513;
    --secondary-color: #A0522D;
    --accent-color: #DEB887;
    --text-color: #333;
    --light-text: #fff;
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 6px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
    --card-radius: 16px;
    --input-radius: 8px;
    --transition: all 0.3s ease;
}

@font-face {
    font-family: 'Noto Sans Devanagari';
    font-style: normal;
    font-weight: 400;
    src: url(https://fonts.gstatic.com/s/notosansdevanagari/v25/TuGOUUFzXI5FBtUq5a8bjKYTZjtRU6Sgv3kWzSpz0C8.woff2) format('woff2');
    unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF;
}

@font-face {
    font-family: 'Noto Sans Devanagari';
    font-style: normal;
    font-weight: 700;
    src: url(https://fonts.gstatic.com/s/notosansdevanagari/v25/TuGOUUFzXI5FBtUq5a8bjKYTZjtRU6Sgv3kWzSpz0C8.woff2) format('woff2');
    unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF;
}

body {
    font-family: 'Noto Sans Devanagari', 'Arial', sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text-color);
    line-height: 1.6;
}

/* Navigation Menu */
.nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-items {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-item {
    padding: 8px 16px;
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    border: none;
}

.nav-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.nav-item.active {
    background: linear-gradient(135deg, #DEB887, #D2B48C);
    color: #333;
}

.nav-item:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 80px auto 20px;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    padding: 40px 0;
    background: rgba(255,255,255,0.1);
    border-radius: var(--card-radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(rgba(255,255,255,0.1), rgba(255,255,255,0));
    pointer-events: none;
}

.title {
    font-size: 3rem;
    color: white;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 5px;
}

.reprint {
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
}

/* Progress Tracker */
.progress-container {
    background: rgba(255,255,255,0.2);
    border-radius: var(--card-radius);
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
}

.progress-bar {
    height: 30px;
    background: rgba(255,255,255,0.3);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    width: 0%;
    transition: width 1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(rgba(255,255,255,0.2), rgba(255,255,255,0));
}

.progress-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    color: white;
}

/* Module Sections */
.module {
    display: none;
    animation: fadeIn 0.5s;
}

.module.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Content Blocks */
.content-block {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.content-block p {
    margin-bottom: 15px;
}

.content-block blockquote {
    border-left: 4px solid #8B4513;
    padding-left: 15px;
    margin: 15px 0;
    font-style: italic;
    color: #555;
}

/* Exercise Cards */
.exercise-card {
    background: white;
    border-radius: var(--card-radius);
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}

.exercise-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.exercise-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.exercise-icon {
    font-size: 2rem;
}

.activity-title {
    font-size: 1.3rem;
    color: #8B4513;
    margin: 25px 0 15px;
}

.section-title {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

/* Story Reader */
.story-reader {
    background: white;
    border-radius: var(--card-radius);
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}

.story-reader:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.18);
}

.story-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.reading-mode-btn {
    padding: 10px 20px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.reading-mode-btn:hover {
    background: #45a049;
    transform: scale(1.05);
}

.reading-mode-btn:focus {
    outline: 2px solid #333;
    outline-offset: 2px;
}

.story-navigation {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.story-nav-btn {
    padding: 8px 20px;
    background: #e0e0e0;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.story-nav-btn:hover {
    background: #d0d0d0;
}

.story-nav-btn.active {
    background: #8B4513;
    color: white;
}

.story-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 20px;
    scroll-behavior: smooth;
}

.story-content p {
    margin-bottom: 15px;
    text-indent: 30px;
}

.story-part {
    display: none;
    animation: fadeIn 0.5s;
}

.story-part.active {
    display: block;
}

.story-part-title {
    font-size: 1.4rem;
    color: #333;
    margin: 20px 0;
    text-align: center;
    font-weight: bold;
}

/* Vocabulary Styling */
.highlight-vocab {
    background: linear-gradient(to bottom, transparent 60%, #ffeb3b 60%);
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.highlight-vocab:hover {
    background: #ffeb3b;
}

.vocab-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 100;
}

.highlight-vocab:hover .vocab-tooltip {
    opacity: 1;
}

/* Reflection Exercise */
.reflection-exercise {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.reflection-options {
    margin: 15px 0;
}

.reflection-option {
    margin: 10px 0;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: var(--input-radius);
    cursor: pointer;
    transition: var(--transition);
}

.reflection-option:hover {
    background: #e9ecef;
}

.reflection-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 50%;
    margin-right: 12px;
    display: inline-grid;
    place-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.reflection-option input[type="radio"]::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.2s ease-in-out;
    background-color: var(--primary-color);
}

.reflection-option input[type="radio"]:checked {
    border-color: var(--primary-color);
}

.reflection-option input[type="radio"]:checked::before {
    transform: scale(1);
}

.reflection-option label {
    cursor: pointer;
    display: inline-block;
    vertical-align: top;
    width: calc(100% - 32px);
}

/* Interactive Elements */
.button-container {
    text-align: center;
    margin-top: 20px;
}

.interactive-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    margin: 5px;
    transition: var(--transition);
    font-size: 1rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.interactive-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255,255,255,0.1), rgba(255,255,255,0));
    opacity: 0;
    transition: var(--transition);
}

.interactive-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

.interactive-btn:hover::after {
    opacity: 1;
}

.interactive-btn:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.interactive-btn:active {
    transform: scale(0.98) translateY(-1px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.feedback-message {
    padding: 16px;
    border-radius: var(--input-radius);
    margin: 15px 0;
    text-align: center;
    font-weight: 600;
    display: none;
    box-shadow: var(--shadow-sm);
}

.feedback-message.show {
    display: block;
    animation: slideIn 0.5s;
}

.feedback-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.feedback-message.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Vocabulary Exercise */
.vocabulary-exercise {
    margin: 20px 0;
}

.vocab-question {
    margin: 15px 0;
    padding: 16px;
    background: #f8f9fa;
    border-radius: var(--input-radius);
    border: 1px solid rgba(0,0,0,0.05);
}

.vocab-question select {
    padding: 8px 12px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: var(--input-radius);
    font-family: inherit;
    font-size: 1rem;
    margin-left: 10px;
    min-width: 150px;
}

.vocab-question select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.2);
}

/* Grammar Exercise */
.grammar-exercise {
    margin: 20px 0;
}

.grammar-item {
    margin: 20px 0;
    padding: 16px;
    background: #f8f9fa;
    border-radius: var(--input-radius);
    border: 1px solid rgba(0,0,0,0.05);
}

.language-select {
    padding: 8px 12px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: var(--input-radius);
    font-family: inherit;
    font-size: 1rem;
    margin-top: 10px;
    width: 100%;
    max-width: 400px;
}

.language-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.2);
}

/* Activity Sections */
.activity-section {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: var(--card-radius);
    border-left: 4px solid var(--primary-color);
}

.writing-exercise textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: var(--input-radius);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    min-height: 200px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    outline: none;
    line-height: 1.6;
}

.writing-exercise textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.2);
}

/* Discussion Activity */
.discussion-questions {
    margin: 20px 0;
}

.discussion-item {
    margin: 25px 0;
    padding: 20px;
    background: white;
    border-radius: var(--input-radius);
    box-shadow: var(--shadow-sm);
}

.choice-options {
    margin: 15px 0;
}

.choice-option {
    margin: 10px 0;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: var(--input-radius);
    cursor: pointer;
    transition: var(--transition);
}

.choice-option:hover {
    background: #e9ecef;
}

.choice-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 50%;
    margin-right: 12px;
    display: inline-grid;
    place-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.choice-option input[type="radio"]::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.2s ease-in-out;
    background-color: var(--primary-color);
}

.choice-option input[type="radio"]:checked {
    border-color: var(--primary-color);
}

.choice-option input[type="radio"]:checked::before {
    transform: scale(1);
}

.choice-option label {
    cursor: pointer;
    display: inline-block;
    vertical-align: top;
    width: calc(100% - 32px);
}

/* Audio Control */
.audio-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

.audio-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4caf50, #8bc34a);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.audio-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255,255,255,0.2), rgba(255,255,255,0));
    opacity: 0;
    transition: var(--transition);
    border-radius: 50%;
}

.audio-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

.audio-btn:hover::after {
    opacity: 1;
}

.audio-btn:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.audio-btn.muted {
    background: linear-gradient(135deg, #9e9e9e, #616161);
}

/* Achievement Popup */
.achievement-popup {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    border-radius: var(--card-radius);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    transform: translateX(400px);
    transition: transform 0.5s;
    z-index: 1000;
    max-width: 300px;
    border: 1px solid rgba(0,0,0,0.05);
    border-left: 4px solid #4caf50;
}

.achievement-popup.show {
    transform: translateX(0);
}

.achievement-title {
    font-size: 1.2rem;
    color: #4caf50;
    margin-bottom: 10px;
    font-weight: bold;
}

.achievement-desc {
    color: #666;
    font-size: 0.9rem;
}

/* Fun Facts */
.fun-facts {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: var(--card-radius);
    border-left: 4px solid var(--primary-color);
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: rgba(255,255,255,0.7);
    margin-top: 30px;
}

/* Print Mode */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .nav-menu, .audio-control, .achievement-popup, .progress-container, 
    .interactive-btn, .reading-mode-btn, .story-navigation {
        display: none !important;
    }
    
    .container {
        margin: 0;
        padding: 20px;
        max-width: 100%;
    }
    
    .header {
        background: none;
        color: black;
        padding: 20px 0;
    }
    
    .title {
        color: black;
        text-shadow: none;
    }
    
    .subtitle, .reprint {
        color: black;
    }
    
    .exercise-card, .story-reader {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .story-content {
        max-height: none;
        overflow: visible;
    }
    
    .module {
        display: block !important;
        page-break-after: always;
    }
    
    .highlight-vocab {
        background: none;
        text-decoration: underline;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-items {
        font-size: 0.8rem;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .container {
        margin-top: 100px;
    }
    
    .story-controls {
        flex-direction: column;
    }
    
    .reading-mode-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .exercise-card, .story-reader {
        padding: 20px 15px;
    }
    
    .nav-items {
        gap: 10px;
    }
    
    .nav-item {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}
