@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;500;700&family=Poppins:wght@400;600;700&display=swap');

:root {
    --primary-color: #4A90E2;   
    --secondary-color: #F5A623; 
    --success-color: #28a745;   
    --danger-color: #dc3545;    
    --warning-color: #ffc107;   
    --info-color: #17a2b8;      
    --dark-color: #2c3e50;     
    --light-color: #f9f9f9;     
    --grey-color: #6c757d;      
    --background-color: #f4f7f9;
    --card-background: #ffffff;
    --font-family: 'Noto Sans Devanagari', 'Roboto', sans-serif;
    --heading-font: 'Poppins', sans-serif;
    --border-color: #e0e0e0;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    line-height: 1.7;
    color: var(--dark-color);
    background-color: var(--background-color);
    scroll-behavior: smooth;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding { padding: 80px 0; }

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-family: var(--heading-font);
    margin-bottom: 50px;
    position: relative;
    color: var(--dark-color);
}
.section-title::after {
    content: '';
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}


.navbar {
    background-color: var(--card-background);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.8rem; font-weight: 700; font-family: var(--heading-font); color: var(--primary-color); text-decoration: none; }
.logo span { color: var(--secondary-color); }
.nav-links { list-style: none; display: flex; margin: 0; padding: 0; align-items: center; }
.nav-links li { margin-left: 25px; }
.nav-links a { text-decoration: none; color: var(--dark-color); font-weight: 500; transition: color 0.3s ease; }
.nav-links a:hover { color: var(--primary-color); }
.hamburger-menu { display: none; font-size: 1.5rem; cursor: pointer; }


.hero { background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1507925921958-8a62f3d1a50d?auto=format&fit=crop&w=1200&q=80') no-repeat center center/cover; color: #fff; text-align: center; padding: 120px 0; }
.hero h1 { font-size: 3rem; margin-bottom: 20px; }
.hero p { font-size: 1.2rem; margin-bottom: 30px; }



.cta-button, .btn-primary, .btn-info, .btn-danger, .btn-google, .selection-btn, .btn-secondary, .btn-warning {
    display: inline-block; padding: 12px 28px; border-radius: 8px; /* Slightly more rounded */ text-decoration: none;
    font-weight: 600; cursor: pointer; border: none; transition: all 0.3s ease; /* Smoother transition */
    font-size: 1rem; color: white; margin: 5px;
}
.cta-button:hover, .btn-primary:hover, .btn-info:hover, .btn-danger:hover, .btn-google:hover, .selection-btn:hover, .btn-secondary:hover, .btn-warning:hover {
    transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); /* Softer hover shadow */
}


