/* 
    Premium Aesthetics:
    - Custom Color Palette
    - Glassmorphism & Translucency
    - Micro-animations
    - Modern Typography
*/

:root {
    /* Color Palette */
    --bg-primary: #0a0a0f;
    --bg-secondary: #14141f;
    --bg-sidebar: rgba(20, 20, 31, 0.7);
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b5;
    --accent: #4f46e5;
    --accent-hover: #6366f1;
    --accent-glow: rgba(79, 70, 229, 0.4);
    --border-color: rgba(255, 255, 255, 0.1);
    --code-bg: #1e1e2d;
    --glass-bg: rgba(20, 20, 31, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);

    /* Spacing & Sizes */
    --sidebar-width: 320px;
    --header-height: 60px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    margin-top: 2rem;
    color: #ffffff;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
    text-shadow: 0 0 8px var(--accent-glow);
}

/* App Layout */
#app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar (Glassmorphism) */
#sidebar {
    width: var(--sidebar-width);
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--glass-border);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, #fff, #a0a0b5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* TOC Styles */
#toc {
    padding: 1.5rem 1rem;
}

#toc ul {
    list-style: none;
    margin-left: 1rem;
}

#toc > ul {
    margin-left: 0;
}

#toc li {
    margin-bottom: 0.5rem;
}

#toc a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

#toc a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transform: translateX(4px);
}

#toc a.active {
    background: var(--accent-glow);
    color: #fff;
    border-left: 4px solid var(--accent);
}

/* Main Content */
#main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 3rem 4rem;
    max-width: 900px;
    position: relative;
    transition: filter 0.3s ease;
}

#content {
    min-height: 80vh;
}

/* Markdown Rendering Styles */
#content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#content blockquote {
    border-left: 4px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: var(--bg-secondary);
    border-radius: 0 8px 8px 0;
    color: var(--text-secondary);
    font-style: italic;
}

#content pre {
    background: var(--code-bg);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

#content code {
    font-family: 'Consolas', 'Monaco', monospace;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

#content pre code {
    background: transparent;
    padding: 0;
}

#content ul, #content ol {
    margin: 1rem 0 1rem 2rem;
}

#content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

#content th, #content td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

#content th {
    background: var(--bg-secondary);
}

/* Hero Section from original index.md */
.sales-page {
    text-align: center;
}

.hero {
    padding: 4rem 1rem;
    background: radial-gradient(circle at center, rgba(79, 70, 229, 0.15) 0%, transparent 70%);
}

.eyebrow {
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin: 1rem 0;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.button-primary {
    background: var(--accent);
    color: #fff !important;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    box-shadow: 0 4px 15px var(--accent-glow);
    transition: all 0.3s ease;
}

.button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.6);
}

.button-secondary {
    padding: 0.8rem 2rem;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    color: #fff !important;
    transition: all 0.3s ease;
}

.button-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.section-card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    margin: 3rem 0;
    text-align: left;
}

.feature-grid, .quote-strip, .reader-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.quote-box, .feature-grid article, .reader-grid article {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quote-box:hover, .feature-grid article:hover, .reader-grid article:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
footer {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Mobile Toggle Button */
#sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 900px) {
    #sidebar-toggle {
        display: flex;
    }

    #sidebar {
        transform: translateX(-100%);
    }

    #sidebar.active {
        transform: translateX(0);
    }

    #main-content {
        margin-left: 0;
        padding: 5rem 2rem 2rem;
    }

    .sidebar-active #main-content {
        filter: blur(4px) brightness(0.6);
        pointer-events: none;
    }
}
