:root {
    --bg-main: #0b0b0f;
    --bg-sidebar: rgba(13, 13, 18, 0.85);
    --bg-card: rgba(22, 22, 30, 0.65);
    --bg-elevated: rgba(30, 30, 42, 0.85);

    --accent: #e9204f;
    --accent-glow: rgba(233, 32, 79, 0.45);
    --accent-hover: #ff3d6a;
    --accent-muted: rgba(233, 32, 79, 0.1);

    --accent-blue: #00b4ff;
    --accent-blue-hover: #33c4ff;
    --accent-blue-glow: rgba(0, 180, 255, 0.4);
    --accent-blue-muted: rgba(0, 180, 255, 0.1);

    --text-primary: #ffffff;
    --text-secondary: #e2e2e8;
    --text-muted: #8e949e;

    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(233, 32, 79, 0.4);

    --sidebar-width: 300px;
    --top-bar-height: 72px;

    --glass: blur(16px) saturate(180%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.8);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-title: 'Montserrat', var(--font-sans);
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

::selection {
    background: var(--accent);
    color: white;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.mobile-only {
    display: none !important;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#app-body {
    display: flex;
    flex: 1;
    width: 100%;
    position: relative;
}

/* ---- SIDEBAR ---- */
#sidebar {
    width: 280px;
    background-color: rgba(22, 22, 30, 0.65);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: 20px;
    margin: 1.5rem;
    height: calc(100vh - var(--top-bar-height) - 3rem);
    position: sticky;
    top: calc(var(--top-bar-height) + 1.5rem);
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    z-index: 900;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-title);
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px var(--accent-glow));
    animation: pulse 2s infinite ease-in-out;
    transition: transform 0.3s ease;
}

.logo:hover .logo-img {
    transform: scale(1.1) rotate(5deg);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px var(--accent-glow)); }
    50% { transform: scale(1.05); filter: drop-shadow(0 0 15px var(--accent)); }
}

.logo-text {
    background: linear-gradient(90deg, #00b4ff 0%, #ffffff 50%, #ff2a4b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.15));
}

/* Search */
.sidebar-search {
    padding: 1.5rem 1.25rem 1.25rem;
    position: relative;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.search-icon {
    color: var(--text-muted);
    margin-right: 0.75rem;
    flex-shrink: 0;
}

#search-input {
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    width: 100%;
    outline: none;
}

.search-kbd {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border);
    margin-left: 0.5rem;
    white-space: nowrap;
}

#search-results {
    position: absolute;
    top: 100%;
    left: 1.25rem;
    right: 1.25rem;
    background: var(--bg-elevated);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1100;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    padding: 0.5rem;
    margin-top: 8px;
}

#search-results.active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.search-result-item {
    display: flex;
    flex-direction: column;
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: var(--text-primary);
    border-radius: 8px;
    transition: var(--transition);
    border: 1px solid transparent;
    margin-bottom: 2px;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
}

.search-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 4px;
}

.search-result-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.search-result-path {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.search-result-snippet {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.search-result-snippet mark {
    background: rgba(255, 62, 62, 0.2);
    color: var(--accent);
    font-weight: 600;
    border-radius: 2px;
    padding: 0 2px;
}

/* Nav Menu */
#nav-menu {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    mask-image: linear-gradient(to bottom, transparent, black 2%, black 98%, transparent);
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section-title {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 4px;
    border: 1px solid transparent;
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-muted);
    color: var(--accent);
    border-color: rgba(255, 62, 62, 0.2);
    font-weight: 600;
}

.nav-item-wrapper {
    position: relative;
}

.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.1);
    margin-left: 0.5rem;
    border-left: 1px solid var(--border);
    border-radius: 0 0 0 12px;
}

.nav-item-wrapper.open>.nav-submenu {
    margin-top: 2px;
    margin-bottom: 8px;
}

.has-submenu {
    justify-content: space-between !important;
}

.chevron {
    transition: transform 0.3s ease;
    opacity: 0.5;
}

.nav-item-wrapper.open>.has-submenu .chevron {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--accent);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---- MAIN CONTENT ---- */
#main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: transparent;
}

#content-render {
    flex: 1;
    padding: 2rem 4rem 6rem;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

#top-bar {
    height: var(--top-bar-height);
    background-color: rgba(11, 11, 15, 0.85);
    backdrop-filter: var(--glass);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3rem;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

#breadcrumbs {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#breadcrumbs span {
    color: var(--text-secondary);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.top-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.top-action-btn:hover {
    background: var(--accent-muted);
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* ---- MARKDOWN ---- */
.markdown-body {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.markdown-body h1 {
    font-family: var(--font-title);
    font-size: 3rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 2rem;
    letter-spacing: -0.04em;
    line-height: 1.1;
    position: relative;
    text-transform: uppercase;
}

.markdown-body h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 5px;
    background: var(--accent);
    margin-top: 1rem;
    border-radius: 3px;
    box-shadow: 0 0 15px var(--accent-glow);
}

.markdown-body h2 {
    font-family: var(--font-title);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 3.5rem 0 1.5rem;
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: 15px;
}

.markdown-body h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 60px;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
    border-radius: 5px;
}

