:root {
    --bg-dark: #0A0E17;
    --surface: #111827;
    --primary-neon: #00FFA3;
    --secondary-cyan: #22D3EE;
    --text-main: #E5E7EB;
    --text-muted: #6B7280;
    --border-glow: rgba(0,255,163,0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Grid Background Pattern */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(rgba(0, 255, 163, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 163, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -1;
    pointer-events: none;
}

/* Scanline */
body::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    opacity: 0.3;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

h1, h2, h3, .logo span {
    font-family: 'Orbitron', sans-serif;
}

a {
    text-decoration: none;
    color: var(--secondary-cyan);
    transition: all 0.3s ease;
}

/* Navbar */
.navbar {
    background: rgba(10, 14, 23, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-glow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-main);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-main);
    font-size: 0.95rem;
    position: relative;
    font-weight: 600;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-neon);
    transition: width 0.3s;
    box-shadow: 0 0 10px var(--primary-neon);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary-neon);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--primary-neon);
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(0, 255, 163, 0.3);
    border: 1px solid var(--primary-neon);
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(0, 255, 163, 0.6);
    background-color: #00e693;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-neon);
    border: 1px solid var(--primary-neon);
    box-shadow: inset 0 0 10px rgba(0, 255, 163, 0.1);
}

.btn-outline:hover {
    background-color: rgba(0, 255, 163, 0.1);
    box-shadow: inset 0 0 20px rgba(0, 255, 163, 0.3), 0 0 15px rgba(0,255,163,0.2);
}

.btn-secondary {
    background-color: var(--surface);
    color: var(--secondary-cyan);
    border: 1px solid var(--secondary-cyan);
}
.btn-secondary:hover {
    background-color: rgba(34, 211, 238, 0.1);
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.3);
}

/* Hero Section */
.hero {
    padding: 100px 0 60px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: 2px;
}

.gradient-text {
    background: linear-gradient(90deg, var(--secondary-cyan), var(--primary-neon));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 40px;
}

/* Terminal */
.terminal {
    background: #05070a;
    border: 1px solid #1f2937;
    border-radius: 8px;
    width: 100%;
    max-width: 650px;
    text-align: left;
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    overflow: hidden;
}

.terminal-header {
    background: #111827;
    padding: 10px 15px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #1f2937;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-body {
    padding: 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.8;
}

.prompt { color: var(--secondary-cyan); font-weight: bold; }
.typing {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--primary-neon);
    animation: typing 2s steps(40, end), blink 0.75s step-end infinite;
}

.output { opacity: 0; }
.delayed { animation: fadeIn 0s 2s forwards; color: var(--text-muted); }
.delayed-2 { animation: fadeIn 0s 2.5s forwards; color: var(--text-muted); }
.delayed-3 { animation: fadeIn 0s 3s forwards; }

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}
@keyframes blink {
    from, to { border-color: transparent }
    50% { border-color: var(--primary-neon) }
}
@keyframes fadeIn {
    to { opacity: 1; }
}

