/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #FFFFFF;
    background: #121212;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #4CAF50;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #66BB6A;
    text-decoration: underline;
}

ul {
    list-style: disc;
    padding-left: 24px;
}

/* ===== TOP NAV (sticky) ===== */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #1A1A1A;
    border-bottom: 1px solid #2A2A2A;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-size: 20px;
    font-weight: 700;
    color: #FFFFFF;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-brand:hover {
    color: #FFFFFF;
    text-decoration: none;
}

.nav-brand span {
    color: #1B5E20;
}

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
    padding: 0;
}

.nav-links a {
    color: #B0B0B0;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #FFFFFF;
    text-decoration: none;
}

/* Language Switcher */
.lang-switcher {
    position: relative;
}

.lang-btn {
    background: #2A2A2A;
    border: 1px solid #3A3A3A;
    color: #B0B0B0;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.lang-btn:hover {
    background: #333333;
    border-color: #4A4A4A;
}

.lang-btn::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #B0B0B0;
    transition: transform 0.2s ease;
}

.lang-switcher.open .lang-btn::after {
    transform: rotate(180deg);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #2A2A2A;
    border: 1px solid #3A3A3A;
    border-radius: 8px;
    overflow: hidden;
    min-width: 140px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 200;
}

.lang-switcher.open .lang-dropdown {
    display: block;
}

.lang-dropdown a {
    display: block;
    padding: 8px 14px;
    color: #B0B0B0;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.lang-dropdown a:hover {
    background: #333333;
    color: #FFFFFF;
    text-decoration: none;
}

.lang-dropdown a.current {
    color: #4CAF50;
    font-weight: 600;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 24px 0;
    font-size: 13px;
    color: #B0B0B0;
    width: 100%;
}

.breadcrumb a {
    color: #B0B0B0;
}

.breadcrumb a:hover {
    color: #FFFFFF;
}

.breadcrumb span {
    margin: 0 6px;
    color: #555;
}

/* ===== LAST UPDATED BADGE ===== */
.updated-badge {
    display: inline-block;
    background: #1B3A1B;
    color: #66BB6A;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 24px;
    letter-spacing: 0.3px;
}

/* ===== PAGE LAYOUT (TOC + CONTENT) ===== */
.page-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 24px 48px;
    width: 100%;
}

/* TOC Sidebar */
.toc-sidebar {
    position: sticky;
    top: 80px;
    align-self: start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.toc-sidebar h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #B0B0B0;
    margin-bottom: 12px;
}

.toc-sidebar ul {
    list-style: none;
    padding: 0;
}

.toc-sidebar li {
    margin-bottom: 4px;
}

.toc-sidebar a {
    display: block;
    padding: 4px 0;
    font-size: 13px;
    color: #888;
    text-decoration: none;
    border-left: 2px solid transparent;
    padding-left: 12px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.toc-sidebar a:hover {
    color: #FFFFFF;
    text-decoration: none;
}

.toc-sidebar a.active {
    color: #4CAF50;
    border-left-color: #1B5E20;
}

.toc-sidebar .toc-h3 {
    padding-left: 24px;
    font-size: 12px;
}

/* Mobile TOC hamburger */
.toc-mobile-toggle {
    display: none;
    background: #1B5E20;
    color: #FFFFFF;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    margin: 16px 24px 0;
    width: calc(100% - 48px);
    text-align: left;
    transition: background 0.2s ease;
}

.toc-mobile-toggle:hover {
    background: #2E7D32;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    max-width: 720px;
    width: 100%;
}

.main-content h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.main-content h2 {
    font-size: 22px;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 12px;
    color: #FFFFFF;
    padding-top: 16px;
}

.main-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 8px;
    color: #E0E0E0;
}

.main-content p {
    margin-bottom: 16px;
    color: #D0D0D0;
}

.main-content ul,
.main-content ol {
    margin-bottom: 16px;
    color: #D0D0D0;
}

.main-content li {
    margin-bottom: 6px;
}

.main-content section {
    border-bottom: 1px solid #2A2A2A;
    padding-bottom: 24px;
}

.main-content section:last-of-type {
    border-bottom: none;
}

/* ===== INDEX / HUB PAGE ===== */
.hub-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 24px;
    width: 100%;
}

.hub-container h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.hub-subtitle {
    color: #B0B0B0;
    font-size: 16px;
    margin-bottom: 40px;
}

.doc-cards {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.doc-card {
    background: #1A1A1A;
    border: 1px solid #2A2A2A;
    border-radius: 12px;
    padding: 24px;
    transition: border-color 0.2s ease, transform 0.15s ease;
}

.doc-card:hover {
    border-color: #1B5E20;
    transform: translateY(-2px);
}

.doc-card h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #FFFFFF;
}

.doc-card .card-desc {
    font-size: 14px;
    color: #B0B0B0;
    margin-bottom: 16px;
}

.card-langs {
    display: flex;
    gap: 12px;
}

.card-langs a {
    display: inline-block;
    background: #2A2A2A;
    color: #B0B0B0;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.card-langs a:hover {
    background: #1B5E20;
    color: #FFFFFF;
    text-decoration: none;
}

/* ===== ACCORDION (SUPPORT FAQ) ===== */
details {
    background: #1A1A1A;
    border: 1px solid #2A2A2A;
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

details:hover {
    border-color: #3A3A3A;
}

details[open] {
    border-color: #1B5E20;
}

summary {
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: #FFFFFF;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s ease;
    user-select: none;
}

summary:hover {
    background: #222222;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '+';
    font-size: 18px;
    font-weight: 400;
    color: #B0B0B0;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 12px;
}

details[open] summary::after {
    content: '\2212';
}

.accordion-body {
    padding: 0 18px 16px;
    color: #D0D0D0;
    font-size: 15px;
}

.accordion-body p {
    margin-bottom: 8px;
}

.accordion-body ul {
    margin-bottom: 8px;
}

.accordion-body li {
    margin-bottom: 4px;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: #1B5E20;
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 90;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #2E7D32;
}

/* ===== FOOTER ===== */
.site-footer {
    margin-top: auto;
    background: #1A1A1A;
    border-top: 1px solid #2A2A2A;
    padding: 32px 24px;
    text-align: center;
    color: #888;
    font-size: 13px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #B0B0B0;
    font-size: 13px;
}

.footer-links a:hover {
    color: #FFFFFF;
}

.footer-email {
    margin-top: 8px;
}

.footer-email a {
    color: #4CAF50;
}

/* ===== RESPONSIVE: MOBILE ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .site-nav {
        padding: 0 16px;
    }

    .page-layout {
        display: block;
        padding: 0 16px 48px;
    }

    .toc-sidebar {
        position: static;
        max-height: none;
        overflow: visible;
        display: none;
        padding: 16px;
        margin: 0 16px;
        background: #1A1A1A;
        border: 1px solid #2A2A2A;
        border-radius: 8px;
    }

    .toc-sidebar.open {
        display: block;
    }

    .toc-mobile-toggle {
        display: block;
    }

    .main-content {
        padding: 16px 0;
    }

    .main-content h1 {
        font-size: 26px;
    }

    .main-content h2 {
        font-size: 20px;
    }

    .breadcrumb {
        padding: 12px 16px 0;
    }

    .hub-container {
        padding: 32px 16px;
    }

    .hub-container h1 {
        font-size: 28px;
    }

    .card-langs {
        flex-wrap: wrap;
    }

    .footer-links {
        flex-direction: column;
        gap: 8px;
    }
}
