/* ============================================
   ADS Notes — Neon Light Theme Stylesheet
   ============================================ */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #0d0d18;
    --bg-tertiary: #111125;
    --bg-card: #12122a;
    --bg-hover: #1a1a3e;
    --neon-cyan: #00f0ff;
    --neon-magenta: #ff00ff;
    --neon-purple: #b300ff;
    --neon-green: #39ff14;
    --neon-pink: #ff2d95;
    --text-primary: #e0e0f0;
    --text-secondary: #9090b0;
    --text-muted: #606080;
    --border-color: #1e1e3a;
    --glow-cyan: 0 0 10px #00f0ff66, 0 0 20px #00f0ff33;
    --glow-magenta: 0 0 10px #ff00ff66, 0 0 20px #ff00ff33;
    --glow-purple: 0 0 10px #b300ff66, 0 0 20px #b300ff33;
    --font-body: 'Inter', sans-serif;
    --font-code: 'Fira Code', monospace;
    --font-display: 'Orbitron', sans-serif;
    --content-font-size: 16px;
    --sidebar-width: 300px;
    --header-height: 60px;
    --transition: 0.3s ease;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta), var(--neon-purple));
    z-index: 10000;
    transition: width 0.1s linear;
    box-shadow: var(--glow-cyan);
}

/* ============================================
   HEADER
   ============================================ */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 16px;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

#sidebar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    width: 36px;
    height: 36px;
}

#sidebar-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--neon-cyan);
    border-radius: 2px;
    transition: var(--transition);
    box-shadow: 0 0 6px var(--neon-cyan);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 24px;
}

.logo h1 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan), 0 0 30px #00f0ff44;
    letter-spacing: 2px;
    white-space: nowrap;
}

.search-wrapper {
    position: relative;
    flex: 1;
    max-width: 400px;
}

#search-input {
    width: 100%;
    padding: 8px 14px 8px 36px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

#search-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 8px #00f0ff44;
}

#search-input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    pointer-events: none;
}

.header-controls {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.header-controls button {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.header-controls button:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 8px #00f0ff44;
}

/* ============================================
   LAYOUT
   ============================================ */
#app {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* ============================================
   SIDEBAR
   ============================================ */
#sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    overflow-x: hidden;
    position: fixed;
    top: var(--header-height);
    left: 0;
    z-index: 900;
    transition: transform 0.3s ease;
    padding: 10px 0;
}

#sidebar::-webkit-scrollbar {
    width: 4px;
}

#sidebar::-webkit-scrollbar-track {
    background: transparent;
}

#sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--neon-cyan);
}

/* File Tree */
.tree-folder {
    user-select: none;
}

.tree-folder-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    cursor: pointer;
    transition: var(--transition);
    border-left: 3px solid transparent;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.tree-folder-header:hover {
    background: var(--bg-hover);
    border-left-color: var(--neon-purple);
}

.tree-folder-header .folder-icon {
    font-size: 16px;
    transition: var(--transition);
    flex-shrink: 0;
}

.tree-folder-header .folder-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-folder-header .folder-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    color: var(--text-muted);
    flex-shrink: 0;
}

.tree-folder-header.expanded .folder-arrow {
    transform: rotate(90deg);
}

.tree-folder-children {
    display: none;
    padding-left: 12px;
}

.tree-folder-children.expanded {
    display: block;
}

.tree-file {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 8px 28px;
    cursor: pointer;
    transition: var(--transition);
    border-left: 3px solid transparent;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
}

.tree-file:hover {
    background: var(--bg-hover);
    color: var(--neon-cyan);
    border-left-color: var(--neon-cyan);
}

.tree-file.active {
    background: var(--bg-hover);
    color: var(--neon-cyan);
    border-left-color: var(--neon-cyan);
    box-shadow: inset 3px 0 8px -3px var(--neon-cyan);
}

.tree-file .file-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.tree-file .file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-file.hidden, .tree-folder.hidden {
    display: none;
}

/* Sidebar Loading */
.sidebar-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 16px;
}

.sidebar-loading p {
    color: var(--text-muted);
    font-size: 13px;
}

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

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

/* Sidebar Overlay (mobile) */
#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 850;
}

