/* JayAI Proxy 用户端样式 - 白色 + 亮蓝主题 */
:root {
  /* 主色调 */
  --bg: #f5f9ff;
  --bg-deep: #eaf2fc;
  --surface: #ffffff;
  --surface2: #eef5ff;
  --surface3: #e3eefe;
  --border: #d8e6fa;
  --border-strong: #b7d0f0;

  /* 文字 */
  --text: #14253f;
  --text2: #5a6c89;
  --text3: #8a99b3;

  /* 品牌色 */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eaf2ff;
  --primary-bright: #3b82f6;
  --accent: #2563eb;
  --accent2: #1d4ed8;

  /* 状态色 */
  --success: #16a34a;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;

  /* 形状 */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(15,23,42,.04), 0 2px 6px rgba(37,99,235,.05);
  --shadow-md: 0 4px 12px rgba(37,99,235,.08);
  --shadow-lg: 0 12px 32px rgba(37,99,235,.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  background: var(--surface2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
  font-size: 0.9em;
  color: var(--accent2);
}

.container { max-width: 1080px; margin: 0 auto; padding: 24px; }
.container-narrow { max-width: 560px; margin: 0 auto; padding: 24px; }
.container-wide { max-width: 1280px; margin: 0 auto; padding: 24px; }

/* ─── Nav (已登录页面顶部导航) ─── */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(37,99,235,.04);
}
.nav-brand {
  font-weight: 800;
  font-size: 18px;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-links { display: flex; gap: 6px; flex: 1; }
.nav-links a {
  color: var(--text2);
  padding: 7px 14px;
  border-radius: 8px;
  font-weight: 500;
  transition: all .15s;
}
.nav-links a:hover,
.nav-links a.active {
  background: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
}
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-bell {
  position: relative;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background .15s;
}
.nav-bell:hover { background: var(--surface2); }
.nav-bell .dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  display: none;
  border: 2px solid var(--surface);
}
.nav-bell.has-unread .dot { display: block; }

/* ─── Card ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.card-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ─── Form ─── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-input::placeholder { color: var(--text3); }
.form-textarea { min-height: 80px; resize: vertical; line-height: 1.6; }
.form-check { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.form-check input { margin-top: 3px; accent-color: var(--primary); }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* ─── Button ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 1px 2px rgba(37,99,235,.15);
}
.btn:hover { background: var(--primary-hover); box-shadow: 0 4px 10px rgba(37,99,235,.25); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-secondary {
  background: #ffffff;
  color: var(--primary);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}
.btn-secondary:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  box-shadow: none;
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  box-shadow: none;
}
.btn-outline:hover { background: var(--primary-light); }
.btn-danger { background: var(--danger); box-shadow: 0 1px 2px rgba(220,38,38,.2); }
.btn-danger:hover { background: #b91c1c; box-shadow: 0 4px 10px rgba(220,38,38,.3); }
.btn-success { background: var(--success); }
.btn-success:hover { background: #15803d; }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* ─── Alert ─── */
.alert {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  border-left: 4px solid;
}
.alert-success { background: var(--success-bg); border-color: var(--success); color: #166534; }
.alert-warning { background: var(--warning-bg); border-color: var(--warning); color: #92400e; }
.alert-danger  { background: var(--danger-bg);  border-color: var(--danger);  color: #991b1b; }
.alert-info    { background: var(--primary-light); border-color: var(--primary); color: var(--accent2); }

/* ─── Table ─── */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.table th {
  color: var(--text2);
  font-weight: 600;
  font-size: 13px;
  background: var(--surface2);
}
.table tbody tr:hover { background: var(--surface2); }

/* ─── Badge ─── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-info    { background: var(--primary-light); color: var(--primary); }

/* ─── Dashboard cards ─── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: box-shadow .15s, transform .15s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card-label { color: var(--text2); font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.stat-card-value { font-size: 28px; font-weight: 700; color: var(--text); }
.stat-card-sub { color: var(--text2); font-size: 12px; margin-top: 4px; }

/* ─── Key display ─── */
.key-display {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  color: var(--accent2);
}
.key-display .key-text { flex: 1; overflow: hidden; text-overflow: ellipsis; }

/* ─── Utility ─── */
.muted { color: var(--text2); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }

/* ─── Toast ─── */
#toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  max-width: 360px;
  color: var(--text);
  animation: slideIn .25s ease;
}
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ─── Modal ─── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.45); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 480px;
  width: 92%;
  box-shadow: var(--shadow-lg);
}
.modal-title { font-size: 18px; font-weight: 700; margin: 0 0 12px; }

/* ─── QR code box ─── */
.qr-box {
  background: white;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: inline-block;
}
.qr-box img { display: block; width: 200px; height: 200px; object-fit: contain; }

.chart-container { position: relative; height: 280px; }

/* Markdown 渲染出的表格（CMS 页面、文档页用） */
.card table { width: 100%; border-collapse: collapse; }
.card table th, .card table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
}
.card table th {
  background: var(--surface2);
  color: var(--text2);
  font-weight: 600;
  font-size: 13px;
}
.card table tbody tr:hover { background: var(--surface2); }
.card table tbody tr:last-child td { border-bottom: none; }

