/* GitBook-like Style */
:root {
    --bg-header: #FAF5E1;
    --header-text-color: #4a4a4a;
    --search-box-bg: rgba(255,255,255,0.5);
    --search-box-text: #4a4a4a;
    --search-box-icon: #6b6b6b;
    --bg-sidebar: #faf4e0;
    --sidebar-group-title: #9b9b9b;
    --sidebar-item-color: #6b6b6b;
    --sidebar-item-active: #725FA1;
    --sidebar-item-active-bg: rgba(114,95,161,0.08);
    --bg-content: #ffffff;
    --text-primary: #1d1d21;
    --text-link: #725FA1;
    --border-color: #e8e8e8;
    --sidebar-width: 260px;
    --header-height: 72px;
    --header-blur: 3px;
    --header-bg-opacity: 0.3;
    --header-cloud-opacity: 0.2;
    --header-offset-x: 12px;
    --header-offset-y: 8px;
    --header-glass-height: 56px;
    --header-radius: 22px;
    --header-fade-start: 80%;
    --header-fade-extend: 16px;
    --radius-small: 4px;
    --radius-medium: 8px;
    --radius-large: 12px;
    --radius-button: 6px;
    --radius-tab: 0 0.8em 0.8em 0;
    --radius-pill: 20px;
    --scrollbar-width: 6px;
    --scrollbar-thumb-radius: 3px;
    --sidebar-border-color: #e8e8e8;
    --scrollbar-thumb-color: #ccc;
    --scrollbar-thumb-hover-color: #aaa;
    --sidebar-scrollbar-thumb-color: #ccc;
    --sidebar-scrollbar-thumb-hover-color: #aaa;
    --header-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    --sidebar-shadow: 4px 0 12px rgba(0, 0, 0, 0.08);
    --article-block-bg: rgba(255, 255, 255, 0.20);
    --article-block-blur: 32px;
    --scrollbar-glass-color: rgba(41, 40, 41, 0.65);
}

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

html, body {
    height: 100vh;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: transparent;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Top Header */
.header-glass-webgl {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 899;
    pointer-events: none;
    border-radius: 0;
    overflow: visible;
    background: rgba(255, 255, 255, 0.001);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
}

.top-header {
    position: fixed;
    top: var(--header-offset-y);
    left: var(--header-offset-x);
    right: var(--header-offset-x);
    height: var(--header-glass-height);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 1000;
    overflow: hidden;
    isolation: isolate;
    border-radius: var(--header-radius);
    border: none;
    box-shadow: var(--header-shadow);
    will-change: transform;
}

.image-background {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    background: #17243b;
}


.glass-control {
    position: fixed;
    right: calc(var(--header-offset-x) + 16px);
    top: calc(var(--header-offset-y) + var(--header-height) + 8px);
    z-index: 1003;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(100vh - var(--header-height) - 28px);
    overflow-y: auto;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(28, 32, 34, 0.38);
    color: rgba(255, 255, 255, 0.86);
    font-size: 12px;
    line-height: 1;
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    backdrop-filter: blur(10px) saturate(140%);
    box-shadow: 0 8px 22px rgba(20, 24, 28, 0.18);
}

.glass-control-section {
    display: grid;
    grid-template-columns: 96px 150px 44px;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    width: 100%;
}

.glass-control-section h2 {
    grid-column: 1 / -1;
    margin: 0 0 2px;
    color: rgba(139, 232, 255, 0.95);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
}

.glass-control input {
    width: 150px;
    accent-color: #8be8ff;
}

.glass-control label {
    white-space: nowrap;
}

.glass-control output {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* Optional cream tint (now controlled via --header-bg-opacity, set to 0 for pure glass) */
.top-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 252, 240, var(--header-bg-opacity));
    z-index: -3;
    pointer-events: none;
    border-radius: inherit;
}

.top-header > * {
    position: relative;
    z-index: 1;
}

