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

:root {
    --bg: #15171C; 
    --bg-rgb: 21, 23, 28;
    --grid-color: rgba(255, 255, 255, 0.04);
    --text: #ffffff;
    --text-muted: #9ba1a6;
    --card-bg: #1A1D24;
    --accent: #EF4444; 
    --accent-glow: rgba(239, 68, 68, 0.25);
    --border: #2A2D35;
    /* 使用系统默认中文字体保证大陆用户体验，英文字体作为前置 */
    --font-heading: 'Space Grotesk', -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-mono: 'JetBrains Mono', "PingFang SC", "Microsoft YaHei", monospace;
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

[data-theme="light"] {
    --bg: #f4f5f6;
    --bg-rgb: 244, 245, 246;
    --grid-color: rgba(15, 17, 21, 0.04);
    --text: #0F1115;
    --text-muted: #555555;
    --card-bg: #ffffff;
    --border: #d1d5db;
}

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

body {
    font-family: var(--font-heading);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 20px 20px;
    transition: background-color var(--transition), color var(--transition);
    position: relative;
    overflow-x: hidden;
}

body::before, body::after {
    content: ""; position: fixed; top: 0; bottom: 0; width: 8px; z-index: -1;
    background-image: repeating-linear-gradient(to bottom, var(--text-muted) 0, var(--text-muted) 1px, transparent 1px, transparent 10px);
    opacity: 0.15;
}
body::before { left: 0; border-right: 1px solid var(--border); }
body::after { right: 0; border-left: 1px solid var(--border); }

.container { width: 90%; max-width: 1200px; margin: 0 auto; position: relative; }
a { text-decoration: none; color: var(--accent); transition: color var(--transition); }

header {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: rgba(var(--bg-rgb), 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0 1rem;
}
.header-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; margin-bottom: 1rem; letter-spacing: 1px; }
.status-stamp { display: flex; align-items: center; gap: 0.5rem; }
.status-stamp .dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 8px var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }

.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--text); font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 2px; }
.nav-links { display: flex; gap: 2.5rem; }
.nav-links a { color: var(--text); font-weight: 600; font-size: 0.95rem; position: relative; padding-bottom: 4px; }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--accent); transition: width var(--transition); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.theme-toggle { background: transparent; border: 1px solid var(--border); width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); transition: all 0.2s; border-radius: 4px; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 16px; height: 16px; fill: currentColor; }

