/* ========== 全局 ========== */
:root {
  --bg: #f5f7fb;
  --bg2: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --rule: #e2e8f0;
  --accent: #2563eb;
  --accent2: #06b6d4;
  --grad: linear-gradient(135deg, #2563eb, #06b6d4);
  --danger: #dc2626;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 30px rgba(37, 99, 235, 0.12);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
body.site-body {
  background-image:
    radial-gradient(ellipse 55% 35% at 90% -5%, rgba(6, 182, 212, 0.10), transparent),
    radial-gradient(ellipse 45% 30% at 5% 10%, rgba(37, 99, 235, 0.08), transparent);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 15px; color: var(--ink); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ========== 按钮 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
  white-space: nowrap;
  background: transparent;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(37, 99, 235, 0.32); }
.btn-ghost { background: var(--bg2); border-color: var(--rule); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-sm { padding: 8px 18px; font-size: 14px; border-radius: 8px; }
.btn-full { width: 100%; padding: 13px; border-radius: 10px; }
.btn-danger {
  padding: 8px 14px; font-size: 13px; font-weight: 600;
  border-radius: 8px;
  background: #fef2f2; color: var(--danger);
  border: 1px solid #fecaca;
}
.btn-danger:hover { background: #fee2e2; }
.btn.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ========== Flash 消息 ========== */
.flash-container {
  position: fixed; top: 20px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
}
.flash {
  padding: 10px 20px; border-radius: 10px; font-weight: 600; font-size: 14px;
  background: #dbeafe; color: #1e40af;
  box-shadow: var(--shadow-md);
  transition: opacity 0.3s;
}
.flash-success { background: #dcfce7; color: #166534; }
.flash-error { background: #fee2e2; color: #991b1b; }

/* ========== 官网导航 ========== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}
.nav-links { display: flex; gap: 6px; }
.nav-links a { padding: 8px 14px; border-radius: 8px; font-size: 15px; font-weight: 500; }
.nav-links a:hover { background: rgba(37, 99, 235, 0.08); color: var(--accent); }

/* ========== Hero ========== */
.hero { padding: 140px 0 80px; }
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(34px, 4.5vw, 52px); font-weight: 800;
  line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 18px;
}
.hero .grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-desc { color: var(--muted); font-size: 17px; margin-bottom: 28px; max-width: 34em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.hero-note { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.hero-art svg { width: 100%; height: auto; max-width: 440px; display: block; margin: 0 auto; }

/* ========== Section 通用 ========== */
section { padding: 80px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 48px; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  color: var(--accent); background: rgba(37, 99, 235, 0.08);
  padding: 5px 14px; border-radius: 999px; margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 800; margin-bottom: 12px; }
.section-head p { color: var(--muted); }

/* ========== Features ========== */
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.feature-card {
  background: var(--bg2); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm);
  transition: transform 0.22s, box-shadow 0.22s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(6, 182, 212, 0.1));
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 15px; }

/* ========== Download ========== */
.download { background: rgba(255, 255, 255, 0.5); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.download-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.download-card {
  background: var(--bg2); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 32px 28px; text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 14px;
}
.download-card .platform {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--ink); font-weight: 700; font-size: 16px;
}
.download-card .platform svg { color: var(--accent); }
.download-card .version {
  font-size: 14px; font-weight: 700; color: var(--accent);
}
.download-card p { color: var(--muted); font-size: 14px; }
.download-card .notes { font-size: 13px; color: var(--muted); font-style: italic; margin-top: 4px; }

/* ========== FAQ ========== */
.faq-list { max-width: 720px; margin: 0 auto; display: grid; gap: 12px; }
.faq-list details {
  background: var(--bg2); border: 1px solid var(--rule);
  border-radius: 12px; padding: 0 20px;
}
.faq-list summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 0; font-weight: 700; font-size: 16px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list .chev { color: var(--accent); transition: transform 0.2s; }
.faq-list details[open] .chev { transform: rotate(180deg); }
.faq-list p { padding: 0 0 18px; color: var(--muted); font-size: 14.5px; }

/* ========== Footer ========== */
.footer { padding: 40px 0 30px; text-align: center; color: var(--muted); font-size: 13px; }
.footer-contact { margin-top: 8px; font-size: 13.5px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.footer-contact a { color: inherit; text-decoration: none; }
.footer-contact a:hover { color: var(--primary); }
.footer-small { font-size: 12px; margin-top: 6px; opacity: 0.7; }

/* ========== 管理后台登录 ========== */
.login-body {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background-image:
    radial-gradient(ellipse 50% 30% at 85% -5%, rgba(37, 99, 235, 0.15), transparent),
    radial-gradient(ellipse 45% 30% at 5% 110%, rgba(6, 182, 212, 0.12), transparent);
}
.login-wrap { width: 100%; padding: 24px; max-width: 420px; }
.login-card {
  background: var(--bg2); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 40px 32px;
}
.login-logo { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--accent); }
.login-logo h1 { color: var(--ink); font-size: 22px; font-weight: 800; }
.login-desc { color: var(--muted); font-size: 14px; text-align: center; margin-bottom: 22px; }
.login-form { display: grid; gap: 14px; }
.login-form label { font-weight: 600; font-size: 14px; }
.login-form input {
  padding: 12px 14px; border: 1px solid var(--rule); border-radius: 10px;
  background: var(--bg);
}
.login-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }
.login-back { display: block; text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); }
.login-back:hover { color: var(--accent); }

/* ========== 管理后台 ========== */
.admin-body { background: var(--bg); }
.admin-nav {
  background: var(--bg2); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 90;
}
.admin-nav-right { display: flex; gap: 10px; }
.admin-main { padding: 32px 24px 80px; }
.tabs { display: flex; gap: 6px; margin-bottom: 24px; background: var(--bg2); border: 1px solid var(--rule); border-radius: 12px; padding: 6px; }
.tab-btn {
  padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: 14px;
  color: var(--muted); transition: all 0.18s;
}
.tab-btn.active { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.panel {
  background: var(--bg2); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 28px; margin-bottom: 24px; box-shadow: var(--shadow-sm);
}
.panel h2 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.panel .hint { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.panel code {
  background: var(--bg); padding: 2px 7px; border-radius: 5px;
  font-size: 13px; color: var(--accent);
}

/* Admin 表格 */
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td {
  text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--rule);
}
.admin-table th { font-size: 13px; color: var(--muted); font-weight: 600; background: var(--bg); }
.admin-table tr:hover td { background: rgba(37, 99, 235, 0.02); }
.admin-table .input-sm {
  width: 90px; padding: 6px 10px; border: 1px solid var(--rule); border-radius: 6px; font-size: 13px;
}
.admin-table small { color: var(--muted); }
.admin-table .actions { white-space: nowrap; }

/* Admin 表单 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.form-grid .req { color: var(--danger); }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 10px;
  background: var(--bg); font-size: 14px;
}
.form-grid textarea { resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.form-narrow { max-width: 460px; }

/* ========== 响应式 ========== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .download-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .admin-table { font-size: 12px; }
  .admin-table th, .admin-table td { padding: 8px 6px; }
}