/* File count badges */
.folder-badge {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
#content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px 40px 60px;
    max-width: 100%;
    min-height: calc(100vh - var(--header-height));
    position: relative;
    overflow-x: hidden;
}

/* Breadcrumb */
#breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-muted);
    min-height: 20px;
}

#breadcrumb .crumb {
    color: var(--text-secondary);
    transition: var(--transition);
}

#breadcrumb .crumb:hover {
    color: var(--neon-cyan);
    cursor: pointer;
}

#breadcrumb .crumb-sep {
    color: var(--text-muted);
    font-size: 11px;
}

#breadcrumb .crumb-active {
    color: var(--neon-cyan);
    text-shadow: 0 0 8px #00f0ff44;
}

/* Document Meta */
#doc-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
}

#doc-meta span::before {
    margin-right: 6px;
}

/* ============================================
   WELCOME SCREEN
   ============================================ */
#welcome {
    text-align: center;
    padding: 60px 20px;
    position: relative;
}

.welcome-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #00f0ff08 0%, transparent 70%);
    pointer-events: none;
}

.welcome-title {
    font-family: var(--font-display);
    font-size: clamp(24px, 4vw, 42px);
    color: var(--neon-cyan);
    text-shadow: 0 0 20px #00f0ff66, 0 0 40px #00f0ff22;
    margin-bottom: 16px;
    position: relative;
    letter-spacing: 2px;
}

.welcome-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto 40px;
}

.subject-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px 16px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.subject-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.subject-card:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px #00f0ff22, 0 4px 20px rgba(0,0,0,0.3);
    transform: translateY(-3px);
}

.subject-card:hover::before {
    opacity: 1;
}

.subject-card .card-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.subject-card .card-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.subject-card .card-count {
    font-size: 12px;
    color: var(--text-muted);
}

.welcome-hint {
    color: var(--text-muted);
    font-size: 14px;
}

.welcome-hint kbd {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 8px;
    font-family: var(--font-code);
    font-size: 12px;
    color: var(--neon-cyan);
}

/* ============================================
   MARKDOWN BODY
   ============================================ */
#markdown-body {
    font-size: var(--content-font-size);
    line-height: 1.85;
    max-width: 860px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#markdown-body h1, #markdown-body h2, #markdown-body h3,
#markdown-body h4, #markdown-body h5, #markdown-body h6 {
    font-family: var(--font-body);
    color: var(--text-primary);
    margin-top: 2em;
    margin-bottom: 0.8em;
    line-height: 1.3;
    position: relative;
}

#markdown-body h1 {
    font-size: 2em;
    color: var(--neon-cyan);
    text-shadow: 0 0 12px #00f0ff44;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#markdown-body h2 {
    font-size: 1.6em;
    color: var(--neon-cyan);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

#markdown-body h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-cyan), transparent);
    box-shadow: 0 0 8px var(--neon-cyan);
}

#markdown-body h3 {
    font-size: 1.3em;
    color: #c0c0ff;
}

#markdown-body h4, #markdown-body h5, #markdown-body h6 {
    font-size: 1.1em;
    color: var(--text-secondary);
}

#markdown-body p {
    margin-bottom: 1.2em;
}

/* Links */
#markdown-body a {
    color: var(--neon-cyan);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

#markdown-body a:hover {
    border-bottom-color: var(--neon-cyan);
    text-shadow: 0 0 8px #00f0ff66;
}

/* Code */
#markdown-body code {
    font-family: var(--font-code);
    font-size: 0.9em;
}

#markdown-body :not(pre) > code {
    background: var(--bg-tertiary);
    color: var(--neon-pink);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    font-size: 0.85em;
    white-space: nowrap;
}

#markdown-body pre {
    position: relative;
    margin: 1.5em 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #1a1b2e !important;
}

#markdown-body pre code {
    display: block;
    padding: 20px;
    overflow-x: auto;
    font-size: 0.88em;
    line-height: 1.6;
    background: transparent !important;
    white-space: pre;
}

#markdown-body pre code::-webkit-scrollbar {
    height: 6px;
}

#markdown-body pre code::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* Code block header */
.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    background: #14152a;
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-code);
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-family: var(--font-body);
    transition: var(--transition);
}

.copy-btn:hover {
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
}

.copy-btn.copied {
    color: var(--neon-green);
    border-color: var(--neon-green);
}

