/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --primary-color: #007BFF;
    --secondary-color: #0056b3;
    --accent-color: #33aaff;
    
    /* Light Mode */
    --bg-light: #f4f7f9;
    --text-light: #343a40;
    --header-light: rgba(255, 255, 255, 0.85); /* For Glass Effect */
    --container-light: #ffffff;
    --border-light: #e0e0e0;
    --shadow-light: rgba(0, 0, 0, 0.08);

    /* Dark Mode */
    --bg-dark: #121212;
    --text-dark: #e0e0e0;
    --header-dark: rgba(28, 28, 46, 0.85); /* For Glass Effect */
    --container-dark: #1e1e1e;
    --border-dark: #333333;
    --shadow-dark: rgba(0, 0, 0, 0.4);

    --border-radius: 12px;
    --transition-speed: 0.4s ease;
}

/* Base Styles */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-light);
    margin: 0;
    padding-top: 80px;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* Dark Mode */
body.dark-mode {
    /* ... (Your existing dark mode variables) ... */
    --bg-light: var(--bg-dark);
    --text-light: var(--text-dark);
    --header-light: var(--header-dark);
    --container-light: var(--container-dark);
    --border-light: var(--border-dark);
    --shadow-light: var(--shadow-dark);
    --highlight-bg: #2c3e50;
    --highlight-text: #ecf0f1;
}
/* ... (Other dark mode styles remain the same) ... */

/* --- NEW: Reading Progress Bar --- */
.progress-container {
    width: 100%;
    height: 5px;
    background: transparent;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001; /* Above the header */
}
.progress-bar {
    height: 5px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    width: 0%;
    border-radius: 0 5px 5px 0;
}

/* --- UPDATED: Header with Glassmorphism --- */
.site-header {
    background: var(--header-light);
    backdrop-filter: blur(10px); /* The Glass Effect! */
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: top 0.4s ease-in-out, background-color var(--transition-speed);
}
body.dark-mode .site-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.site-header.header-hidden {
    top: -100px;
}
/* ... (Rest of the header styles remain the same) ... */


/* --- NEW: Scroll Animation --- */
/* Add this to elements you want to animate on scroll (h2, .info-box, .mcq-item, etc.) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
/* ... (Rest of your CSS file remains the same) ... */
/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --primary-color: #007BFF;
    --secondary-color: #0056b3;
    --accent-color: #33aaff;
    
    /* Light Mode */
    --bg-light: #f4f7f9;
    --text-light: #343a40;
    --header-light: rgba(255, 255, 255, 0.85); /* For Glass Effect */
    --container-light: #ffffff;
    --border-light: #e0e0e0;
    --shadow-light: rgba(0, 0, 0, 0.08);

    /* Dark Mode */
    --bg-dark: #121212;
    --text-dark: #e0e0e0;
    --header-dark: rgba(28, 28, 46, 0.85); /* For Glass Effect */
    --container-dark: #1e1e1e;
    --border-dark: #333333;
    --shadow-dark: rgba(0, 0, 0, 0.4);

    --border-radius: 12px;
    --transition-speed: 0.4s ease;
}

