:root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: #1f2937;
    --bg-card-hover: #283548;
    --bg-sidebar: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-primary: #06d6a0;
    --accent-secondary: #8b5cf6;
    --accent-warning: #f59e0b;
    --accent-blue: #3b82f6;
    --border-color: #334155;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 2rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-logo img { height: 36px; width: auto; }

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--accent-primary); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary { background: var(--accent-primary); color: var(--bg-primary); }
.btn-primary:hover { background: #05c490; transform: translateY(-1px); }

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--accent-primary); }

.btn-windows { background: var(--accent-blue); color: white; }
.btn-windows:hover { background: #2563eb; transform: translateY(-1px); }

.btn-ha { background: #18bcf2; color: white; }
.btn-ha:hover { background: #0ea5e9; transform: translateY(-1px); }

.btn-large { padding: 1rem 2rem; font-size: 1rem; }

/* Sections */
section { padding: 6rem 2rem; }

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-header h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; }
.section-header p { font-size: 1.1rem; color: var(--text-secondary); }

/* Page Header */
.page-header {
    padding: 8rem 2rem 4rem;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    text-align: center;
}

.page-header h1 { font-size: 3rem; font-weight: 700; margin-bottom: 1rem; }
.page-header p { font-size: 1.25rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto; }

/* Content Container */
.content-container { max-width: 900px; margin: 0 auto; padding: 4rem 2rem; }

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.card h2 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--accent-primary); }
.card h3 { font-size: 1.25rem; margin: 1.5rem 0 0.75rem; }
.card p { color: var(--text-secondary); margin-bottom: 1rem; }
.card ul, .card ol { margin: 0.5rem 0 1rem 1.5rem; color: var(--text-secondary); }
.card li { margin-bottom: 0.5rem; }

.card code {
    background: var(--bg-sidebar);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.85rem;
}

.card pre {
    background: var(--bg-sidebar);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.85rem;
    color: var(--accent-primary);
    border: 1px solid var(--border-color);
    white-space: pre;
    line-height: 1.4;
}

/* FAQ */
.faq-item {
    background: var(--bg-card);
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: background 0.2s;
}

.faq-question:hover { background: var(--bg-card-hover); }
.faq-question svg { width: 20px; height: 20px; color: var(--accent-primary); transition: transform 0.3s; flex-shrink: 0; }
.faq-item.open .faq-question svg { transform: rotate(180deg); }

.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; }
.faq-item.open .faq-answer { max-height: 1000px; }
.faq-answer-content { padding: 0 1.5rem 1.5rem; color: var(--text-secondary); }
.faq-answer-content ul { margin: 0.5rem 0 0.5rem 1.5rem; }
.faq-answer-content li { margin-bottom: 0.25rem; }

/* Steps */
.step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: start;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.step-content p { color: var(--text-secondary); margin-bottom: 1rem; }
.step-content code { background: var(--bg-sidebar); padding: 0.25rem 0.5rem; border-radius: 4px; font-family: monospace; font-size: 0.85rem; }

/* Tabs */
.tabs { display: flex; gap: 0.5rem; margin-bottom: 2rem; }

.tab {
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-family: inherit;
    font-size: 0.95rem;
}

.tab:hover { border-color: var(--accent-primary); }
.tab.active { background: var(--accent-primary); color: var(--bg-primary); border-color: var(--accent-primary); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Footer */
footer {
    background: var(--bg-sidebar);
    padding: 3rem 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-logo { display: flex; align-items: center; gap: 0.75rem; font-weight: 600; }
.footer-logo img { height: 32px; }
.footer-links { display: flex; gap: 2rem; }
.footer-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent-primary); }
.footer-credit { color: var(--text-muted); font-size: 0.85rem; }
.footer-credit a { color: var(--accent-primary); text-decoration: none; }

/* Mobile menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
}

.nav-links.show {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-sidebar);
    flex-direction: column;
    padding: 1rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
}

/* Docs Layout */
.docs-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    gap: 3rem;
    min-height: calc(100vh - 200px);
}

.docs-sidebar { position: sticky; top: 100px; height: fit-content; }
.docs-sidebar h3 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin: 1.5rem 0 0.75rem; }
.docs-sidebar h3:first-child { margin-top: 0; }
.docs-sidebar ul { list-style: none; }
.docs-sidebar li { margin-bottom: 0.25rem; }

.docs-sidebar a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.docs-sidebar a:hover, .docs-sidebar a.active { background: var(--bg-card); color: var(--accent-primary); }

.docs-wiki-link {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.docs-wiki-link p { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.docs-wiki-link a { color: var(--accent-primary); }

.docs-content { min-width: 0; }
.docs-content h1 { font-size: 2.5rem; margin-bottom: 1.5rem; }
.docs-content h2 { font-size: 1.5rem; margin: 2.5rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color); }
.docs-content h2:first-of-type { border-top: none; padding-top: 0; }
.docs-content h3 { font-size: 1.15rem; margin: 1.5rem 0 0.75rem; }
.docs-content p { color: var(--text-secondary); margin-bottom: 1rem; }
.docs-content ul, .docs-content ol { margin: 0.5rem 0 1.5rem 1.5rem; color: var(--text-secondary); }
.docs-content li { margin-bottom: 0.5rem; }
.docs-content strong { color: var(--text-primary); }

.docs-content code {
    background: var(--bg-card);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.85rem;
}

.docs-content pre {
    background: var(--bg-sidebar);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.85rem;
    color: var(--accent-primary);
    border: 1px solid var(--border-color);
    white-space: pre;
}

.docs-content pre code { background: none; padding: 0; }
.docs-content a { color: var(--accent-primary); }
.docs-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.docs-content th, .docs-content td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--border-color); }
.docs-content th { color: var(--text-primary); font-weight: 600; }
.docs-content td { color: var(--text-secondary); }

/* Loading */
.loading { text-align: center; padding: 4rem; color: var(--text-muted); }

/* Responsive */
@media (max-width: 968px) {
    .docs-layout { grid-template-columns: 1fr; }
    .docs-sidebar { position: relative; top: 0; }
    .step { grid-template-columns: 1fr; text-align: center; }
    .step-number { margin: 0 auto 1rem; }
    .page-header h1 { font-size: 2rem; }
    .section-header h2 { font-size: 2rem; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .tabs { flex-wrap: wrap; }
    .tab { flex: 1; min-width: 120px; text-align: center; }
    .footer-content { flex-direction: column; text-align: center; }
    .footer-links { flex-wrap: wrap; justify-content: center; gap: 1rem; }
}