/* Blockquotes */
#markdown-body blockquote {
    margin: 1.5em 0;
    padding: 16px 20px;
    border-left: 4px solid var(--neon-purple);
    background: #12122a;
    border-radius: 0 8px 8px 0;
    color: var(--text-secondary);
    box-shadow: inset 4px 0 12px -4px #b300ff44;
}

#markdown-body blockquote p:last-child {
    margin-bottom: 0;
}

/* Tables */
#markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95em;
    overflow-x: auto;
    display: block;
}

#markdown-body thead {
    background: var(--bg-tertiary);
}

#markdown-body th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    color: var(--neon-cyan);
    border-bottom: 2px solid var(--neon-cyan);
    white-space: nowrap;
}

#markdown-body td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
}

#markdown-body tbody tr:nth-child(even) {
    background: #0f0f20;
}

#markdown-body tbody tr:hover {
    background: var(--bg-hover);
}

/* Lists */
#markdown-body ul, #markdown-body ol {
    margin: 1em 0;
    padding-left: 1.8em;
}

#markdown-body li {
    margin-bottom: 0.5em;
}

#markdown-body ul > li::marker {
    color: var(--neon-cyan);
}

#markdown-body ol > li::marker {
    color: var(--neon-purple);
    font-weight: 600;
}

/* Images */
#markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin: 1em 0;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
    transition: var(--transition);
}

#markdown-body img:hover {
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.2);
}

/* Horizontal Rule */
#markdown-body hr {
    border: none;
    height: 2px;
    margin: 2em 0;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-purple), transparent);
    box-shadow: 0 0 8px #00f0ff44;
}

/* Strong & Em */
#markdown-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

#markdown-body em {
    color: var(--text-secondary);
    font-style: italic;
}

/* ============================================
   SCROLL TO TOP
   ============================================ */
#scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    font-size: 20px;
    cursor: pointer;
    z-index: 500;
    transition: var(--transition);
    box-shadow: 0 0 10px #00f0ff44;
    display: flex;
    align-items: center;
    justify-content: center;
}

#scroll-top:hover {
    background: var(--neon-cyan);
    color: var(--bg-primary);
    box-shadow: 0 0 20px #00f0ff66;
}

/* ============================================
   TABLE OF CONTENTS
   ============================================ */
#toc-toggle {
    position: fixed;
    bottom: 85px;
    right: 30px;
    background: var(--bg-card);
    border: 1px solid var(--neon-purple);
    color: var(--neon-purple);
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-family: var(--font-body);
    z-index: 500;
    transition: var(--transition);
    box-shadow: 0 0 10px #b300ff44;
}

#toc-toggle:hover {
    background: var(--neon-purple);
    color: #fff;
    box-shadow: 0 0 20px #b300ff66;
}

#toc-panel {
    position: fixed;
    right: 20px;
    bottom: 130px;
    width: 280px;
    max-height: 50vh;
    background: var(--bg-secondary);
    border: 1px solid var(--neon-purple);
    border-radius: 12px;
    box-shadow: 0 0 20px #b300ff33, 0 10px 30px rgba(0,0,0,0.4);
    z-index: 600;
    transition: opacity 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

#toc-panel.toc-hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
}

.toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.toc-header h3 {
    font-size: 14px;
    color: var(--neon-purple);
    font-weight: 600;
}

#toc-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

#toc-close:hover {
    color: var(--neon-magenta);
}

#toc-list {
    padding: 10px 0;
    overflow-y: auto;
    max-height: calc(50vh - 50px);
}

#toc-list::-webkit-scrollbar {
    width: 3px;
}

#toc-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.toc-item {
    display: block;
    padding: 6px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border-left: 2px solid transparent;
}

.toc-item:hover {
    color: var(--neon-purple);
    background: var(--bg-hover);
    border-left-color: var(--neon-purple);
}

.toc-item.toc-h2 {
    padding-left: 28px;
}

.toc-item.toc-h3 {
    padding-left: 40px;
    font-size: 12px;
}

/* ============================================
   LOADING STATE (Content)
   ============================================ */
.content-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 20px;
}

.content-loading .neon-spinner {
    width: 50px;
    height: 50px;
}

