/* 内地运营增强样式：国内字体栈、430px 移动端 H5 自适应、合规与交互组件 */
:root {
  --font-cn: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;
}

body {
  font-family: var(--font-cn) !important;
  overflow-x: hidden;
}

.notice, .eyebrow, .panel-head time, .update b, .panel-foot strong, .cat small,
.card-meta, .plan h3, .guide li > span, footer span {
  font-family: var(--font-mono) !important;
}

/* 防止网格子元素在 430px 视口横向撑爆 */
.hero > *, .resource-grid > *, .plan-grid > *, .pack-grid > *, .dashboard-grid > *, .member-center > * {
  min-width: 0;
}

/* 移动端汉堡按钮（桌面隐藏） */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid #354137;
  color: #eff5ec;
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 16px;
  line-height: 1;
}

.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8, 12, 9, 0.72);
  backdrop-filter: blur(4px);
}
.mobile-drawer.show { display: flex; justify-content: flex-end; }
.mobile-drawer-panel {
  width: min(300px, 82vw);
  height: 100%;
  background: #121713;
  border-left: 1px solid #283329;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #eff5ec;
}
.mobile-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #243026;
}
.mobile-drawer-panel a,
.mobile-drawer-panel button.drawer-action {
  color: #dce5da;
  text-decoration: none;
  padding: 12px 10px;
  border-radius: 8px;
  background: #1a211b;
  border: 1px solid #273228;
  font-size: 14px;
  text-align: left;
}
.mobile-drawer-panel button.drawer-action.primary-act {
  background: var(--lime);
  color: #141c0d;
  border-color: var(--lime);
  font-weight: 700;
  text-align: center;
}

/* 登录/注册弹窗：顶部仅保留「登录」「注册」两项 Tab */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0 18px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.auth-tab {
  border: 0;
  background: transparent;
  color: #9ba69c;
  padding: 9px 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
}
.auth-tab.active {
  background: var(--lime);
  color: #141c0d;
}
.auth-mode-switch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12px;
  color: #94a095;
}
.auth-mode-switch button,
.forgot-link {
  background: transparent;
  border: 0;
  color: #a9b8a8;
  font-size: 12px;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
}
.forgot-link:hover { color: var(--lime); }
.input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.input-row input { flex: 1; min-width: 0; }
.captcha-badge, .sms-send-btn {
  flex-shrink: 0;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid #354236;
  background: #1a221c;
  color: var(--lime);
  font-size: 12px;
  font-family: var(--font-mono);
  white-space: nowrap;
}
.terms-check {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px !important;
  color: #9da89e !important;
  margin: 12px 0 6px !important;
  line-height: 1.5;
}
.terms-check input {
  width: auto !important;
  margin: 3px 0 0 !important;
  flex-shrink: 0;
}
.terms-check a {
  color: var(--lime);
  text-decoration: underline;
  cursor: pointer;
}
.auth-msg {
  font-size: 12px;
  min-height: 18px;
  margin: 6px 0;
  color: #ff8e72;
}
.auth-msg.ok { color: var(--lime); }

