/* Psytron Documentation Site Styles */
:root {
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #6d28d9;
    --bg: #ffffff;
    --bg-secondary: #f8fafc;
    --text: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --sidebar-width: 280px;
    --header-height: 64px;
    --code-bg: #1e293b;
    --code-text: #e2e8f0;
    --callout-bg: #f0f9ff;
    --callout-border: #3b82f6;
    --warning-bg: #fffbeb;
    --warning-border: #f59e0b;
    --danger-bg: #fef2f2;
    --danger-border: #ef4444;
}

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

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

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

.sidebar-logo {
    padding: 0 24px 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

.sidebar-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 18px;
}

.sidebar-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 16px;
}

.sidebar-nav {
    padding: 8px 12px;
}

.sidebar-section {
    margin-bottom: 4px;
}

.sidebar-section-title {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s;
}

.sidebar-section-title:hover {
    background: rgba(124, 58, 237, 0.08);
}

.sidebar-section-title.active {
    background: rgba(124, 58, 237, 0.12);
    color: var(--primary);
}

.sidebar-pages {
    padding-left: 16px;
}

.sidebar-page {
    display: block;
    padding: 5px 12px;
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.15s;
}

.sidebar-page:hover {
    color: var(--primary);
    background: rgba(124, 58, 237, 0.06);
}

.sidebar-page.active {
    color: var(--primary);
    background: rgba(124, 58, 237, 0.1);
    font-weight: 500;
}

/* Main Content */
.main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-width: 0;
}

.header {
    height: var(--header-height);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 32px;
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    z-index: 50;
}

.header-title {
    font-size: 15px;
    color: var(--text-secondary);
}

.header-title span {
    color: var(--text);
    font-weight: 500;
}

.content {
    max-width: 860px;
    padding: 32px 48px 80px;
}

/* Typography */
.content h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
    line-height: 1.3;
}

.content h2 {
    font-size: 24px;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 28px;
    margin-bottom: 12px;
    color: var(--text);
}

.content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 8px;
    color: var(--text);
}

.content p {
    margin-bottom: 16px;
    font-size: 15px;
}

.content ul, .content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.content li {
    margin-bottom: 6px;
    font-size: 15px;
}

.content a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s;
}

.content a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.content strong {
    font-weight: 600;
    color: var(--text);
}

/* Code blocks */
.content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: "JetBrains Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
    font-size: 13px;
    color: var(--primary-dark);
}

.content pre {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 20px 24px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
    line-height: 1.6;
}

.content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 13px;
}

/* Callout blocks */
.callout {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
    font-size: 14px;
}

.callout-info {
    background: var(--callout-bg);
    border-color: var(--callout-border);
}

.callout-warning {
    background: var(--warning-bg);
    border-color: var(--warning-border);
}

.callout-danger {
    background: var(--danger-bg);
    border-color: var(--danger-border);
}

.callout-title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}

/* Images */
.content img {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin: 16px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Tables */
.content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

.content table th,
.content table td {
    padding: 10px 14px;
    border: 1px solid var(--border);
    text-align: left;
}

.content table th {
    background: var(--bg-secondary);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.content table tr:hover {
    background: rgba(124, 58, 237, 0.03);
}

/* Page nav */
.page-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.page-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid var(--border);
    transition: all 0.15s;
}

.page-nav a:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}

/* Meta */
.page-meta {
    display: flex;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.page-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Footer */
.footer {
    margin-top: 48px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 13px;
}

/* Mobile */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main { margin-left: 0; }
    .content { padding: 24px 20px 60px; }
    .content h1 { font-size: 24px; }
    
    .mobile-menu-btn {
        display: flex !important;
    }
}

.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 200;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