.markdown-body h3 {
    font-family: var(--font-title);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2.5rem 0 1rem;
}

.markdown-body h4 {
    font-family: var(--font-title);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
}

.markdown-body a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border-bottom: 1px dashed rgba(0, 180, 255, 0.4);
}

.markdown-body a:hover {
    color: var(--accent-blue-hover);
    border-bottom-style: solid;
    border-bottom-color: var(--accent-blue);
    text-shadow: 0 0 8px var(--accent-blue-glow);
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
    background: rgba(22, 22, 30, 0.4);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.markdown-body th {
    background: rgba(233, 32, 79, 0.06);
    color: var(--text-primary);
    font-family: var(--font-title);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 2px solid rgba(233, 32, 79, 0.2);
}

.markdown-body td {
    padding: 1rem 1.25rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.markdown-body tr:last-child td {
    border-bottom: none;
}

.markdown-body tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.01);
}

.markdown-body tr:hover td {
    background: rgba(233, 32, 79, 0.02);
    color: var(--text-primary);
}

.markdown-body p {
    margin-bottom: 1.5rem;
}

.markdown-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.markdown-body ul,
.markdown-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.markdown-body li {
    margin-bottom: 0.75rem;
}

.markdown-body ul {
    list-style: none;
    padding-left: 0.5rem;
}

.markdown-body ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.markdown-body ul li::before {
    content: '➔';
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--accent);
    font-size: 0.9rem;
    text-shadow: 0 0 8px var(--accent-glow);
}

.markdown-body blockquote {
    background: var(--bg-card);
    border-left: 4px solid var(--accent);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 0 16px 16px 0;
    font-style: italic;
    color: var(--text-primary);
}

.markdown-body pre {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.markdown-body code {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.markdown-body code:not(pre code) {
    background: var(--bg-card);
    color: var(--accent);
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.markdown-body hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 3rem 0;
}

/* Homepage Hero */
.hero-section {
    padding: 0 0 2rem;
    text-align: center;
    animation: slideUp 0.8s ease-out;
}

.hero-section h1 {
    font-family: var(--font-title);
    font-size: 4rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: -2px;
    line-height: 1;
    background: linear-gradient(to bottom, #fff, #999);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 1.75rem;
}

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

.btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px var(--accent);
    background: var(--accent-hover);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
    border-color: var(--text-muted);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 5rem 0;
}

.feature-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 2rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Categories Display */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.category-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    transition: var(--transition);
    text-align: center;
}

.category-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-lg);
}

.category-card .feature-icon {
    font-size: 3.5rem;
}

.category-card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 1rem 0 0.75rem;
}

.category-card .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.category-links {
    list-style: none;
    padding: 0;
    text-align: left;
}

.category-links li {
    margin-bottom: 0.5rem;
}

.category-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

.category-links a:hover {
    background: var(--accent-muted);
    color: var(--accent);
    padding-left: 1rem;
}

/* ---- CALLOUT CARDS ---- */
.callout-card {
    background: rgba(22, 22, 30, 0.45);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-left: 5px solid var(--accent);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.callout-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.callout-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    font-family: var(--font-title);
}

.callout-icon {
    font-size: 1.1rem;
}

