/* derouter.ai 风格配色 */
:root {
    --bg-primary: #faf8f5;
    --bg-card: #ffffff;
    --bg-code: #f0ece4;
    --accent: #c4956a;
    --accent-light: rgba(196, 149, 106, 0.1);
    --text-primary: #2c2c2c;
    --text-muted: #6b6358;
    --text-dim: #9a9080;
    --border: #f0ece4;
}

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 248, 245, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.navbar-brand {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    flex-shrink: 0;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: flex-end;
    margin-right: 8px;
}

.navbar-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.navbar-links a:hover {
    color: var(--text-primary);
    background: var(--accent-light);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-nav-login {
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.btn-nav-login:hover {
    color: var(--text-primary);
}

.btn-nav-register {
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
}

.btn-nav-register:hover {
    opacity: 0.88;
}

@media (max-width: 640px) {
    .navbar-links {
        display: none;
    }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: var(--accent-light);
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 24px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.hero-title {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: var(--bg-card);
}

/* Features Grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s;
}

.feature-card:hover {
    box-shadow: 0 4px 12px rgba(196, 149, 106, 0.1);
}

.feature-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 12px;
}

.feature-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.feature-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Terminal */
.terminal {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-top: 16px;
    overflow: hidden;
}

.terminal-header {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

.terminal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #eab308; }
.terminal-dot.green { background: #22c55e; }

.terminal-body {
    padding: 14px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.8;
    color: var(--text-dim);
}

.prompt { color: var(--accent); }
.cmd { color: var(--text-dim); }
.url { color: var(--accent); }
.string { color: var(--accent); }
.json { color: var(--text-muted); }
.success { color: #22c55e; margin-top: 8px; }

/* Metric */
.metric {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 16px 0;
}

.metric-value {
    font-family: 'Courier New', monospace;
    font-size: 56px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.metric-unit {
    font-size: 20px;
    color: var(--text-dim);
    font-weight: 500;
}

/* Code Example */
.code-example {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    margin-top: 16px;
}

.code-line {
    padding: 4px 0;
}

.code-line.old {
    color: #ef4444;
    text-decoration: line-through;
    opacity: 0.5;
}

.code-line.new {
    color: #22c55e;
}

/* Price */
.price {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}

.price-value {
    font-family: 'Courier New', monospace;
    font-size: 36px;
    font-weight: 800;
    color: var(--accent);
}

.price-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.feature-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.feature-link:hover {
    opacity: 0.8;
}

/* Providers */
.providers {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    margin: 40px 0;
}

.provider-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.provider-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--accent-light);
    border: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.provider-tag.more {
    color: var(--accent);
}

/* Active nav link */
.navbar-links a.active {
    color: var(--accent);
}

/* Pricing nav buttons */
.pricing-nav {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.pricing-nav-btn {
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    background: var(--bg-card);
    transition: all 0.2s;
}

.pricing-nav-btn:hover,
.pricing-nav-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ===== Pricing Page ===== */
.pricing-header {
    text-align: center;
    padding: 50px 20px 30px;
}

.pricing-title {
    font-size: 40px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.pricing-subtitle {
    font-size: 16px;
    color: var(--text-muted);
}

/* Pricing grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.pricing-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
    position: relative;
    transition: box-shadow 0.3s;
}

.pricing-card:hover {
    box-shadow: 0 6px 20px rgba(196, 149, 106, 0.1);
}

.pricing-card.recommended {
    border: 2px solid var(--accent);
}

.pricing-card.featured {
    border: 2px solid #e07a3a;
}

.pricing-card.enterprise {
    border: 1px solid var(--accent);
    background: var(--accent-light);
}

/* Badge */
.plan-badge {
    position: absolute;
    top: -1px;
    right: 20px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 0 0 6px 6px;
}

.plan-badge-dark {
    background: #e07a3a;
}

/* Plan name & price */
.plan-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.plan-name.accent {
    color: var(--accent);
}

.plan-name.accent-dark {
    color: #e07a3a;
}

.plan-name-lg {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.plan-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.plan-price {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.1;
}

.plan-period {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-muted);
}

/* Features list */
.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.plan-features li {
    font-size: 14px;
    color: var(--text-muted);
    padding: 6px 0;
    padding-left: 24px;
    position: relative;
    line-height: 1.5;
}

.plan-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.plan-features li strong {
    color: var(--text-primary);
}

.plan-features li.highlight {
    color: #e07a3a;
    font-weight: 600;
}

/* Buttons */
.plan-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

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

.plan-btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.plan-btn-filled {
    background: var(--accent);
    color: #fff;
    border: none;
}

.plan-btn-filled:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.plan-btn-gradient {
    background: linear-gradient(135deg, var(--accent), #e07a3a);
    color: #fff;
    border: none;
}

.plan-btn-gradient:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.plan-btn-dark {
    background: var(--text-primary);
    color: #fff;
    border: none;
}

.plan-btn-dark:hover {
    opacity: 0.85;
}

/* Pricing note */
.pricing-note {
    text-align: center;
    padding: 30px 0;
    color: var(--text-dim);
    font-size: 14px;
}

.pricing-note p {
    margin: 4px 0;
}

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

.pricing-note a:hover {
    text-decoration: underline;
}

/* FAQ */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 20px 0 40px;
}

.faq-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.faq-question {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.faq-answer {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Pricing responsive */
@media (max-width: 768px) {
    .pricing-title {
        font-size: 28px;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-grid-2 {
        grid-template-columns: 1fr;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }
}

/* Doc Article Page */
.doc-layout {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: calc(100vh - 60px);
}

.doc-main {
    flex: 1;
    padding: 32px 48px 80px;
    min-width: 0;
    max-width: 760px;
}

.doc-toc {
    width: 200px;
    flex-shrink: 0;
    padding: 32px 0 32px 24px;
    position: sticky;
    top: 80px;
    align-self: flex-start;
}

.doc-toc-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 10px;
}

.doc-toc-link {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 0;
    border-left: 2px solid transparent;
    padding-left: 10px;
    transition: all 0.15s;
    line-height: 1.4;
}

.doc-toc-link:hover {
    color: var(--accent);
    border-left-color: var(--accent);
}

.doc-breadcrumb {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.doc-breadcrumb a:hover { color: var(--accent); }

.doc-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.2;
}

.doc-lead {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 8px;
}

.doc-note {
    font-size: 14px;
    color: var(--text-muted);
    background: var(--accent-light);
    border-left: 3px solid var(--accent);
    border-radius: 0 6px 6px 0;
    padding: 12px 16px;
    margin: 16px 0 32px;
    line-height: 1.6;
}

.doc-h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 40px 0 16px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.doc-h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 24px 0 10px;
}

.doc-p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 12px;
}

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

.doc-p a:hover { text-decoration: underline; }

.doc-code {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0 20px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre;
}

.doc-next {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.doc-next-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    margin-bottom: 12px;
}

.doc-next-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.doc-next-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.doc-next-link:hover { text-decoration: underline; }

@media (max-width: 900px) {
    .doc-toc { display: none; }
    .doc-main { padding: 24px 0 60px; }
}

/* Docs Page */
.docs-layout {
    display: flex;
    min-height: calc(100vh - 60px);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.docs-sidebar {
    width: 240px;
    flex-shrink: 0;
    padding: 32px 0;
    border-right: 1px solid var(--border);
}

.docs-nav-home {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    padding: 6px 0;
    margin-bottom: 16px;
}

.docs-nav-group {
    margin-bottom: 20px;
}

.docs-nav-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.docs-nav-link {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 5px 0 5px 12px;
    border-left: 2px solid transparent;
    transition: all 0.15s;
    line-height: 1.4;
}

.docs-nav-link:hover {
    color: var(--accent);
    border-left-color: var(--accent);
}

.docs-main {
    flex: 1;
    padding: 32px 0 60px 48px;
    min-width: 0;
}

.docs-hero {
    margin-bottom: 40px;
}

.docs-hero-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.docs-hero-sub {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
}

.docs-section {
    margin-bottom: 48px;
}

.docs-section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.docs-grid-1 {
    grid-template-columns: 1fr;
}

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

.docs-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(196, 149, 106, 0.1);
}

.docs-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.docs-card-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.docs-card-link {
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
}

@media (max-width: 768px) {
    .docs-sidebar { display: none; }
    .docs-main { padding-left: 0; }
    .docs-grid { grid-template-columns: 1fr; }
}

/* About Page */
.about-hero {
    text-align: center;
    padding: 60px 20px 40px;
}

.about-hero-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.about-hero-sub {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 28px;
}

.about-hero-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.about-who,
.about-promise {
    margin: 48px 0;
}

.about-section-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.about-text {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 12px;
    max-width: 800px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: box-shadow 0.3s;
}

.about-card:hover {
    box-shadow: 0 4px 12px rgba(196, 149, 106, 0.1);
}

.about-card-icon {
    font-size: 18px;
    color: var(--accent);
    margin-bottom: 10px;
}

.about-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.about-card-text {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

@media (max-width: 640px) {
    .about-hero-title { font-size: 28px; }
    .about-grid { grid-template-columns: 1fr; }
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-dim);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .metric-value {
        font-size: 42px;
    }
}