.latency-ticker {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-neon);
    font-size: 0.85rem;
    letter-spacing: 2px;
    margin-bottom: 40px;
    background: rgba(0, 255, 163, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid var(--border-glow);
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* Sections */
.section-title {
    font-size: 2rem;
    text-align: center;
    margin: 80px 0 40px;
    color: var(--text-main);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.bento-card {
    background: var(--surface);
    border: 1px solid var(--border-glow);
    padding: 30px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.bento-card:hover {
    box-shadow: 0 0 24px rgba(0,255,163,0.15);
    border-color: var(--primary-neon);
    transform: translateY(-2px);
}

.bento-card h3 {
    color: var(--primary-neon);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.bento-card p {
    color: var(--text-muted);
}

.col-span-2 {
    grid-column: span 2;
}

/* API Section */
.code-block {
    background: #05070a;
    border: 1px solid var(--border-glow);
    border-radius: 8px;
    padding: 25px;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
}
.code-block pre { margin: 0; }
.code-block .keyword { color: #c678dd; }
.code-block .string { color: #98c379; }
.code-block .property { color: #61afef; }

/* Pricing */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.pricing-card {
    background: var(--surface);
    border: 1px solid var(--border-glow);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--primary-neon);
    box-shadow: 0 0 30px rgba(0,255,163,0.1);
    transform: scale(1.05);
}

.pricing-card h3 {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 20px;
}

.badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-neon);
    color: var(--bg-dark);
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 900;
}

.pricing-card .price {
    font-size: 3rem;
    font-family: 'Orbitron', sans-serif;
    color: var(--text-main);
    margin-bottom: 30px;
}

.pricing-card .price span {
    font-size: 1rem;
    color: var(--text-muted);
}

.pricing-card ul {
    list-style: none;
    margin-bottom: 30px;
    text-align: left;
}

.pricing-card li {
    padding: 10px 0;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.pricing-card li::before {
    content: "✓ ";
    color: var(--primary-neon);
    font-weight: bold;
}

.pricing-card .btn {
    width: 100%;
}

/* FAQ */
.faq-item {
    background: var(--surface);
    border: 1px solid var(--border-glow);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.faq-item h3 { color: var(--secondary-cyan); margin-bottom: 10px;}
.faq-item p { color: var(--text-muted); }

/* Footer */
footer {
    margin-top: 100px;
    padding: 40px 0;
    border-top: 1px solid var(--border-glow);
    text-align: center;
    background: rgba(17, 24, 39, 0.5);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary-neon);
}

.copyright {
    color: #4b5563;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
}

/* Keep .card for subpage compatibility */
.card {
    background: var(--surface);
    border: 1px solid var(--border-glow);
    padding: 30px;
    border-radius: 12px;
}
.card h2, .card h3 { color: var(--primary-neon); margin-bottom: 15px; }
.card p, .card li { color: var(--text-main); }
.card a { color: var(--primary-neon); }

/* Responsive */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .col-span-2 {
        grid-column: span 1;
    }
    .grid-3 {
        grid-template-columns: 1fr;
    }
    .pricing-card.featured {
        transform: scale(1);
    }
    .hero-title { font-size: 2.5rem; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-buttons { flex-direction: column; width: 100%; max-width: 300px; }
    .hero-buttons .btn { width: 100%; padding: 15px; }
}

.floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-neon);
    color: var(--bg-dark);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(0, 255, 163, 0.5);
    z-index: 9999;
    transition: all 0.3s;
    text-decoration: none;
    border: 2px solid var(--primary-neon);
}
.floating-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 0 30px rgba(0, 255, 163, 0.8);
    background: var(--bg-dark);
    color: var(--primary-neon);
}
.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    padding: 10px 15px;
    background: rgba(17, 24, 39, 0.6);
    border-radius: 8px;
    border: 1px solid var(--border-glow);
}
.breadcrumb a {
    color: var(--primary-neon);
}
.breadcrumb a:hover {
    text-decoration: underline;
}
.hero-image-container {
    margin: 30px auto;
    max-width: 800px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-glow);
    box-shadow: 0 0 40px rgba(0, 255, 163, 0.2);
}
.hero-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

