/* =========================================================
   theme-shop-lite · 精致化设计系统
   ========================================================= */

:root {
  --bg: #f5f6fb;
  --bg-soft: #eceef6;
  --surface: #ffffff;
  --surface-2: #fafbfe;
  --text: #101223;
  --text-2: #3c4056;
  --muted: #69708a;
  --border: #e6e8f1;
  --border-strong: #d5d9e7;
  --primary: #4f46e5;
  --primary-2: #6366f1;
  --primary-hover: #4338ca;
  --primary-soft: #eef0ff;
  --accent: #8b5cf6;
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --grad-soft: linear-gradient(135deg, #eef0ff 0%, #f6f0ff 100%);
  --ok: #059669;
  --ok-soft: #e6f7f0;
  --warn: #b45309;
  --warn-soft: #fdf3e3;
  --danger: #dc2626;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(16, 18, 35, .04), 0 2px 8px rgba(16, 18, 35, .05);
  --shadow: 0 1px 2px rgba(16, 18, 35, .04), 0 14px 34px -12px rgba(16, 18, 35, .14);
  --shadow-lg: 0 32px 70px -24px rgba(16, 18, 35, .22);
  --ring: 0 0 0 4px rgba(99, 102, 241, .16);
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(900px 480px at 8% -8%, rgba(99, 102, 241, .06), transparent 60%),
    radial-gradient(820px 460px at 96% 4%, rgba(139, 92, 246, .06), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
::selection { background: rgba(99, 102, 241, .18); color: var(--text); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 780px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
}

/* 精致滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: #cdd2e2; border-radius: 999px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #b6bcd2; }
::-webkit-scrollbar-track { background: transparent; }

/* 焦点可达性 */
a:focus-visible, button:focus-visible, input:focus-visible, .btn:focus-visible {
  outline: none; box-shadow: var(--ring); border-radius: 8px;
}

/* ---------------- 页头 / 页脚 ---------------- */
.site-header {
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(16, 18, 35, .06);
  position: sticky;
  top: 0;
  z-index: 60;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px; gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--grad);
  color: #fff; font-size: 15px; line-height: 34px; text-align: center;
  box-shadow: 0 6px 16px -6px rgba(99, 102, 241, .6);
  flex-shrink: 0;
}
.brand-name { line-height: 1; }
.header-right { display: flex; align-items: center; gap: 12px; }
.nav { display: flex; gap: 6px; font-size: 15px; }
.nav a {
  padding: 8px 14px; border-radius: 10px; color: var(--text-2);
  font-weight: 500; transition: color .18s, background .18s;
}
.nav a:hover { color: var(--primary); background: var(--primary-soft); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-user {
  color: var(--muted); font-size: 14px; font-weight: 500;
  max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#logout-form { display: inline; }
.btn-link {
  border: none; background: none; padding: 7px 12px; cursor: pointer;
  color: var(--muted); font-size: 14px; border-radius: 8px; transition: all .18s;
}
.btn-link:hover { color: var(--danger); background: rgba(220, 38, 38, .08); }

/* 移动端汉堡按钮 */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  cursor: pointer; transition: border-color .18s, background .18s;
}
.nav-toggle:hover { border-color: var(--border-strong); background: var(--surface-2); }
.nav-toggle span { display: block; height: 2px; border-radius: 2px; background: var(--text-2); transition: transform .22s, opacity .22s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 52px; margin-top: 80px;
  font-size: 14px; color: var(--muted);
  background: linear-gradient(180deg, transparent, rgba(16, 18, 35, .025));
}
.site-footer .wrap { text-align: center; }
.site-footer a { color: var(--primary); text-decoration: none; font-weight: 500; }
.site-footer a:hover { text-decoration: underline; }
.site-footer strong { color: var(--text-2); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  padding: 104px 0 84px; text-align: center; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(720px 360px at 50% -140px, rgba(99, 102, 241, .16), transparent 70%),
    radial-gradient(520px 300px at 82% 6%, rgba(139, 92, 246, .12), transparent 70%),
    radial-gradient(460px 280px at 14% 16%, rgba(236, 72, 153, .08), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, .12), transparent 65%);
  top: -160px; left: 50%; transform: translateX(-50%);
  animation: hero-glow 7s ease-in-out infinite;
}
@keyframes hero-glow {
  0%, 100% { opacity: .7; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}
.hero h1 {
  font-size: 52px; line-height: 1.16; margin: 0 0 18px;
  letter-spacing: -.03em; font-weight: 800;
  animation: hero-in .8s cubic-bezier(.16, 1, .3, 1) both;
}
.hero .sub {
  font-size: 18px; color: var(--muted); max-width: 620px;
  margin: 0 auto 30px; line-height: 1.7;
  animation: hero-in .8s .08s cubic-bezier(.16, 1, .3, 1) both;
}
.hero .sub strong { color: var(--text); font-weight: 650; }
.hero-cta { display: flex; gap: 12px; justify-content: center; }

.hero-badges { margin-bottom: 18px; animation: hero-in .6s .02s ease both; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  border: 1px solid transparent;
}
.hero-badge + .hero-badge { margin-left: 8px; }
.hero-badge.hot {
  background: linear-gradient(135deg, #fee2e2, #ffedd5); color: #dc2626;
  border-color: rgba(220, 38, 38, .15);
  box-shadow: 0 4px 14px -6px rgba(220, 38, 38, .5);
}
.hero-badge.earn {
  background: linear-gradient(135deg, var(--primary-soft), #f6f0ff); color: var(--primary);
  border-color: rgba(99, 102, 241, .18);
  box-shadow: 0 4px 14px -6px rgba(99, 102, 241, .5);
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .62; } }

.hero-accent {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.hero-offer {
  display: inline-flex; align-items: center; gap: 22px;
  margin: 24px 0 10px; padding: 18px 30px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  animation: hero-in .8s .16s cubic-bezier(.16, 1, .3, 1) both;
  backdrop-filter: blur(6px);
}
.offer-main { display: flex; align-items: baseline; gap: 14px; text-align: left; }
.offer-price {
  font-size: 44px; font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, #dc2626, #f97316);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.offer-what { font-size: 14px; color: var(--muted); }
.hero-invite { margin-top: 22px; font-size: 14px; animation: hero-in .8s .22s ease both; }
.invite-link {
  color: var(--primary); font-weight: 600;
  border-bottom: 1px dashed var(--primary); padding-bottom: 1px;
  transition: all .18s;
}
.invite-link:hover { background: var(--primary-soft); border-bottom-style: solid; border-radius: 4px; }

@keyframes hero-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border-radius: 11px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; background: none;
  letter-spacing: .01em; white-space: nowrap;
  transition: transform .15s, box-shadow .2s, background .18s, border-color .18s, color .18s, opacity .2s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 8px 20px -8px rgba(79, 70, 229, .65), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 12px 26px -8px rgba(79, 70, 229, .7), inset 0 1px 0 rgba(255,255,255,.18); transform: translateY(-1px); }
.btn-ghost { border-color: var(--border); background: var(--surface); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); box-shadow: var(--shadow-sm); }
.btn-lg { padding: 13px 30px; font-size: 16px; border-radius: 13px; }
.btn-sm { padding: 7px 15px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.2); transform: none; }

/* ---------------- 区块 ---------------- */
.section { padding: 64px 0; }
.section.alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-title {
  text-align: center; font-size: 30px; margin: 0 0 14px;
  letter-spacing: -.02em; font-weight: 800;
}
.section-title::after {
  content: ""; display: block; width: 46px; height: 4px; border-radius: 999px;
  background: var(--grad); margin: 16px auto 0;
}
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-head .page-title { margin: 0; }
.page-title { font-size: 32px; margin: 0 0 8px; letter-spacing: -.02em; font-weight: 800; }
.page-sub { color: var(--muted); margin: 0 0 36px; font-size: 16px; }

/* ---------------- 套餐卡 ---------------- */
.plans-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px; align-items: stretch;
}
.plan-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform .25s cubic-bezier(.16, 1, .3, 1), box-shadow .25s, border-color .25s;
}
.plan-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.plan-card.featured {
  border: 1.5px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              var(--grad) border-box;
  box-shadow: 0 18px 44px -16px rgba(99, 102, 241, .42);
}
.plan-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 14px; border-radius: 999px; letter-spacing: .02em;
  box-shadow: 0 6px 16px -6px rgba(99, 102, 241, .6);
  white-space: nowrap;
}
.plan-card h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -.01em; }
.plan-desc { color: var(--muted); font-size: 14px; margin: 0 0 18px; min-height: 42px; line-height: 1.55; }
.price { font-size: 40px; font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; }
.price span { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price-lifetime { color: var(--muted); font-size: 13px; margin-top: 3px; }
.plan-features { list-style: none; margin: 20px 0 24px; padding: 0; font-size: 14px; flex: 1; }
.plan-features li { padding: 7px 0 7px 26px; position: relative; color: var(--text-2); }
.plan-features li::before {
  content: "✓"; position: absolute; left: 2px; top: 7px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--ok-soft); color: var(--ok);
  font-weight: 700; font-size: 11px; line-height: 18px; text-align: center;
}
.plan-scenes {
  display: flex; flex-direction: column; gap: 7px; margin: 14px 0 6px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--grad-soft);
  border: 1px dashed rgba(99, 102, 241, .4);
}
.scene { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.scene span { font-size: 15px; }
.plan-devlimit {
  margin: 12px 0 4px; padding: 9px 12px; border-radius: 10px;
  background: var(--ok-soft); color: var(--ok);
  font-size: 13px; font-weight: 600; text-align: center;
}
.skeleton {
  min-height: 360px;
  background: linear-gradient(100deg, #eceef4 40%, #f7f8fc 50%, #eceef4 60%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------- 特性 ---------------- */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 26px; }
.feature {
  text-align: center; padding: 28px 20px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform .25s cubic-bezier(.16, 1, .3, 1), box-shadow .25s, border-color .25s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.feature-icon {
  width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 16px;
  background: var(--grad-soft); font-size: 27px; line-height: 58px;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, .12);
}
.feature h3 { margin: 0 0 7px; font-size: 17px; letter-spacing: -.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* ---------------- FAQ ---------------- */
.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 22px; margin-bottom: 12px;
  transition: border-color .2s, box-shadow .2s;
}
.faq-item:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.faq-item h3 { margin: 0 0 6px; font-size: 15px; }
.faq-item p { margin: 0; color: var(--muted); font-size: 14px; }
code {
  background: var(--primary-soft); color: var(--primary);
  padding: 2px 7px; border-radius: 6px; font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------------- 卡片 (控制台) ---------------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  margin-bottom: 22px; overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.card-head h3 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
.card-body { padding: 22px; }
.sub-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; padding: 5px 14px; border-radius: 999px; }
.sub-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(5, 150, 105, .14); }
.sub-status.active { color: var(--ok); background: var(--ok-soft); box-shadow: inset 0 0 0 1px rgba(5, 150, 105, .16); }
.sub-status.inactive { color: var(--warn); background: var(--warn-soft); box-shadow: inset 0 0 0 1px rgba(180, 83, 9, .16); }
.sub-status.inactive::before { box-shadow: 0 0 0 3px rgba(180, 83, 9, .12); }
.sub-info { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px; }
.sub-plan { font-size: 20px; font-weight: 700; }
.sub-expiry { color: var(--muted); font-size: 14px; }
.sub-actions { margin-left: auto; display: flex; gap: 10px; }
.sub-empty { padding: 48px 24px; text-align: center; }
.sub-empty-icon {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px;
  background: var(--grad-soft); font-size: 30px; line-height: 64px;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, .12);
}
.sub-empty h4 { margin: 0 0 8px; font-size: 18px; letter-spacing: -.01em; }
.sub-empty p { color: var(--muted); margin: 0 0 20px; }
.sub-empty .btn { margin: 0 auto; }

/* ---------------- 兑换码 ---------------- */
.redeem-row { display: flex; gap: 10px; }
.redeem-row input, .referral-row input, .apikey-token-row input, .import-row input {
  flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--border);
  border-radius: 11px; font-size: 15px; outline: none; background: var(--bg);
  color: var(--text); transition: border-color .18s, box-shadow .18s, background .18s;
}
.redeem-row input:focus, .referral-row input:focus, .apikey-token-row input:focus, .import-row input:focus {
  border-color: var(--primary); background: #fff; box-shadow: var(--ring);
}