.hero { padding: 14rem 0 8rem; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-content { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.hero h1 { font-size: 4rem; line-height: 1.15; margin-bottom: 1.5rem; font-weight: 700; text-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.hero p { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 3.5rem; max-width: 700px; margin-inline: auto; letter-spacing: 0.5px; }

.hero-bg-gear {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 900px; height: 900px; opacity: 0.05; z-index: 0; pointer-events: none;
}
.gear-rotate { animation: rotate 40s linear infinite; transform-origin: center; }
.gear-rotate-reverse { animation: rotateReverse 50s linear infinite; transform-origin: center; width: 600px; height: 600px; opacity: 0.03; }
@keyframes rotate { 100% { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes rotateReverse { 100% { transform: translate(-50%, -50%) rotate(-360deg); } }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 1.2rem 3rem; font-family: var(--font-heading); font-size: 1rem; font-weight: 700; letter-spacing: 1px; color: var(--bg); background: var(--text); border: 1px solid var(--text); cursor: pointer; transition: all var(--transition); clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: transparent; color: var(--accent); box-shadow: inset 0 0 20px var(--accent-glow); }
.btn:hover { background: transparent; color: var(--text); }

.section { padding: 7rem 0; position: relative; border-top: 1px solid var(--border); }
.section-header { margin-bottom: 4rem; display: flex; flex-direction: column; align-items: flex-start; }
.section-label { font-family: var(--font-mono); color: var(--accent); font-size: 0.9rem; margin-bottom: 0.5rem; letter-spacing: 1px; }
.section-title { font-size: 2.5rem; font-weight: 700; line-height: 1.2; }

.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.bento-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.card {
    background: var(--card-bg); border: 1px solid var(--border); padding: 3rem 2.5rem;
    position: relative; transition: all var(--transition);
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}
.card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 1px solid transparent; transition: all var(--transition); pointer-events: none; z-index: 10; box-sizing: border-box; }
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.card:hover::before { box-shadow: inset 0 0 30px var(--accent-glow); border: 1px solid var(--accent); }
.card-icon { font-family: var(--font-mono); font-size: 1.2rem; color: var(--accent); margin-bottom: 2rem; font-weight: bold; }
.card h3 { font-size: 1.4rem; margin-bottom: 1rem; font-weight: 700; }
.card p { color: var(--text-muted); font-size: 1rem; line-height: 1.7; }

.protocol-toggles { display: flex; background: var(--bg); border: 1px solid var(--border); padding: 0.5rem; gap: 0.5rem; width: fit-content; margin-bottom: 2rem; margin-top: 1.5rem; flex-wrap: wrap; }
.protocol-btn { padding: 0.6rem 1.2rem; font-family: var(--font-mono); font-size: 0.9rem; background: transparent; border: 1px solid transparent; color: var(--text-muted); cursor: pointer; transition: all 0.2s; font-weight: 600; }
.protocol-btn.active { background: var(--card-bg); color: var(--accent); border-color: var(--border); box-shadow: 0 2px 10px rgba(0,0,0,0.2); }

.latency-widget { background: var(--bg); border: 1px solid var(--border); padding: 2.5rem; margin-top: 2rem; font-family: var(--font-mono); position: relative; overflow: hidden; }
.caliper-track { height: 2px; background: var(--border); margin: 3rem 0; position: relative; border-radius: 0; }
.caliper-thumb { width: 12px; height: 30px; background: var(--accent); position: absolute; top: 50%; transform: translate(-50%, -50%); cursor: ew-resize; border: 2px solid var(--card-bg); transition: background 0.2s; }
.caliper-thumb:hover, .caliper-thumb:active { background: #fff; border-color: var(--accent); box-shadow: 0 0 15px var(--accent); }
.caliper-labels { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-muted); }
.latency-readout { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; border-top: 1px dashed var(--border); padding-top: 1.5rem; margin-top: 1.5rem; }
.readout-item { display: flex; flex-direction: column; }
.readout-label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; letter-spacing: 1px; }
.readout-value { font-size: 1.5rem; font-weight: 700; color: var(--accent); line-height: 1; }

.pricing-table { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.price-card { border: 1px solid var(--border); background: var(--card-bg); padding: 3.5rem 2.5rem; position: relative; display: flex; flex-direction: column; transition: all var(--transition); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%); }
.price-card:hover { transform: translateY(-5px); border-color: var(--text-muted); }
.price-card.pro { border-color: var(--accent); }
.price-card.pro:hover { box-shadow: inset 0 0 20px var(--accent-glow); }
.price-card.pro::before { content: '最受欢迎 / HOT'; position: absolute; top: 0; right: 0; background: var(--accent); color: #fff; font-size: 0.75rem; padding: 0.35rem 1rem; font-weight: bold; letter-spacing: 1px; }
.price-tier { font-weight: 700; color: var(--text-muted); font-size: 1rem; margin-bottom: 1.5rem; }
.price-amount { font-size: 4rem; font-weight: 700; line-height: 1; margin-bottom: 2.5rem; display: flex; align-items: baseline; font-family: var(--font-mono); }
.price-amount span { font-size: 1rem; color: var(--text-muted); margin-left: 0.5rem; font-family: var(--font-heading); font-weight: 400; }
.price-features { list-style: none; margin-bottom: 3.5rem; flex-grow: 1; font-size: 0.95rem; }
.price-features li { padding: 1rem 0; border-bottom: 1px dashed var(--border); display: flex; justify-content: space-between; align-items: center; }
.price-features li:last-child { border-bottom: none; }
.price-features .val { color: var(--text); font-weight: 700; text-align: right; font-family: var(--font-mono); }
.price-card.pro .price-features .val { color: var(--accent); }
.price-card .btn { width: 100%; }

.faq-list { max-width: 900px; width: 100%; }
.faq-item { border-bottom: 1px solid var(--border); padding: 2rem 0; }
.faq-question { font-size: 1.15rem; font-weight: 700; margin-bottom: 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: color var(--transition); }
.faq-question:hover { color: var(--accent); }
.faq-question::after { content: '+'; font-family: var(--font-mono); color: var(--accent); font-size: 1.5rem; transition: transform var(--transition); font-weight: 400; }
.faq-item.active .faq-question::after { transform: rotate(45deg); }
.faq-answer { display: none; color: var(--text-muted); font-size: 1rem; margin-top: 1.5rem; padding-left: 1rem; border-left: 2px solid var(--border); }
.faq-item.active .faq-answer { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.review-card { padding: 2.5rem; background: var(--card-bg); border: 1px solid var(--border); position: relative; }
.review-card::before { content: '"'; font-family: serif; font-size: 6rem; position: absolute; top: -1rem; right: 1.5rem; color: var(--border); line-height: 1; opacity: 0.3; }
.review-text { font-size: 1rem; margin-bottom: 2.5rem; position: relative; z-index: 1; color: var(--text); line-height: 1.8; }
.review-author { font-weight: 700; font-size: 1.1rem; color: var(--accent); display: flex; flex-direction: column; letter-spacing: 1px; }
.review-role { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; font-weight: 400; }

footer { background: var(--bg); border-top: 1px solid var(--border); padding: 5rem 0 2rem; margin-top: 6rem; position: relative; z-index: 10; }
.footer-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 4rem; margin-bottom: 4rem; }
.footer-logo { font-size: 1.8rem; font-weight: 700; color: var(--text); letter-spacing: 2px; margin-bottom: 1rem; display: block; }
.footer-desc { color: var(--text-muted); font-size: 0.95rem; max-width: 300px; margin-bottom: 2rem; }
.footer-links { display: flex; gap: 4rem; }
.footer-col h4 { color: var(--accent); margin-bottom: 1.5rem; font-size: 0.9rem; font-weight: 700; letter-spacing: 1px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.85rem; }
.footer-col a { color: var(--text-muted); font-size: 0.95rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px dashed var(--border); padding-top: 2rem; display: flex; justify-content: space-between; color: var(--text-muted); font-size: 0.85rem; }

.subpage-container { padding: 12rem 0 8rem; max-width: 800px; margin: 0 auto; }
.subpage-title { font-size: 2.5rem; font-weight: 700; margin-bottom: 3rem; padding-bottom: 1.5rem; border-bottom: 2px solid var(--accent); }
.subpage-content h2 { margin: 3rem 0 1.5rem; font-size: 1.5rem; }
.subpage-content p { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 1.05rem; line-height: 1.8; }
.subpage-content ul { color: var(--text-muted); padding-left: 1.5rem; margin-bottom: 2rem; font-size: 1.05rem; }
.subpage-content li { margin-bottom: 0.75rem; }
.subpage-content a { border-bottom: 1px dashed var(--accent); padding-bottom: 2px; }

@media (max-width: 900px) {
    .bento-grid, .pricing-table, .review-grid { grid-template-columns: 1fr; }
    .bento-2 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 3rem; }
    .footer-links { flex-direction: column; gap: 2rem; }
}
@media (max-width: 768px) {
    .header-top { display: none; }
    .nav-links { display: none; }
    .hero { padding: 10rem 0 5rem; }
    .hero h1 { font-size: 2.8rem; }
    .hero p { font-size: 1rem; }
    .section-title { font-size: 2rem; }
    .btn { padding: 1rem 2rem; width: 100%; }
    .latency-readout { grid-template-columns: 1fr; gap: 0.5rem; }
    .footer-bottom { flex-direction: column; gap: 1rem; align-items: center; text-align: center; }
}