/* 资源详情弹窗 & 合规协议弹窗 */
.detail-card {
  width: min(680px, calc(100% - 28px)) !important;
  max-height: 88vh;
  overflow-y: auto;
}
.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 14px 0 18px;
}
.detail-meta-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
}
.detail-meta-item span { display: block; font-size: 11px; color: #8c978d; margin-bottom: 4px; }
.detail-meta-item strong { font-size: 13px; color: #eef4ec; }
.detail-block { margin: 14px 0; }
.detail-block h4 { margin: 0 0 6px; font-size: 13px; color: var(--lime); }
.detail-block p { margin: 0; font-size: 13px; line-height: 1.7; color: #b8c2b9; }
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.detail-actions .primary { flex: 1; min-width: 170px; text-align: center; }
.detail-actions .secondary-btn {
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #3c4a3e;
  background: transparent;
  color: #e4ece3;
  text-decoration: none;
  font-size: 13px;
  text-align: center;
}

/* 悬浮微信/企微客服组件 */
.floating-support {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.support-fab {
  background: var(--lime);
  color: #141d0c;
  border: 1px solid #141d0c;
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.qr-placeholder {
  width: 148px;
  height: 148px;
  margin: 10px auto;
  border: 1px dashed #4a5b4c;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #171e18;
  color: #a4b2a5;
  font-size: 12px;
  text-align: center;
  padding: 10px;
}

/* 合规页脚与备案链接 */
footer.cn-footer {
  flex-direction: column;
  align-items: stretch !important;
  gap: 18px !important;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
}
.footer-legal-links button {
  background: transparent;
  border: 0;
  color: #9ba59c;
  padding: 0;
  font-size: 12px;
}
.footer-legal-links button:hover { color: var(--lime); }
.footer-filing {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #849085;
}
.footer-filing a {
  color: #9ba69c;
  text-decoration: none;
}
.footer-filing a:hover { color: var(--lime); text-decoration: underline; }

/* 会员中心增强：列表、卡密兑换、发票、账号注销 */
.center-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.center-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}
.center-row small { display: block; color: #8f9b90; font-size: 12px; margin-top: 3px; }
.redeem-box, .invoice-box, .danger-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.danger-box {
  border-color: rgba(255, 113, 75, 0.35);
}
.danger-btn {
  background: transparent;
  border: 1px solid #ff714b;
  color: #ff8e72;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

/* 独立 SSR 资源详情页样式 */
.ssr-detail-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 36px 20px 64px;
}
.ssr-back {
  display: inline-block;
  color: var(--lime);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 18px;
}
.ssr-detail-card {
  background: #141a15;
  border: 1px solid #283429;
  border-radius: 16px;
  padding: 28px;
  color: #eef5ec;
}
.ssr-detail-card h1 { margin: 8px 0 12px; font-size: clamp(24px, 4vw, 34px); }
.ssr-summary { color: #a5b2a6; font-size: 15px; line-height: 1.7; }
.ssr-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 20px 0;
}
.ssr-meta-grid > div {
  background: #1b221c;
  border: 1px solid #29362b;
  border-radius: 10px;
  padding: 12px;
}
.ssr-meta-grid span { display: block; font-size: 11px; color: #8c978d; margin-bottom: 4px; }
.ssr-block { margin-top: 18px; }
.ssr-block h2 { font-size: 16px; color: var(--lime); margin: 0 0 8px; }
.ssr-block p { color: #c3cdc4; font-size: 14px; line-height: 1.8; margin: 0; }
.ssr-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.ssr-actions .ghost-btn {
  padding: 13px 18px;
  border: 1px solid #3a4a3c;
  color: #e6efe5;
  text-decoration: none;
  border-radius: 8px;
  font-size: 13px;
}
.ssr-foot {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #828e83;
}

/* 移动端 H5（<=760px 及 430px 视口）深度修复：不再隐藏登录按钮，防溢出 */
@media (max-width: 760px) {
  header {
    padding: 0 14px !important;
    gap: 8px;
  }
  header nav { display: none !important; }
  .header-actions {
    display: flex !important;
    align-items: center;
    gap: 8px !important;
  }
  .header-actions .ghost {
    display: inline-flex !important;
    align-items: center;
    padding: 7px 11px;
    border: 1px solid #354236;
    border-radius: 8px;
    font-size: 12px;
    color: #eff5ec;
  }
  .header-actions .primary.small {
    padding: 8px 11px;
    font-size: 12px;
    white-space: nowrap;
  }
  .mobile-menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .hero { padding: 36px 16px 34px !important; grid-template-columns: 1fr !important; gap: 28px !important; }
  .hero h1 { font-size: 36px !important; }
  .category-strip { grid-template-columns: repeat(2, 1fr) !important; }
  .pack-grid, .resource-grid, .plan-grid, .dashboard-grid, .detail-meta-grid, .ssr-meta-grid {
    grid-template-columns: 1fr !important;
  }
  .member-proof { grid-template-columns: 1fr !important; }
  .member-center.show {
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto;
  }
  .center-side {
    width: 100% !important;
    height: auto !important;
    position: static !important;
    border-right: 0 !important;
    border-bottom: 1px solid #243025;
  }
  .center-nav {
    display: flex !important;
    overflow-x: auto;
    gap: 6px;
  }
  .center-tab { white-space: nowrap; flex-shrink: 0; }
  .floating-support { right: 12px; bottom: 14px; }
  .support-fab { padding: 9px 13px; font-size: 12px; }
}
