:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-code: #f8f8f8;
    --text-primary: #333333;
    --text-secondary: #666666;
    --accent: #007acc;
    --border: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #1e1e1e;
    --bg-secondary: #252526;
    --bg-code: #2d2d30;
    --text-primary: #d4d4d4;
    --text-secondary: #9d9d9d;
    --accent: #4fc3f7;
    --border: #3c3c3c;
    --shadow: rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 2rem 0;
    overflow-y: auto;
    position: fixed;
    height: 100vh;
}

.sidebar-header {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.sidebar-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.sidebar-header h1 a {
    color: var(--text-primary);
    text-decoration: none;
}

.sidebar-header h1 a:hover {
    color: var(--accent);
}

.sidebar-header .version {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.nav-section {
    margin-bottom: 1.5rem;
    padding: 0 1.5rem;
}

.nav-section h2 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.nav-section a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 0.25rem;
    transition: background 0.2s;
}

.nav-section a:hover {
    background: var(--bg-primary);
}

.nav-section a.active {
    background: var(--accent);
    color: white;
}

/* Main Content */
.content {
    margin-left: 280px;
    flex: 1;
    padding: 3rem;
    max-width: 1200px;
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header .module-type {
    color: var(--text-secondary);
    font-size: 1rem;
}

.section {
    margin-bottom: 3rem;
}

.section h2 {
    font-size: 1.75rem;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

.section h3 {
    font-size: 1.25rem;
    margin: 1rem 0 0.5rem;
    color: var(--accent);
}

.section h4 {
    font-size: 1rem;
    margin: 1rem 0 0.5rem;
    font-weight: 600;
}

/* Grid for cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow);
    border-color: var(--accent);
}

.card h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Methods and Properties */
.method, .property {
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.method h3, .property h3 {
    margin-top: 0;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
}

.static-badge {
    background: var(--accent);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: normal;
    margin-right: 0.5rem;
}

.description {
    margin: 0.75rem 0;
    color: var(--text-primary);
}

.source-link {
    font-size: 0.875rem;
    margin: 0.5rem 0;
}

.source-link a {
    color: var(--accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.source-link a:hover {
    text-decoration: underline;
}

.params {
    list-style: none;
    margin: 0.5rem 0;
}

.params li {
    padding: 0.5rem;
    background: var(--bg-code);
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.params code {
    font-weight: 600;
    margin-right: 0.5rem;
}

.type {
    color: var(--accent);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.type-list {
    list-style: none;
    margin: 1rem 0;
}

.type-list li {
    margin: 0.5rem 0;
}

.type-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 1.1rem;
}

.type-link:hover {
    text-decoration: underline;
}

.type-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-secondary);
    border-left: 4px solid var(--accent);
    border-radius: 4px;
}

.param-desc {
    margin: 0.5rem 0 0 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

code {
    background: var(--bg-code);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }

    .content {
        margin-left: 0;
        padding: 1.5rem;
    }
}
pre code.hljs {
  display: block;
  overflow-x: auto;
  padding: 1em
}
code.hljs {
  padding: 3px 5px
}
/*!
  Theme: GitHub Dark
  Description: Dark theme as seen on github.com
  Author: github.com
  Maintainer: @Hirse
  Updated: 2021-05-15

  Outdated base version: https://github.com/primer/github-syntax-dark
  Current colors taken from GitHub's CSS
*/
.hljs {
  color: #c9d1d9;
  background: #0d1117
}
.hljs-doctag,
.hljs-keyword,
.hljs-meta .hljs-keyword,
.hljs-template-tag,
.hljs-template-variable,
.hljs-type,
.hljs-variable.language_ {
  /* prettylights-syntax-keyword */
  color: #ff7b72
}
.hljs-title,
.hljs-title.class_,
.hljs-title.class_.inherited__,
.hljs-title.function_ {
  /* prettylights-syntax-entity */
  color: #d2a8ff
}
.hljs-attr,
.hljs-attribute,
.hljs-literal,
.hljs-meta,
.hljs-number,
.hljs-operator,
.hljs-variable,
.hljs-selector-attr,
.hljs-selector-class,
.hljs-selector-id {
  /* prettylights-syntax-constant */
  color: #79c0ff
}
.hljs-regexp,
.hljs-string,
.hljs-meta .hljs-string {
  /* prettylights-syntax-string */
  color: #a5d6ff
}
.hljs-built_in,
.hljs-symbol {
  /* prettylights-syntax-variable */
  color: #ffa657
}
.hljs-comment,
.hljs-code,
.hljs-formula {
  /* prettylights-syntax-comment */
  color: #8b949e
}
.hljs-name,
.hljs-quote,
.hljs-selector-tag,
.hljs-selector-pseudo {
  /* prettylights-syntax-entity-tag */
  color: #7ee787
}
.hljs-subst {
  /* prettylights-syntax-storage-modifier-import */
  color: #c9d1d9
}
.hljs-section {
  /* prettylights-syntax-markup-heading */
  color: #1f6feb;
  font-weight: bold
}
.hljs-bullet {
  /* prettylights-syntax-markup-list */
  color: #f2cc60
}
.hljs-emphasis {
  /* prettylights-syntax-markup-italic */
  color: #c9d1d9;
  font-style: italic
}
.hljs-strong {
  /* prettylights-syntax-markup-bold */
  color: #c9d1d9;
  font-weight: bold
}
.hljs-addition {
  /* prettylights-syntax-markup-inserted */
  color: #aff5b4;
  background-color: #033a16
}
.hljs-deletion {
  /* prettylights-syntax-markup-deleted */
  color: #ffdcd7;
  background-color: #67060c
}
.hljs-char.escape_,
.hljs-link,
.hljs-params,
.hljs-property,
.hljs-punctuation,
.hljs-tag {
  /* purposely ignored */
  
}
/* Custom code block styling */
pre {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: 0.9em;
    line-height: 1.5;
}

/* Adjust hljs background to match theme */
.hljs {
    background: var(--bg-code) !important;
}

/* Inline code styling */
code:not(.hljs) {
    background: var(--bg-code);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* Markdown in descriptions */
.type-description p {
    margin: 0.75rem 0;
}

.type-description ul, .type-description ol {
    margin: 0.75rem 0;
    padding-left: 2rem;
}

.type-description li {
    margin: 0.25rem 0;
}

.type-description code {
    background: var(--bg-code);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
}