/* Base Styles */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-light);
    margin: 0;
    padding-top: 80px; /* Space for fixed header */
    transition: background-color var(--transition-speed), color var(--transition-speed);
}
main {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
body.loaded main {
    opacity: 1;
    transform: translateY(0);
}

/* Dark Mode */
body.dark-mode {
    --bg-light: var(--bg-dark);
    --text-light: var(--text-dark);
    --header-light: var(--header-dark);
    --container-light: var(--container-dark);
    --border-light: var(--border-dark);
    --shadow-light: var(--shadow-dark);
    --highlight-bg: #2c3e50;
    --highlight-text: #ecf0f1;
}
body.dark-mode .nav-links a {
    background-color: #2c3e50;
}
body.dark-mode .nav-links a.active {
    background-image: linear-gradient(45deg, var(--accent-color), var(--primary-color));
}

/* --- NEW: Reading Progress Bar --- */
.progress-container {
    width: 100%;
    height: 5px;
    background: transparent;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001; /* Above the header */
}
.progress-bar {
    height: 5px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    width: 0%;
    border-radius: 0 5px 5px 0;
}


/* --- UPDATED: Header with Glassmorphism --- */
.site-header {
    background: var(--header-light);
    backdrop-filter: blur(10px); /* The Glass Effect! */
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: top 0.4s ease-in-out, background-color var(--transition-speed);
}
body.dark-mode .site-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-header.header-hidden {
    top: -100px; /* হেডারটিকে স্ক্রিনের বাইরে ঠেলে দেওয়া হয় */
}
.header-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}
.site-title {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    font-weight: 700;
    margin: 0;
}
#theme-toggle {
    background: none;
    border: 2px solid var(--text-light);
    color: var(--text-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all var(--transition-speed);
}
#theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Navigation Bar with Emojis */
.navbar {
    padding: 15px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 30px;
}
.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.nav-links a {
    text-decoration: none;
    color: var(--secondary-color);
    background-color: #e9ecef;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 1.2rem;
    transition: all var(--transition-speed);
}
.nav-links a:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 5px 15px var(--shadow-light);
}
.nav-links a.active {
    background-image: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
    transform: scale(1.1);
}

/* Main Container & Content */
.container {
    max-width: 900px;
    margin: 30px auto;
    padding: 20px 40px;
    background-color: var(--container-light);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px var(--shadow-light);
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
}
h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-top: 40px;
}
.highlight {
    background-color: var(--highlight-bg, #fff3cd);
    color: var(--highlight-text, #856404);
    padding: 3px 8px;
    border-radius: 5px;
    font-weight: 600;
}
.info-box, .formula-box, .derivation-box {
    margin: 25px 0;
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 8px var(--shadow-light);
    transition: all var(--transition-speed);
}
.info-box {
    background-color: #e7f3ff;
    border-left: 6px solid var(--primary-color);
}
body.dark-mode .info-box {
    background-color: #1c2a44;
}
.formula-box, .derivation-box {
    background-color: #f8f9fa;
    font-family: 'Courier New', Courier, monospace;
}
body.dark-mode .formula-box, body.dark-mode .derivation-box {
    background-color: #2b2b2b;
}

/* Table */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-light);
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}
th {
    background-color: var(--secondary-color);
    color: white;
}
tr:last-child td { border-bottom: none; }

/* Pagination & Scroll Button */
.pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}
.pagination a {
    text-decoration: none;
    background-image: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    transition: all var(--transition-speed);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}
.pagination a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.5);
}
.pagination .disabled {
    background-image: none;
    background-color: #ced4da;
    cursor: not-allowed;
    box-shadow: none;
}
body.dark-mode .pagination .disabled {
    background-color: #444;
}

#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    background-image: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.5);
    transition: all var(--transition-speed);
}
#scrollTopBtn:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .container {
        padding: 15px 20px;
    }
    .header-content {
        padding: 10px 15px;
    }
    body {
        padding-top: 70px;
    }
}
/* --- Update this in your style.css file for MCQ Pages --- */

.mcq-item {
    background-color: var(--container-light);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 25px;
    transition: all var(--transition-speed);
}
body.dark-mode .mcq-item {
    background-color: #2b2b2b;
}

.mcq-item .question {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.mcq-item .options {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.mcq-item .options li {
    padding: 8px;
    border-radius: 5px;
    margin-bottom: 5px;
}

/* Style for the correct answer, which is now always visible */
.mcq-item .options li.correct-answer {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    font-weight: 600;
}
body.dark-mode .mcq-item .options li.correct-answer {
    background-color: #2a4b37;
    color: #c8e6c9;
}

/* Style for the explanation, which is now always visible */
.answer-explanation {
    margin-top: 15px;
    padding: 15px;
    background-color: #f1f3f5;
    border-radius: 8px;
}
body.dark-mode .answer-explanation {
    background-color: #343a40;
}
/* --- NEW: Scroll Animation --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}