/* ================== Base Variables & Light Theme ================== */
:root {
    --bg-light: #f4f6fc;
    --dynamic-primary: #4f46e5; 
    
    --text-dark: #1e1e4b;
    --text-muted: #6b7280;
    --white: #ffffff;
    --btn-grey: #e5e7eb;
    --border-soft: #d1d5db;
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.05);
    
    --contact-pill-bg: #f4f6fc;
    --pdf-bg: #f3f4f6;

    --radius-lg: 16px;
    --radius-pill: 50px;
    --transition: all 0.3s ease;
}

/* ================== DARK MODE Variables ================== */
body.dark-mode {
    --bg-light: #121212;
    --white: #1e1e1e;
    --text-dark: #f3f4f6;
    --text-muted: #9ca3af;
    --btn-grey: #2d3748;
    --border-soft: #374151;
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.3);
    
    --contact-pill-bg: #121212;
    --pdf-bg: #2d3748;
}

/* Dynamic Theme Classes (Controlled by JS) */
body.theme-active-pyq { --dynamic-primary: #4f46e5; }   /* Blue */
body.theme-active-notes { --dynamic-primary: #059669; } /* Green */
body.theme-active-syllabus { --dynamic-primary: #9333ea; } /* Purple */

/* Dark Mode Dynamic Primary Adjustments */
body.dark-mode.theme-active-pyq { --dynamic-primary: #818cf8; }
body.dark-mode.theme-active-notes { --dynamic-primary: #34d399; }
body.dark-mode.theme-active-syllabus { --dynamic-primary: #c084fc; }

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; -webkit-tap-highlight-color: transparent; }
body { background-color: var(--bg-light); color: var(--text-dark); display: flex; flex-direction: column; min-height: 100vh; transition: background-color 0.3s ease, color 0.3s ease; }
button { cursor: pointer; border: none; outline: none; background: none; color: var(--text-dark); }

/* ================== Header ================== */
.top-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; max-width: 600px; margin: 0 auto; width: 100%; position: sticky; top: 0; z-index: 100; background: var(--bg-light); transition: background-color 0.3s ease; }
.logo-box { display: flex; align-items: center; gap: 8px; background: var(--white); padding: 8px 14px; border-radius: var(--radius-pill); box-shadow: var(--shadow-soft); transition: var(--transition); cursor: pointer; }
.logo-icon { font-size: 1.4rem; color: var(--dynamic-primary); transition: color 0.3s ease; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong { font-size: 0.95rem; color: var(--text-dark); transition: color 0.3s ease; }
.logo-text span { font-size: 0.65rem; color: var(--text-muted); transition: color 0.3s ease; }

.header-actions { display: flex; gap: 12px; align-items: center; }
.theme-toggle-btn { background: var(--white); width: 44px; height: 44px; border-radius: 12px; box-shadow: var(--shadow-soft); display: flex; justify-content: center; align-items: center; font-size: 1.2rem; transition: var(--transition); border: 1px solid transparent; }
.theme-toggle-btn:active { transform: scale(0.95); }

.hamburger-btn { background: var(--white); width: 44px; height: 44px; border-radius: 12px; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; transition: var(--transition); }
.hamburger-btn .line { width: 18px; height: 2px; background: var(--text-dark); border-radius: 2px; transition: background 0.3s ease; }
.hamburger-btn:active { transform: scale(0.95); }

/* ================== Sidebar Menu ================== */
.menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); z-index: 999; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.menu-overlay.show { opacity: 1; pointer-events: all; }
.side-menu { position: fixed; top: 0; right: -320px; width: 280px; height: 100vh; background: var(--white); z-index: 1000; box-shadow: -5px 0 20px rgba(0,0,0,0.2); transition: right 0.3s ease, background-color 0.3s ease; display: flex; flex-direction: column; padding: 24px 20px; }
.side-menu.show { right: 0; }
.side-menu-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.menu-title { font-size: 1.5rem; color: #4f46e5; font-weight: 600; }
body.dark-mode .menu-title { color: #818cf8; }
.close-btn { width: 36px; height: 36px; background: var(--bg-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--text-dark); transition: var(--transition); }
.close-btn:active { transform: scale(0.9); }
.side-menu-items { display: flex; flex-direction: column; gap: 12px; flex: 1; overflow-y: auto; }
.menu-card { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 12px; border: 1px solid transparent; text-align: left; transition: var(--transition); background: var(--white); }
.menu-card:active { transform: scale(0.98); }
.menu-icon { font-size: 1.4rem; }
.menu-text { display: flex; flex-direction: column; }
.m-title { font-size: 1.05rem; font-weight: 600; color: var(--text-dark); }
.m-sub { font-size: 0.75rem; font-weight: 500; margin-top: 2px; }

/* Menu Themes */
.menu-card.theme-pyq { background-color: #eef2ff; border-color: #dbeafe; }
.menu-card.theme-pyq .menu-icon, .menu-card.theme-pyq .m-title { color: #4f46e5; }
.menu-card.theme-notes { background-color: #f0fdf4; border-color: #bbf7d0; }
.menu-card.theme-notes .menu-icon, .menu-card.theme-notes .m-title { color: #059669; }
.menu-card.theme-syllabus { background-color: #faf5ff; border-color: #e9d5ff; }
.menu-card.theme-syllabus .menu-icon, .menu-card.theme-syllabus .m-title { color: #9333ea; }
.menu-card.theme-contact { background-color: #fff7ed; border-color: #fed7aa; }
.menu-card.theme-contact .menu-icon, .menu-card.theme-contact .m-title { color: #ea580c; }

body.dark-mode .menu-card.theme-pyq { background-color: #1e1e2d; border-color: #312e81; }
body.dark-mode .menu-card.theme-pyq .menu-icon, body.dark-mode .menu-card.theme-pyq .m-title { color: #818cf8; }
body.dark-mode .menu-card.theme-notes { background-color: #14251e; border-color: #064e3b; }
body.dark-mode .menu-card.theme-notes .menu-icon, body.dark-mode .menu-card.theme-notes .m-title { color: #34d399; }
body.dark-mode .menu-card.theme-syllabus { background-color: #231533; border-color: #581c87; }
body.dark-mode .menu-card.theme-syllabus .menu-icon, body.dark-mode .menu-card.theme-syllabus .m-title { color: #c084fc; }
body.dark-mode .menu-card.theme-contact { background-color: #2e1c12; border-color: #7c2d12; }
body.dark-mode .menu-card.theme-contact .menu-icon, body.dark-mode .menu-card.theme-contact .m-title { color: #fb923c; }

/* ================== App Container & Pages ================== */
.app-container { max-width: 600px; margin: 0 auto; padding: 10px 20px 30px; flex: 1; width: 100%; }
.page { display: none; animation: fadeIn 0.3s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ================== Typography & Dynamic Colors ================== */
.text-center { text-align: center; }
.page-header { margin-bottom: 20px; }
.main-title, .dynamic-type-title { font-size: 1.6rem; color: var(--text-dark); font-weight: 600; margin-bottom: 2px; transition: color 0.3s ease; }
.hindi-subtitle { font-size: 0.95rem; color: var(--dynamic-primary); font-weight: 500; margin-bottom: 12px; transition: color 0.3s ease; }
.breadcrumbs-center { font-size: 1.25rem; color: var(--text-dark); font-weight: 500; margin-top: 10px; transition: color 0.3s ease; }
.breadcrumbs-sub { font-size: 1rem; color: var(--dynamic-primary); font-weight: 500; margin-top: 4px; margin-bottom: 15px; transition: color 0.3s ease;}
.desc-box { background: var(--white); padding: 16px; border-radius: var(--radius-lg); text-align: center; margin-bottom: 24px; box-shadow: var(--shadow-soft); border: 1px solid var(--border-soft); transition: var(--transition); }
.desc-box p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; font-weight: 500; }

/* ================== Back Button ================== */
.back-card-btn { background: var(--white); color: var(--text-dark); width: 100%; padding: 12px; font-size: 1rem; font-weight: 600; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); margin-bottom: 10px; transition: var(--transition); border: 1px solid var(--border-soft); }
.back-card-btn:active { transform: scale(0.98); border-color: var(--dynamic-primary); color: var(--dynamic-primary); }

/* ================== Home Page Cards ================== */
.card-grid { display: flex; flex-direction: column; gap: 16px; }
.main-card { padding: 16px 20px; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); display: flex; align-items: center; gap: 20px; text-align: left; border: 2px solid transparent; transition: var(--transition); }
.card-text { display: flex; flex-direction: column; }
.card-title { font-size: 1.35rem; font-weight: 600; color: var(--text-dark); margin-bottom: 2px; transition: color 0.3s ease;}
.card-subtitle { font-size: 0.9rem; font-weight: 500; }
.card-icon { width: 65px; height: 65px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: var(--transition); }

.main-card.theme-pyq { background-color: #eef2ff; border-color: #dbeafe; }
.main-card.theme-pyq .card-icon { background-color: #dbeafe; color: #4f46e5; }
.main-card.theme-pyq .card-subtitle { color: #4f46e5; }
.main-card.theme-pyq:hover, .main-card.theme-pyq:active { border-color: #4f46e5; box-shadow: 0 6px 15px rgba(79, 70, 229, 0.15); transform: translateY(-2px); }

.main-card.theme-notes { background-color: #f0fdf4; border-color: #bbf7d0; }
.main-card.theme-notes .card-icon { background-color: #bbf7d0; color: #059669; }
.main-card.theme-notes .card-subtitle { color: #059669; }
.main-card.theme-notes:hover, .main-card.theme-notes:active { border-color: #059669; box-shadow: 0 6px 15px rgba(5, 150, 105, 0.15); transform: translateY(-2px); }

.main-card.theme-syllabus { background-color: #faf5ff; border-color: #e9d5ff; }
.main-card.theme-syllabus .card-icon { background-color: #e9d5ff; color: #9333ea; }
.main-card.theme-syllabus .card-subtitle { color: #9333ea; }
.main-card.theme-syllabus:hover, .main-card.theme-syllabus:active { border-color: #9333ea; box-shadow: 0 6px 15px rgba(147, 51, 234, 0.15); transform: translateY(-2px); }

body.dark-mode .main-card.theme-pyq { background-color: #1e1e2d; border-color: #312e81; }
body.dark-mode .main-card.theme-pyq .card-icon { background-color: #312e81; color: #818cf8; }
body.dark-mode .main-card.theme-pyq .card-subtitle { color: #818cf8; }
body.dark-mode .main-card.theme-notes { background-color: #14251e; border-color: #064e3b; }
body.dark-mode .main-card.theme-notes .card-icon { background-color: #064e3b; color: #34d399; }
body.dark-mode .main-card.theme-notes .card-subtitle { color: #34d399; }
body.dark-mode .main-card.theme-syllabus { background-color: #231533; border-color: #581c87; }
body.dark-mode .main-card.theme-syllabus .card-icon { background-color: #581c87; color: #c084fc; }
body.dark-mode .main-card.theme-syllabus .card-subtitle { color: #c084fc; }

/* ================== Dynamic List Cards ================== */
.list-card { background: var(--white); padding: 18px; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); font-size: 1.1rem; font-weight: 600; text-align: center; color: var(--text-dark); transition: var(--transition); display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--border-soft); }
.list-card span { font-size: 0.9rem; color: var(--dynamic-primary); font-weight: 400; transition: color 0.3s ease; }
.list-card:active, .list-card:hover { border-color: var(--dynamic-primary); transform: scale(0.98); }

/* ================== Search Box ================== */
.search-box { position: relative; margin-bottom: 20px; width: 100%; }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 1.2rem; opacity: 0.5; color: var(--text-dark); }
.search-input { width: 100%; padding: 14px 14px 14px 45px; font-size: 1rem; border-radius: var(--radius-lg); border: 1px solid var(--border-soft); background: var(--white); outline: none; color: var(--text-dark); transition: var(--transition);}
.search-input:focus { border-color: var(--dynamic-primary); box-shadow: 0 0 0 2px rgba(0,0,0,0.1); }

/* ================== Dynamic Pill Tabs ================== */
.pill-tabs { display: flex; gap: 8px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; }
.pill-tabs::-webkit-scrollbar { display: none; }
.pill-tab { flex: 1; min-width: 80px; padding: 10px 14px; background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-pill); color: var(--text-dark); font-weight: 500; font-size: 0.95rem; transition: var(--transition); }
.pill-tab.active { background: var(--dynamic-primary); color: #ffffff; border-color: var(--dynamic-primary); }

/* ================== Dynamic Resource Cards ================== */
.resource-list { display: flex; flex-direction: column; gap: 16px; }
.resource-card { background: var(--white); padding: 20px; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); border: 1px solid var(--border-soft); transition: border-color 0.3s ease, background-color 0.3s ease; }
.resource-card:hover { border-color: var(--dynamic-primary); }
.res-title { font-size: 1.1rem; font-weight: 600; color: var(--text-dark); margin-bottom: 4px; transition: color 0.3s ease;}
.res-year { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; transition: color 0.3s ease;}
.res-action-btns { display: flex; gap: 12px; }
.action-btn { flex: 1; padding: 10px; border-radius: 10px; font-size: 0.95rem; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; transition: var(--transition); text-decoration: none; }
.view-btn { background: var(--dynamic-primary); color: #ffffff; }
.dl-btn { background: var(--btn-grey); color: var(--text-dark); border: 1px solid transparent; }
.dl-btn:hover { border-color: var(--dynamic-primary); color: var(--dynamic-primary); background: transparent; }
.action-btn:active { transform: scale(0.95); }


/* ================== PDF Viewer Action Buttons ================== */
.pdf-action-btns { 
    display: flex; 
    flex-direction: row; /* Ensure side-by-side */
    gap: 12px; 
    margin-bottom: 20px; 
    width: 100%; 
}

.viewer-btn { 
    flex: 1; /* Equal space */
    padding: 12px; 
    font-size: 1rem; 
    font-weight: 600; 
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
    box-shadow: var(--shadow-soft); 
    transition: var(--transition); 
    cursor: pointer; 
    border: none;
}

.viewer-btn:active { transform: scale(0.96); }

/* Light Mode Specific Colors for PDF Buttons */
.viewer-download-btn { 
    background-color: var(--dynamic-primary); 
    color: #ffffff; 
}

.viewer-open-btn { 
    background-color: var(--white); 
    color: var(--text-dark); 
    border: 1px solid var(--border-soft); 
}

/* Dark Mode Specific Colors for PDF Buttons */
body.dark-mode .viewer-open-btn { 
    background-color: var(--btn-grey); /* Nice dark grey */
    border-color: var(--border-soft); 
    color: #ffffff; 
}
body.dark-mode .viewer-download-btn {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.pdf-container { width: 100%; height: 85vh; background: var(--white); border-radius: var(--radius-lg); padding: 8px; border: 1px solid var(--border-soft); box-shadow: var(--shadow-soft); margin-top: 10px; margin-bottom: 40px; transition: background-color 0.3s ease; }
.pdf-title-text { color: var(--dynamic-primary); margin-top: 10px; transition: color 0.3s ease; }

/* ================== Contact Footer ================== */
.site-footer { padding: 10px 20px 40px; margin-top: auto; display: flex; justify-content: center; }
.contact-card { background: var(--white); width: 100%; max-width: 600px; padding: 30px 24px; border-radius: 20px; box-shadow: var(--shadow-soft); border: 1px solid var(--border-soft); text-align: center; transition: var(--transition); }
.contact-title { font-size: 1.3rem; color: var(--dynamic-primary); font-weight: 600; margin-bottom: 24px; transition: color 0.3s ease; }
.contact-links { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.contact-item { display: flex; align-items: center; justify-content: center; gap: 12px; text-decoration: none; color: var(--text-dark); font-size: 1rem; font-weight: 500; padding: 16px; border-radius: 14px; background: var(--contact-pill-bg); border: 1px solid var(--border-soft); transition: var(--transition); }
.contact-item:hover, .contact-item:active { color: var(--dynamic-primary); border-color: var(--dynamic-primary); transform: scale(0.98); }
.contact-icon { color: var(--dynamic-primary); display: flex; align-items: center; justify-content: center; transition: color 0.3s ease; }
.contact-divider { border: none; border-top: 1px solid var(--border-soft); margin: 20px 0; transition: border-color 0.3s ease;}
.copyright { font-size: 0.85rem; color: var(--text-muted); transition: color 0.3s ease;}

/* ================== Updated Social Media & WhatsApp Group Theme ================== */
.contact-item.contact-whatsapp-pill { background-color: #25D366 !important; color: #ffffff !important; border-color: #25D366 !important; }
.contact-item.contact-whatsapp-pill .contact-icon { color: #ffffff !important; }
.contact-item.contact-whatsapp-pill:hover, .contact-item.contact-whatsapp-pill:active { transform: scale(0.98); box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35); }

.social-icons-wrapper { display: flex; justify-content: center; gap: 18px; margin-bottom: 20px; }
.social-btn { width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all 0.3s ease; text-decoration: none; }

.social-btn.whatsapp { background: #25D366; color: #ffffff; border: 1px solid #25D366; }
.social-btn.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); color: #ffffff; border: 1px solid transparent; }
.social-btn.facebook { background: #1877F2; color: #ffffff; border: 1px solid #1877F2; }

.social-btn:hover, .social-btn:active { transform: translateY(-4px) scale(1.06); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18); filter: brightness(1.08); }
body.dark-mode .social-btn { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); }

/* ================== Dynamic Message Box ================== */
.dynamic-msg-box { padding: 12px 16px; border-radius: var(--radius-lg); font-size: 0.9rem; font-weight: 500; margin-top: 5px; margin-bottom: 20px; text-align: center; display: none; transition: var(--transition); }

body.theme-active-pyq .dynamic-msg-box { background: #eef2ff; color: #4f46e5; border: 1px solid #dbeafe; }
body.theme-active-notes .dynamic-msg-box { background: #f0fdf4; color: #059669; border: 1px solid #bbf7d0; }
body.theme-active-syllabus .dynamic-msg-box { background: #faf5ff; color: #9333ea; border: 1px solid #e9d5ff; }

body.dark-mode.theme-active-pyq .dynamic-msg-box { background: #1e1e2d; color: #818cf8; border: 1px solid #312e81; }
body.dark-mode.theme-active-notes .dynamic-msg-box { background: #14251e; color: #34d399; border: 1px solid #064e3b; }
body.dark-mode.theme-active-syllabus .dynamic-msg-box { background: #231533; color: #c084fc; border: 1px solid #581c87; }










/* External CSS for Addrex-Solution Link */
.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: 14px;
    color: #666;
}

.addrex-credit-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    background: rgba(255, 107, 0, 0.05);
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid rgba(255, 107, 0, 0.2);
    transition: all 0.3s ease;
}

.addrex-credit-box:hover {
    background: rgba(255, 107, 0, 0.1);
    border-color: #ff6b00;
    transform: translateY(-2px);
}

.code-icon {
    color: #ff6b00;
    font-weight: bold;
}

/* AddreX Solution text ko orange color dene ke liye */
.brand-name {
    color: #ff6b00;
    font-weight: 700;
}

/* Animated Click Hand Style & Animation */
.click-hand {
    display: inline-block;
    font-size: 16px;
    animation: clickBounce 1.2s infinite ease-in-out;
}

@keyframes clickBounce {
    0%, 100% {
        transform: translateX(0) scale(1);
    }
    50% {
        transform: translateX(6px) scale(1.15);
    }
}