/* ─── 下载客户端下拉菜单 ─── */
.dl-wrap { position: relative; display: inline-block; }
.dl-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.dl-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.dl-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  min-width: 220px; padding: 6px;
  z-index: 200;
  display: none;
  animation: dlFadeIn .15s ease;
}
.dl-menu.open { display: block; }
.dl-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  color: var(--text);
  border-radius: 7px;
  text-decoration: none;
  font-size: 14px;
}
.dl-menu a:hover { background: var(--primary-light); color: var(--primary); }
.dl-menu .dl-empty {
  padding: 14px;
  color: var(--text3);
  font-size: 13px;
  text-align: center;
}
@keyframes dlFadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* ═══════════════════════════════════════════════════════════════════
   登录/落地页（landing）专用样式
   ═══════════════════════════════════════════════════════════════════ */
.landing-bg {
  background:
    radial-gradient(circle at 20% 0%, rgba(59,130,246,.12), transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(96,165,250,.12), transparent 50%),
    var(--bg);
  min-height: 100vh;
}

/* 顶部 nav */
.landing-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.landing-nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.landing-brand {
  font-weight: 800; font-size: 20px;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.landing-nav-links { display: flex; gap: 4px; align-items: center; }
.landing-nav-links a {
  padding: 8px 14px; color: var(--text2);
  border-radius: 8px; font-weight: 500;
  transition: background .15s, color .15s;
}
.landing-nav-links a:hover { background: var(--primary-light); color: var(--primary); text-decoration: none; }

/* Hero */
.hero {
  padding: 60px 24px 80px;
}
.hero-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 1fr;
  gap: 60px; align-items: center;
}
.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 100px;
  font-size: 13px; font-weight: 600;
  margin-bottom: 20px;
}
.hero-title {
  font-size: 48px; font-weight: 800; line-height: 1.15;
  margin: 0 0 18px;
  color: var(--text);
  letter-spacing: -.02em;
}
.text-gradient {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: 18px; color: var(--text2);
  margin: 0 0 28px;
  line-height: 1.6;
}
.hero-actions { display: flex; gap: 12px; margin-bottom: 36px; flex-wrap: wrap; }
.hero-trust {
  display: flex; gap: 32px; flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.trust-item { color: var(--text2); font-size: 14px; }
.trust-item strong {
  display: block;
  font-size: 24px; font-weight: 800;
  color: var(--primary);
  margin-bottom: 2px;
}

/* 右侧登录卡片 */
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.auth-tabs {
  display: flex; gap: 6px;
  background: var(--surface2);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  padding: 9px 14px;
  background: transparent;
  border: none;
  color: var(--text2);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border-radius: 7px;
  transition: all .15s;
  font-family: inherit;
}
.auth-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(15,23,42,.08);
}
.auth-tab:not(.active):hover { color: var(--text); }

/* 特性区 */
.section { padding: 70px 24px; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title {
  font-size: 32px; font-weight: 800; text-align: center;
  margin: 0 0 12px; letter-spacing: -.02em;
}
.section-sub {
  font-size: 16px; color: var(--text2);
  text-align: center;
  margin: 0 0 50px;
}
.features-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: left;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.feature:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.feature-icon {
  width: 48px; height: 48px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
}
.feature h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.feature p { margin: 0; color: var(--text2); line-height: 1.65; }

/* 流程步骤 */
.steps {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  position: relative;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}
.step-num {
  width: 44px; height: 44px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800;
  box-shadow: 0 4px 12px rgba(37,99,235,.3);
}
.step h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.step p { margin: 0; color: var(--text2); }

/* 定价区 */
.pricing-grid {
  max-width: 720px; margin: 0 auto 24px;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.pricing-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: border-color .2s, transform .2s;
}
.pricing-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.pricing-label { color: var(--text2); font-weight: 600; font-size: 14px; margin-bottom: 12px; }
.pricing-num {
  font-size: 42px; font-weight: 800; color: var(--primary);
  line-height: 1;
}
.pricing-num span {
  font-size: 16px; font-weight: 500; color: var(--text2);
}
.pricing-note { text-align: center; color: var(--text2); margin: 0; font-size: 14px; }

/* 页脚 */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 32px 24px;
  text-align: center;
  color: var(--text3);
  font-size: 13px;
}

/* 响应式 */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-title { font-size: 36px; }
  .hero-sub { font-size: 16px; }
  .section-title { font-size: 26px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .landing-nav-links a:not(.btn) { display: none; }
}