.header-left {
    display: flex;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
    width: 176px;
    height: 40px;
    padding: 0;
    line-height: 1;
    flex: 0 0 auto;
    align-self: center;
    justify-content: center;
    transform: none;
    position: relative;
    isolation: isolate;
    background: none;
    border-radius: 12px;
    box-shadow: none;
}

.site-logo::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 12px;
    background: rgba(24, 38, 56, 0.34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 3px 10px rgba(12, 22, 34, 0.12);
}

.logo-icon:empty { display: none; }

.site-logo:hover {
    opacity: 0.7;
}

.logo-icon {
    width: auto;
    height: 32px;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--header-text-color);
    font-weight: 700;
    font-size: 1.25rem;
    padding: 0 0.25rem;
}

.logo-text {
    font-weight: 600;
    font-size: 1rem;
    color: transparent;
    background:
        radial-gradient(ellipse 50% 70% at 25% 35%, rgba(255, 180, 200, 0.95) 0%, transparent 60%),
        radial-gradient(ellipse 55% 65% at 75% 65%, rgba(180, 210, 255, 0.95) 0%, transparent 60%),
        radial-gradient(ellipse 45% 55% at 50% 50%, rgba(255, 250, 230, 1) 0%, transparent 55%),
        radial-gradient(ellipse 40% 50% at 80% 25%, rgba(120, 255, 180, 0.9) 0%, transparent 55%),
        radial-gradient(ellipse 50% 60% at 30% 70%, rgba(255, 200, 150, 0.92) 0%, transparent 55%),
        radial-gradient(ellipse 55% 50% at 70% 30%, rgba(170, 160, 255, 0.9) 0%, transparent 55%),
        #faf8f0;
    background-size: 300% 300%;
    background-position: 50% 50%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: gradient-shift 8s ease-in-out infinite;
}

.header-right {
    display: flex;
    align-items: center;
    height: 100%;
}

.search-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 32px;
    padding: 0.2rem 0.65rem;
    background: var(--search-box-bg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: var(--search-box-text);
    font-size: 0.875rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0;
    align-self: center;
}

.search-trigger:hover {
    background: rgba(255, 255, 255, 0.25);
}

.search-trigger i {
    font-size: 0.875rem;
    color: var(--search-box-icon);
}

.search-trigger span {
    opacity: 0.8;
}

.search-trigger kbd {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: inherit;
    margin-left: 0.5rem;
}

/* App Layout */
#app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: var(--header-offset-x);
    top: calc(var(--header-offset-y) + var(--header-glass-height) + 12px);
    width: calc(var(--sidebar-width) - (var(--header-offset-x) * 2));
    height: calc(100vh - var(--header-offset-y) - var(--header-glass-height) - 24px);
    z-index: 900;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: none;
    border-radius: var(--header-radius);
    box-shadow:
        var(--sidebar-shadow),
        inset 0 -2px 8px rgba(20, 24, 28, 0.10);
    overflow: visible;
    padding: 1rem 0 2rem 0;
    will-change: transform;
}
.top-header,
.sidebar {
    transition: transform 380ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.top-header {
    --glass-drift-x: 0px;
    --glass-drift-y: 0px;
    --glass-scale-y: 1;
    --glass-origin-y: 50%;
    transform: translate3d(var(--glass-drift-x), var(--glass-drift-y), 0) scaleY(var(--glass-scale-y));
    transform-origin: 50% var(--glass-origin-y);
}

.sidebar {
    --glass-drift-x: 0px;
    --glass-drift-y: 0px;
    --glass-scale-x: 1;
    --glass-scale-y: 1;
    --glass-origin-x: 50%;
    --glass-origin-y: 50%;
    transform: translate3d(var(--glass-drift-x), var(--glass-drift-y), 0) scale(var(--glass-scale-x), var(--glass-scale-y));
    transform-origin: var(--glass-origin-x) var(--glass-origin-y);
    transition: transform 850ms cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar.is-liquid-glass-hover,
.sidebar.is-sidebar-animating {
    transition: none;
}

/* Sidebar collapse button */
.sidebar-collapse-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    color: var(--sidebar-item-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    opacity: 0.45;
    z-index: 10;
    padding: 0;
}
.sidebar-collapse-btn {
    will-change: transform;
    backface-visibility: hidden;
}

/* Collapsed sidebar state */
.sidebar.sidebar-collapsed {
    overflow: hidden;
    cursor: pointer;
}
.sidebar.sidebar-collapsed .main-nav {
    opacity: 0;
    pointer-events: none;
}

/* Sidebar scrollbar (separately themeable from page scrollbar) */
.sidebar::-webkit-scrollbar {
    display: none;
}
.sidebar { scrollbar-width: none; }
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: var(--scrollbar-glass-color);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: var(--radius-pill);
}
.sidebar::-webkit-scrollbar-thumb:hover { background: var(--sidebar-scrollbar-thumb-hover-color); }

.main-nav {
    padding: 0 0 1.5rem 0;
    overflow: visible;
}

/* Navigation Groups */
.nav-group {
    margin-bottom: 0.5rem;
}

.nav-group-title {
    padding: 0.75rem 1.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sidebar-group-title);
}