.wiki-layout { display: flex; gap: 40px; margin-top: 50px; align-items: flex-start; }
.wiki-sidebar { flex: 0 0 280px; position: sticky; top: 90px; }
.toc { background: var(--surface); border: 1px solid var(--border-glow); padding: 20px; border-radius: 8px; box-shadow: 0 0 15px rgba(0,0,0,0.5); }
.toc h3 { color: var(--primary-neon); font-size: 1.1rem; margin-bottom: 15px; border-bottom: 1px solid rgba(0,255,163,0.2); padding-bottom: 10px; }
.toc ul { list-style: none; margin-left: 0; padding-left: 0; }
.toc li { margin-bottom: 10px; }
.toc a { color: var(--text-muted); font-size: 0.95rem; text-decoration: none; }
.toc a:hover { color: var(--secondary-cyan); }
.wiki-content { flex: 1; min-width: 0; }
.wiki-section { margin-bottom: 60px; }
.wiki-section h2 { font-family: 'Inter', sans-serif; color: var(--primary-neon); font-size: 1.8rem; border-bottom: 1px solid rgba(0,255,163,0.2); padding-bottom: 10px; margin-bottom: 20px; }
.wiki-section p { margin-bottom: 20px; font-size: 1.05rem; color: #d1d5db; line-height: 1.8; text-indent: 0; }
.disclosure-box { background: rgba(245, 158, 11, 0.1); border-left: 4px solid #f59e0b; padding: 15px 20px; color: #d1d5db; font-size: 0.95rem; border-radius: 4px; }
.wiki-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.wiki-table th, .wiki-table td { padding: 15px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.1); }
.wiki-table th { color: var(--secondary-cyan); font-weight: 700; }
.highlight-row { background: rgba(0, 255, 163, 0.05); border-left: 3px solid var(--primary-neon); }
.pros-cons-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.pros, .cons { background: rgba(0,0,0,0.2); padding: 20px; border-radius: 8px; border: 1px solid var(--border-glow); }
.pros h4 { color: #10b981; margin-bottom: 15px; }
.cons h4 { color: #ef4444; margin-bottom: 15px; }
.pros li, .cons li { margin-bottom: 10px; color: #d1d5db; font-size: 0.95rem; }
.author-box { display: flex; gap: 20px; background: var(--surface); padding: 30px; border: 1px solid var(--border-glow); border-radius: 12px; align-items: center; }
.author-avatar { font-size: 50px; background: rgba(255,255,255,0.05); border-radius: 50%; width: 90px; height: 90px; display: flex; justify-content: center; align-items: center; flex-shrink: 0; }
.author-info h3 { color: var(--secondary-cyan); margin-bottom: 10px; font-family: 'Orbitron', sans-serif;}
.author-info p { margin-bottom: 0; font-size: 0.95rem; }
@media (max-width: 900px) { .wiki-layout { flex-direction: column; } .wiki-sidebar { width: 100%; position: static; } .pros-cons-grid { grid-template-columns: 1fr; } .author-box { flex-direction: column; text-align: center; } }


.faq-details { background: rgba(255,255,255,0.02); border: 1px solid rgba(0,255,163,0.15); border-radius: 8px; margin-bottom: 15px; padding: 15px 20px; transition: all 0.3s ease; }
.faq-details:hover { border-color: var(--secondary-cyan); background: rgba(255,255,255,0.05); }
.faq-details summary { font-size: 1.05rem; font-weight: 600; color: var(--text-main); cursor: pointer; outline: none; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-details summary::-webkit-details-marker { display: none; }
.faq-details summary::after { content: '+'; color: var(--secondary-cyan); font-size: 1.5rem; transition: transform 0.3s ease; font-weight: normal; }
.faq-details[open] summary::after { content: '−'; transform: rotate(180deg); color: var(--primary-neon); }
.faq-details[open] summary { color: var(--primary-neon); }
.faq-details p { margin-top: 15px; margin-bottom: 0; color: #d1d5db; font-size: 0.95rem; line-height: 1.7; border-top: 1px dashed rgba(255,255,255,0.1); padding-top: 15px; text-indent: 0; }

/* 锚点滚动平滑与偏移修复 */
html { scroll-behavior: smooth; }
.wiki-section, #faq { scroll-margin-top: 100px; }


/* 知识库体系小卡片样式 */
.kb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 25px;
}
.kb-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(0,255,163,0.15);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.kb-card:hover {
    border-color: var(--primary-neon);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,255,163,0.15);
    background: rgba(0,255,163,0.02);
}
.kb-card h3 {
    color: var(--secondary-cyan);
    font-size: 1.1rem;
    margin-bottom: 15px;
    line-height: 1.4;
    font-family: 'Inter', sans-serif;
}
.kb-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
    text-indent: 0;
}
.kb-card a {
    color: var(--primary-neon);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    align-self: flex-start;
    display: inline-block;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}
.kb-card a:hover {
    border-bottom-color: var(--primary-neon);
    text-shadow: 0 0 8px rgba(0,255,163,0.5);
}
