:root {
    --bg-color: #0b0f19;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --accent-1: #3b82f6;
    --accent-2: #8b5cf6;
    --accent-3: #ec4899;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --card-bg: rgba(15, 23, 42, 0.7);
    --font-primary: 'Inter', sans-serif;
    --font-header: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.8;
    position: relative;
}

/* Background animated glow */
.bg-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 40% 60%, rgba(59, 130, 246, 0.08), transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.08), transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(236, 72, 153, 0.04), transparent 50%);
    animation: drift 25s ease-in-out infinite alternate;
    z-index: -1;
    pointer-events: none;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-3%, 3%) scale(1.1); }
}

header {
    padding: 1.2rem 1rem;
    text-align: center;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-family: var(--font-header);
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa, #c084fc, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.2rem;
    letter-spacing: -0.5px;
}

header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
}

/* Mobile-First: Main container takes full width with thin padding */
.container {
    width: 100%;
    padding: 1rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Dashboard Grid: Single column on small screens */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
}

.day-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.day-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 10px 25px -10px rgba(139, 92, 246, 0.15);
}

.day-tag {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--accent-1);
    margin-bottom: 0.4rem;
}

.day-title {
    font-family: var(--font-header);
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.6rem;
}

.day-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    flex-grow: 1;
}

.btn-learn {
    display: inline-block;
    padding: 0.7rem 1.2rem;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    transition: transform 0.2s ease;
}

.btn-learn:hover {
    transform: scale(1.02);
}

/* Detail Page Layout: Single column on mobile */
.detail-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Mobile-First: TOC Sidebar is a sliding drawer, offscreen by default */
.toc-sidebar {
    position: fixed;
    top: 0;
    left: -290px;
    width: 280px;
    height: 100vh;
    background: #0b0f19;
    border-right: 1px solid var(--glass-border);
    z-index: 1000;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 2rem 1.5rem;
    overflow-y: auto;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.6);
}

.toc-sidebar.open {
    left: 0;
}

.toc-sidebar h3 {
    font-family: var(--font-header);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #fff;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.toc-link {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.6rem 0;
    font-size: 0.95rem;
    border-left: 2px solid transparent;
    padding-left: 0.8rem;
    transition: all 0.2s ease;
}

.toc-link:hover {
    color: var(--text-primary);
    border-left-color: var(--accent-1);
}

/* Toggle Menu buttons */
.menu-toggle {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: white;
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-family: var(--font-header);
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
}

.close-menu {
    display: block;
    background: none;
    border: none;
    color: #ef4444;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
    font-weight: 700;
    font-family: var(--font-header);
    text-align: right;
    width: 100%;
}

.main-content {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
}

.main-content h2 {
    font-family: var(--font-header);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.main-content h3 {
    font-family: var(--font-header);
    font-size: 1.25rem;
    color: var(--accent-1);
    margin: 1.8rem 0 0.8rem;
}

.main-content p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
}

/* Callout Boxes */
.definition-box, .caution-box, .tip-box {
    padding: 1.2rem;
    border-radius: 0 12px 12px 0;
    margin: 1.5rem 0;
}

.definition-box {
    background: rgba(59, 130, 246, 0.08);
    border-left: 4px solid var(--accent-1);
}
.definition-box h4 { color: #60a5fa; margin-bottom: 0.4rem; }

.caution-box {
    background: rgba(245, 158, 11, 0.08);
    border-left: 4px solid #f59e0b;
}
.caution-box h4 { color: #fbbf24; margin-bottom: 0.4rem; }

.tip-box {
    background: rgba(16, 185, 129, 0.08);
    border-left: 4px solid #10b981;
}
.tip-box h4 { color: #34d399; margin-bottom: 0.4rem; }

/* Prompt Box */
.prompt-box {
    background: rgba(0, 0, 0, 0.3);
    border-left: 4px solid var(--accent-3);
    padding: 1.2rem;
    margin: 1.5rem 0;
    border-radius: 0 12px 12px 0;
    position: relative;
}

.prompt-box::before {
    content: 'প্রম্পট টেমপ্লেট (Prompt)';
    position: absolute;
    top: -10px;
    left: 12px;
    background: var(--accent-3);
    color: white;
    font-size: 0.75rem;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 600;
}

.prompt-box pre {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

pre {
    background: #0f172a;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid #1e293b;
    white-space: pre-wrap;
    word-wrap: break-word;
}

code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #a5b4fc;
}

ul {
    list-style: none;
    margin-bottom: 1.2rem;
}

ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.6rem;
    color: var(--text-secondary);
}

ul li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--accent-2);
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
    gap: 0.5rem;
}

.btn-nav {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    flex: 1;
}

/* Tablet & Desktop Layout overrides */
@media (min-width: 768px) {
    header {
        padding: 2rem 5%;
    }
    
    header h1 {
        font-size: 2.8rem;
    }
    
    header p {
        font-size: 1.2rem;
    }
    
    .container {
        width: 90%;
        max-width: 1400px;
        padding: 0;
        gap: 2rem;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.8rem;
    }
    
    .detail-layout {
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 2.5rem;
    }
    
    .toc-sidebar {
        position: sticky;
        top: 130px;
        left: auto;
        width: auto;
        height: auto;
        background: var(--glass-bg);
        box-shadow: none;
        z-index: auto;
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .menu-toggle, .close-menu {
        display: none;
    }
    
    .main-content {
        padding: 3rem;
        border-radius: 24px;
    }
    
    .main-content h2 {
        font-size: 2.2rem;
    }
    
    .main-content h3 {
        font-size: 1.6rem;
    }
    
    .btn-nav {
        flex: 0 1 auto;
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
}
