html, body {
    width: 100%;
    overflow-x: hidden; /* दाएं-बाएं का मूवमेंट जड़ से खत्म */
    margin: 0;
    padding: 0;
    position: relative;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch; /* मोबाइल पर स्मूथ स्क्रॉलिंग के लिए */
    touch-action: pan-y; /* केवल ऊपर-नीचे मूव करने की अनुमति दें, दाएं-बाएं नहीं */
}



/* --- 1. Variables & Global Styles --- */



:root {
    --primary-blue: #005fa9;
    --accent-red: #e31e24;
    --text-dark: #333;
    --bg-light: #f7f9fc;
    --white: #ffffff;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    background-color: var(--bg-light);
    margin: 0;
    padding-top: 85px; /* हेडर के लिए पर्याप्त स्पेस */
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* --- 2. Global Header Styling (Fixed Format) --- */
#global-header {
    background-color: var(--white) !important;
    width: 100% !important;
    padding: 0 4% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 75px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 99999 !important;
    box-sizing: border-box !important;
}

.logo-container { display: flex; align-items: center; text-decoration: none; gap: 10px; }
.logo-img { height: 50px; width: auto; }
.logo-text-wrapper { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { color: var(--primary-blue); font-weight: 700; font-size: 20px; margin: 0; }
.tagline { color: var(--accent-red); font-size: 10px; font-weight: 500; margin: 0; text-transform: uppercase; }

/* Navigation links - Desktop */
.nav-menu { 
    display: flex !important; 
    align-items: center !important; 
    gap: 10px !important; 
    list-style: none !important; 
    margin: 0 !important; 
    padding: 0 !important; 
}
.nav-item { 
    text-decoration: none !important; 
    color: var(--text-dark) !important; 
    font-size: 14px !important; 
    font-weight: 500 !important; 
    padding: 8px 15px !important; 
    border-radius: 5px !important; 
    transition: 0.3s;
    display: block;
}
.nav-item:hover { color: var(--primary-blue) !important; background: #f0f7ff !important; }
.login-btn-header { background: var(--primary-blue) !important; color: white !important; padding: 8px 25px !important; border-radius: 50px !important; }

/* --- 3. Login & Signup Cards Styling --- */
.container {
    padding: 20px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.signup-card, .login-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 350px;
    max-width: 90vw;
    margin: 20px auto;
}

.signup-card h2, .login-card h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--text-dark);
    text-align: left;
}

.input-group { margin-bottom: 20px; position: relative; text-align: left; }
.input-group input {
    width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid #ccc;
    font-size: 1rem;
    outline: none;
    transition: border-bottom-color 0.3s;
}
.input-group input:focus { border-bottom-color: var(--primary-blue); }

.otp-button, .login-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(to right, var(--primary-blue), #4facfe);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 95, 169, 0.3);
    transition: 0.3s;
}

.otp-button:hover, .login-button:hover { opacity: 0.9; transform: translateY(-1px); }

/* --- 4. Mobile Responsiveness (Fixed Menu Format) --- */
.mobile-toggle { display: none; font-size: 24px; color: var(--primary-blue); cursor: pointer; background: none; border: none; }

@media (max-width: 991px) {
    .mobile-toggle { display: block !important; }
    
    .nav-menu {
        display: none !important; /* डिफ़ॉल्ट रूप से छुपा हुआ */
        flex-direction: column !important;
        position: absolute !important;
        top: 75px; 
        left: 0; 
        width: 100% !important;
        background: white !important;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        padding: 10px 0 !important;
        z-index: 9999;
    }

    /* जब JS से 'active' क्लास मिले */
    .nav-menu.active { 
        display: flex !important; 
    }

    .nav-item { 
        width: 100% !important; 
        text-align: center !important; 
        padding: 12px 0 !important; 
        border-radius: 0 !important;
    }
    
    .login-btn-header {
        width: 80% !important;
        margin: 10px auto !important;
        border-radius: 5px !important;
    }
}

/* Background Graphic Area */
.city-background {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 100px;
    background-image: linear-gradient(to top, rgba(0,95,169,0.05) 1px, transparent 1px);
    background-size: 50px 50px; opacity: 0.4; z-index: 5; pointer-events: none;
}

/* --- Index Page & Modules Grid Styling --- */
.content-wrapper { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 20px; 
}

