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

:root {
    --bg: #0a0a0f;
    --bg-card: #111118;
    --bg-card-hover: #16161f;
    --border: #1e1e2e;
    --text: #e4e4e7;
    --text-muted: #9191a0;
    --accent: #f97316;
    --accent-hover: #fb923c;
    --accent-glow: rgba(249, 115, 22, 0.15);
    --green: #22c55e;
    --blue: #3b82f6;
    --purple: #8b5cf6;
    --red: #ef4444;
    --yellow: #eab308;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Nav */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    padding: 16px 0;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.logo span { color: var(--accent); }

.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Guide article */
.guide {
    padding-top: 100px;
    padding-bottom: 60px;
}

.guide-header {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
}

.guide-header h1 {
    font-size: clamp(32px, 4vw, 44px);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 12px;
    line-height: 1.15;
}

.guide-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.7;
}

.guide-meta {
    display: flex;
    gap: 20px;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

/* Table of contents */
.guide-toc {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 48px;
}

.guide-toc h3 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.guide-toc ol {
    list-style: decimal;
    padding-left: 20px;
}

.guide-toc li {
    padding: 4px 0;
    font-size: 14px;
}

.guide-toc a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.guide-toc a:hover { color: var(--accent); }

/* Guide sections */
.guide-section {
    margin-bottom: 56px;
    padding-bottom: 56px;
    border-bottom: 1px solid var(--border);
}

.guide-section:last-of-type { border-bottom: none; }

.step-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.step-num {
    width: 44px;
    height: 44px;
    background: var(--accent-glow);
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: var(--accent);
    flex-shrink: 0;
}

.step-header h2 {
    font-size: 22px;
    font-weight: 700;
}

.step-body p {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 16px;
    color: var(--text);
}

.step-body h3 {
    font-size: 17px;
    font-weight: 700;
    margin-top: 28px;
    margin-bottom: 12px;
}

.step-body a {
    color: var(--accent);
    text-decoration: none;
}

.step-body a:hover { text-decoration: underline; }

/* Code blocks */
.code-block {
    position: relative;
    background: #0d0d14;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.code-header {
    padding: 8px 16px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-block code {
    display: block;
    padding: 16px;
    font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
    font-size: 13px;
    color: var(--green);
    overflow-x: auto;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.copy-btn:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

/* Lists */
.checklist {
    list-style: none;
    padding: 0;
    margin-bottom: 16px;
}

.checklist li {
    padding: 6px 0 6px 28px;
    position: relative;
    font-size: 15px;
}

.checklist li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--green);
    font-weight: 700;
}

.numbered-list {
    padding-left: 20px;
    margin-bottom: 16px;
}

.numbered-list li {
    padding: 4px 0;
    font-size: 15px;
}

ul:not(.checklist) {
    padding-left: 20px;
    margin-bottom: 16px;
}

ul:not(.checklist) li {
    padding: 4px 0;
    font-size: 15px;
}

/* Info/Warning/Success boxes */
.info-box, .warning-box, .success-box {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.info-box {
    background: rgba(59, 130, 246, 0.08);
    border-left: 3px solid var(--blue);
}

.warning-box {
    background: rgba(234, 179, 8, 0.08);
    border-left: 3px solid var(--yellow);
}

.success-box {
    background: rgba(34, 197, 94, 0.08);
    border-left: 3px solid var(--green);
}

.info-box strong, .warning-box strong, .success-box strong {
    display: block;
    margin-bottom: 4px;
}

.info-box p, .warning-box p, .success-box p {
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 14px;
}

/* File grid */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.file-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}

.file-card h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 4px;
}

.file-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Command table */
.command-table {
    margin-bottom: 16px;
}

.command-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.command-row:last-child { border-bottom: none; }

.command-row code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--green);
    background: #0d0d14;
    padding: 3px 8px;
    border-radius: 4px;
}

.command-row span {
    color: var(--text-muted);
    font-size: 13px;
}

/* Message examples */
.message-example {
    margin-bottom: 16px;
}

.msg-user {
    background: var(--accent-glow);
    border: 1px solid rgba(249, 115, 22, 0.2);
    padding: 12px 16px;
    border-radius: 10px 10px 10px 2px;
    font-size: 14px;
    margin-bottom: 8px;
    display: inline-block;
    max-width: 85%;
}

.msg-agent {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 12px 16px;
    border-radius: 10px 10px 2px 10px;
    font-size: 14px;
    color: var(--text-muted);
    margin-left: auto;
    display: inline-block;
    max-width: 85%;
    float: right;
}

.msg-agent::after { content: ''; display: block; clear: both; }

/* Next steps grid */
.next-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.next-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
    transition: all 0.2s;
}

.next-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(249, 115, 22, 0.2);
}

.next-card h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.next-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Guide footer */
.guide-footer {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.guide-footer p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.guide-footer a {
    color: var(--accent);
    text-decoration: none;
}

/* Guides index page */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.guide-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    transition: all 0.2s;
}

.guide-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(249, 115, 22, 0.2);
    transform: translateY(-2px);
}

.guide-card .tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 12px;
}

.tag-beginner { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.tag-intermediate { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.tag-advanced { background: rgba(139, 92, 246, 0.15); color: var(--purple); }
.tag-coming { background: rgba(113, 113, 122, 0.15); color: var(--text-muted); }

.guide-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.guide-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* kbd */
kbd {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
}

/* Inline code */
p code, li code {
    background: #0d0d14;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--accent);
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    text-align: center;
}

footer .container { max-width: 1100px; }

footer p {
    font-size: 13px;
    color: var(--text-muted);
}

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

footer a:hover { color: var(--text); }

.footer-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 16px;
}

/* Light theme */
[data-theme="light"] {
    --bg: #ffffff;
    --bg-card: #f4f4f5;
    --bg-card-hover: #e8e8ec;
    --border: #d4d4d8;
    --text: #18181b;
    --text-muted: #52525b;
    --accent: #ea580c;
    --accent-hover: #f97316;
    --accent-glow: rgba(234, 88, 12, 0.1);
    --green: #16a34a;
    --blue: #2563eb;
    --purple: #7c3aed;
}

[data-theme="light"] nav {
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .code-block {
    background: #1e1e2e;
}

[data-theme="light"] .code-block code {
    color: #22c55e;
}

[data-theme="light"] .code-block .code-header {
    background: rgba(255,255,255,0.05);
    color: #9191a0;
}

[data-theme="light"] p code, [data-theme="light"] li code {
    background: #f0f0f3;
    color: #ea580c;
}

/* Responsive */
@media (max-width: 640px) {
    .nav-links { gap: 16px; }
    .step-header { flex-direction: column; align-items: flex-start; }
    .file-grid { grid-template-columns: 1fr; }
    .command-row { flex-direction: column; align-items: flex-start; gap: 4px; }
    .guide-meta { flex-wrap: wrap; gap: 12px; }
}
