/* --- Global Styles & Variables --- */
:root {
    --primary-color: #3182CE; /* Professional Blue */
    --primary-hover: #4299E1; /* Lighter Blue */
    --background-color: #0d1117;
    --surface-color: #1a1a1a;
    --text-color: #c9d1d9;
    --text-muted: #8b949e;
    --border-color: #30363d;
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'Source Code Pro', monospace;
}

body {
    font-family: var(--font-sans);
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

h1, h2, h3, h4 { 
    font-weight: 700; 
    line-height: 1.2; 
    color: #e6edf3;
}
h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
.text-center { text-align: center; }
.section-title { text-align: center; margin-bottom: 3rem; font-size: 2.5rem; }
.subtitle { color: var(--text-muted); max-width: 650px; margin: 1rem auto; }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.btn-primary { 
    background-color: var(--primary-color); 
    color: #fff; 
    border-color: #63B3ED;
}
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-secondary { 
    background-color: transparent; 
    color: #58a6ff; 
    border: 1px solid #58a6ff; 
}
.btn-secondary:hover { background-color: #58a6ff1a; }

/* --- Header & Navigation --- */
.main-header { padding: 1.5rem 0; border-bottom: 1px solid var(--border-color); }
.main-header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--text-color); text-decoration: none; }
.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.main-nav a, .dropdown-toggle {
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}
.main-nav a:hover { color: var(--text-color); }
.hamburger-menu, .mobile-nav { display: none; }

/* --- Dropdown Menu --- */
.dropdown { 
    position: relative; 
    display: inline-block;
    padding: 1rem 0;
    margin: -1rem 0;
}
.dropdown-toggle {
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1rem;
    font-family: inherit;
    padding: 0;
}
.dropdown-toggle:hover, .dropdown:hover .dropdown-toggle { color: var(--text-color); }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #161b22;
    min-width: 160px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    z-index: 1000;
    padding: 0.5rem 0;
}
.dropdown-menu a {
    color: var(--text-muted);
    padding: 0.75rem 1.5rem;
    display: block;
    text-align: left;
    margin: 0;
}
.dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
}
.dropdown:hover .dropdown-menu { display: block; }

/* --- Homepage Sections --- */
.hero { padding: 6rem 0; }
.hero h1 { max-width: 800px; margin: 0 auto 1.5rem; }
.hero .cli-identifier { font-family: var(--font-mono); font-size: 1.1rem; color: var(--primary-color); margin-bottom: 2rem; }
.hero .subtitle { font-size: 1.25rem; }
.demo-section { padding: 2rem 0 5rem; }
.demo-gif { max-width: 100%; border-radius: 8px; border: 1px solid var(--border-color); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2); display: block; margin: 0 auto 2rem auto; }
.installation-section { padding: 5rem 0; background-color: var(--surface-color); }
.features-table-section { padding: 5rem 0; }