.page-main-title { 
    text-align: center; 
    margin: 40px 0; 
    color: var(--text-dark); 
    font-size: 1.8rem; 
    font-weight: 700; 
    line-height: 1.3;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.module-card {
    background: #fff;
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid #eee;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.card-icon { font-size: 2.5rem; margin-bottom: 15px; }
.card-text { font-size: 1.1rem; font-weight: 600; color: #333; }

.card-1 .card-icon { color: #4facfe; }
.card-3 .card-icon { color: #f093fb; }
.card-5 .card-icon { color: #f6d365; }
.card-2 .card-icon { color: #eb3349; }
.card-4 .card-icon { color: #43e97b; }
.card-6 .card-icon { color: #fa709a; }

@media (max-width: 991px) {
    .modules-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .page-main-title { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .modules-grid { grid-template-columns: 1fr; }
    .module-card { padding: 20px; }
}

/* --- Footer Styling --- */
#global-footer {
    background: #1a1a1a;
    color: #ffffff;
    padding: 30px 15px;
    text-align: center;
    width: 100%;
    margin-top: auto;
    font-family: 'Poppins', sans-serif;
    border-top: 3px solid var(--primary-blue);
}

.footer-content { max-width: 1200px; margin: 0 auto; }
.footer-contact p { margin: 0; font-size: 14px; color: #bbb; }
.footer-email { color: var(--primary-blue); text-decoration: none; font-weight: 600; transition: 0.3s; }
.footer-email:hover { color: var(--accent-red); }
.footer-divider { border: 0; border-top: 1px solid #333; width: 100px; margin: 15px auto; }
.footer-bottom { margin: 0; font-size: 12px; color: #888; letter-spacing: 0.5px; text-transform: uppercase; }
.brand-white { color: #fff; font-weight: 600; }
.youtube-link { color: #ff0000; margin-left: 10px; font-size: 18px; vertical-align: middle; text-decoration: none; transition: 0.3s; }
.youtube-link:hover { transform: scale(1.2); display: inline-block; }

html, body { height: 100%; margin: 0; }
.main-content { flex: 1 0 auto; }

/* --- Course/Test Series Page Styles --- */
.course-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    justify-content: center; 
    gap: 30px; 
    margin-top: 20px; 
}
.breadcrumb-container { margin-bottom: 20px; font-size: 0.9em; }
.breadcrumbs { display: flex; list-style: none; padding: 0; margin: 0; color: #666; flex-wrap: wrap; }
.breadcrumbs li { display: flex; align-items: center; }
.breadcrumbs li:not(:last-child)::after { 
    content: "\f105"; 
    font-family: "Font Awesome 6 Free"; 
    font-weight: 900; 
    margin: 0 10px; 
    color: #ccc; 
}
.breadcrumbs li a { color: var(--primary-blue); text-decoration: none; font-weight: 500; }
.breadcrumbs li span { color: #333; font-weight: 600; }

.course-card { 
    background: #fff; 
    border-radius: 12px; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); 
    overflow: hidden; 
    transition: 0.3s; 
    display: flex; 
    flex-direction: column; 
    border: 1px solid #eee; 
    position: relative; 
}
.course-card:hover { transform: translateY(-8px); box-shadow: 0 12px 25px rgba(0,0,0,0.1); }
.price-badge { position: absolute; top: 15px; right: 15px; background: var(--accent-red); color: white; padding: 5px 15px; border-radius: 20px; font-weight: bold; z-index: 10; font-size: 0.9em; }
.card-header { background: linear-gradient(135deg, var(--primary-blue), #004a85); color: white; padding: 40px 20px; text-align: center; }
.card-header h3 { margin: 0; font-size: 1.4em; line-height: 1.3; font-weight: 600; }
.card-body { padding: 25px 20px; text-align: center; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.info-row { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 15px; font-size: 0.85em; color: #555; }
.info-item { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.info-item i { color: var(--primary-blue); font-size: 1em; }

.medium-info { background: #f8f9fa; padding: 8px; border-radius: 6px; margin-bottom: 20px; font-size: 0.85em; color: #666; border-left: 3px solid var(--accent-red); text-align: left; }
.btn-group { display: flex; flex-direction: column; gap: 10px; }
.price-text { font-size: 1.3em; font-weight: 800; color: var(--accent-red); margin-bottom: 5px; display: block; }
.buy-btn { background-color: var(--primary-blue); color: white; padding: 12px; border-radius: 8px; font-weight: bold; text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.3s; }
.buy-btn:hover { background-color: #004a85; }
.purchased-btn { background-color: #28a745; color: white; padding: 12px; border-radius: 8px; font-weight: bold; display: flex; align-items: center; justify-content: center; gap: 8px; }
.view-tests-btn { background-color: #fff; color: var(--primary-blue); padding: 10px; border-radius: 8px; font-weight: 600; border: 1px solid var(--primary-blue); text-decoration: none; transition: 0.3s; }
.view-tests-btn:hover { background-color: #f0f7ff; }

@media (max-width: 768px) { .course-grid { grid-template-columns: 1fr; } .page-main-title { font-size: 1.6em; } }

/* --- Subject Selection Page Styles --- */
.subject-container { padding: 10px; }
.subject-grid { display: grid; grid-template-columns: 1fr; gap: 15px; margin-top: 20px; }
@media (min-width: 768px) { .subject-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); } }
.subject-item { background: #ffffff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 20px; text-align: left; text-decoration: none; color: #333; font-weight: 600; font-size: 16px; transition: all 0.3s ease; box-shadow: 0 2px 5px rgba(0,0,0,0.05); display: flex; align-items: center; border-left: 5px solid var(--primary-blue); }
.subject-item i { margin-right: 15px; font-size: 1.3em; color: var(--primary-blue); transition: 0.3s; }
.subject-item:hover { background: var(--primary-blue); color: #ffffff !important; border-color: var(--primary-blue); transform: translateX(5px); box-shadow: 0 5px 15px rgba(0, 95, 169, 0.2); }
.subject-item:hover i { color: #ffffff; }

.section-title { text-align: center; font-size: 24px; color: #222; margin-bottom: 35px; position: relative; padding-bottom: 12px; font-weight: 700; }
.section-title::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 60px; height: 4px; background: var(--accent-red); border-radius: 2px; }

/* --- Test List Styling --- */
.test-list-container { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; }
.test-card { background: #fff; padding: 15px 20px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); display: flex; justify-content: space-between; align-items: center; border-left: 6px solid #005fa9; transition: 0.3s; cursor: pointer; }
.test-card:hover { transform: translateX(5px); box-shadow: 0 6px 12px rgba(0,0,0,0.1); }
.test-card.is-locked { border-left-color: #6c757d; opacity: 0.8; }
.test-info h3 { margin: 0; font-size: 1.1rem; color: #333; display: flex; align-items: center; gap: 10px; }
.test-meta { font-size: 0.85rem; color: #666; margin-top: 5px; display: flex; gap: 12px; }
.lock-text { color: #e31e24; font-weight: 600; font-size: 0.85rem; margin-top: 5px; }

/* Modal Styling */
#instrModal { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.7); z-index:9999; justify-content:center; align-items:center; }
.modal-box { background:#fff; padding:25px; border-radius:12px; width:90%; max-width:500px; }
#mBody { max-height: 250px; overflow-y: auto; margin: 5px 0 15px 0; font-size: 0.9rem; line-height: 1.4; }

/* --- History Page Styles --- */
.history-container { max-width: 1000px; margin: 30px auto; padding: 15px; }
.header-section { border-bottom: 3px solid #003366; padding-bottom: 15px; margin-bottom: 25px; display: flex; justify-content: space-between; align-items: center; }
.header-section h2 { margin: 0; color: #003366; font-size: 1.6rem; font-weight: 700; }
.total-badge { background-color: #D32F2F; color: white; padding: 6px 15px; border-radius: 5px; font-size: 0.85em; font-weight: bold; box-shadow: 2px 2px 5px rgba(0,0,0,0.1); }
.test-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.test-card-history { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); border-left: 6px solid #003366; display: flex; justify-content: space-between; align-items: center; transition: 0.3s ease; }
.test-card-history:hover { transform: translateX(5px); border-left-color: #D32F2F; }
.course-tag { font-size: 0.75rem; color: #003366; font-weight: 700; text-transform: uppercase; }
.subject-tag { font-size: 0.9rem; color: #D32F2F; font-weight: 600; display: block; }
.test-info h4 { margin: 8px 0; color: #222; font-size: 1.3rem; font-weight: 700; }
.test-meta span i { color: #003366; margin-right: 4px; }
.test-score-area { text-align: right; display: flex; align-items: center; gap: 20px; }
.score-circle { text-align: center; padding: 5px 15px; border-right: 1px solid #eee; }
.score-circle .percent { display: block; font-size: 1.5rem; font-weight: 800; color: #1B5E20; }
.score-circle .label { font-size: 0.7rem; color: #888; text-transform: uppercase; }
.btn-view-details { background-color: #003366; color: white; padding: 10px 20px; text-decoration: none; border-radius: 6px; font-size: 14px; font-weight: bold; display: inline-flex; align-items: center; gap: 8px; transition: 0.3s; }
.btn-view-details:hover { background-color: #D32F2F; color: white; }

@media (max-width: 600px) {
    .test-card-history { flex-direction: column; align-items: flex-start; }
    .test-score-area { width: 100%; margin-top: 15px; padding-top: 15px; border-top: 1px solid #eee; justify-content: space-between; }
    .score-circle { border-right: none; padding-left: 0; text-align: left; }
}

/* Result Page Specific Styling */
.result-container {
    max-width: 900px;
    margin: 30px auto;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.result-header h1 { 
    color: #28a745; 
    margin-bottom: 5px; 
}

.score-display {
    font-size: 2.5em;
    font-weight: bold;
    color: #007bff;
    margin: 15px 0;
}

.score-display small { 
    font-size: 0.6em; 
    color: #6c757d; 
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.stat-item { 
    padding: 10px; 
    border-radius: 8px; 
    text-align: center; 
}

.stat-item strong { 
    display: block; 
    font-size: 1.3em; 
    margin-top: 5px; 
}

.stat-item span { 
    font-size: 0.75em; 
    color: #6c757d; 
    font-weight: bold; 
}

.stat-correct { background-color: #d4edda; color: #155724; }
.stat-incorrect { background-color: #f8d7da; color: #721c24; }
.stat-skipped { background-color: #fff3cd; color: #856404; }
.stat-pos-mark { background-color: #cce5ff; color: #004085; }
.stat-neg-mark { background-color: #f5c6cb; color: #721c24; }

.action-buttons { 
    margin-top: 20px; 
}

.action-buttons a {
    padding: 12px 25px;
    margin: 5px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
}

.btn-view { background-color: #007bff; color: white; }
.btn-back { background-color: #6c757d; color: white; }

/* Responsive Media Queries */
@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
}

/* Solution & Analysis Page Styling */
.solution-container { 
    max-width: 1000px; 
    margin: 30px auto; 
    background: #f8f9fa; 
    padding: 20px; 
    border-radius: 10px; 
}

.solution-header { 
    text-align: center; 
    margin-bottom: 25px; 
    border-bottom: 2px solid #007bff; 
    padding-bottom: 15px; 
}

.solution-header h1 { 
    color: #007bff; 
    margin: 0; 
}

.question-solution-card { 
    background: #fff; 
    padding: 20px; 
    margin-bottom: 20px; 
    border-radius: 8px; 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); 
    position: relative; 
}

.q-status-tag { 
    position: absolute; 
    top: 15px; 
    right: 15px; 
    font-size: 0.9em; 
    font-weight: bold; 
    padding: 5px 12px; 
    border-radius: 20px; 
    color: white; 
}

.status-correct { background-color: #28a745; }
.status-incorrect { background-color: #dc3545; }
.status-skipped { background-color: #ffc107; color: #333; }

.question-text h3 { 
    font-size: 1.1em; 
    margin-top: 25px; 
    padding-right: 20px; 
    line-height: 1.5; 
    font-weight: 500; 
}

.options-solution-list { margin-top: 15px; }

.option-item-sol { 
    padding: 12px; 
    margin-bottom: 8px; 
    border-radius: 6px; 
    border: 1px solid #ddd; 
}

.option-correct { 
    background-color: #e6ffed; 
    border-color: #28a745; 
    font-weight: bold; 
    color: #155724; 
}

.option-user-incorrect { 
    background-color: #ffeded; 
    border-color: #dc3545; 
    font-weight: bold; 
    color: #721c24; 
}

.option-user-skipped { 
    background-color: #fcfcfc; 
    color: #444; 
}

.explanation-box { 
    margin-top: 20px; 
    padding: 15px; 
    background-color: #f0f8ff; 
    border-left: 5px solid #007bff; 
    border-radius: 4px; 
}

.explanation-box h4 { 
    color: #007bff; 
    margin-top: 0; 
    font-size: 1.1em; 
}

.explanation-content { 
    font-size: 0.95em; 
    line-height: 1.6; 
    color: #333; 
}

.marks-info { 
    font-size: 0.85em; 
    color: #6c757d; 
    float: right; 
    background: #eee; 
    padding: 2px 8px; 
    border-radius: 4px; 
}

.btn-view { 
    background-color: #007bff; 
    color: white; 
    padding: 10px 20px; 
    text-decoration: none; 
    border-radius: 5px; 
    display: inline-block; 
    font-weight: bold; 
}