/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif; color: #1a1a2e; background: #fafbfc; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: #4361ee; text-decoration: none; transition: .2s; }
a:hover { color: #3a0ca3; }

/* ===== Navbar ===== */
.navbar { background: rgba(255,255,255,.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid rgba(0,0,0,.06); padding: 0 32px; display: flex; align-items: center; justify-content: space-between; height: 64px; position: sticky; top: 0; z-index: 100; }
.navbar .logo { font-size: 1.15rem; font-weight: 700; color: #1a1a2e; letter-spacing: -.5px; }
.navbar .logo span { color: #4361ee; }
.navbar .nav-links { display: flex; align-items: center; gap: 28px; }
.navbar .nav-links a { font-size: .9rem; color: #64748b; font-weight: 500; }
.navbar .nav-links a:hover { color: #1a1a2e; }
.navbar .nav-links .nav-btn { background: #1a1a2e; color: #fff; padding: 8px 20px; border-radius: 8px; font-size: .85rem; }
.navbar .nav-links .nav-btn:hover { background: #4361ee; color: #fff; }

/* ===== Hero ===== */
.hero { padding: 100px 24px 80px; text-align: center; background: #fff; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -200px; right: -200px; width: 500px; height: 500px; background: radial-gradient(circle, rgba(67,97,238,.08) 0%, transparent 70%); border-radius: 50%; }
.hero::after { content: ''; position: absolute; bottom: -150px; left: -150px; width: 400px; height: 400px; background: radial-gradient(circle, rgba(247,37,133,.06) 0%, transparent 70%); border-radius: 50%; }
.hero-badge { display: inline-block; background: #f0f4ff; color: #4361ee; padding: 6px 16px; border-radius: 20px; font-size: .82rem; font-weight: 600; margin-bottom: 24px; letter-spacing: .5px; }
.hero h1 { font-size: 3.2rem; font-weight: 800; line-height: 1.15; letter-spacing: -1.5px; color: #1a1a2e; max-width: 650px; margin: 0 auto 20px; position: relative; }
.hero h1 em { font-style: normal; background: linear-gradient(135deg, #4361ee, #7209b7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { font-size: 1.1rem; color: #64748b; max-width: 500px; margin: 0 auto 36px; position: relative; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; justify-content: center; position: relative; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 28px; border-radius: 10px; font-size: .92rem; font-weight: 600; cursor: pointer; border: none; transition: all .2s; text-decoration: none; }
.btn-dark { background: #1a1a2e; color: #fff; }
.btn-dark:hover { background: #4361ee; color: #fff; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(67,97,238,.25); }
.btn-ghost { background: transparent; color: #64748b; border: 1.5px solid #e2e8f0; }
.btn-ghost:hover { border-color: #1a1a2e; color: #1a1a2e; }
.btn-primary { background: #4361ee; color: #fff; }
.btn-primary:hover { background: #3a0ca3; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(67,97,238,.3); }
.btn-sm { padding: 8px 20px; font-size: .85rem; border-radius: 8px; }
.btn-danger { background: #fee2e2; color: #dc2626; border: none; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-success { background: #dcfce7; color: #16a34a; border: none; }
.btn-success:hover { background: #16a34a; color: #fff; }

/* ===== Features ===== */
.features { max-width: 1000px; margin: 0 auto; padding: 80px 24px; }
.features .section-label { text-align: center; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: #4361ee; margin-bottom: 12px; }
.features h2 { text-align: center; font-size: 2rem; font-weight: 700; color: #1a1a2e; margin-bottom: 48px; letter-spacing: -.5px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card { background: #fff; border: 1px solid #f1f5f9; border-radius: 16px; padding: 32px 24px; transition: all .3s; }
.feature-card:hover { border-color: #e2e8f0; box-shadow: 0 8px 32px rgba(0,0,0,.06); transform: translateY(-2px); }
.feature-card .f-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 18px; }
.feature-card .f-icon.blue { background: #eff3ff; color: #4361ee; }
.feature-card .f-icon.green { background: #ecfdf5; color: #059669; }
.feature-card .f-icon.orange { background: #fff7ed; color: #ea580c; }
.feature-card h3 { font-size: 1rem; font-weight: 650; margin-bottom: 8px; color: #1a1a2e; }
.feature-card p { font-size: .88rem; color: #94a3b8; line-height: 1.6; }

/* ===== Pricing ===== */
.pricing-section { background: #fff; padding: 80px 24px; border-top: 1px solid #f1f5f9; }
.pricing-section .section-label { text-align: center; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: #4361ee; margin-bottom: 12px; }
.pricing-section h2 { text-align: center; font-size: 2rem; font-weight: 700; color: #1a1a2e; margin-bottom: 8px; letter-spacing: -.5px; }
.pricing-section .subtitle { text-align: center; color: #94a3b8; margin-bottom: 48px; font-size: .95rem; }
.pricing-grid { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.price-card { background: #fafbfc; border: 1.5px solid #f1f5f9; border-radius: 16px; padding: 28px 20px; text-align: center; transition: all .3s; position: relative; }
.price-card:hover { border-color: #4361ee; background: #fff; box-shadow: 0 8px 32px rgba(67,97,238,.1); transform: translateY(-3px); }
.price-card.hot { border-color: #4361ee; background: #fff; }
.price-card.hot::before { content: '推荐'; position: absolute; top: 12px; right: 12px; background: #4361ee; color: #fff; padding: 2px 10px; border-radius: 6px; font-size: .72rem; font-weight: 600; }
.price-card h3 { font-size: .95rem; color: #64748b; font-weight: 500; margin-bottom: 12px; }
.price-card .price { font-size: 2.2rem; font-weight: 800; color: #1a1a2e; letter-spacing: -1px; }
.price-card .price span { font-size: .8rem; font-weight: 400; color: #94a3b8; }
.price-card .calls { color: #64748b; margin: 8px 0 4px; font-size: .9rem; }
.price-card .unit { font-size: .8rem; color: #cbd5e1; margin-bottom: 16px; }

/* ===== Code Demo ===== */
.api-demo { padding: 80px 24px; max-width: 1000px; margin: 0 auto; }
.api-demo .section-label { text-align: center; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: #4361ee; margin-bottom: 12px; }
.api-demo h2 { text-align: center; font-size: 2rem; font-weight: 700; color: #1a1a2e; margin-bottom: 8px; letter-spacing: -.5px; }
.api-demo .subtitle { text-align: center; color: #94a3b8; margin-bottom: 36px; }
.code-block { background: #1a1a2e; border-radius: 16px; padding: 28px 32px; font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace; font-size: .85rem; line-height: 2; color: #e2e8f0; overflow-x: auto; position: relative; }
.code-block::before { content: ''; position: absolute; top: 16px; left: 20px; width: 8px; height: 8px; border-radius: 50%; background: #ff5f57; box-shadow: 14px 0 0 #ffbd2e, 28px 0 0 #28c840; }
.code-block code { display: block; margin-top: 12px; }
.code-block .cm { color: #64748b; }
.code-block .str { color: #4ade80; }
.code-block .key { color: #fbbf24; }

/* ===== Footer ===== */
.footer { text-align: center; padding: 32px 24px; color: #94a3b8; font-size: .82rem; border-top: 1px solid #f1f5f9; }

/* ===== Container ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 24px; }

/* ===== Cards ===== */
.card { background: #fff; border-radius: 14px; padding: 24px; border: 1px solid #f1f5f9; margin-bottom: 20px; }
.card h3 { font-size: 1rem; font-weight: 650; margin-bottom: 16px; color: #1a1a2e; padding-bottom: 12px; border-bottom: 1px solid #f8fafc; }

/* ===== Stats ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 14px; padding: 24px; text-align: center; border: 1px solid #f1f5f9; }
.stat-card .num { font-size: 2rem; font-weight: 800; color: #1a1a2e; letter-spacing: -1px; }
.stat-card .label { font-size: .82rem; color: #94a3b8; margin-top: 4px; font-weight: 500; }

/* ===== Forms ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: .85rem; color: #64748b; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 14px; border: 1.5px solid #e2e8f0; border-radius: 10px; font-size: .9rem; transition: .2s; outline: none; background: #fff; font-family: inherit; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #4361ee; box-shadow: 0 0 0 3px rgba(67,97,238,.1); }

/* Auth Pages */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #fafbfc; }
.auth-box { background: #fff; border-radius: 20px; padding: 44px 40px; width: 400px; max-width: 92%; border: 1px solid #f1f5f9; box-shadow: 0 4px 24px rgba(0,0,0,.04); }
.auth-box h2 { text-align: center; margin-bottom: 28px; color: #1a1a2e; font-size: 1.5rem; font-weight: 700; letter-spacing: -.5px; }
.auth-box .switch { text-align: center; margin-top: 18px; font-size: .88rem; color: #94a3b8; }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
table th, table td { padding: 12px 14px; text-align: left; font-size: .88rem; }
table th { color: #94a3b8; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; border-bottom: 1.5px solid #f1f5f9; }
table td { border-bottom: 1px solid #f8fafc; color: #475569; }
table tr:hover td { background: #fafbfc; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: .78rem; font-weight: 600; }
.badge-ok { background: #dcfce7; color: #16a34a; }
.badge-no { background: #fee2e2; color: #dc2626; }

/* ===== Key Display ===== */
.key-display { background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 14px 16px; font-family: "JetBrains Mono", monospace; font-size: .88rem; word-break: break-all; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.key-display .copy-btn { background: #1a1a2e; color: #fff; border: none; padding: 7px 16px; border-radius: 8px; cursor: pointer; font-size: .82rem; font-weight: 600; white-space: nowrap; transition: .2s; }
.key-display .copy-btn:hover { background: #4361ee; }

/* ===== Messages ===== */
.msg { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: .88rem; font-weight: 500; }
.msg-ok { background: #dcfce7; color: #16a34a; }
.msg-err { background: #fee2e2; color: #dc2626; }

/* ===== Admin Layout ===== */
.admin-wrap { display: flex; min-height: 100vh; }
.sidebar { width: 230px; background: #1a1a2e; color: #e2e8f0; padding: 24px 0; flex-shrink: 0; }
.sidebar .logo { text-align: center; font-size: 1.1rem; font-weight: 700; padding: 8px 20px 28px; color: #fff; letter-spacing: -.3px; }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 11px 24px; color: #94a3b8; font-size: .9rem; transition: .2s; border-left: 3px solid transparent; }
.sidebar a:hover { background: rgba(255,255,255,.05); color: #fff; }
.sidebar a.active { background: rgba(67,97,238,.15); color: #4361ee; border-left-color: #4361ee; }
.admin-main { flex: 1; padding: 28px; background: #fafbfc; }
.admin-main h2 { font-size: 1.35rem; font-weight: 700; margin-bottom: 24px; color: #1a1a2e; letter-spacing: -.3px; }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 20px; }
.pagination a, .pagination span { padding: 7px 14px; border-radius: 8px; font-size: .85rem; font-weight: 500; }
.pagination a { background: #fff; border: 1.5px solid #e2e8f0; color: #64748b; }
.pagination a:hover { background: #4361ee; color: #fff; border-color: #4361ee; }
.pagination span.current { background: #4361ee; color: #fff; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .features-grid { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr 1fr; }
    .hero h1 { font-size: 2.2rem; }
    .admin-wrap { flex-direction: column; }
    .sidebar { width: 100%; }
    .navbar { padding: 0 16px; }
    .navbar .nav-links { gap: 16px; }
}
