:root {
    --color-primary: #000000;
    --color-accent: #0070f3;
    --color-background: #ffffff;
    --color-background-secondary: #fafafa;
    --color-background-tertiary: #f5f5f5;
    --color-text: #000000;
    --color-text-secondary: #666666;
    --color-border: #eaeaea;
    --color-code-bg: #fafafa;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --radius: 8px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    --font-mono: "Fira Code", "Menlo", "Monaco", "Courier New", monospace;
}

[data-theme="dark"] {
    --color-primary: #ffffff;
    --color-accent: #0070f3;
    --color-background: #000000;
    --color-background-secondary: #111111;
    --color-background-tertiary: #1a1a1a;
    --color-text: #ffffff;
    --color-text-secondary: #888888;
    --color-border: #333333;
    --color-code-bg: #111111;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
}

* {
    box-sizing: border-box;
}

body {
    background: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-sans);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

.tsd-page-title {
    background: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    padding: 4rem 0 2rem;
    margin: 0 0 3rem;
}

.tsd-page-title h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    margin: 0;
    color: var(--color-text);
}

.tsd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.tsd-breadcrumb a {
    color: var(--color-text-secondary);
    transition: color 0.2s;
}

.tsd-breadcrumb a:hover {
    color: var(--color-accent);
}

.tsd-navigation {
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    padding: 1rem 0;
}

.tsd-navigation a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.2s;
    font-size: 0.875rem;
}

.tsd-navigation a:hover {
    color: var(--color-text);
    background: var(--color-background-secondary);
}

.tsd-navigation a.current {
    color: var(--color-accent);
    background: var(--color-background-secondary);
    font-weight: 500;
}

.tsd-accordion-summary {
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    transition: background 0.2s;
    user-select: none;
}

.tsd-accordion-summary:hover {
    background: var(--color-background-secondary);
}

.tsd-accordion .tsd-accordion-summary > svg,
.tsd-index-accordion .tsd-accordion-summary > svg {
    position: static !important;
    margin-right: 0.5rem;
}

.tsd-accordion-summary a {
    width: calc(100% - 2rem) !important;
    font-weight: 500;
}

.tsd-panel {
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2rem;
    margin: 2rem 0;
}

.tsd-signature {
    background: var(--color-code-bg) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius) !important;
    padding: 1rem !important;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    overflow-x: auto;
}

.tsd-signatures .tsd-signature {
    border-width: 1px !important;
    margin: 0.5rem 0;
}

.tsd-kind-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tsd-kind-class .tsd-kind-icon {
    background: #0070f3;
    color: white;
}

.tsd-kind-interface .tsd-kind-icon {
    background: #7928ca;
    color: white;
}

.tsd-kind-function .tsd-kind-icon,
.tsd-kind-method .tsd-kind-icon {
    background: #f81ce5;
    color: white;
}

.tsd-kind-property .tsd-kind-icon {
    background: #ff0080;
    color: white;
}

.tsd-kind-enum .tsd-kind-icon {
    background: #79ffe1;
    color: black;
}

#tsd-search {
    border-radius: var(--radius) !important;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    transition: all 0.2s;
    margin-bottom: 1rem;
}

#tsd-search:focus-within {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.1);
}

#tsd-search-input {
    border-radius: var(--radius) !important;
    background: transparent;
    color: var(--color-text);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border: none;
    width: 100%;
}

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

#tsd-search-results {
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-top: 0.5rem;
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
}

#tsd-search-results > li {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    transition: background 0.2s;
}

#tsd-search-results > li:last-child {
    border-bottom: none;
}

#tsd-search-results > li:hover,
#tsd-search-results > li[aria-selected="true"] {
    background: var(--color-background-secondary) !important;
}

code {
    background: var(--color-code-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.875em;
    border: 1px solid var(--color-border);
}

pre {
    background: var(--color-code-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

pre code {
    background: none;
    border: none;
    padding: 0;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.8;
}

.tsd-hierarchy {
    overflow-x: auto !important;
    padding: 1rem;
    background: var(--color-background-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    margin: 1rem 0;
}

.tsd-page-navigation-section > div {
    margin-left: 1rem !important;
}

.tsd-member-summaries {
    margin-left: 1.5rem !important;
}

#tsd-nav-container > li:has(> a:only-child) {
    position: relative !important;
    left: -1rem !important;
}

footer {
    border-top: 1px solid var(--color-border) !important;
    background: var(--color-background) !important;
    padding: 3rem 0 !important;
    margin-top: 4rem;
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

footer a {
    color: var(--color-accent);
    font-weight: 500;
}

.tsd-comment {
    background: var(--color-background-secondary);
    padding: 1rem;
    border-radius: var(--radius);
    border-left: 3px solid var(--color-accent);
    margin: 1rem 0;
    font-size: 0.9375rem;
}

.tsd-typography h1,
.tsd-typography h2,
.tsd-typography h3,
.tsd-typography h4 {
    color: var(--color-text);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.tsd-typography h1 {
    font-size: 2.5rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
}

.tsd-typography h2 {
    font-size: 2rem;
}

.tsd-typography h3 {
    font-size: 1.5rem;
}

.tsd-typography h4 {
    font-size: 1.25rem;
}

.tsd-typography p {
    margin: 1rem 0;
    line-height: 1.7;
}

.tsd-typography ul,
.tsd-typography ol {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.tsd-typography li {
    margin: 0.5rem 0;
}

.tsd-typography blockquote {
    border-left: 3px solid var(--color-accent);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--color-text-secondary);
}

.tsd-typography table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.875rem;
}

.tsd-typography th,
.tsd-typography td {
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    text-align: left;
}

.tsd-typography th {
    background: var(--color-background-secondary);
    font-weight: 600;
}

.tsd-typography tr:hover {
    background: var(--color-background-secondary);
}

.tsd-panel-group {
    margin: 2rem 0;
}

.tsd-index-panel .tsd-index-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.tsd-index-panel .tsd-index-list {
    background: var(--color-background-secondary);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

@media (max-width: 1024px) {
    .tsd-page-title h1 {
        font-size: 2.5rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .tsd-page-title {
        padding: 2rem 0 1rem;
        margin-bottom: 2rem;
    }
    
    .tsd-page-title h1 {
        font-size: 2rem;
    }
    
    .tsd-panel {
        padding: 1.5rem;
    }
    
    .tsd-navigation {
        position: static;
        max-height: none;
    }
    
    .tsd-index-panel .tsd-index-content {
        grid-template-columns: 1fr;
    }
    
    footer {
        padding: 2rem 0 !important;
    }
}

@media (max-width: 480px) {
    .tsd-page-title h1 {
        font-size: 1.75rem;
    }
    
    .tsd-panel {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .tsd-signature {
        font-size: 0.75rem;
    }
    
    .tsd-typography h1 {
        font-size: 1.75rem;
    }
    
    .tsd-typography h2 {
        font-size: 1.5rem;
    }
    
    .tsd-typography h3 {
        font-size: 1.25rem;
    }
}

@media (min-width: 769px) {
    .site-menu {
        margin-right: 1rem !important;
    }
}

@media (min-width: 769px) and (max-width: 1399px) {
    .col-sidebar {
        margin-right: 1rem !important;
    }
    
    #tsd-nav-container {
        width: 100% !important;
    }
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-background);
}

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

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

* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) var(--color-background);
}