/* --- Feature Grid --- */
.why-rust-section { padding: 5rem 0; background-color: var(--surface-color); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; text-align: left; margin-top: 3rem;}
.feature-card { background-color: #161b22; padding: 1.5rem 2rem; border-radius: 8px; border: 1px solid var(--border-color); }
.feature-card h3 { margin-top: 0; margin-bottom: 0.5rem; font-size: 1.25rem; color: var(--text-color); }
.feature-card p { color: var(--text-muted); margin-bottom: 0; }

/* --- Code Blocks & Installation --- */
.code-block-container { 
    position: relative;
    max-width: 800px; 
    margin: 1.5rem auto; 
    background-color: #161b22; 
    border-radius: 8px; 
    padding: 1.5rem; 
    border: 1px solid var(--border-color); 
}
.code-block-container h3 { margin: 0 0 0.5rem; }
.code-block-container p { margin-top: 0.5rem; }
pre { margin: 0; background: #0d1117; padding: 1rem; border-radius: 6px; overflow-x: auto; }
code { font-family: var(--font-mono); font-size: 0.9rem; color: #dcdfe4; }
.copy-button {
    position: absolute;
    top: 1.5rem; right: 1.5rem;
    background-color: #21262d;
    color: #c9d1d9;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s;
}
.copy-button:hover { background-color: #30363d; }
.copy-button.copied { background-color: #2ea043; color: white; border-color: #267c34; }


/* --- Blog Post Specific Styles --- */
.blog-post-container { padding-top: 3rem; padding-bottom: 4rem; max-width: 800px; }
.blog-post-header h1 { font-size: 2.75rem; margin-bottom: 0.5rem; line-height: 1.2; }
.blog-post-meta { color: var(--text-muted); margin-bottom: 2rem; }
.blog-post-content p, .blog-post-content ul, .blog-post-content li { font-size: 1.1rem; color: var(--text-color); }
.blog-post-content h2 { font-size: 1.8rem; margin-top: 2.5rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem;}
.blog-post-content h3 { font-size: 1.4rem; margin-top: 2rem; }
.blog-post-content a { color: #58a6ff; text-decoration: none; }
.blog-post-content a:hover { text-decoration: underline; }
.blog-post-content .btn-primary { color: white; }
.faq-section { margin-top: 3rem; border-top: 1px solid var(--border-color); padding-top: 2rem; }
.faq-item h3 { font-size: 1.2rem; }
.info-box { background-color: #212c477a; border-left: 4px solid #58a6ff; padding: 1rem 1.5rem; margin: 1.5rem 0; border-radius: 0 6px 6px 0; }
.cta-buttons { display: flex; justify-content: center; gap: 1rem; margin-top: 2.5rem; }


/* --- Blog Index Page Styles --- */
.blog-listing-container { padding-top: 3rem; padding-bottom: 4rem; }
.blog-listing-container h1 { font-size: 2.75rem; text-align: center; margin-bottom: 1rem; }
.blog-subtitle { color: var(--text-muted); max-width: 550px; margin: 0 auto 4rem auto; text-align: center; font-size: 1.1rem; }
.blog-posts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.blog-card {
    background-color: #161b22;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.blog-card:hover { transform: translateY(-5px); border-color: #58a6ff; }
.blog-card-content { padding: 1.5rem; }
.blog-card-category {
    display: inline-block;
    background-color: #58a6ff1a;
    color: #58a6ff;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.blog-card h2 { margin: 0 0 0.75rem 0; font-size: 1.4rem; }
.blog-card h2 a { color: #e6edf3; text-decoration: none; }
.blog-card h2 a:hover { text-decoration: underline; }
.blog-card p { margin: 0 0 1.5rem 0; color: var(--text-muted); }
.blog-card-meta { color: var(--text-muted); font-size: 0.9rem; display: flex; gap: 1rem; }


/* --- Screenshot & Modal Styles --- */
.screenshot { max-width: 100%; border-radius: 8px; border: 1px solid var(--border-color); cursor: zoom-in; transition: transform 0.2s ease-in-out; margin-top: 1em; margin-bottom: 1em; }
.screenshot:hover { transform: scale(1.02); }
#modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); display: none; justify-content: center; align-items: center; z-index: 1000; cursor: zoom-out; }
#modal-overlay.visible { display: flex; }
#modal-image { max-width: 90vw; max-height: 90vh; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }


/* --- Footer --- */
.main-footer { padding: 2rem 0; text-align: center; color: var(--text-muted); border-top: 1px solid var(--border-color); margin-top: 4rem; }
.footer-links { display: flex; justify-content: center; gap: 0.5rem; margin-bottom: 1rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text-color); text-decoration: underline; }

/* --- Use Case Page & GIF Styles --- */
.use-cases-container { padding-top: 3rem; padding-bottom: 4rem; }
.use-cases-container h1 { font-size: 2.75rem; text-align: center; margin-bottom: 1rem; }
.use-cases-subtitle { color: var(--text-muted); max-width: 650px; margin: 0 auto 4rem auto; text-align: center; font-size: 1.1rem; }
.use-case-card { background-color: #161b22; border: 1px solid var(--border-color); border-radius: 8px; padding: 2rem; margin-bottom: 3rem; }
.use-case-card h2 { margin-top: 0; font-size: 1.75rem; }
.use-case-card p { color: var(--text-muted); max-width: 80ch; }
.gif-container { margin-top: 1.5rem; position: relative; max-width: 100%; cursor: pointer; border-radius: 8px; overflow: hidden; border: 1px solid #4a4a4a; }
.gif-thumbnail { display: block; width: 100%; transition: opacity 0.2s ease-in-out; }
.gif-container:hover .gif-thumbnail { opacity: 0.8; }
.gif-play-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 48px; color: white; text-shadow: 0 0 15px rgba(0,0,0,0.8); pointer-events: none; transition: transform 0.2s ease; }
.gif-container:hover .gif-play-icon { transform: translate(-50%, -50%) scale(1.1); }
#lightbox-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); z-index: 1000; display: flex; justify-content: center; align-items: center; cursor: pointer; }
#lightbox-overlay img { max-width: 90%; max-height: 90%; border: 2px solid white; border-radius: 4px; }
.final-cta { padding: 2rem; text-align: center; }
.final-cta h2 { font-size: 2rem; }
.final-cta p { color: var(--text-muted); margin-bottom: 2rem; }
.final-cta .btn { margin: 0.5rem; }

/* --- About Page Specific Styles --- */
.about-content-container { padding-top: 4rem; padding-bottom: 4rem; }
.about-content { max-width: 800px; margin: 0 auto; }
.about-content h1 { font-size: 3rem; }
.about-content h2 { font-size: 2rem; margin-top: 3rem; margin-bottom: 1rem; }
.creator-social-link { margin-top: 1rem; }
.creator-social-link a { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-muted); text-decoration: none; font-weight: 500; transition: color 0.2s ease; }
.creator-social-link a:hover { color: var(--primary-color); }
.creator-social-link svg { width: 18px; height: 18px; fill: currentColor; }
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-top: 1.5rem; }
.project-card { display: block; background-color: #161b22; border: 1px solid var(--border-color); padding: 1.5rem; border-radius: 8px; text-decoration: none; color: inherit; transition: transform 0.2s ease, border-color 0.2s ease; }
.project-card:hover { transform: translateY(-5px); border-color: #58a6ff; }
.project-category { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.75rem; }
.project-card h3 { margin: 0 0 0.5rem 0; color: #e6edf3; }
.project-card p { margin: 0 0 1rem 0; color: var(--text-muted); font-size: 0.9rem; }
.project-link { font-weight: 600; color: #58a6ff; }
.review-section { background-color: #1a1a1a; padding: 4rem 0; text-align: center; border-top: 1px solid var(--border-color); margin-top: 4rem; }

/* --- Roadmap Page Specific Styles --- */
.roadmap-container { padding-top: 3rem; padding-bottom: 4rem; }
.roadmap-container h1 { font-size: 2.75rem; text-align: center; margin-bottom: 1rem; }
.roadmap-subtitle { color: var(--text-muted); max-width: 650px; margin: 0 auto 3rem auto; text-align: center; font-size: 1.1rem; }
.roadmap-suggestion-box { background-color: #161b22; border: 1px solid var(--border-color); border-radius: 8px; padding: 1.5rem; display: flex; justify-content: space-between; align-items: center; margin-bottom: 4rem; }
.roadmap-suggestion-box p { margin: 0; color: var(--text-muted); }
.roadmap-phase { margin-bottom: 3rem; }
.roadmap-phase h2 { font-size: 2rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.75rem; margin-bottom: 2rem; }
.roadmap-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.roadmap-card { background-color: #161b22; border: 1px solid var(--border-color); padding: 1.5rem; border-radius: 8px; }
.roadmap-card h3 { margin-top: 0; color: #e6edf3; }
.roadmap-card p { margin-bottom: 0; color: var(--text-muted); }

/* --- Changelog Page Specific Styles --- */
.changelog-container { padding-top: 3rem; padding-bottom: 4rem; max-width: 800px; }
.changelog-container h1 { font-size: 2.75rem; text-align: center; margin-bottom: 1rem; }
.changelog-subtitle { color: var(--text-muted); margin: 0 auto 3rem auto; text-align: center; font-size: 1.1rem; }
.changelog-version { margin-bottom: 3rem; border-bottom: 1px solid var(--border-color); padding-bottom: 2rem; }
.changelog-version:last-child { border-bottom: none; }
.changelog-version h2 { font-size: 2rem; margin-top: 0; margin-bottom: 0.25rem; }
.release-date { color: var(--text-muted); margin-top: 0; }
.changelog-version ul { list-style: none; padding-left: 0; }
.changelog-version li { position: relative; padding-left: 1.5rem; margin-bottom: 0.75rem; }
.changelog-version li::before { content: '•'; position: absolute; left: 0; color: var(--text-muted); }
.change-tag { font-weight: 600; padding: 2px 6px; border-radius: 4px; font-size: 0.8em; margin-right: 0.5rem; }
.change-new { background-color: #2ea0431a; color: #2ea043; }
.change-fix { background-color: #db6d281a; color: #db6d28; }
.change-imp { background-color: #58a6ff1a; color: #58a6ff; }
.pro-badge-changelog { font-size: 0.8em; font-weight: 600; background: #58a6ff1a; color: #58a6ff; padding: 2px 5px; border-radius: 4px; vertical-align: middle; margin-left: 4px; }

/* --- Support Page Specific Styles --- */
.support-container { padding-top: 3rem; padding-bottom: 4rem; }
.support-header { margin-bottom: 3rem; text-align: center; }
.support-header h1 { font-size: 2.75rem; }
.support-header .subtitle { font-size: 1.1rem; color: var(--text-muted); max-width: 600px; margin: 1rem auto 0; }
.form-container { max-width: 600px; margin: 0 auto; background-color: #161b22; padding: 2rem; border: 1px solid var(--border-color); border-radius: 8px; }
.form-container label { display: block; margin-bottom: 1.5rem; font-weight: 600; }
.form-container input[type="email"],
.form-container textarea { width: 100%; padding: 0.75rem; margin-top: 0.5rem; background-color: #0d1117; border: 1px solid var(--border-color); border-radius: 6px; color: #c9d1d9; font-family: 'Inter', sans-serif; font-size: 1rem; box-sizing: border-box; }
.form-container input[type="file"] { margin-top: 0.5rem; }
.file-input-info { font-weight: 400; font-size: 0.9rem; color: var(--text-muted); margin: 0.25rem 0 0.5rem; }
.form-container button { width: 100%; font-size: 1rem; }

/* --- Docs Page Specific Styles --- */
.docs-container { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; align-items: start; padding-top: 2rem; padding-bottom: 4rem; }
.docs-nav { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; }
.docs-nav ul { list-style: none; padding: 0; margin: 0; }
.docs-nav li { margin-bottom: 0.5rem; }
.docs-nav li strong { display: block; margin-top: 1.5rem; margin-bottom: 0.75rem; color: #e6edf3; font-weight: 600; }
.docs-nav a { color: var(--text-muted); text-decoration: none; display: block; padding: 0.25rem 0; transition: color 0.2s ease; }
.docs-nav a:hover { color: #58a6ff; }
.pro-badge { font-size: 0.7em; font-weight: 600; background: #58a6ff1a; color: #58a6ff; padding: 2px 5px; border-radius: 4px; vertical-align: middle; margin-left: 4px; }
.docs-content section { margin-bottom: 3rem; border-bottom: 1px solid var(--border-color); padding-bottom: 2rem; scroll-margin-top: 80px; }
.docs-content section:last-child { border-bottom: none; }
.docs-content h1 { font-size: 2.5rem; }
.docs-content h2 { font-size: 2rem; margin-top: 2.5rem; }
.docs-content h3 { font-size: 1.5rem; }
.docs-content h4 { font-size: 1.2rem; }
.docs-content a { color: #58a6ff; }
.recommended-badge { background: #2ea043; color: white; padding: 2px 6px; border-radius: 4px; font-size: 0.8em; font-weight: 600; vertical-align: middle; text-transform: uppercase; }
.table-wrapper { overflow-x: auto; }
.args-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }
.args-table th, .args-table td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--border-color); }
.args-table th { color: #e6edf3; }
.args-table td code { background: #ffffff1a; padding: 2px 4px; border-radius: 4px; }
.docs-content .code-block-container { max-width: none; margin-left: 0; margin-right: 0; padding: 1.5rem; }
.docs-content .code-block-container pre { background: #0d1117; padding: 1rem; border-radius: 6px; margin: 0; }
.docs-nav::-webkit-scrollbar { width: 8px; }
.docs-nav::-webkit-scrollbar-track { background: transparent; }
.docs-nav::-webkit-scrollbar-thumb { background-color: #30363d; border-radius: 10px; border: 2px solid #0d1117; }
.docs-nav::-webkit-scrollbar-thumb:hover { background-color: #58a6ff; }


/* --- SINGLE CONSOLIDATED RESPONSIVE BLOCK --- */
@media (max-width: 768px) {
    /* --- Global Adjustments --- */
    h1 { font-size: 2.25rem; }
    .section-title, .blog-post-header h1, .blog-listing-container h1 { font-size: 2rem; }

    /* --- Mobile Navigation --- */
    .main-nav, .main-header .btn-primary { 
        display: none; 
    }
    .hamburger-menu { 
        display: block; 
        font-size: 2rem; 
        background: none; 
        border: none; 
        color: #c9d1d9; 
        cursor: pointer; 
        z-index: 1001; 
    }
    .mobile-nav {
        position: fixed; 
        top: 0; 
        left: 0; 
        width: 100%; 
        height: 100%;
        background-color: var(--background-color);
        z-index: 1000;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        overflow-y: auto;
        padding: 4rem 0;
        box-sizing: border-box;
    }
    .mobile-nav.active { 
        transform: translateX(0); 
    }
    .mobile-nav a { 
        color: #e6edf3; 
        text-decoration: none; 
        font-size: 1.5rem; 
    }
    body.no-scroll { 
        overflow: hidden; 
    }

    /* --- Homepage Adjustments --- */
    .features-grid { 
        grid-template-columns: 1fr; 
    }
    .copy-button { 
        position: static; 
        margin-top: 1rem; 
        width: 100%; 
    }
    
    /* --- Blog Index Adjustments --- */
    .blog-listing-container { padding-top: 2rem; padding-bottom: 2rem; }
    .blog-subtitle { margin-bottom: 3rem; }
    .blog-posts-grid { grid-template-columns: 1fr; }

    /* --- Blog Post Adjustments --- */
    .blog-post-container { padding-top: 2rem; padding-bottom: 2rem; }
    .blog-post-content p, .blog-post-content ul, .blog-post-content li { font-size: 1rem; }
    .blog-post-content h2 { font-size: 1.5rem; }
    .blog-post-content h3 { font-size: 1.2rem; }
    .cta-buttons { display: flex; flex-direction: column; align-items: stretch; gap: 1rem; }
    .cta-buttons a { margin-left: 0 !important; }

    /* --- Use Cases Page Adjustments --- */
    .use-cases-container { padding-top: 2rem; padding-bottom: 2rem; }
    .use-cases-container h1 { font-size: 2rem; }
    .use-cases-subtitle { margin-bottom: 3rem; }
    .use-case-card { padding: 1.5rem; }
    .use-case-card h2 { font-size: 1.5rem; }
    .final-cta { display: flex; flex-direction: column; }
    .final-cta .btn { width: 100%; box-sizing: border-box; text-align: center; }

    /* --- About Page Adjustments --- */
    .projects-grid { grid-template-columns: 1fr; }
    .about-content h1 { font-size: 2.25rem; }
    .about-content h2 { font-size: 1.75rem; }
    .review-section { padding: 3rem 0; }

    /* --- Roadmap Page Adjustments --- */
    .roadmap-container { padding-top: 2rem; padding-bottom: 2rem; }
    .roadmap-container h1 { font-size: 2rem; }
    .roadmap-phase h2 { font-size: 1.75rem; }
    .roadmap-suggestion-box { flex-direction: column; text-align: center; gap: 1rem; }
    .roadmap-grid { grid-template-columns: 1fr; }

    /* --- Changelog Page Adjustments --- */
    .changelog-container { padding-top: 2rem; }
    .changelog-container h1 { font-size: 2.25rem; }
    .changelog-version h2 { font-size: 1.75rem; }

    /* --- Support Page Adjustments --- */
    .support-container { padding-top: 2rem; }
    .support-header h1 { font-size: 2.25rem; }
    .form-container { padding: 1.5rem; }

    /* --- Docs Page Adjustments (THE FIX) --- */
    .docs-container { 
        grid-template-columns: 1fr; 
        gap: 1.5rem;
    }
    .docs-nav { 
        position: static; 
        max-height: none; 
        overflow-y: visible; 
        border-bottom: 1px solid var(--border-color); 
        padding-bottom: 1.5rem; 
        margin-bottom: 0; /* FIX: Removed redundant margin */
    }
    .docs-content {
        overflow: hidden; /* FIX: Prevent content from breaking layout */
    }
    .docs-content h1 { font-size: 2rem; }
    .docs-content h2 { font-size: 1.75rem; }
    .docs-content h3 { font-size: 1.4rem; }
}