
/* Базовый темный режим */
:root {
    color-scheme: dark;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #1a1a1a;
}
::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #666;
}


@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    --bg-base: #000000;
    --bg-grid: #111111;
    --bg-surface: #0a0a0a;
    --bg-surface-elevated: #141414;
    --bg-surface-hover: #1f1f1f;
    --text-primary: #ededed;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border-color: #27272a;
    --border-highlight: #3f3f46;
    
    --accent-blue: #3b82f6;
    --accent-blue-glow: rgba(59, 130, 246, 0.15);
    --accent-purple: #8b5cf6;
    --accent-cyan: #06b6d4;
    
    --method-get-bg: rgba(16, 185, 129, 0.1); --method-get-text: #10b981;
    --method-post-bg: rgba(59, 130, 246, 0.1); --method-post-text: #3b82f6;
    --method-del-bg: rgba(239, 68, 68, 0.1); --method-del-text: #ef4444;
    --method-wss-bg: rgba(245, 158, 11, 0.1); --method-wss-text: #f59e0b;
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    background-image: 
        linear-gradient(to right, #111 1px, transparent 1px),
        linear-gradient(to bottom, #111 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center top;
    background-attachment: fixed;
}

a { color: var(--text-primary); text-decoration: none; transition: all 0.2s ease; }
a:hover { color: var(--accent-blue); }

/* Typography */
h1, h2, h3, h4, h5 { font-weight: 600; letter-spacing: -0.02em; color: #fff; }
h1 { font-size: 4rem; line-height: 1.1; letter-spacing: -0.04em; margin-bottom: 1.5rem; background: linear-gradient(to right, #fff, #a1a1aa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
h2 { font-size: 2.25rem; margin: 3rem 0 1.5rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border-color); }
h3 { font-size: 1.5rem; margin: 2rem 0 1rem; }
p { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 1.05rem; }
strong { color: var(--text-primary); }

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.brand { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; font-weight: 500; color: #fff; }
.brand:hover { color: #fff; }
.nodes-badge {
    background: #2563eb;
    color: #fff;
    font-size: 0.65em;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.08em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.nav-links { display: flex; gap: 2.5rem; align-items: center; }
.nav-links a { color: var(--text-secondary); font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: #fff; }

/* Layout Components */
.container { max-width: 1300px; margin: 0 auto; padding: 5rem 2rem; }
.hero-section { text-align: center; padding: 6rem 1rem 8rem; max-width: 900px; margin: 0 auto; }
.hero-section p { font-size: 1.25rem; margin-bottom: 3rem; }

.grid-2, .grid-3, .grid-4 { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* Cards */
.card {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}
.card:hover { border-color: var(--border-highlight); transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5); }
.card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    opacity: 0; transition: opacity 0.3s;
}
.card:hover::before { opacity: 1; }

.card-icon { font-size: 2rem; margin-bottom: 1.5rem; display: inline-block; padding: 1rem; background: var(--bg-surface-elevated); border-radius: 12px; border: 1px solid var(--border-color); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; color: #000; padding: 0.875rem 1.75rem;
    border-radius: 8px; font-weight: 600; font-size: 1rem;
    transition: all 0.2s; cursor: pointer; border: none;
}
.btn:hover { background: #e5e5e5; transform: translateY(-1px); }
.btn-primary { background: var(--accent-blue); color: #fff; }
.btn-primary:hover { background: #2563eb; box-shadow: 0 0 20px var(--accent-blue-glow); }
.btn-outline { background: transparent; border: 1px solid var(--border-highlight); color: #fff; }
.btn-outline:hover { background: var(--bg-surface-elevated); border-color: #fff; }

/* Code & Pre */
pre { background: #000; border: 1px solid var(--border-color); padding: 1.25rem; border-radius: 8px; overflow-x: auto; margin: 1.5rem 0; box-shadow: inset 0 0 20px rgba(0,0,0,0.5); }
code { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: #e4e4e7; }
p code, li code { background: var(--bg-surface-elevated); padding: 0.2em 0.4em; border-radius: 4px; border: 1px solid var(--border-color); color: #60a5fa; }

/* Alerts */
.alert { padding: 1.25rem 1.5rem; border-radius: 8px; margin: 2rem 0; border: 1px solid; display: flex; gap: 1rem; align-items: flex-start; }
.alert::before { content: 'i'; font-family: 'JetBrains Mono'; font-weight: bold; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; }
.alert-info { background: rgba(59, 130, 246, 0.05); border-color: rgba(59, 130, 246, 0.2); }
.alert-info::before { background: var(--accent-blue); color: #fff; }
.alert-warning { background: rgba(245, 158, 11, 0.05); border-color: rgba(245, 158, 11, 0.2); }
.alert-warning::before { content: '!'; background: #f59e0b; color: #000; }
.alert-warning h4 { color: #f59e0b; margin: 0 0 0.5rem 0; font-size: 1.1rem; }

/* Docs Layout (ReDoc Style) */
.docs-layout { display: flex; min-height: calc(100vh - 72px); }
.docs-sidebar {
    width: 300px; flex-shrink: 0; border-right: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3); padding: 2rem; position: sticky; top: 72px; height: calc(100vh - 72px); overflow-y: auto;
}
.docs-sidebar h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin: 2rem 0 1rem 0; }
.docs-sidebar h4:first-child { margin-top: 0; }
.docs-sidebar ul { list-style: none; }
.docs-sidebar li { margin-bottom: 0.4rem; }
.docs-sidebar a { color: var(--text-secondary); font-size: 0.95rem; display: block; padding: 0.4rem 0.75rem; border-radius: 6px; margin-left: -0.75rem; }
.docs-sidebar a:hover, .docs-sidebar a.active { color: #fff; background: var(--bg-surface-elevated); }

.docs-content { flex: 1; min-width: 0; }
.docs-section { padding: 4rem; border-bottom: 1px solid var(--border-color); }
.docs-section:last-child { border-bottom: none; }

/* ReDoc Style API Endpoints */
.api-block { display: flex; flex-direction: column; gap: 3rem; margin-top: 2rem; }
@media (min-width: 1200px) {
    .api-block { flex-direction: row; }
    .api-desc { flex: 1; padding-right: 2rem; }
    .api-samples { width: 450px; flex-shrink: 0; background: #0a0a0a; border-left: 1px solid var(--border-color); margin: -4rem -4rem -4rem 0; padding: 4rem; box-shadow: inset 20px 0 20px -20px rgba(0,0,0,0.5); }
}

.endpoint-badge {
    display: inline-flex; align-items: center; gap: 1rem;
    font-family: 'JetBrains Mono', monospace; font-size: 1rem;
    background: var(--bg-surface-elevated); border: 1px solid var(--border-color);
    padding: 0.5rem 1rem; border-radius: 8px; margin-bottom: 1.5rem; width: fit-content;
}
.method { font-weight: 700; font-size: 0.85rem; padding: 0.2rem 0.5rem; border-radius: 4px; }
.method.get { background: var(--method-get-bg); color: var(--method-get-text); }
.method.post { background: var(--method-post-bg); color: var(--method-post-text); }
.method.del { background: var(--method-del-bg); color: var(--method-del-text); }
.method.wss { background: var(--method-wss-bg); color: var(--method-wss-text); }
.path { color: var(--text-primary); }

.params-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.params-table th { text-align: left; padding: 1rem 0; border-bottom: 1px solid var(--border-highlight); color: #fff; font-size: 0.9rem; font-weight: 600; }
.params-table td { padding: 1.25rem 0; border-bottom: 1px solid var(--border-color); vertical-align: top; }
.param-name { font-family: 'JetBrains Mono', monospace; color: var(--text-primary); font-weight: 600; display: block; margin-bottom: 0.25rem; }
.param-meta { font-size: 0.8rem; color: var(--text-muted); display: flex; gap: 0.5rem; align-items: center; }
.param-req { color: #ef4444; }
.param-desc { margin-top: 0.75rem; font-size: 0.95rem; color: var(--text-secondary); line-height: 1.5; }

.response-tabs { display: flex; gap: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border-color); }
.response-tab { padding: 0.5rem 1rem; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; font-family: 'JetBrains Mono'; font-size: 0.85rem; }
.response-tab.active { color: #fff; border-bottom-color: var(--accent-blue); }

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 4rem 5%;
    text-align: center;
    background: #000;
}
.footer-content { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font-size: 0.95rem; }
.footer-links a { margin-left: 1.5rem; }

/* Status Page specific */
.metric-huge { font-size: 3.5rem; font-weight: 700; color: #fff; line-height: 1; margin-bottom: 0.5rem; font-family: 'JetBrains Mono', monospace; }
.metric-label { color: var(--text-secondary); font-weight: 500; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.status-indicator { display: inline-block; width: 12px; height: 12px; background: #10b981; border-radius: 50%; box-shadow: 0 0 10px #10b981; margin-right: 8px; }