.btn-primary { background-color: var(--primary-color); }
.btn-danger { background-color: var(--danger-color); }
.btn-info { background-color: var(--info-color); }
.btn-google { background-color: #DB4437; width: 100%; }
.cta-button { background-color: var(--secondary-color); }
.btn-secondary { background-color: var(--grey-color); }
.btn-warning { background-color: var(--warning-color); color: #212529; }



.input-group { margin-bottom: 15px; }
.input-group label { display: block; margin-bottom: 5px; font-weight: 600; }
.input-group input { width: 95%; padding: 12px; font-size: 16px; border: 1px solid #ccc; border-radius: 4px; }
#auth-error { color: var(--danger-color); text-align: center; margin-bottom: 15px; min-height: 20px; }
.auth-toggle { text-align: center; margin-top: 15px; cursor: pointer; color: var(--primary-color); }



.exam-selection-menu, .quiz-type-menu, .quiz-submenu-container, .ca-quiz-menu {
    max-width: 900px;
    margin: 30px auto;
    padding: 30px 40px; 
    border-radius: 12px;
    background-color: var(--card-background);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
}


#quiz-type-title, #submenu-title {
    font-family: var(--heading-font);
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 30px; 
    padding-bottom: 15px;
    position: relative;
    display: inline-block;
}

#quiz-type-title::after, #submenu-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}


#exam-buttons-container, 
#quiz-type-buttons-container, 
#submenu-selection-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}


.selection-btn {
    text-align: left;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 16px 20px;
    font-size: 1rem;
    font-weight: 500;
    border: 2px solid transparent; 
    background-color: #f8f9fa; 
    color: var(--dark-color); 
}


.selection-btn:hover {
    border-color: var(--primary-color);
    background-color: #eef2f7;
}


.selection-btn::before {
    margin-right: 15px;
    font-size: 1.3rem;
    width: 24px;
    text-align: center;
    color: var(--primary-color);
}


.selection-btn::after {
    content: '→';
    position: absolute;
    right: 20px;
    font-size: 1.5rem;
    color: var(--primary-color);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.selection-btn:hover::after {
    right: 15px;
    opacity: 1;
}


.question-item.correct-answer { 
    background-color: var(--success-color);
    color: white;
    border-color: var(--success-color);
}
.question-item.wrong-answer { 
    background-color: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}
.question-item.unattempted { 
    background-color: var(--grey-color);
    color: white;
    border-color: var(--grey-color);
}

.question-item.active {
    background-color: var(--primary-color) !important; 
    color: white !important;
    border: 2px solid var(--dark-color) !important;
    transform: scale(1.1);
}
.question-item.attempted { 
    background-color: var(--success-color);
    color: white;
    border-color: var(--success-color);
}
.question-item.marked { 
    background-color: var(--warning-color);
    color: #212529; 
    border-color: var(--warning-color);
}



button[onclick^="showQuizTypeMenu"]::before { content: '🎓'; }
button[onclick="showSubMenu('pyq')"]::before { content: '📜'; }
button[onclick="showSubMenu('mock')"]::before { content: '📝'; }
button[onclick="showSubMenu('subject')"]::before { content: '📚'; }
button[onclick="showSubMenu('daily')"]::before { content: '📅'; }
button[onclick="showSubMenu('ca')"]::before { content: '📰'; }
button[onclick^="showChapterMenu"]::before { content: '📖'; color: var(--info-color); }
button[onclick^="startQuizWrapper"]::before { content: '▶️'; color: var(--success-color); }



#quiz-form-container { position: relative; padding-bottom: 80px; background: var(--card-background); box-shadow: 0 4px 15px rgba(0,0,0,0.08); border-radius: 8px; }
#quiz-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid #eee; padding: 20px; }
.quiz-meta { text-align: right; }
#quiz-info { font-size: 0.9rem; color: var(--grey-color); margin-bottom: 5px; }
#timer { font-size: 1.5rem; font-weight: bold; color: var(--primary-color); }
#questions-container { padding: 20px; }
.question { margin-bottom: 25px; }
.options label { display: block; background-color: #f8f9fa; margin-bottom: 10px; border: 1px solid #ddd; border-radius: 5px; padding: 12px; cursor: pointer; transition: background-color 0.2s, border-color 0.2s; }
.options label:hover { background-color: #e9ecef; }
.options label.correct { background-color: #d4edda; border-color: var(--success-color); } /* For review mode */
.options label.wrong { background-color: #f8d7da; border-color: var(--danger-color); }   /* For review mode */
.explanation { background-color: #eef2f7; padding: 15px; margin-top: 15px; border-left: 4px solid var(--info-color); border-radius: 4px; }

.toggle-button { position: fixed; top: 80px; right: 20px; background-color: var(--primary-color); color: white; padding: 8px 12px; border-radius: 50px; cursor: pointer; z-index: 1010; border: none; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.sidebar { position: fixed; top: 0; right: -320px; width: 300px; height: 100%; background-color: #ffffff; transition: right 0.3s ease; overflow-y: auto; z-index: 1005; padding: 20px; box-sizing: border-box; box-shadow: -2px 0 5px rgba(0,0,0,0.1); }
.sidebar.open { right: 0; }
.question-grid { margin-top: 60px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.question-item { border: 1px solid #ccc; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-weight: bold; transition: background-color 0.2s, color 0.2s; }



.buttons-container { display: flex; justify-content: space-between; align-items: center; gap: 10px; position: absolute; bottom: 0; left: 0; width: 100%; background-color: #f1f1f1; padding: 15px 20px; border-top: 1px solid #ccc; box-sizing: border-box; border-radius: 0 0 8px 8px; }
.buttons-container button, .buttons-container > div { flex: 1; text-align: center; }
.buttons-container > div { display: flex; justify-content: center; gap: 10px; }



#result-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; text-align: center; margin: 30px 0; }
.summary-item { padding: 20px; border-radius: 8px; color: white; }
.summary-item h3 { margin: 0 0 10px 0; font-size: 1rem; text-transform: uppercase; opacity: 0.9; }
.summary-item p { font-size: 2em; font-weight: bold; margin: 0; }
.score { background-color: var(--primary-color); } .correct { background-color: var(--success-color); }
.wrong { background-color: var(--danger-color); } .unattempted { background-color: var(--grey-color); }
.accuracy { background-color: #6f42c1; } /* A purple shade for accuracy */
#pieChartContainer { max-width: 250px; margin: 20px auto; }
#result-actions { text-align: center; margin-top: 30px; }


.profile-card { display: flex; align-items: center; background-color: #f8f9fa; padding: 20px; border-radius: 8px; border: 1px solid #e9ecef; margin-bottom: 20px; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; background-color: var(--primary-color); color: white; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; font-weight: bold; margin-right: 20px; flex-shrink: 0; }
.profile-info h2 { margin: 0 0 5px 0; font-family: var(--heading-font); }
.profile-info p { margin: 0; color: var(--grey-color); }
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; text-align: center; margin-bottom: 20px; }
.stat-item { background-color: #f8f9fa; padding: 15px; border-radius: 8px; }
.stat-item .stat-value { font-size: 2rem; font-weight: bold; color: var(--primary-color); }
.stat-item .stat-label { font-size: 0.9rem; color: var(--grey-color); }


.history-table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 0.9em; }
.history-table th, .history-table td { border: 1px solid #ddd; padding: 10px; text-align: left; }
.history-table th { background-color: #f2f2f2; }
.history-table tr:nth-child(even) { background-color: #f9f9f9; }
.history-table tr:hover { background-color: #f1f1f1; }
.history-table .btn-small { padding: 5px 10px; font-size: 0.8em; }


.first-attempt-highlight {
    background-color: #e6ffe6; 
    font-weight: bold;
}



.leaderboard-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.leaderboard-table th, .leaderboard-table td { border: 1px solid #ddd; padding: 12px; text-align: center; }
.leaderboard-table th { background-color: #f2f2f2; }
.leaderboard-table tr:nth-child(even) { background-color: #f9f9f9; }
.leaderboard-table .rank-1, .leaderboard-table .rank-2, .leaderboard-table .rank-3 { font-weight: bold; }
.leaderboard-table .current-user { background-color: #e7f3ff; border: 2px solid var(--primary-color); }
.fa-medal { margin-right: 5px; }
.gold { color: #FFD700; }
.silver { color: #C0C0C0; }
.bronze { color: #CD7F32; }



.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.calendar-header select, .calendar-header button { padding: 5px 10px; font-size: 1rem; }
.calendar-table { width: 100%; border-collapse: collapse; text-align: center; }
.calendar-table th { padding: 10px; background-color: #f2f2f2; }
.calendar-table td { padding: 12px; border: 1px solid #e9e9e9; }
.date-cell.has-quiz { background-color: #e7f3ff; font-weight: bold; color: var(--primary-color); cursor: pointer; border-radius: 50%; }
.date-cell.today { border: 2px solid var(--success-color); border-radius: 50%; }



.articles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.article-card { background: #fff; box-shadow: 0 4px 15px rgba(0,0,0,0.1); border-radius: 8px; overflow: hidden; transition: transform 0.3s ease; }
.article-card:hover { transform: translateY(-10px); }
.article-card img { width: 100%; height: 200px; object-fit: cover; }
.article-content { padding: 20px; }
.article-date { font-size: 0.8em; color: #666; margin-bottom: 5px; }
.article-content h3 { font-family: var(--heading-font); margin-top: 0; }
.article-content a { display: inline-block; margin-top: 15px; text-align: left; color: var(--primary-color); font-weight: bold; }


.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.6); 
}
.modal-content {
    background-color: #fefefe;
    margin: 10% auto; 
    padding: 30px;
    border: 1px solid #888;
    width: 80%; 
    max-width: 700px; 
    border-radius: 10px;
    position: relative;
    animation: fadeIn 0.5s;
    text-align: left; 
}
.close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}
.close-btn:hover, .close-btn:focus { color: black; }
@keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }
#modalBody b { font-weight: bold; display: block; margin-top: 1em; font-size: 1.1em; }


.quiz-option-btn {
    display: block; 
    width: 80%; 
    margin: 10px auto; 
    padding: 12px 20px;
    font-size: 1.1em;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}



@media (max-width: 768px) {
    .nav-links { display: none; flex-direction: column; width: 100%; position: absolute; top: 70px; left: 0; background-color: #fff; text-align: center;}
    .nav-links.active { display: flex; }
    .nav-links li { margin: 15px 0; }
    .hamburger-menu { display: block; }
    .hero h1 { font-size: 2.2rem; }
    .section-title { font-size: 2rem; }
    .profile-card { flex-direction: column; text-align: center; }
    .profile-avatar { margin-right: 0; margin-bottom: 15px; }

    
    .buttons-container {
        padding: 10px;
        gap: 8px;
    }
    .buttons-container button {
        padding: 12px 5px;
        font-size: 0.9rem;
    }

    
    .exam-selection-menu, .quiz-type-menu, .quiz-submenu-container, .ca-quiz-menu {
        padding: 20px;
    }
    #quiz-type-title, #submenu-title {
        font-size: 1.5rem;
    }
    .modal-content {
        width: 95%; 
        margin: 5% auto; 
    }
    .quiz-option-btn {
        width: 95%; 
    }
}


.search-container {
    position: relative;
    width: 300px;
}
#search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-family: var(--font-family);
    transition: all 0.3s ease;
}
#search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}
.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--grey-color);
}
.search-results-container {
    max-width: 800px;
    margin: 10px auto;
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 999;
    position: absolute; 
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px); 
}
@media (min-width: 769px) { 
    .search-results-container {
        position: absolute;
        top: 60px;
        left: auto;
        right: 20px; 
        transform: translateX(0);
        width: 300px; 
        margin: 0;
    }
}
.search-result-item {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--dark-color);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background-color: #f4f7f9; }
.result-type {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 4px;
    margin-right: 10px;
    color: white;
}
.result-type-quiz { background-color: var(--primary-color); }
.result-type-article { background-color: var(--success-color); }
.no-results {
    padding: 20px;
    text-align: center;
    color: var(--grey-color);
}



a.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--heading-font);
}
a.logo .logo-icon {
    height: 40px;
    width: auto;
}
a.logo .logo-text {
    color: var(--primary-color);
}
a.logo .logo-text .logo-text-highlight {
    color: var(--secondary-color) !important;
}
@media (max-width: 768px) {
    a.logo .logo-icon { height: 35px; }
    a.logo .logo-text { font-size: 1.5rem; }
    .search-container { width: 100%; order: 3; } 
    .navbar .container { flex-wrap: wrap; justify-content: center; gap: 10px; }
    .navbar .logo { order: 1; }
    .navbar .hamburger-menu { order: 2; margin-left: auto; }
}

.site-footer {
    background-color: var(--dark-color);
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0 20px 0;
    margin-top: 60px;
    border-top: 5px solid var(--primary-color);
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}
.footer-column h3 {
    font-family: var(--heading-font);
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}
.footer-column h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}
.footer-about .logo { margin-bottom: 15px; }
.footer-about .about-text { font-size: 0.9rem; line-height: 1.8; }
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links ul li { margin-bottom: 12px; }
.footer-links ul a { text-decoration: none; color: rgba(255, 255, 255, 0.7); transition: all 0.3s ease; }
.footer-links ul a:hover { color: #ffffff; padding-left: 5px; }
.social-icons { display: flex; gap: 15px; margin-top: 20px; }
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}
.social-icon:hover { background-color: var(--primary-color); transform: translateY(-3px); }
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}
.hidden-during-quiz {
    display: none !important;
}


.leaderboard-avatar {
    width: 35px; 
    height: 35px;
    border-radius: 50%; 
    object-fit: cover; 
    margin: 0 auto; 
    display: block; 
    border: 1px solid #eee; 
}

.leaderboard-default-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: var(--grey-color); 
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem; 
    font-weight: bold;
    margin: 0 auto;
    border: 1px solid var(--grey-color);
}


.profile-card .profile-avatar {
    
    overflow: hidden; 
    display: flex; 
    align-items: center;
    justify-content: center;
}

.profile-card .profile-avatar img.profile-display-avatar {
    width: 100%; 
    height: 100%;
    object-fit: cover; 
    border-radius: 50%; 
}

#quiz-app-container,
        #all-articles-page {
            display: none;
        }

        /* डिफ़ॉल्ट रूप से लैंडिंग पेज दिखाएँ */
        #landing-page-content {
            display: block;

        }