.nav-group-items {
    padding: 0;
}

/* Navigation Items */
.nav-item {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.5rem 1.25rem;
    margin: 6px 0;
    color: var(--sidebar-item-color);
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.4;
    cursor: pointer;
    border-radius: var(--radius-tab);
    position: relative;
    overflow: visible;
    z-index: 0;
    transform: perspective(300px) rotateY(0deg) scale(1);
    transform-origin: 70% center;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s ease,
                background 0.3s ease,
                color 0.2s ease;
}

.nav-item > i,
.nav-item > span {
    position: relative;
    z-index: 2;
}

/* Hover: white bg, 3D perspective tilt left-big right-small */
.nav-item:not(.active):hover {
    transform: perspective(300px) rotateY(10deg) scale(1.04);
    z-index: 10;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18), 0 2px 4px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.85);
}

/* Gradient layer: only visible on active items, fades in/out on switch */
.nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: 
        radial-gradient(ellipse 50% 70% at 25% 35%, rgba(255, 180, 200, 0.8) 0%, transparent 60%),
        radial-gradient(ellipse 55% 65% at 75% 65%, rgba(180, 210, 255, 0.8) 0%, transparent 60%),
        radial-gradient(ellipse 45% 55% at 50% 50%, rgba(255, 250, 230, 0.85) 0%, transparent 55%),
        radial-gradient(ellipse 40% 50% at 80% 25%, rgba(120, 255, 180, 0.7) 0%, transparent 55%),
        radial-gradient(ellipse 50% 60% at 30% 70%, rgba(255, 200, 150, 0.75) 0%, transparent 55%),
        radial-gradient(ellipse 55% 50% at 70% 30%, rgba(170, 160, 255, 0.7) 0%, transparent 55%),
        #faf8f0;
    background-size: 300% 300%;
    background-position: 50% 50%;
    z-index: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.nav-item.active::before {
    opacity: 1;
    animation: gradient-shift 8s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 30% 30%; }
    25% { background-position: 70% 40%; }
    50% { background-position: 60% 70%; }
    75% { background-position: 30% 60%; }
}

.nav-item:hover {
    color: var(--sidebar-item-active);
}

@keyframes cloud-drift-hover {
    0%, 100% {
        background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%;
    }
    33% {
        background-position: 15% 8%, -8% -8%, 8% 15%, -15% 8%, 15% -8%, -8% 15%;
    }
    66% {
        background-position: -8% -8%, 15% 15%, -15% -8%, 8% -15%, -8% 15%, 15% -8%;
    }
}

.nav-item.active {
    color: #26384d;
    transform: perspective(300px) rotateY(0deg);
}

