/* 泡沫授权系统 - 全站样式 */
:root {
  --primary: #4f6bed;
  --primary-dark: #3b54d6;
  --primary-light: #eef1ff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1f2937;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 2px 12px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.12);
  --radius: 14px;
  --radius-sm: 10px;
}
[data-theme="dark"] {
  --bg: #0f172a;
  --card: #1e293b;
  --text: #e2e8f0;
  --text-light: #94a3b8;
  --border: #334155;
  --shadow: 0 2px 12px rgba(0,0,0,.3);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.5);
}
* { margin:0; padding:0; box-sizing:border-box; }
*:focus { outline:none; }
* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior:smooth; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background .3s, color .3s;
}
a { color: inherit; text-decoration:none; }
img { max-width:100%; display:block; }
button { cursor:pointer; border:none; background:none; font-family:inherit; }
input, select, textarea { font-family:inherit; }

/* 通用卡片 */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all .3s ease;
}
.card:hover { box-shadow: var(--shadow-lg); }

/* 按钮 */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  padding: 10px 22px; border-radius: 10px; font-size: 14px; font-weight: 500;
  transition: all .25s ease; white-space:nowrap;
}
.btn-primary { background: var(--primary); color:#fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(79,107,237,.4); }
.btn-outline { border:1px solid var(--border); color: var(--text); background:var(--card); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-success { background: var(--success); color:#fff; }
.btn-success:hover { background:#059669; }
.btn-danger { background: var(--danger); color:#fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 8px; }
.btn-block { width:100%; }

/* 输入框 */
.input {
  width:100%; padding: 11px 14px; border:1px solid var(--border); border-radius:10px;
  background: var(--card); color: var(--text); font-size:14px; transition: all .25s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,107,237,.12); }
.input::placeholder { color: var(--text-light); opacity:.6; }

/* 标签 */
.tag {
  display:inline-block; padding: 3px 10px; border-radius: 20px; font-size:12px; font-weight:500;
}
.tag-success { background: rgba(16,185,129,.12); color: var(--success); }
.tag-warning { background: rgba(245,158,11,.12); color: var(--warning); }
.tag-danger { background: rgba(239,68,68,.12); color: var(--danger); }
.tag-primary { background: var(--primary-light); color: var(--primary); }

/* ============ 首页 ============ */
.navbar {
  position: sticky; top:0; z-index:100; background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
[data-theme="dark"] .navbar { background: rgba(15,23,42,.85); }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; display:flex; align-items:center; justify-content:space-between; }
.brand { display:flex; align-items:center; gap:12px; }
.brand-avatar { width:42px; height:42px; border-radius:50%; object-fit:cover; border:2px solid var(--primary-light); }
.brand-name { font-size: 20px; font-weight: 700; background: linear-gradient(135deg, var(--primary), #7c3aed); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.nav-actions { display:flex; gap:10px; align-items:center; }
.nav-user { display:flex; align-items:center; gap:8px; font-size:14px; }
.nav-user img { width:34px; height:34px; border-radius:50%; }

/* Hero */
.hero { max-width:1200px; margin: 50px auto 0; padding: 0 24px; text-align:center; }
.hero-badge { display:inline-block; padding:6px 18px; background: var(--primary-light); color: var(--primary); border-radius: 30px; font-size:13px; font-weight:500; margin-bottom:24px; }
.hero h1 { font-size: 52px; font-weight: 800; line-height:1.2; margin-bottom:18px; letter-spacing:-1px; }
.hero h1 .grad { background: linear-gradient(135deg, var(--primary), #7c3aed); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.hero p { font-size: 18px; color: var(--text-light); margin-bottom: 36px; }
.hero-actions { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

/* 特性条 */
.feature-bar { max-width:900px; margin: 60px auto 0; padding: 0 24px; display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.feature-item { text-align:center; }
.feature-icon { width:52px; height:52px; border-radius:14px; background: var(--primary-light); display:flex; align-items:center; justify-content:center; margin: 0 auto 12px; }
.feature-item h3 { font-size:16px; margin-bottom:4px; }
.feature-item p { font-size:13px; color: var(--text-light); }

/* 服务状态大卡片 */
.status-card { max-width:1000px; margin: 60px auto; padding: 0 24px; }
.status-card .card { padding: 28px; }
.status-head { display:flex; align-items:center; justify-content:space-between; margin-bottom: 24px; }
.dots { display:flex; gap:7px; }
.dot { width:13px; height:13px; border-radius:50%; }
.dot.r { background:#ff5f57; } .dot.y { background:#febc2e; } .dot.g { background:#28c840; }
.status-title { font-size:20px; font-weight:700; }
.status-badge { display:flex; align-items:center; gap:6px; font-size:13px; color: var(--success); }
.status-badge::before { content:''; width:8px; height:8px; border-radius:50%; background: var(--success); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.status-grid { display:grid; grid-template-columns: 1fr 1fr; gap:20px; }
.status-mini { background: var(--bg); border-radius: var(--radius-sm); padding:20px; }
.status-mini .label { font-size:13px; color: var(--text-light); margin-bottom:6px; }
.status-mini .value { font-size:22px; font-weight:700; }
.status-mid { background: var(--bg); border-radius: var(--radius-sm); padding:20px; }
.status-mid h4 { font-size:15px; margin-bottom:14px; }
.status-mid ul { list-style:none; }
.status-mid li { display:flex; justify-content:space-between; padding:8px 0; font-size:13px; border-bottom:1px dashed var(--border); }
.status-mid li:last-child { border:none; }
.status-mid li span:last-child { color: var(--success); font-weight:500; }

/* 快速查询 */
.query-section { max-width:1000px; margin: 0 auto; padding: 0 24px; }
.query-tabs { display:flex; gap:10px; margin-bottom:20px; flex-wrap:wrap; }
.query-tab { padding: 10px 24px; border-radius: 30px; background: var(--card); border:1px solid var(--border); font-size:14px; cursor:pointer; transition:all .25s; }
.query-tab.active { background: var(--primary); color:#fff; border-color: var(--primary); }
.query-box { background: var(--card); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.query-row { display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:14px; margin-bottom:16px; }
.query-result { margin-top:16px; padding:14px; background: var(--bg); border-radius: var(--radius-sm); font-size:14px; display:none; }
.query-result.show { display:block; }

/* 功能介绍 */
.intro { max-width:1100px; margin: 80px auto; padding: 0 24px; text-align:center; }
.intro h2 { font-size:34px; font-weight:700; margin-bottom:14px; }
.intro .sub { color: var(--text-light); font-size:16px; margin-bottom:50px; }
.intro-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(240px,1fr)); gap:24px; }
.intro-card { text-align:left; padding:28px; }
.intro-card .ic { width:48px; height:48px; border-radius:12px; background: var(--primary-light); display:flex; align-items:center; justify-content:center; margin-bottom:16px; }
.intro-card h3 { font-size:17px; margin-bottom:8px; }
.intro-card p { font-size:14px; color: var(--text-light); }

/* 支持类型 */
.types { max-width:1000px; margin: 0 auto 80px; padding:0 24px; }
.types h2 { text-align:center; font-size:30px; font-weight:700; margin-bottom:40px; }
.type-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.type-card { text-align:center; padding:36px 20px; }
.type-card .ic { width:64px; height:64px; border-radius:18px; margin:0 auto 18px; display:flex; align-items:center; justify-content:center; }
.type-card h3 { font-size:18px; margin-bottom:6px; }
.type-card p { font-size:13px; color: var(--text-light); }

/* 开通步骤 */
.steps { max-width:1000px; margin:0 auto 80px; padding:0 24px; }
.steps h2 { text-align:center; font-size:30px; font-weight:700; margin-bottom:50px; }
.step-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.step-card { text-align:center; padding:32px 20px; position:relative; }
.step-num { width:44px; height:44px; border-radius:50%; background: var(--primary); color:#fff; display:flex; align-items:center; justify-content:center; font-size:18px; font-weight:700; margin:0 auto 16px; }
.step-card h3 { font-size:17px; margin-bottom:6px; }
.step-card p { font-size:13px; color: var(--text-light); }

/* 底部 */
.footer { border-top:1px solid var(--border); padding: 40px 0 24px; background: var(--card); margin-top:60px; }
.footer-inner { max-width:1200px; margin:0 auto; padding:0 24px; }
.footer-brand { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.footer-brand img { width:38px; height:38px; border-radius:50%; }
.footer-brand span { font-size:18px; font-weight:700; }
.footer-line { height:1px; background: var(--border); margin: 18px 0; opacity:.5; }
.footer-meta { display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; font-size:13px; color: var(--text-light); }

/* ============ 弹窗 ============ */
.modal-mask { position:fixed; inset:0; background:rgba(0,0,0,.45); backdrop-filter:blur(4px); display:none; align-items:center; justify-content:center; z-index:1000; animation: fadeIn .25s; }
.modal-mask.show { display:flex; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.modal { background: var(--card); border-radius: 18px; width: 420px; max-width:92vw; overflow:hidden; box-shadow: var(--shadow-lg); animation: slideUp .3s cubic-bezier(.16,1,.3,1); }
@keyframes slideUp { from{transform:translateY(30px);opacity:0} to{transform:translateY(0);opacity:1} }
.modal-head { display:flex; align-items:center; gap:10px; padding:18px 22px; border-bottom:1px solid var(--border); }
.modal-head img { width:34px; height:34px; border-radius:50%; }
.modal-head .name { font-size:16px; font-weight:600; }
.modal-head .close { margin-left:auto; font-size:22px; color: var(--text-light); cursor:pointer; }
.modal-body { padding: 24px; }
.modal-title { font-size:18px; font-weight:700; margin-bottom:18px; }
.form-group { margin-bottom:16px; }
.form-group label { display:block; font-size:13px; color: var(--text-light); margin-bottom:6px; }
.form-row { display:flex; gap:8px; }
.form-row .input { flex:1; }
.captcha-row { display:flex; gap:8px; align-items:stretch; }
.captcha-btn { padding: 0 16px; border-radius:10px; background: var(--primary-light); color: var(--primary); font-size:13px; font-weight:500; white-space:nowrap; }
.captcha-btn:disabled { opacity:.5; cursor:not-allowed; }

/* 滑动验证 */
.slider-verify { position:relative; height:42px; background: var(--bg); border-radius:10px; overflow:hidden; user-select:none; margin-bottom:16px; border:1px solid var(--border); }
.slider-track { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:13px; color: var(--text-light); }
.slider-bar { position:absolute; left:0; top:0; height:100%; width:0; background: rgba(79,107,237,.15); transition: width .1s; }
.slider-btn { position:absolute; left:0; top:0; height:100%; width:46px; background: var(--primary); border-radius:10px; display:flex; align-items:center; justify-content:center; color:#fff; cursor:grab; transition: background .2s; }
.slider-btn:active { cursor:grabbing; }
.slider-btn.success { background: var(--success); }

/* 主题切换 */
.theme-toggle { width:38px; height:38px; border-radius:10px; border:1px solid var(--border); display:flex; align-items:center; justify-content:center; background:var(--card); transition:all .25s; }
.theme-toggle:hover { border-color: var(--primary); }

/* ============ 用户中心 ============ */
.dashboard { display:flex; min-height:100vh; }
.sidebar { width:240px; background: var(--card); border-right:1px solid var(--border); transition: width .3s; flex-shrink:0; }
.sidebar.collapsed { width: 68px; }
.sidebar.collapsed .side-label, .sidebar.collapsed .brand-name, .sidebar.collapsed .side-section { display:none; }
.sidebar-brand { display:flex; align-items:center; gap:10px; padding:16px; border-bottom:1px solid var(--border); }
.sidebar-brand img { width:36px; height:36px; border-radius:50%; flex-shrink:0; }
.sidebar-close { display:none; margin-left:auto; width:32px; height:32px; border-radius:8px; align-items:center; justify-content:center; cursor:pointer; color:var(--text-light); background:var(--bg); flex-shrink:0; }
.sidebar-close:hover { color:var(--text); }
.sidebar-divider { height:1px; background: var(--border); margin: 0 16px; opacity:.5; }
.side-section { padding: 16px; font-size:11px; color: var(--text-light); text-transform:uppercase; letter-spacing:1px; }
.side-menu { padding: 8px; }
.side-item { display:flex; align-items:center; gap:12px; padding:11px 14px; border-radius:10px; font-size:14px; color: var(--text-light); margin-bottom:4px; transition:all .25s; cursor:pointer; }
.side-item:hover { background: var(--bg); color: var(--text); }
.side-item.active { background: var(--primary); color:#fff; }
.side-item svg { flex-shrink:0; }

.main { flex:1; display:flex; flex-direction:column; min-width:0; }
.topbar { display:flex; align-items:center; padding: 16px 28px; background: var(--card); border-bottom:1px solid var(--border); gap:16px; }
.topbar-toggle { width:36px; height:36px; border-radius:8px; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.topbar-toggle:hover { background: var(--bg); }
.topbar-title { font-size:17px; font-weight:600; flex:1; }
.topbar-right { display:flex; align-items:center; gap:14px; }
.topbar-balance { display:flex; align-items:center; gap:6px; padding: 7px 14px; background: var(--primary-light); color: var(--primary); border-radius: 20px; font-size:13px; font-weight:600; }
.topbar-user { display:flex; align-items:center; gap:8px; }
.topbar-user img { width:34px; height:34px; border-radius:50%; }

.content { padding: 28px; flex:1; }

/* 统计卡片 */
.stat-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(200px,1fr)); gap:18px; margin-bottom:24px; }
.stat-card { padding:22px; }
.stat-card .label { font-size:13px; color: var(--text-light); margin-bottom:8px; }
.stat-card .value { font-size:28px; font-weight:700; }
.stat-card .delta { font-size:12px; color: var(--success); margin-top:6px; }

/* 欢迎卡 */
.welcome-card { padding:28px; background: linear-gradient(135deg, var(--primary), #7c3aed); color:#fff; border-radius: var(--radius); margin-bottom:24px; }
.welcome-card h2 { font-size:22px; margin-bottom:6px; }
.welcome-card p { opacity:.9; font-size:14px; }

/* 表格 */
.table-card { padding: 0; overflow:hidden; }
.table-head { padding:18px 22px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.table-filters { display:flex; gap:10px; flex-wrap:wrap; }
.search-box { display:flex; align-items:center; gap:8px; padding: 0 14px; border:1px solid var(--border); border-radius:10px; background: var(--card); }
.search-box input { border:none; background:none; padding: 10px 0; width:200px; color: var(--text); }
.search-box input:focus { outline:none; }
select.input { padding: 10px 14px; }
table { width:100%; border-collapse:collapse; }
th { text-align:left; padding: 14px 22px; font-size:12px; color: var(--text-light); text-transform:uppercase; letter-spacing:.5px; background: var(--bg); font-weight:600; }
td { padding: 16px 22px; font-size:14px; border-top:1px solid var(--border); }
tr:hover td { background: rgba(79,107,237,.03); }

/* 广告位 */
.ad-banner { position:relative; border-radius: var(--radius); overflow:hidden; margin-bottom:24px; height:180px; background: linear-gradient(135deg, #667eea, #764ba2); display:flex; align-items:center; justify-content:center; color:#fff; }
.ad-banner img { width:100%; height:100%; object-fit:cover; }
.ad-text { text-align:center; }
.ad-text h3 { font-size:24px; margin-bottom:6px; }

/* 弹窗表单 */
.modal-wide { width: 560px; }

/* 响应式（仅首页组件，侧边栏保持最初的简单折叠样式） */
@media (max-width: 768px) {
  .hero h1 { font-size: 34px; }
  .feature-bar, .status-grid, .type-grid, .step-grid { grid-template-columns:1fr; }
  .query-row { grid-template-columns:1fr; }
}

/* ============ 开关样式 ============ */
.toggle-switch { display:inline-flex; align-items:center; gap:12px; }
.toggle-switch input[type="checkbox"] { display:none; }
.toggle-switch .switch {
  position:relative; width:48px; height:26px; background: var(--border);
  border-radius:20px; cursor:pointer; transition: background .25s; flex-shrink:0;
}
.toggle-switch .switch::before {
  content:''; position:absolute; top:3px; left:3px; width:20px; height:20px;
  background:#fff; border-radius:50%; transition: transform .25s; box-shadow:0 2px 6px rgba(0,0,0,.2);
}
.toggle-switch input[type="checkbox"]:checked + .switch { background: var(--success); }
.toggle-switch input[type="checkbox"]:checked + .switch::before { transform: translateX(22px); }
.toggle-switch .switch-label { font-size:13px; color: var(--text-light); }

/* ============ 维护模式页面 ============ */
.maintenance-container {
  max-width: 480px; margin: 80px auto; padding: 40px 30px;
  background: var(--card); border-radius: 18px; box-shadow: var(--shadow-lg); text-align:center;
}
.maintenance-logo { width:64px; height:64px; border-radius:50%; margin:0 auto 18px; border:3px solid var(--primary-light); }
.maintenance-title { font-size: 24px; font-weight:700; margin-bottom:12px; color: var(--text); }
.maintenance-icon { width:72px; height:72px; border-radius:50%; background: var(--primary-light); display:flex; align-items:center; justify-content:center; margin:0 auto 20px; color: var(--primary); }
.maintenance-desc { color: var(--text-light); font-size:14px; line-height:1.8; margin-bottom:28px; }
.maintenance-brand { display:flex; align-items:center; justify-content:center; gap:10px; margin-bottom:24px; font-size:18px; font-weight:700; }
.maintenance-brand img { width:38px; height:38px; border-radius:50%; }
.maintenance-brand .grad { background: linear-gradient(135deg, var(--primary), #7c3aed); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }

/* 加载动画 */
.spinner { width:20px; height:20px; border:2px solid rgba(255,255,255,.3); border-top-color:#fff; border-radius:50%; animation: spin .8s linear infinite; display:inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast { position:fixed; top:24px; left:50%; transform:translateX(-50%); background: var(--card); color: var(--text); padding:12px 22px; border-radius:10px; box-shadow: var(--shadow-lg); z-index:2000; font-size:14px; animation: toastIn .3s; }
@keyframes toastIn { from{transform:translate(-50%,-20px);opacity:0} to{transform:translate(-50%,0);opacity:1} }
.toast.success { border-left:3px solid var(--success); }
.toast.error { border-left:3px solid var(--danger); }

/* 隐藏 */
.hidden { display:none !important; }