/* ---------------- 表格 ---------------- */
.table-scroll { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; color: var(--muted); font-weight: 600; font-size: 12.5px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  background: var(--surface-2); letter-spacing: .02em; text-transform: uppercase;
}
.table td { padding: 13px 14px; border-bottom: 1px solid var(--border); color: var(--text-2); }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tr:last-child td { border-bottom: none; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; padding: 3px 11px; border-radius: 999px;
  background: var(--bg-soft); color: var(--muted);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge-ok { color: var(--ok); background: var(--ok-soft); }
.badge-pending { color: var(--warn); background: var(--warn-soft); }

/* 危险操作按钮 */
.danger-btn:hover { border-color: var(--danger); color: var(--danger); }

/* 工单 */
.ticket-item {
  border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; margin-bottom: 14px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.ticket-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.ticket-head strong { font-size: 15px; }
.ticket-body {
  font-size: 14px; color: var(--text-2); white-space: pre-wrap;
  padding: 10px 12px; background: var(--bg); border-radius: 10px;
}
.ticket-reply {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: var(--bg); border-left: 3px solid var(--border-strong);
}
.ticket-reply.admin { border-left-color: var(--primary); background: var(--grad-soft); }
.ticket-reply-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.ticket-reply-body { font-size: 13.5px; color: var(--text-2); white-space: pre-wrap; }
.ticket-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.ticket-actions textarea {
  flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px; outline: none; background: var(--bg);
  font-family: inherit; resize: vertical;
}
.ticket-actions textarea:focus { border-color: var(--primary); background: #fff; }

/* 分页每页条数选择器 */
.pager-size {
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text-2); font-size: 12px;
  padding: 2px 4px; outline: none; cursor: pointer;
}
.pager-size:focus { border-color: var(--primary); }

/* 高速节点徽章(计费倍率 > 1) */
.badge-fast {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  color: #b45309; background: var(--warn-soft); border: 1px solid rgba(180, 83, 9, .22);
  vertical-align: 1px; white-space: nowrap;
}

/* ---------------- 弹窗 ---------------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(16, 18, 35, .5);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
  animation: fade-in .2s ease;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--surface); border-radius: 18px; width: 440px; max-width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modal-in .28s cubic-bezier(.16, 1, .3, 1);
  overflow: hidden;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.modal-head h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.modal-close {
  background: none; border: none; font-size: 24px; cursor: pointer; color: var(--muted);
  line-height: 1; width: 32px; height: 32px; border-radius: 8px; transition: all .15s;
}
.modal-close:hover { background: var(--bg-soft); color: var(--text); }
.modal-body { padding: 22px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 22px; border-top: 1px solid var(--border); background: var(--surface-2);
}
.order-summary {
  margin-bottom: 18px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 12px; padding: 4px 14px;
}
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; border-bottom: 1px dashed var(--border); }
.summary-row:last-child { border-bottom: none; }
.summary-row span:last-child { font-weight: 600; color: var(--text); }
.summary-note { font-size: 12px; color: var(--text-3); padding: 6px 0 0; line-height: 1.5; }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 9px; }
.months-picker { display: flex; gap: 8px; flex-wrap: wrap; }
[hidden] { display: none !important; }  /* 修复: display:flex 等规则会压过 hidden 属性, 强制隐藏 */
.month-btn {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); font-size: 14px; cursor: pointer; color: var(--text-2);
  transition: all .16s;
}
.month-btn:hover { border-color: var(--primary); color: var(--primary); }
.month-btn.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 14px -6px rgba(79, 70, 229, .55); }
.order-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0 4px; font-size: 15px; }
.order-total strong { font-size: 24px; letter-spacing: -.01em; }

