:root {
  --bg-main: #f8fafc;
  --bg-card: #fff;
  --bg-soft: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-glow: rgba(79, 70, 229, .2);
  --green: #10b981;
  --orange: #f97316;
  --purple: #a855f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg-main); color: var(--text-main); }
body { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .76);
  backdrop-filter: blur(16px);
}
.nav-content, .dash-topbar {
  max-width: 1200px; height: 64px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo-area { display: flex; align-items: center; gap: 12px; font-weight: 800; }
.logo-box {
  width: 40px; height: 40px; border-radius: 10px; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  box-shadow: 0 8px 24px var(--primary-glow);
  font-size: 14px; flex-shrink: 0;
}
.site-name { font-size: 18px; letter-spacing: 0; }
.action-area { display: flex; gap: 20px; align-items: center; }
.login-text { color: var(--text-muted); font-weight: 600; font-size: 14px; }
.btn-console, .btn-primary, .btn-secondary, .auth-submit, .panel-refresh, .dash-user button {
  border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap; transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.btn-console { height: 36px; padding: 0 20px; border-radius: 999px; color: #fff; background: #0f172a; font-weight: 700; }
.btn-primary { height: 48px; padding: 0 32px; border-radius: 999px; background: var(--primary); color: #fff; font-weight: 700; box-shadow: 0 12px 28px var(--primary-glow); }
.btn-secondary { height: 48px; padding: 0 32px; border-radius: 999px; background: #fff; color: var(--text-main); border: 1px solid var(--border); font-weight: 700; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); }
.btn-secondary:hover { background: var(--bg-soft); }

.main-content { max-width: 1200px; margin: 0 auto; padding: 120px 24px 80px; }
.fade-in-section { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.fade-in-section.is-visible { opacity: 1; transform: translateY(0); }
.hero-section { max-width: 820px; margin: 0 auto 80px; text-align: center; position: relative; }
.glow-bg { position: absolute; z-index: -1; border-radius: 999px; filter: blur(100px); pointer-events: none; }
.glow-1 { width: 400px; height: 400px; background: rgba(99,102,241,.15); top: 20px; left: -120px; }
.glow-2 { width: 320px; height: 320px; background: rgba(168,85,247,.15); top: 30px; right: -100px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; padding: 7px 16px;
  border-radius: 999px; color: var(--primary); background: rgba(99,102,241,.12); border: 1px solid rgba(99,102,241,.18); font-weight: 700; font-size: 14px;
}
.badge-dot, .live-monitor-status-dot, .dash-status span { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.hero-title { margin: 0 0 24px; font-size: clamp(46px, 8vw, 76px); line-height: 1.08; letter-spacing: 0; }
.hero-desc { margin: 0 auto 10px; max-width: 760px; color: var(--text-muted); font-size: 20px; line-height: 1.6; }
.hero-actions, .cta-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin-top: 30px; }

.stats-section, .platforms-section, .capabilities-section, .advanced-section, .integration-section { margin-bottom: 118px; }
.stats-grid, .capabilities-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.platforms-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.advanced-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.stat-card, .platform-card, .capability-item, .feature-card, .live-monitor-card, .integration-code, .dash-panel, .metrics-grid article {
  background: var(--bg-card); border: 1px solid var(--border); box-shadow: 0 10px 32px rgba(15,23,42,.055);
}
.stat-card { border: 0; border-radius: 20px; padding: 24px; position: relative; overflow: hidden; }
.stat-bg-decoration { position: absolute; width: 220px; height: 220px; border-radius: 50%; top: -80px; right: -80px; filter: blur(35px); }
.stat-bg-1 { background: rgba(99,102,241,.15); } .stat-bg-2 { background: rgba(16,185,129,.15); } .stat-bg-3 { background: rgba(249,115,22,.15); } .stat-bg-4 { background: rgba(168,85,247,.15); }
.stat-header { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.stat-icon, .cap-icon-box, .metric-icon { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.pv-icon, .indigo { color: #6366f1; background: #eef2ff; } .uv-icon, .green { color: #059669; background: #ecfdf5; } .online-icon, .orange { color: #ea580c; background: #fff7ed; } .site-icon, .purple { color: #8b5cf6; background: #f5f3ff; }
.stat-label { color: var(--text-muted); font-weight: 700; font-size: 13px; }
.stat-value { position: relative; z-index: 1; font-size: 36px; line-height: 1; font-weight: 900; }
.stat-trend { position: relative; z-index: 1; margin-top: 16px; }
.stat-trend svg { width: 100%; height: 42px; }
.line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.line.pv { stroke: #6366f1; } .line.uv { stroke: #10b981; } .line.online { stroke: #f97316; } .line.site { stroke: #8b5cf6; }
.stat-trend__delta { display: inline-flex; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; }
.is-up { color: #059669; background: rgba(16,185,129,.12); } .is-flat { color: #64748b; background: rgba(148,163,184,.12); }

.live-monitor-card { margin-top: 28px; padding: 28px; border-radius: 28px; background: radial-gradient(circle at 100% 0, rgba(99,102,241,.12), transparent 30%), rgba(255,255,255,.96); }
.live-monitor-header { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.live-monitor-title-row { display: flex; align-items: center; gap: 12px; }
.live-monitor-mark { width: 6px; height: 24px; border-radius: 999px; background: linear-gradient(#6366f1, #8b5cf6); }
.live-monitor-header h3 { margin: 0; font-size: 26px; }
.live-monitor-header p { margin: 10px 0 0; color: var(--text-muted); }
.live-monitor-status { display: inline-flex; align-items: center; gap: 10px; color: #059669; background: rgba(16,185,129,.12); height: 38px; padding: 0 16px; border-radius: 999px; font-weight: 800; font-size: 13px; }
.live-monitor-toolbar { display: flex; justify-content: flex-end; margin-bottom: 18px; }
.live-window-switch { display: inline-flex; gap: 8px; padding: 6px; border: 1px solid rgba(148,163,184,.18); border-radius: 999px; background: rgba(255,255,255,.7); }
.live-window-switch__btn { border: 0; background: transparent; border-radius: 999px; padding: 9px 14px; color: var(--text-muted); font-weight: 800; cursor: pointer; }
.live-window-switch__btn.is-active { color: var(--primary); background: #fff; box-shadow: 0 2px 8px rgba(15,23,42,.08); }
.live-monitor-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.live-monitor-metric { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 20px; border: 1px solid rgba(148,163,184,.12); background: rgba(255,255,255,.66); }
.live-monitor-metric small { display: block; color: var(--text-muted); font-weight: 700; margin-bottom: 4px; }
.live-monitor-metric strong { font-size: 24px; }
.live-monitor-chart-wrap { border: 1px solid rgba(148,163,184,.14); background: rgba(255,255,255,.64); border-radius: 24px; padding: 18px 14px 10px; }
.live-monitor-legend { display: flex; justify-content: flex-end; gap: 20px; margin-bottom: 12px; color: var(--text-muted); font-weight: 700; font-size: 13px; }
.live-monitor-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.live-monitor-chart { width: 100%; height: 340px; }
.live-monitor-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; color: var(--text-muted); font-size: 13px; }

.section-header { text-align: center; margin-bottom: 56px; }
.section-title { margin: 0 0 16px; font-size: 36px; }
.section-desc { margin: 0 auto; max-width: 650px; color: var(--text-muted); font-size: 18px; line-height: 1.6; }
.platform-card, .capability-item, .feature-card { border-radius: 16px; padding: 24px; transition: transform .2s ease, box-shadow .2s ease; }
.platform-card:hover, .capability-item:hover, .feature-card:hover, .stat-card:hover { transform: translateY(-4px); box-shadow: 0 18px 42px rgba(15,23,42,.09); }
.platform-card { text-align: center; }
.platform-icon { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; }
.wechat { background: #07c160; } .qq { background: #12b7f5; } .douyin { background: #000; } .kuaishou { background: #ff6734; } .xiaohongshu { background: #ff2442; }
.platform-card h3, .capability-item h3, .feature-card h3 { margin: 0 0 8px; }
.platform-card p, .capability-item p, .feature-card p { margin: 0; color: var(--text-muted); line-height: 1.6; }
.bg-purple { background: rgba(168,85,247,.12); color: #8b5cf6; } .bg-blue { background: rgba(59,130,246,.12); color: #2563eb; } .bg-green { background: rgba(16,185,129,.12); color: #059669; } .bg-orange { background: rgba(249,115,22,.12); color: #ea580c; }
.feature-card { border-radius: 24px; position: relative; overflow: hidden; }
.feature-card span { display: inline-flex; padding: 5px 12px; border-radius: 999px; color: var(--primary); background: rgba(99,102,241,.1); font-size: 12px; font-weight: 800; margin-bottom: 18px; }
.integration-container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.integration-text h2, .cta-container h2 { margin: 0 0 16px; font-size: 32px; }
.integration-text p, .cta-container p { margin: 0 0 24px; color: var(--text-muted); line-height: 1.75; }
.check-list { padding: 0; margin: 0; list-style: none; display: grid; gap: 12px; font-weight: 700; }
.check-list li::before { content: "✓"; color: var(--green); margin-right: 10px; }
.integration-code { border-radius: 20px; overflow: hidden; }
.code-header { display: flex; align-items: center; gap: 8px; padding: 16px 20px; background: var(--bg-soft); border-bottom: 1px solid var(--border); color: var(--text-muted); }
.code-header span { width: 12px; height: 12px; border-radius: 50%; background: #cbd5e1; }
.code-header span:nth-child(1) { background: #ef4444; } .code-header span:nth-child(2) { background: #f59e0b; } .code-header span:nth-child(3) { background: #10b981; }
pre { margin: 0; padding: 24px; overflow: auto; line-height: 1.7; }
.cta-section { text-align: center; margin-bottom: 80px; }
.footer { border-top: 1px solid var(--border); padding: 44px 24px; }
.footer-content { max-width: 1200px; margin: 0 auto; color: var(--text-muted); }
.footer-brand { display: flex; align-items: center; gap: 12px; color: var(--text-main); margin-bottom: 14px; }

.auth-page { min-height: 100dvh; background: #fbfbfd; overflow: hidden; }
.auth-page::before { content: ""; position: fixed; inset: 0 0 auto; height: 34vh; background: linear-gradient(180deg, rgba(245,247,250,.92), transparent); pointer-events: none; }
.auth-back { position: fixed; top: 16px; left: 20px; z-index: 2; color: #0071e3; display: inline-flex; gap: 2px; align-items: center; font-weight: 600; }
.auth-back span { font-size: 20px; }
.auth-main { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 72px 20px 24px; overflow-y: auto; }
.auth-card { width: min(336px, 100%); position: relative; z-index: 1; }
.auth-brand { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; color: #6e6e73; font-size: 12px; font-weight: 700; }
.auth-brand span { width: 8px; height: 8px; border-radius: 50%; background: #0071e3; }
.auth-header { text-align: center; }
.auth-header h1 { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.auth-header p { margin: 0 0 28px; color: #6e6e73; }
.auth-form { display: grid; gap: 10px; }
.auth-input { min-height: 44px; display: flex; align-items: center; gap: 8px; border-radius: 12px; background: #f5f5f7; padding: 0 14px; border: 1px solid transparent; }
.auth-input:focus-within { background: #fff; border-color: rgba(0,113,227,.45); box-shadow: 0 0 0 3px rgba(0,113,227,.12); }
.auth-input input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; font-size: 14px; }
.toggle-password { border: 0; background: transparent; color: #86868b; cursor: pointer; }
.agree-box { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.45; }
.agree-box input { display: none; }
.checkmark { width: 18px; height: 18px; flex: 0 0 18px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; background: #0071e3; color: #fff; font-size: 10px; margin-top: 1px; }
.agree-box button { border: 0; padding: 0; background: transparent; color: #0071e3; cursor: pointer; }
.auth-submit { width: 100%; height: 44px; margin-top: 10px; border-radius: 999px; background: #0071e3; color: #fff; font-weight: 700; }
.auth-links { margin-top: 18px; text-align: center; color: #0071e3; }
.login-footer { text-align: center; margin-top: 48px; font-size: 12px; color: #a1a1a6; }
.auth-avatar-upload { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 8px; }
.auth-avatar-trigger { width: 88px; height: 88px; border-radius: 22px; background: #fff; border: 1px solid rgba(0,0,0,.06); display: flex; align-items: center; justify-content: center; overflow: hidden; color: #0071e3; }
.auth-avatar-trigger img { width: 100%; height: 100%; object-fit: cover; }
.auth-avatar-hint { height: 28px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; background: #f5f5f7; color: #0071e3; font-size: 12px; font-weight: 700; }
.auth-dialog-layer { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.48); }
.auth-dialog-layer[hidden] { display: none; }
.auth-dialog { width: min(340px, 100%); border-radius: 16px; background: #fff; padding: 20px; box-shadow: 0 22px 60px rgba(0,0,0,.18); position: relative; }
.auth-dialog-close { position: absolute; top: 10px; right: 12px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; font-size: 20px; cursor: pointer; color: #86868b; }
.auth-dialog h2 { margin: 0 0 12px; font-size: 18px; }
.auth-dialog-body, #authDialogBody { max-height: 52vh; overflow: auto; color: #6e6e73; line-height: 1.65; }
.toast { position: fixed; left: 50%; top: 18px; z-index: 80; transform: translateX(-50%); padding: 11px 16px; border-radius: 999px; color: #fff; background: rgba(15,23,42,.94); box-shadow: 0 12px 34px rgba(15,23,42,.18); font-weight: 700; font-size: 13px; }

.dashboard-page { min-height: 100vh; background: radial-gradient(circle at 100% 0, rgba(99,102,241,.1), transparent 28%), var(--bg-main); }
.dash-topbar { position: sticky; top: 0; z-index: 10; max-width: none; background: rgba(255,255,255,.78); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
.dash-user { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-weight: 700; }
.dash-user button, .panel-refresh { height: 34px; padding: 0 14px; border-radius: 999px; background: #0f172a; color: #fff; font-weight: 800; }
.dash-main { max-width: 1180px; margin: 0 auto; padding: 40px 24px 80px; }
.dash-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 24px; }
.dash-kicker { margin: 0 0 8px; color: var(--primary); font-weight: 900; }
.dash-hero h1 { margin: 0 0 12px; font-size: clamp(34px, 5vw, 54px); }
.dash-hero p { margin: 0; color: var(--text-muted); }
.dash-status { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; color: #059669; background: rgba(16,185,129,.12); font-weight: 800; white-space: nowrap; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.metrics-grid article { border-radius: 18px; padding: 20px; }
.metrics-grid small { color: var(--text-muted); font-weight: 800; }
.metrics-grid strong { display: block; margin-top: 10px; font-size: 30px; }
.dash-layout { display: grid; grid-template-columns: 360px 1fr; gap: 24px; align-items: start; }
.dash-panel { border-radius: 24px; padding: 22px; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.panel-header h2 { margin: 0 0 6px; font-size: 20px; }
.panel-header p { margin: 0; color: var(--text-muted); font-size: 13px; }
.dash-form { display: grid; gap: 14px; }
.dash-form label { display: grid; gap: 6px; color: var(--text-muted); font-size: 13px; font-weight: 800; }
.dash-form input, .dash-form select, .dash-form textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 12px; background: #f8fafc; padding: 12px 13px; outline: 0; color: var(--text-main);
}
.dash-form textarea { min-height: 98px; resize: vertical; }
.dash-form input:focus, .dash-form select:focus, .dash-form textarea:focus { border-color: rgba(99,102,241,.5); box-shadow: 0 0 0 3px rgba(99,102,241,.12); background: #fff; }
.account-list { display: grid; gap: 12px; }
.account-item { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 18px; background: #fbfdff; }
.account-title { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.account-title strong { font-size: 16px; }
.pill { border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 900; background: #eef2ff; color: #4f46e5; }
.pill.low { background: #ecfdf5; color: #059669; } .pill.medium { background: #eff6ff; color: #2563eb; } .pill.high { background: #fff7ed; color: #ea580c; } .pill.critical { background: #fef2f2; color: #dc2626; }
.account-item p { margin: 0; color: var(--text-muted); line-height: 1.6; }
.account-actions { display: flex; flex-direction: column; gap: 8px; min-width: 110px; }
.account-actions button { height: 32px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--text-main); cursor: pointer; font-weight: 800; }
.account-actions button.danger { color: #dc2626; }
.empty { padding: 32px; text-align: center; color: var(--text-muted); border: 1px dashed var(--border); border-radius: 18px; }

@media (max-width: 900px) {
  .stats-grid, .capabilities-grid, .live-monitor-metrics, .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .platforms-grid, .advanced-grid, .integration-container, .dash-layout { grid-template-columns: 1fr; }
  .live-monitor-header, .dash-hero, .live-monitor-footer { flex-direction: column; }
}
@media (max-width: 560px) {
  .nav-content, .dash-topbar { padding: 0 16px; }
  .site-name { font-size: 15px; }
  .login-text { display: none; }
  .main-content { padding: 104px 16px 56px; }
  .hero-title { font-size: 44px; }
  .hero-desc { font-size: 16px; }
  .stats-grid, .capabilities-grid, .live-monitor-metrics, .metrics-grid { grid-template-columns: 1fr; }
  .stat-card, .live-monitor-card, .dash-panel { padding: 18px; }
  .section-title { font-size: 28px; }
  .live-monitor-chart { height: 260px; }
  .account-item { grid-template-columns: 1fr; }
  .account-actions { flex-direction: row; flex-wrap: wrap; }
  .dash-main { padding: 28px 16px 60px; }
}
