/* ===== 微创云主样式 — 双主题 + 圆角可配 ===== */

/* ---------- 浏览器仿顶部加载进度条 ---------- */
#wcy-topbar {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  z-index: 99999;
  background: linear-gradient(90deg, var(--brand, #6366f1), var(--accent, #22d3ee));
  border-radius: 0 3px 3px 0;
  transition: width .25s ease, opacity .4s ease;
  box-shadow: 0 0 10px rgba(99,102,241,.7), 0 0 4px rgba(34,211,238,.5);
  pointer-events: none;
}
/* 进度条右端发光小圆点 */
#wcy-topbar::after {
  content: '';
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px 2px var(--accent, #22d3ee);
  opacity: .9;
}

/* ---------- CSS 变量：深色默认 ---------- */
:root {
  --radius-factor: 1;   /* JS 动态修改圆角倍率 */
  --r: calc(12px * var(--radius-factor));
  --r-lg: calc(20px * var(--radius-factor));
  --r-btn: calc(10px * var(--radius-factor));
  --r-full: calc(100px * var(--radius-factor));
}

[data-theme="dark"] {
  --brand: #6366f1;
  --brand-light: #818cf8;
  --brand-dark: #4f46e5;
  --accent: #22d3ee;
  --bg: #0a0e1a;
  --bg2: #0f1629;
  --bg3: #151d35;
  --surface: #1a2236;
  --surface2: #212d45;
  --border: rgba(99,102,241,.18);
  --border2: rgba(255,255,255,.07);
  --text: #e2e8f0;
  --text2: #94a3b8;
  --text3: #64748b;
  --green: #22c55e;
  --shadow: 0 4px 32px rgba(99,102,241,.12);
  --shadow-lg: 0 8px 64px rgba(99,102,241,.2);
  --nav-bg: rgba(10,14,26,.85);
  --nav-scrolled: rgba(10,14,26,.97);
}

[data-theme="light"] {
  --brand: #6366f1;
  --brand-light: #4f46e5;
  --brand-dark: #3730a3;
  --accent: #0891b2;
  --bg: #f8fafc;
  --bg2: #f1f5f9;
  --bg3: #e2e8f0;
  --surface: #ffffff;
  --surface2: #f8fafc;
  --border: rgba(99,102,241,.15);
  --border2: rgba(0,0,0,.07);
  --text: #0f172a;
  --text2: #475569;
  --text3: #94a3b8;
  --green: #16a34a;
  --shadow: 0 4px 24px rgba(99,102,241,.08);
  --shadow-lg: 0 8px 48px rgba(99,102,241,.12);
  --nav-bg: rgba(248,250,252,.9);
  --nav-scrolled: rgba(248,250,252,.98);
}

/* ---------- 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'PingFang SC','Microsoft YaHei','Segoe UI',system-ui,sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- 导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border2);
  transition: background .3s, box-shadow .3s;
}
.nav.scrolled { background: var(--nav-scrolled); box-shadow: 0 2px 24px rgba(0,0,0,.12); }
.nav-inner { display: flex; align-items: center; height: 64px; gap: 8px; }
.nav-brand { display: flex; align-items: center; gap: 0; margin-right: 24px; flex-shrink: 0; }
.nav-brand img { height: 36px; width: auto; object-fit: contain; border-radius: var(--r-btn); }
.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav-links a {
  padding: 6px 13px; border-radius: var(--r-btn); font-size: 14px;
  color: var(--text2); transition: color .2s, background .2s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface); }
.nav-links a.hot { color: var(--brand); font-weight: 600; }
.nav-links a.hot .hot-badge {
  font-size: 10px; background: var(--brand); color: #fff;
  padding: 1px 5px; border-radius: var(--r-full); margin-left: 4px; font-weight: 700;
}
.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--text); }
.nav-mobile-toggle span { display: block; width: 22px; height: 2px; background: currentColor; margin: 4px 0; border-radius: 2px; transition: all .3s; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 20px; border-radius: var(--r-btn); font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; transition: all .2s; white-space: nowrap; text-decoration: none;
}
.btn-ghost { background: transparent; color: var(--text2); border: 1px solid var(--border2); }
.btn-ghost:hover { color: var(--text); border-color: var(--brand); }
.btn-primary { background: linear-gradient(135deg,var(--brand),var(--brand-dark)); color: #fff; box-shadow: 0 0 20px rgba(99,102,241,.3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 28px rgba(99,102,241,.45); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-large { padding: 14px 32px; font-size: 16px; border-radius: calc(var(--r-btn) + 4px); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- 移动端菜单 ---------- */
.mobile-menu { display: none; position: fixed; inset: 0; z-index: 999; }
.mobile-menu.open { display: block; }
.mobile-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
.mobile-panel {
  position: absolute; top: 0; right: 0; width: 280px; height: 100%;
  background: var(--bg2); border-left: 1px solid var(--border2);
  padding: 80px 20px 40px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
}
.mobile-panel a { padding: 11px 14px; border-radius: var(--r); font-size: 14px; color: var(--text2); transition: all .2s; display: block; }
.mobile-panel a:hover { background: var(--surface); color: var(--text); }
.mobile-panel .divider { height: 1px; background: var(--border2); margin: 8px 0; }

/* ---------- section 公共 ---------- */
section { padding: 90px 0; }
.section-kicker {
  display: inline-block; background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.22);
  border-radius: var(--r-full); padding: 4px 14px; font-size: 12px; color: var(--brand);
  margin-bottom: 14px; font-weight: 600; letter-spacing: .05em;
}
.section-title { font-size: clamp(26px,4vw,42px); font-weight: 800; line-height: 1.2; margin-bottom: 14px; letter-spacing: -.02em; }
.section-title .lead { color: var(--text); }
.section-title .accent {
  background: linear-gradient(135deg,var(--brand-light),var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.section-sub { font-size: 16px; color: var(--text2); line-height: 1.7; max-width: 560px; }
.section-head-center { text-align: center; margin-bottom: 56px; }
.section-head-center .section-sub { margin: 0 auto; }

/* ---------- check-list ---------- */
.check-list { display: flex; flex-direction: column; gap: 13px; margin: 20px 0 26px; }
.check-item { display: flex; align-items: flex-start; gap: 12px; }
.check-icon { width: 24px; height: 24px; background: rgba(99,102,241,.12); border-radius: var(--r); display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; margin-top: 2px; }
.check-copy strong { display: block; font-size: 14px; color: var(--text); }
.check-copy em { font-style: normal; font-size: 13px; color: var(--text3); }

/* ---------- 页面 Hero ---------- */
.page-hero { padding: 120px 0 60px; background: var(--bg2); border-bottom: 1px solid var(--border2); position: relative; overflow: hidden; }
.page-hero-bg { position: absolute; inset: 0; background: radial-gradient(ellipse 60% 60% at 80% 50%,rgba(99,102,241,.08) 0%,transparent 70%); pointer-events: none; }
.page-hero h1 { margin-bottom: 12px; }
.page-hero > .container > p { font-size: 16px; color: var(--text2); max-width: 540px; line-height: 1.7; margin-bottom: 24px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text3); margin-bottom: 18px; }
.breadcrumb a { color: var(--text3); transition: color .2s; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span { color: var(--text3); }

/* ---------- 页脚 ---------- */
footer { background: var(--bg); border-top: 1px solid var(--border2); padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.footer-brand img { height: 40px; width: auto; border-radius: var(--r); margin-bottom: 14px; }
.footer-brand h3 { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.footer-brand p { font-size: 13px; color: var(--text3); line-height: 1.7; }
.footer-col h4 { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 14px; letter-spacing: .06em; text-transform: uppercase; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 13px; color: var(--text3); transition: color .2s; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 22px; border-top: 1px solid var(--border2); }
.footer-bottom p { font-size: 13px; color: var(--text3); }
.footer-badges { display: flex; gap: 8px; }
.footer-badge { display: flex; align-items: center; gap: 5px; background: var(--surface); border: 1px solid var(--border2); border-radius: var(--r); padding: 5px 10px; font-size: 12px; color: var(--text3); }

/* ---------- 悬浮栏 ---------- */
.float-bar { position: fixed; right: 20px; bottom: 100px; display: flex; flex-direction: column; gap: 8px; z-index: 800; }
.float-btn {
  width: 44px; height: 44px; background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--r); display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; transition: all .2s; position: relative;
}
.float-btn:hover { background: var(--brand); border-color: var(--brand); transform: scale(1.1); }
.float-btn .tip {
  position: absolute; right: 52px; background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--r); padding: 5px 10px; font-size: 12px; color: var(--text);
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s;
  box-shadow: var(--shadow);
}
.float-btn:hover .tip { opacity: 1; }

/* ---------- 设置面板 ---------- */
.settings-panel {
  position: fixed; right: 20px; bottom: 80px; width: 260px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px; z-index: 900;
  box-shadow: var(--shadow-lg);
  transform: translateY(10px) scale(.96); opacity: 0; pointer-events: none;
  transition: all .25s cubic-bezier(.34,1.56,.64,1);
}
.settings-panel.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: all; }
.settings-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 16px; display: flex; align-items: center; gap: 6px; }
.settings-row { margin-bottom: 16px; }
.settings-label { font-size: 12px; color: var(--text3); margin-bottom: 8px; font-weight: 600; letter-spacing: .04em; }
.theme-btns { display: flex; gap: 6px; }
.theme-btn {
  flex: 1; padding: 7px 4px; border-radius: var(--r); font-size: 12px; font-weight: 600;
  border: 1px solid var(--border2); background: var(--bg2); color: var(--text2);
  cursor: pointer; text-align: center; transition: all .2s;
}
.theme-btn:hover { border-color: var(--brand); color: var(--brand); }
.theme-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.radius-slider { width: 100%; accent-color: var(--brand); cursor: pointer; }
.radius-preview { display: flex; gap: 6px; margin-top: 8px; }
.radius-dot { width: 28px; height: 28px; background: var(--brand); opacity: .7; }

/* ---------- 入场动画：仅前台生效，后台不受影响 ---------- */
body:not(.admin-page) .anim { opacity: 0; transform: translateY(22px); transition: opacity .5s ease, transform .5s ease; }
body:not(.admin-page) .anim.visible { opacity: 1; transform: translateY(0); }

/* ---------- 响应式 ---------- */
@media(max-width:768px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}
@media(max-width:480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