@keyframes color-rotate1 {
    0%, 100% {
        transform: translate(0%, 0%) scale(1);
        opacity: 1;
    }
    25% {
        transform: translate(20%, -15%) scale(1.1);
        opacity: 0.9;
    }
    50% {
        transform: translate(-15%, 20%) scale(0.95);
        opacity: 0.7;
    }
    75% {
        transform: translate(10%, 10%) scale(1.05);
        opacity: 0.85;
    }
}

@keyframes color-rotate2 {
    0%, 100% {
        transform: translate(0%, 0%) scale(1);
    }
    25% {
        transform: translate(-18%, 12%) scale(1.08);
    }
    50% {
        transform: translate(15%, -18%) scale(0.92);
    }
    75% {
        transform: translate(-8%, -10%) scale(1.02);
    }
}

@keyframes fade-layers {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

.nav-item.active:hover {
    color: #26384d;
}

.nav-item i {
    width: 16px;
    font-size: 0.875rem;
    margin-top: 2px;
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-item span {
    flex: 1;
}

/* Main Content — scroll container so page scrollbar extends full viewport height */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    height: 100vh;
    padding-top: var(--header-height);
    overflow-y: auto;
    background: transparent;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 3rem;
}

/* Content Header Bar */
.content-header-bar {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0;
}

.breadcrumb {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sidebar-item-active);
}

/* Page Content */
.page-content {
    color: var(--text-primary);
}

/* Page Title with Icon */
.page-title-wrapper {
    margin-bottom: 1rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.3;
}

.page-title .page-icon {
    display: inline-flex;
    width: 40px;
    height: 40px;
    background: var(--bg-sidebar);
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 0.5rem;
    vertical-align: middle;
    position: relative;
    top: -2px;
}

/* Markdown Body */
.markdown-body {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.markdown-body h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.markdown-body h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.markdown-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.markdown-body p {
    margin-bottom: 1rem;
    color: var(--text-primary);
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius-medium);
    background: var(--article-block-bg);
    -webkit-backdrop-filter: blur(var(--article-block-blur));
    backdrop-filter: blur(var(--article-block-blur));
}

.markdown-body h2,
.markdown-body h3,
.markdown-body ul,
.markdown-body ol {
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius-medium);
    background: var(--article-block-bg);
    -webkit-backdrop-filter: blur(var(--article-block-blur));
    backdrop-filter: blur(var(--article-block-blur));
}

.markdown-body a {
    color: var(--text-link);
    text-decoration: none;
}

.markdown-body a:hover {
    text-decoration: underline;
}

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

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

.markdown-body blockquote {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--primary-color);
    background: var(--bg-sidebar);
    border-radius: 0 6px 6px 0;
}

.markdown-body pre {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    position: relative;
    background: #3c3836;
}

/* Custom scrollbar for code blocks */
.markdown-body pre {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) rgba(0, 0, 0, 0.2);
}

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

.markdown-body pre::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.markdown-body pre::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.markdown-body pre::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.markdown-body code {
    font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
    font-size: 0.875em;
    background: rgba(114, 95, 161, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 4px;
}

.markdown-body pre code {
    font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    background: transparent;
    padding: 0;
}

.markdown-body pre code.hljs {
    background: transparent;
    padding: 0;
}

/* Make comments more visible in code blocks */
.hljs-comment,
.hljs-quote {
    color: #a89984;
}

/* Line numbers */
.line-number {
    display: inline-block;
    width: 2.5em;
    text-align: right;
    padding-right: 1em;
    margin-right: 0.5em;
    color: rgba(255, 255, 255, 0.3);
    user-select: none;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* Code block copy button */
.code-block-wrapper {
    position: relative;
}

.code-block-wrapper pre {
    padding-top: 2.5rem;
}

.code-block-wrapper .copy-code-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    background: #504945;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.7);
    z-index: 10;
}

.code-block-wrapper:hover .copy-code-btn {
    opacity: 1;
}

.code-block-wrapper .copy-code-btn:hover {
    background: #665c54;
    color: rgba(255, 255, 255, 0.9);
}

.code-block-wrapper .copy-code-btn.copied {
    color: #b8bb26;
}

.markdown-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1rem 0;
}