.content-loading p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Error State */
.content-error {
    text-align: center;
    padding: 60px 20px;
}

.content-error h2 {
    color: var(--neon-magenta);
    font-size: 24px;
    margin-bottom: 12px;
    text-shadow: 0 0 12px #ff00ff44;
}

.content-error p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.content-error button {
    background: var(--bg-tertiary);
    border: 1px solid var(--neon-magenta);
    color: var(--neon-magenta);
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: var(--transition);
}

.content-error button:hover {
    background: var(--neon-magenta);
    color: #fff;
}

/* ============================================
   FOOTER
   ============================================ */
#footer {
    text-align: center;
    padding: 20px;
    margin-left: var(--sidebar-width);
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-muted);
    background: var(--bg-secondary);
}

/* ============================================
   FULLSCREEN MODE
   ============================================ */
body.fullscreen #sidebar,
body.fullscreen #sidebar-overlay,
body.fullscreen #footer {
    display: none !important;
}

body.fullscreen #content {
    margin-left: 0;
    padding: 30px 60px 60px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

body.fullscreen #footer {
    margin-left: 0;
}

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

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

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

    #sidebar.open ~ #sidebar-overlay {
        display: block;
    }

    #content {
        margin-left: 0;
        padding: 20px 16px 60px;
    }

    #footer {
        margin-left: 0;
    }

    .logo h1 {
        font-size: 16px;
    }

    .header-controls {
        display: none;
    }

    .search-wrapper {
        max-width: 200px;
    }

    #toc-panel {
        right: 10px;
        width: 260px;
    }

    #scroll-top, #toc-toggle {
        right: 16px;
    }

    body.fullscreen #content {
        padding: 20px 16px 60px;
    }
}

@media (max-width: 500px) {
    .search-wrapper {
        max-width: 140px;
    }

    .logo h1 {
        font-size: 14px;
        letter-spacing: 1px;
    }

    .subjects-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    #header, #sidebar, #sidebar-overlay, #scroll-progress,
    #scroll-top, #toc-toggle, #toc-panel, #footer, #breadcrumb,
    #doc-meta, #welcome, .code-block-header,
    .header-controls {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    #content {
        margin: 0;
        padding: 0;
        max-width: 100%;
    }

    #markdown-body {
        font-size: 12pt;
        color: #000;
        max-width: 100%;
    }

    #markdown-body h1, #markdown-body h2, #markdown-body h3 {
        color: #000;
        -webkit-text-fill-color: #000;
        background: none;
        text-shadow: none;
    }

    #markdown-body h2::after {
        display: none;
    }

    #markdown-body a {
        color: #0066cc;
    }

    #markdown-body pre {
        border: 1px solid #ccc;
        background: #f5f5f5 !important;
    }

    #markdown-body pre code {
        color: #000;
        background: transparent !important;
    }

    #markdown-body :not(pre) > code {
        background: #eee;
        color: #c00;
        border-color: #ccc;
    }

    #markdown-body blockquote {
        border-left-color: #999;
        background: #f9f9f9;
        color: #333;
    }

    #markdown-body table {
        display: table;
    }

    #markdown-body th {
        color: #000;
        border-bottom-color: #000;
    }

    #markdown-body td {
        border-bottom-color: #ccc;
    }

    #markdown-body img {
        box-shadow: none;
        border-color: #ccc;
    }
}

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

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 5px #00f0ff33; }
    50% { box-shadow: 0 0 20px #00f0ff66; }
}

.glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
}

/* Search highlight */
.search-highlight {
    background: #ff00ff44;
    border-radius: 2px;
    padding: 0 2px;
}

/* ============================================
   OFFLINE BANNER
   ============================================ */
#offline-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    margin-bottom: 16px;
    background: linear-gradient(90deg, #1a1a0a, #2a2a10);
    border: 1px solid #aaaa00;
    border-radius: 8px;
    font-size: 13px;
    color: #eeee44;
    box-shadow: 0 0 10px #aaaa0033;
    animation: fadeIn 0.4s ease;
}

#offline-banner.error-banner {
    border-color: var(--neon-magenta);
    background: linear-gradient(90deg, #1a0a0a, #2a1010);
    color: var(--neon-magenta);
    box-shadow: 0 0 10px #ff00ff33;
}