.callout-body {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.callout-body p:last-child {
    margin-bottom: 0;
}

.callout-note { border-left-color: var(--accent-blue); }
.callout-note .callout-title { color: var(--accent-blue); }
.callout-info { border-left-color: #3b82f6; }
.callout-info .callout-title { color: #3b82f6; }
.callout-tip { border-left-color: #22c55e; }
.callout-tip .callout-title { color: #22c55e; }
.callout-warning { border-left-color: #f59e0b; }
.callout-warning .callout-title { color: #f59e0b; }
.callout-important { border-left-color: var(--accent); }
.callout-important .callout-title { color: var(--accent); }
.callout-caution { border-left-color: #a855f7; }
.callout-caution .callout-title { color: #a855f7; }

/* ---- CODE BLOCKS ---- */
.code-block-container {
    margin: 2rem 0;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(11, 11, 15, 0.65);
    backdrop-filter: var(--glass);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.code-block-container:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(233, 32, 79, 0.2);
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border);
}

.code-block-dots {
    display: flex;
    gap: 0.5rem;
}

.code-block-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.code-block-dots .dot.red { background-color: #ff5f56; }
.code-block-dots .dot.yellow { background-color: #ffbd2e; }
.code-block-dots .dot.green { background-color: #27c93f; }

.code-block-lang {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    font-family: var(--font-title);
    letter-spacing: 0.1em;
}

.code-block-container pre {
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 1.25rem 1.5rem !important;
}

/* ---- GLOBAL BANNER ---- */
#global-banner {
    position: relative;
    height: 120px;
    width: 100%;
    background: linear-gradient(135deg, #0b0b0f 0%, #1a0a0e 50%, #0b0b1a 100%);
    display: none;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.global-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(11, 11, 15, 0.2) 0%, rgba(11, 11, 15, 0.6) 60%, #0b0b0f 100%);
    z-index: 1;
}

.global-banner-content {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 4rem;
    z-index: 2;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

#global-banner #breadcrumbs {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
    flex-shrink: 0;
}

#global-banner #breadcrumbs span {
    color: var(--accent);
    text-shadow: 0 0 8px rgba(233, 32, 79, 0.25);
}

#global-banner-title {
    font-family: var(--font-title);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-primary);
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 0 20px rgba(233, 32, 79, 0.2);
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
}

/* ---- TABLE WRAP ---- */
.table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 2rem 0;
}

.csv-table th {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 2px solid var(--accent);
    padding: 1.25rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.csv-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.csv-table tr:last-child td {
    border-bottom: none;
}

.csv-table tr:hover td {
    background: rgba(255, 62, 62, 0.03);
    color: var(--text-primary);
}

/* ---- COPY BUTTON ---- */
.copy-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
}

pre:hover .copy-btn {
    opacity: 1;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.copy-btn.success {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
    color: #4ade80;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
    animation: successPulse 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1.05); }
}

.copy-btn .icon-copy,
.copy-btn .icon-check {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}

.copy-btn .icon-check { display: none; }
.copy-btn.success .icon-copy { display: none; }
.copy-btn.success .icon-check {
    display: inline-block;
    animation: bounceIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ---- ORBS ---- */
.bg-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, #050508 0%, #020204 100%);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
    animation: floatOrb 25s infinite alternate ease-in-out;
}

.orb-1 {
    width: 55vw;
    height: 55vw;
    background: var(--accent);
    top: -20%;
    left: -10%;
}

.orb-2 {
    width: 45vw;
    height: 45vw;
    background: #50000a;
    bottom: -10%;
    right: -10%;
    animation-delay: -7s;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(8vw, 12vh) scale(1.15); }
}

/* ---- FAB ---- */
#fab-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 32px var(--accent-glow);
    z-index: 800;
    transition: var(--transition);
    opacity: 0;
    pointer-events: none;
}

#fab-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#fab-top:hover {
    transform: translateY(-5px) rotate(5deg);
    box-shadow: 0 12px 40px var(--accent);
}

/* ---- OVERLAY ---- */
#sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 950;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

#sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ---- FOOTER ---- */
#page-footer {
    padding: 3rem 4rem;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
    margin-top: auto;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
}

/* ---- SPINNER ---- */
.content-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-container {
    text-align: center;
    padding: 4rem 2rem;
}

.error-container h1 {
    font-family: var(--font-title);
    font-size: 6rem;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 1rem;
}

.error-container p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.error-container small {
    color: var(--text-muted);
}

/* ---- ANIMATIONS ---- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1200px) {
    #sidebar {
        --sidebar-width: 260px;
    }
}

@media (max-width: 1024px) {
    html, body { overflow-x: hidden; max-width: 100vw; }

    #sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        margin: 0 !important;
        height: 100vh !important;
        height: 100dvh !important;
        border-radius: 0 !important;
        width: 280px !important;
        transform: translateX(-100%);
        z-index: 2000 !important;
        background-color: rgba(11, 11, 15, 0.98) !important;
        border: none !important;
        border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    #sidebar.open {
        transform: translateX(0) !important;
        box-shadow: 20px 0 60px rgba(0, 0, 0, 0.9) !important;
    }

    #main-content { margin-left: 0; }
    .mobile-only { display: block !important; }

    .sidebar-header.mobile-only {
        display: flex !important;
        padding: 2rem 1.5rem 0.5rem !important;
        align-items: center;
        justify-content: space-between;
    }

    #top-bar { padding: 0 1.5rem; }
    .markdown-body h1 { font-size: 2.5rem; }
}

@media (max-width: 900px) {
    #content-render { padding: 2rem 1.5rem; }
    .hero-section h1 { font-size: 2.5rem; }
    .features-grid { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    #global-banner {
        height: 100px;
    }
    .global-banner-content {
        padding: 0 2rem;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        gap: 0.25rem;
    }
    #global-banner-title { font-size: 1.4rem; }
    #global-banner #breadcrumbs { font-size: 0.75rem; }
    #content-render { padding: 1.5rem; }
}

@media (max-width: 500px) {
    #top-bar { padding: 0 0.5rem; }
    .top-bar-left { gap: 0.5rem; }
    .logo-text { display: none !important; }
    .markdown-body h1 { font-size: 1.6rem; }
    .markdown-body h2 { font-size: 1.25rem; }
    #content-render { padding: 1.5rem 1rem; }
}