.markdown-body hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}

/* Content Footer */
.content-footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    color: var(--text-muted);
    gap: 1rem;
}

.loading i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Search Modal */
.search-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
}

.search-modal.active {
    display: flex;
}

.search-modal-content {
    width: 90%;
    max-width: 560px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.search-modal-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    gap: 0.75rem;
}

.search-modal-header i {
    color: var(--text-muted);
    font-size: 1rem;
}

.search-modal-header input {
    flex: 1;
    border: none;
    background: none;
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
}

.search-modal-header input::placeholder {
    color: var(--text-muted);
}

.search-modal-header kbd {
    background: var(--bg-sidebar);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: inherit;
}

.search-results {
    max-height: 50vh;
    overflow-y: auto;
    padding: 0.5rem;
}

.search-result-item {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.search-result-item:hover {
    background: var(--bg-sidebar);
}

.search-result-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.search-result-path {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.search-no-results {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {
    .sidebar {
        z-index: 500;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-wrapper {
        padding: 1.5rem;
    }
    
    .search-trigger span {
        display: none;
    }
    
    .search-trigger kbd {
        display: none;
    }
}

/* Page scrollbar */
::-webkit-scrollbar {
    width: var(--scrollbar-width);
    height: var(--scrollbar-width);
}

::-webkit-scrollbar-track {
    background: transparent;
    scrollbar-width: none;
}

.main-content::-webkit-scrollbar { display: none; }

.page-glass-scrollbar {
    position: fixed;
    top: calc(var(--header-height) + 4px);
    right: 3px;
    bottom: 4px;
    width: var(--scrollbar-width);
    z-index: 1999;
    pointer-events: none;
}

.page-glass-scrollbar-thumb {
    position: absolute;
    inset: 0 0 auto;
    min-height: 32px;
    background: var(--scrollbar-glass-color);
    -webkit-backdrop-filter: blur(16px) saturate(135%);
    backdrop-filter: blur(16px) saturate(135%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: var(--radius-pill);
    box-shadow: inset 0 0 7px rgba(255, 255, 255, 0.18), 0 2px 8px rgba(0, 0, 0, 0.12);
    pointer-events: auto;
    cursor: grab;
}

.page-glass-scrollbar-thumb:active { cursor: grabbing; }

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-glass-color);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-glass-color);
}

/* PDF Viewer */
.pdf-viewer {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-height) - 4rem);
    background: rgba(255, 255, 255, 0.18);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
    backdrop-filter: blur(18px) saturate(135%);
    border: none;
    border-radius: var(--radius-large);
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem 0.75rem;
    border-bottom: none;
    flex-shrink: 0;
}

.pdf-header .page-title {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.pdf-controls {
    display: flex;
    gap: 0.5rem;
}

.pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: rgba(45, 76, 96, 0.28);
    -webkit-backdrop-filter: blur(14px) saturate(135%);
    backdrop-filter: blur(14px) saturate(135%);
    border: none;
    border-radius: var(--radius-medium);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 14px rgba(20, 35, 48, 0.14);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.2s;
    cursor: pointer;
}

.pdf-btn:hover {
    background: rgba(31, 62, 84, 0.42);
    color: var(--text-primary);
}

.pdf-container {
    flex: 1;
    padding: 0.5rem;
    overflow: hidden;
    min-height: 0;
    display: block;
    background: rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

html[data-design-controls="on"] .glass-control {
    display: flex;
}

.pdf-iframe {
    width: 100%;
    height: calc(100vh - var(--header-height) - 5rem);
    border: none;
    border-radius: var(--radius-medium);
    background: rgba(255, 255, 255, 0.72);
}

/* Animation */
.fade-in {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