/* ---------------- 空状态 ---------------- */
.empty-state { text-align: center; padding: 64px 24px; }
.empty-state h3 { margin: 0 0 8px; font-size: 20px; }
.empty-state p { color: var(--muted); margin: 0 0 20px; }
.empty-state .btn { margin: 0 auto; }

/* ---------------- 文章 ---------------- */
.article {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px 44px; box-shadow: var(--shadow-sm);
}
.article h1 { margin-top: 0; font-size: 30px; letter-spacing: -.02em; line-height: 1.3; }
.article .meta { color: var(--muted); font-size: 13px; margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.article-content { line-height: 1.85; color: var(--text-2); }
.article-content h1, .article-content h2, .article-content h3, .article-content h4 { color: var(--text); letter-spacing: -.01em; }
.article-content img { max-width: 100%; border-radius: 12px; }
.article-content pre { background: #1a1b2b; color: #e8e8f2; padding: 18px; border-radius: 12px; overflow-x: auto; font-size: 13.5px; }
.article-content code { background: transparent; color: inherit; padding: 0; }
.article-content a {
  color: var(--primary); text-decoration: none; font-weight: 600;
  border-bottom: 2px solid rgba(99, 102, 241, .22); padding: 1px 2px;
  transition: all .16s ease;
}
.article-content a:hover { color: var(--primary-hover); border-bottom-color: var(--primary); background: var(--primary-soft); border-radius: 4px; }
.article-content a[href^="http"]::after { content: " ↗"; font-size: .82em; font-weight: 700; opacity: .5; vertical-align: .08em; }
.article-content a[href^="http"]:hover::after { opacity: 1; }
.article-content a[href^="/"]::after { content: none; }
.article-content blockquote {
  margin: 16px 0; padding: 12px 18px; border-left: 3px solid var(--primary);
  background: var(--primary-soft); border-radius: 0 10px 10px 0; color: var(--text-2);
}

/* ---------------- 教程中心 ---------------- */
.tutorial-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.tutorial-group {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .25s cubic-bezier(.16, 1, .3, 1), box-shadow .25s;
}
.tutorial-group:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.tutorial-group-head {
  display: flex; align-items: center; gap: 14px; padding: 18px 22px;
  border-bottom: 1px solid var(--border); background: var(--grad-soft);
}
.tutorial-group-icon {
  width: 46px; height: 46px; border-radius: 13px; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; box-shadow: var(--shadow-sm); flex-shrink: 0;
}
.tutorial-group-head h2 { margin: 0 0 2px; font-size: 16px; }
.tutorial-group-head p { margin: 0; color: var(--muted); font-size: 13px; }
.tutorial-list { list-style: none; margin: 0; padding: 6px 0; }
.tutorial-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 22px; font-size: 15px; color: var(--text-2);
}
.tutorial-item:hover { background: var(--bg); }
.tutorial-item .arrow {
  color: var(--muted); transition: transform .18s, color .18s;
  display: inline-block;
}
.tutorial-item:hover .arrow { transform: translateX(4px); color: var(--primary); }

/* ---------------- Toast ---------------- */
#toast-container {
  position: fixed; top: 22px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.toast {
  padding: 11px 24px; border-radius: 12px; color: #fff; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg); animation: toast-in .3s cubic-bezier(.16, 1, .3, 1);
  backdrop-filter: blur(6px);
}
.toast-success { background: linear-gradient(135deg, #10b981, #059669); }
.toast-error { background: linear-gradient(135deg, #f43f5e, #dc2626); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------------- 订阅一键导入 ---------------- */
.platform-picker { display: inline-flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; padding: 4px; background: var(--bg-soft); border-radius: 12px; }
.platform-btn {
  padding: 8px 18px; border-radius: 9px; border: none;
  background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: all .16s;
}
.platform-btn:hover { color: var(--primary); }
.platform-btn.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.import-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.import-actions .import-btn { flex: 1; min-width: 180px; justify-content: center; }
.import-row { display: flex; gap: 10px; margin-bottom: 12px; }

/* ---------------- 二维码弹窗 ---------------- */
.qr-modal { max-width: 360px; }
.qr-box { display: inline-block; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); }
.qr-box svg { display: block; }

/* ---------------- API 密钥卡 ---------------- */
.apikey-token-row { display: flex; gap: 8px; align-items: center; }
#client-test { border-top: 1px dashed var(--border); padding-top: 16px; margin-top: 16px; }

/* ---------------- 更新日志 ---------------- */
.log-list { display: flex; flex-direction: column; gap: 14px; }
.log-item {
  display: block; padding: 18px 22px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm);
  transition: border-color .2s, transform .2s cubic-bezier(.16, 1, .3, 1), box-shadow .2s;
}
.log-item:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.log-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.log-date { font-size: 13px; color: var(--muted); }
.log-type {
  font-size: 13px; font-weight: 600; color: var(--primary);
  background: var(--primary-soft); padding: 3px 11px; border-radius: 999px;
}
.log-title { font-size: 16px; font-weight: 650; }
.log-summary { font-size: 13.5px; margin-top: 6px; color: var(--muted); }

/* ---------------- 流量用量 ---------------- */
.traffic-grid { display: flex; gap: 12px; margin-bottom: 14px; }
.traffic-cell { flex: 1; text-align: center; padding: 14px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.traffic-num { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.traffic-label { font-size: 12px; color: var(--muted); margin-top: 3px; }
.traffic-bar { height: 10px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; }
.traffic-bar-fill { height: 100%; border-radius: 999px; background: var(--grad); transition: width .5s cubic-bezier(.25, .8, .35, 1); }
.traffic-bar-fill.warn { background: linear-gradient(90deg, #f59e0b, #d97706); }
.traffic-bar-fill.danger { background: linear-gradient(90deg, #f43f5e, #dc2626); }

.traffic-layout { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.traffic-ring-box { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.traffic-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--bg-soft); stroke-width: 11; }
.ring-val {
  fill: none; stroke: var(--ok); stroke-width: 11; stroke-linecap: round;
  transition: stroke-dashoffset .9s cubic-bezier(.25, .8, .35, 1), stroke .3s ease;
  filter: drop-shadow(0 2px 4px rgba(5, 150, 105, .3));
}
.ring-val.warn { stroke: var(--warn); filter: drop-shadow(0 2px 4px rgba(180, 83, 9, .3)); }
.ring-val.danger { stroke: var(--danger); filter: drop-shadow(0 2px 4px rgba(220, 38, 38, .3)); }
.traffic-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.traffic-ring-num { font-size: 28px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.traffic-ring-label { font-size: 12px; color: var(--muted); }
.traffic-detail { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 12px; }
.traffic-row { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.traffic-row strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.traffic-row-label { color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 3px rgba(0,0,0,.03); }
.dot.ok { background: var(--ok); }
.dot.used { background: var(--primary); }
.dot.quota { background: var(--border-strong); }

/* ---------------- 邀请返利 ---------------- */
.referral-row { display: flex; gap: 8px; margin: 12px 0; }
.referral-row input { flex: 1; min-width: 0; font-size: 13px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg); }
.referral-stats { margin-top: 8px; }
.referral-pending { font-size: 14px; padding: 12px 16px; background: var(--primary-soft); border-radius: 12px; }
.referral-pending strong { color: var(--primary); font-size: 16px; }
.referral-tip { font-size: 12px; color: var(--muted); }
.referral-rewards { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.referral-reward-row { display: flex; justify-content: space-between; font-size: 13px; padding: 7px 12px; background: var(--ok-soft); border-radius: 8px; }
.referral-reward-row strong { color: var(--ok); }

.ref-rules { display: flex; flex-direction: column; gap: 16px; }
.ref-rule { display: flex; gap: 16px; align-items: flex-start; }
.ref-rule-icon {
  width: 48px; height: 48px; border-radius: 13px; background: var(--grad-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.ref-rule p { margin: 4px 0 0; font-size: 14px; color: var(--muted); line-height: 1.6; }
.ref-rule strong { color: var(--primary); }
.ref-stats-grid { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.ref-stat {
  flex: 1; min-width: 150px; text-align: center; padding: 18px 12px;
  border: 1px solid var(--border); border-radius: 13px; background: var(--bg);
}
.ref-stat.highlight { border-color: transparent; background: var(--grad-soft); box-shadow: inset 0 0 0 1px rgba(99, 102, 241, .18); }
.ref-stat-num { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ref-stat.highlight .ref-stat-num { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ref-stat-label { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

/* ---------------- 订阅卡(高级版) ---------------- */
.sub-body { padding: 26px 28px 28px; }
.sub-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 22px;
  padding: 26px 28px; border-radius: 18px;
  background:
    radial-gradient(460px 220px at 90% -30%, rgba(139, 92, 246, .20), transparent 60%),
    linear-gradient(135deg, #f1f3ff, #fbf7ff);
  border: 1px solid rgba(99, 102, 241, .14);
  margin-bottom: 24px;
}
.sub-hero::after {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 170px; height: 170px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, .15), transparent 65%);
  pointer-events: none;
}
.sub-hero-icon {
  width: 64px; height: 64px; border-radius: 18px; flex-shrink: 0;
  background: var(--grad); color: #fff; font-size: 30px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 30px -10px rgba(99, 102, 241, .65);
}
.sub-hero-text { position: relative; z-index: 1; min-width: 0; }
.sub-hero-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.sub-hero-meta { display: flex; align-items: center; gap: 10px; margin-top: 13px; flex-wrap: wrap; }
.sub-plan-tag {
  display: inline-flex; align-items: center;
  font-size: 13px; font-weight: 700; padding: 5px 13px;
  background: rgba(255, 255, 255, .75); color: var(--primary);
  border: 1px solid rgba(99, 102, 241, .18); border-radius: 999px;
}
.sub-days {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; padding: 5px 13px; border-radius: 999px;
}
.sub-days::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sub-days.ok { color: var(--ok); background: var(--ok-soft); }
.sub-days.warn { color: var(--warn); background: var(--warn-soft); }
.sub-days.danger { color: var(--danger); background: #fdeaea; }

.sub-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.sub-stat {
  display: flex; gap: 15px; align-items: flex-start;
  padding: 18px 20px; border: 1px solid var(--border); border-radius: 15px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.sub-stat:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.sub-stat-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: var(--grad-soft); font-size: 20px;
  display: flex; align-items: center; justify-content: center;
}
.sub-stat-body { min-width: 0; }
.sub-stat-label { font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.sub-stat-value { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.3; }
.sub-stat-value.ok { color: var(--ok); }
.sub-stat-sub { font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.5; }

.sub-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 24px; padding-top: 20px; gap: 12px; flex-wrap: wrap;
  border-top: 1px dashed var(--border);
}
.sub-foot-note { font-size: 13.5px; color: var(--muted); }

/* ---------------- 分页器 ---------------- */
.pager { display: flex; align-items: center; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.pager-btn {
  min-width: 34px; height: 34px; padding: 0 9px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  font-size: 13px; cursor: pointer; transition: all .16s;
}
.pager-btn:hover { border-color: var(--primary); color: var(--primary); }
.pager-btn.active { background: var(--grad); border-color: transparent; color: #fff; font-weight: 700; box-shadow: 0 6px 14px -6px rgba(79, 70, 229, .55); }

/* ---------------- 邀请裂变横幅 ---------------- */
.invite-banner-section { padding: 24px 0; }
.invite-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  padding: 34px 38px; border-radius: 22px;
  background:
    radial-gradient(500px 240px at 12% 0%, rgba(99, 102, 241, .14), transparent 60%),
    linear-gradient(135deg, #f1f3ff, #fdf2fb);
  border: 1px solid rgba(99, 102, 241, .16);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.invite-banner h2 { margin: 0 0 20px; font-size: 24px; letter-spacing: -.02em; }
.invite-mech { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mech-step {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(255, 255, 255, .85); padding: 14px 16px; border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.mech-step strong { font-size: 14px; }
.mech-step p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.mech-num {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad); color: #fff; font-size: 12.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px -4px rgba(99, 102, 241, .6);
}
.mech-arrow { color: var(--primary); font-size: 18px; font-weight: 700; }
.invite-math { margin: 16px 0 0; font-size: 13px; color: var(--primary); }
.invite-right { text-align: center; flex-shrink: 0; }
.invite-right .muted { margin: 10px 0 0; }

/* ---------------- 控制台子 tab ---------------- */
.dash-tabs {
  display: inline-flex; gap: 4px; margin: 6px 0 24px;
  background: var(--bg-soft); padding: 5px; border-radius: 13px; flex-wrap: wrap;
}
.dash-tab {
  padding: 9px 18px; border: none; background: none; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--muted); border-radius: 9px;
  transition: all .18s;
}
.dash-tab:hover { color: var(--primary); }
.dash-tab.active { color: var(--primary); font-weight: 700; background: var(--surface); box-shadow: var(--shadow-sm); }
.tab-panel { animation: tab-in .25s cubic-bezier(.16, 1, .3, 1); }
@keyframes tab-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------- flash (兼容保留) ---------------- */
.flash { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 200; width: min(480px, calc(100vw - 32px)); }
.flash-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 18px; border-radius: 12px; background: var(--surface);
  box-shadow: var(--shadow-lg); border: 1px solid var(--border); font-size: 14px;
}
.flash-inner.success { border-color: rgba(5, 150, 105, .3); color: var(--ok); }
.flash-inner.error { border-color: rgba(220, 38, 38, .3); color: var(--danger); }
.flash-close { background: none; border: none; font-size: 20px; cursor: pointer; color: inherit; opacity: .7; }

/* ---------------- 滚动入场动画 ---------------- */
.reveal { opacity: 0; translate: 0 20px; transition: opacity .65s ease, translate .65s cubic-bezier(.16, 1, .3, 1); }
.reveal.is-in { opacity: 1; translate: 0 0; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 768px) {
  .hero { padding: 72px 0 60px; }
  .hero h1 { font-size: 34px; }
  .hero .sub { font-size: 16px; }
  .section { padding: 48px 0; }
  .section-title { font-size: 25px; }
  .page-title { font-size: 26px; }
  .article { padding: 26px 20px; }
  .invite-banner { flex-direction: column; align-items: stretch; text-align: center; padding: 26px 22px; gap: 22px; }
  .invite-mech { justify-content: center; }
  .invite-right { margin-top: 2px; }
  .invite-right .btn { width: 100%; justify-content: center; }
  .mech-arrow { display: none; }
  .mech-step { justify-content: center; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .nav {
    display: none; position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; gap: 4px; padding: 12px 16px 16px;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; border-radius: 10px; }
  .nav-toggle { display: flex; }
  .hero h1 { font-size: 30px; }
  .hero-offer { flex-direction: column; gap: 14px; }
  .offer-main { flex-direction: row; align-items: baseline; }
  .sub-actions { margin-left: 0; }
  .sub-body { padding: 20px 18px 22px; }
  .sub-stats { grid-template-columns: 1fr; }
  .sub-hero { padding: 22px 20px; gap: 16px; }
  .plans-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .feature { padding: 20px 14px; }
  .traffic-layout { gap: 20px; }
}

/* ---------------- 动效偏好 ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; translate: none; }
}

/* ===== 控制台: 邀请返利横幅(突出) ===== */
/* 只作用于控制台的 .card.invite-banner —— 首页的 .invite-banner 保持浅色底,
   避免紫色渐变覆盖导致文字对比度不足 */
.card.invite-banner {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 60%, #a78bfa 100%) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 10px 30px -12px rgba(99, 102, 241, .45);
}
.invite-banner-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 24px;
}
.invite-banner-title { font-size: 17px; font-weight: 700; color: #fff !important; }
.invite-banner-rule { font-size: 13px; opacity: .95; line-height: 1.6; color: #f0efff !important; }
.invite-banner-rule strong { font-weight: 700; }
/* 底部一行: 左侧余额, 右侧邀请码+按钮, 横向铺满消除中空 */
.invite-banner-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 2px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.25);
}
.invite-banner-bal {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.invite-bal-label { font-size: 12px; line-height: 1.4; color: #e4e2ff !important; white-space: nowrap; }
.invite-bal-num { font-size: 24px; font-weight: 800; letter-spacing: .5px; line-height: 1.1; color: #fff !important; }
.invite-bal-hint { font-size: 11px; line-height: 1.4; color: #d8d5ff !important; }
.invite-banner-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.invite-code-box { display: flex; align-items: center; gap: 8px; }
.invite-code-label { font-size: 11px; color: #d8d5ff !important; white-space: nowrap; }
.invite-code {
  color: #fff !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px;
  padding: 4px 14px;
}
/* 控制台横幅内按钮: 白底主色字(在紫色渐变上更清晰) */
.card.invite-banner .btn { background: #fff; color: var(--primary); border: none; font-weight: 600; padding: 8px 18px; }
.invite-detail-link { font-size: 12px; color: #fff !important; opacity: .9; white-space: nowrap; }
.card.invite-banner .btn:hover { opacity: .92; }
@media (max-width: 640px) {
  .invite-banner-body { gap: 12px; }
  .invite-banner-bottom { flex-direction: column; align-items: stretch; }
  .invite-banner-side { justify-content: space-between; }
}

/* ===== 价格: 原价划线 + 抵扣后到手价 ===== */
.price-origin {
  color: var(--text-3);
  font-size: 0.72em;
  font-weight: 500;
  margin-right: 4px;
  text-decoration: line-through;
  text-decoration-color: rgba(120, 113, 108, .6);
  opacity: .8;
}

/* ===== 弹窗合计: 抵扣明细 ===== */
.order-deduct-detail {
  display: flex; gap: 12px; justify-content: flex-end;
  font-size: 12px; color: var(--text-3); margin-top: 4px;
}
.order-deduct-detail s { text-decoration-color: rgba(120,113,108,.6); }
.order-deduct-detail em { font-style: normal; color: #16a34a; font-weight: 600; }

/* 教程中心: 最新动态速览 */
.news-teaser {
  background: var(--card, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px;
  padding: 18px 20px;
  margin-top: 28px;
}
.news-teaser-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.news-teaser-head h2 {
  margin: 0;
  font-size: 16px;
}
.news-teaser-more {
  font-size: 13px;
  color: #2563eb;
  text-decoration: none;
  white-space: nowrap;
}
.news-teaser-more:hover { text-decoration: underline; }
.news-teaser .log-item { border-bottom: 1px dashed var(--line, #eceef2); }
.news-teaser .log-item:last-child { border-bottom: none; }

/* 支付失败横幅(购买/续费弹窗内) */
.pay-error-box {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  border-radius: 10px;
  font-size: 13px;
  color: #991b1b;
}
.pay-error-qq {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pay-error-qq .btn-sm { padding: 2px 10px; font-size: 12px; }

/* 控制台: 待支付订单横幅 */
.pending-pay-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 18px;
}
.pending-pay-info { font-size: 14px; }
.pending-pay-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* 页脚链接(隐私政策/用户协议) */
.footer-link {
  color: var(--muted, #8b8fa8);
  text-decoration: none;
  transition: color .15s ease;
}
.footer-link:hover { color: var(--text, #101223); text-decoration: underline; }
