/* =========================================================
   视频号POI商家AI平台 · 自定义样式补充（v4 重构版）
   - v3 保留：Modal 动画、进度条流光、表格样式、Toast/BackTop 等
   - v4 新增：Hero 极光律动、主标题流光、CTA 扫光、柱状图弹性、
              #liveActivity 实时气泡、prefers-reduced-motion 兼容
   ========================================================= */

/* ---------- 模态框动画 ---------- */
@keyframes modalFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes modalPopIn {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
@keyframes modalPopOut {
  from { opacity: 1; transform: translateY(0)    scale(1); }
  to   { opacity: 0; transform: translateY(10px) scale(0.97); }
}

#wechatModal.show,
#cardModal.show,
#toolsModal.show,
#authModal.show,
#pwdModal.show,
#adminModal.show,
#ordersModal.show,
#genModal.show { display: flex !important; }

#wechatModal.show .modal-backdrop,
#cardModal.show .modal-backdrop,
#toolsModal.show .modal-backdrop,
#authModal.show .modal-backdrop,
#pwdModal.show .modal-backdrop,
#adminModal.show .modal-backdrop,
#ordersModal.show .modal-backdrop { animation: modalFadeIn 0.25s ease both; }
#wechatModal.show .modal-panel,
#cardModal.show .card-modal-panel,
#toolsModal.show .tools-modal-panel,
#authModal.show .modal-panel,
#pwdModal.show .modal-panel,
#adminModal.show .admin-modal-panel,
#ordersModal.show .orders-modal-panel { animation: modalPopIn  0.32s cubic-bezier(0.16, 1, 0.3, 1) both; }
#wechatModal.leaving .modal-backdrop,
#cardModal.leaving .modal-backdrop,
#toolsModal.leaving .modal-backdrop,
#authModal.leaving .modal-backdrop,
#pwdModal.leaving .modal-backdrop,
#adminModal.leaving .modal-backdrop,
#ordersModal.leaving .modal-backdrop { animation: modalFadeOut 0.22s ease both; }
#wechatModal.leaving .modal-panel,
#cardModal.leaving .card-modal-panel,
#toolsModal.leaving .tools-modal-panel,
#authModal.leaving .modal-panel,
#pwdModal.leaving .modal-panel,
#adminModal.leaving .admin-modal-panel,
#ordersModal.leaving .orders-modal-panel { animation: modalPopOut  0.22s ease both; }

#genModal.show .modal-backdrop      { animation: modalFadeIn 0.25s ease both; }
#genModal.show .modal-panel         { animation: modalPopIn  0.32s cubic-bezier(0.16, 1, 0.3, 1) both; }
#genModal.leaving .modal-backdrop   { animation: modalFadeOut 0.22s ease both; }
#genModal.leaving .modal-panel      { animation: modalPopOut  0.22s ease both; }

/* ---------- 进度条流光动画 ---------- */
@keyframes progressShimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.progress-shimmer {
  background-image: linear-gradient(
    90deg,
    #6366f1 0%,
    #8b5cf6 25%,
    #d946ef 50%,
    #8b5cf6 75%,
    #6366f1 100%
  );
  background-size: 200% 100%;
  animation: progressShimmer 2.2s linear infinite;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- 微信二维码网格 ---------- */
.qr-grid {
  grid-template-rows: repeat(7, 1fr);
}
.qr-grid > span {
  border-radius: 2px;
}
.qr-corner-tl {
  background: transparent !important;
  position: relative;
  border: 2.5px solid #1f2937;
  border-right: none;
  border-bottom: none;
  border-radius: 4px 0 0 0 !important;
}
.qr-corner-tl:nth-child(1),
.qr-corner-tl:nth-child(2),
.qr-corner-tl:nth-child(3) {
  border-top: 2.5px solid #1f2937;
  border-left: 2.5px solid #1f2937;
}
.qr-dot {
  border-radius: 2px;
  align-self: center;
  justify-self: center;
  width: 60%;
  height: 60%;
}

/* ---------- 比例/风格按钮选中态 ---------- */
.ratio-btn.active,
.style-btn.active {
  border-color: #a78bfa;
  background: rgba(139, 92, 246, 0.08);
  color: #6d28d9;
}
.ratio-btn,
.style-btn { cursor: pointer; }

/* ---------- 生成预览动画 ---------- */
@keyframes genGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
  50%      { box-shadow: 0 0 0 8px rgba(139, 92, 246, 0.12); }
}
#genPreview.is-processing {
  animation: genGlow 1.6s ease-in-out infinite;
}
#genPreview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: modalPopIn 0.4s ease both;
}

/* ---------- Hero Mockup 数据切换动效 ---------- */
.hero-data-swap {
  animation: heroSwap 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes heroSwap {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* =========================================================
   v4 新增：常驻动态视觉
   ========================================================= */

/* ---------- 渐变文字 + 流光扫过 ---------- */
.text-gradient {
  background: linear-gradient(100deg, #a5b4fc 0%, #c4b5fd 35%, #e879f9 75%, #f0abfc 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: textShimmer 4s linear infinite;
}
@keyframes textShimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---------- Hero 背景极光：位移 + 透明度呼吸 ---------- */
@keyframes blobDrift {
  0%   { transform: translate3d(0,    0,   0) rotate(0deg)   scale(1);    }
  33%  { transform: translate3d(40px, -28px, 0) rotate(6deg)  scale(1.05); }
  66%  { transform: translate3d(-30px, 22px, 0) rotate(-5deg) scale(0.97); }
  100% { transform: translate3d(0,    0,   0) rotate(0deg)   scale(1);    }
}
@keyframes blobPulse {
  0%, 100% { opacity: 0.22; }
  50%      { opacity: 0.40; }
}
.blob {
  will-change: transform, opacity;
  transform: translate3d(0, 0, 0); /* 启动 GPU 加速 */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.blob-a {
  animation: blobDrift 11s ease-in-out infinite,
             blobPulse 6s  ease-in-out infinite;
}
.blob-b {
  animation: blobDrift 14s ease-in-out infinite reverse,
             blobPulse 7s  ease-in-out infinite;
}

/* ---------- CTA 按钮扫光 ---------- */
@keyframes btnShimmer {
  0%   { transform: translateX(-120%) skewX(-22deg); }
  60%  { transform: translateX(180%)  skewX(-22deg); }
  100% { transform: translateX(180%)  skewX(-22deg); }
}
.btn-shimmer { position: relative; overflow: hidden; isolation: isolate; }
.btn-shimmer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 42%;
  height: 100%;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0)    0%,
    rgba(255, 255, 255, 0.28) 45%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0.28) 55%,
    rgba(255, 255, 255, 0)    100%
  );
  transform: translateX(-120%) skewX(-22deg);
  animation: btnShimmer 3.5s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
  pointer-events: none;
  /* v11.9：去掉 mix-blend-mode——混合图层在某些渲染器会绕过圆角裁剪，露出直角方块 */
  z-index: 1;
}
.btn-shimmer > * { position: relative; z-index: 2; }

/* ---------- Mini Bar Chart 弹性过渡 ---------- */
#heroChart .bar {
  transition: height 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 0.5s ease;
}

/* ---------- Live Activity 实时气泡 ---------- */
#liveActivity {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 38; /* 低于 Modal (50)，高于导航 (40)，不挡 backTop */
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 9999px;
  background: rgba(15, 18, 34, 0.78);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(167, 139, 250, 0.28);
  color: #e7e8f3;
  font-size: 12.5px;
  line-height: 1.2;
  box-shadow: 0 10px 30px -8px rgba(13, 8, 60, 0.55),
              0 0 0 1px rgba(255,255,255,0.04) inset;
  max-width: 280px;
  animation: liveEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}
#liveActivity .live-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.65);
  flex-shrink: 0;
}
#liveActivity .live-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: #22c55e;
  opacity: 0.65;
  animation: livePing 1.6s cubic-bezier(0,0,0.2,1) infinite;
}
@keyframes livePing {
  0%   { transform: scale(1);   opacity: 0.65; }
  80%  { transform: scale(2.6); opacity: 0;    }
  100% { transform: scale(2.6); opacity: 0;    }
}
#liveActivity .live-time {
  color: #c4b5fd;
  font-weight: 700;
  flex-shrink: 0;
}
#liveActivity .live-msg {
  display: inline-block;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s ease, transform 0.45s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
#liveActivity .live-msg.swap-out { opacity: 0; transform: translateY(-6px); }
#liveActivity .live-msg.swap-in  { opacity: 0; transform: translateY(6px);  }

@keyframes liveEnter {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* 小屏更紧凑 */
@media (max-width: 640px) {
  #liveActivity {
    left: 12px;
    bottom: 12px;
    padding: 8px 12px;
    font-size: 11.5px;
    max-width: 62vw;
  }
}

/* =========================================================
   v3 保留：原全站样式（含 prefers-reduced-motion）
   ========================================================= */

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.10), rgba(99, 102, 241, 0.10));
  border: 1px solid rgba(139, 92, 246, 0.22);
  color: #7c3aed;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.section-tag.dark {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(196, 181, 253, 0.35);
  color: #c4b5fd;
}

/* ---------- 导航栏状态 ---------- */
/* v9.2：首屏 navShell 透明无框，向下滑动出现白色玻璃背景框 */
#navShell {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding: 0;
  transition: all .35s cubic-bezier(.4, 0, .2, 1);
}
/* v9.3：滚动后玻璃框视觉更长更宽——向左右各外扩 14px、上下加留白，
   使「免费使用」等所有按钮完整包裹在框内 */
#navShell.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 12px 40px -14px rgba(23, 20, 60, 0.22);
  margin-left: -14px;
  margin-right: -14px;
  padding: 6px 14px;
}
/* v9.3：框内内容行不再裁切（移除 overflow:hidden 防止 CTA 阴影被裁），
   圆角由 navShell 自身承担，内容行保持 flex 布局 */
#navShell.scrolled > div {
  border-radius: 14px;
}
#navShell.scrolled .nav-title { color: #0f1222; }
#navShell.scrolled .nav-links { color: #5a5f7a; }
#navShell.scrolled .nav-links .nav-link:hover { color: #6d28d9; background: rgba(124, 58, 237, 0.06); }
#navShell.scrolled .nav-aux { color: #5a5f7a; }
#navShell.scrolled .nav-aux:hover { color: #6d28d9; }

/* v9.4：右侧三件套与 CTA 的滚动后样式——统一淡玻璃色 + 浅描边，去除套娃 */
#navShell.scrolled .nav-points-btn {
  background: rgba(254, 243, 199, 0.95);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.32);
}
#navShell.scrolled .nav-points-btn:hover {
  background: rgba(253, 230, 138, 0.95);
}
#navShell.scrolled .nav-points-icon { color: #d97706; }

#navShell.scrolled .nav-orders-btn {
  background: rgba(248, 250, 252, 0.9);
  color: #475569;
  border: 1px solid rgba(226, 232, 240, 0.8);
}
#navShell.scrolled .nav-orders-btn:hover {
  background: rgba(241, 245, 249, 0.95);
  color: #6d28d9;
}

#navShell.scrolled .nav-auth-btn {
  background: rgba(248, 250, 252, 0.9);
  color: #334155;
  border: 1px solid rgba(226, 232, 240, 0.8);
}
#navShell.scrolled .nav-auth-btn:hover {
  background: rgba(241, 245, 249, 0.95);
  color: #6d28d9;
}
#navShell.scrolled #navAvatar { color: #ffffff; }

#navShell.scrolled .nav-mobile-btn {
  background: rgba(248, 250, 252, 0.9);
  color: #475569;
  border: 1px solid rgba(226, 232, 240, 0.8);
}
#navShell.scrolled .nav-mobile-btn:hover {
  background: rgba(241, 245, 249, 0.95);
  color: #6d28d9;
}

/* v9.4：唯一主转化 CTA 在滚动后——保留品牌渐变 + 阴影，hover 微浮 */
#navShell.scrolled .nav-cta {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px -6px rgba(124, 58, 237, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.4);
}
#navShell.scrolled .nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -6px rgba(124, 58, 237, 0.7);
}

/* 移动端展开菜单在滚动后也要切为浅底 */
#navShell.scrolled #mobileMenu > div {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(226, 232, 240, 0.8);
  box-shadow: 0 10px 30px -10px rgba(23, 20, 60, 0.15);
}
#navShell.scrolled #mobileMenu .mobile-link,
#navShell.scrolled #mobileMenu .mobile-auth-btn,
#navShell.scrolled #mobileMenu .mobile-recharge-btn,
#navShell.scrolled #mobileMenu .mobile-admin-btn {
  color: #475569;
}
#navShell.scrolled #mobileMenu .mobile-link:hover,
#navShell.scrolled #mobileMenu .mobile-auth-btn:hover {
  background: rgba(124, 58, 237, 0.07);
  color: #6d28d9;
}
#navShell.scrolled #mobileMenu .mobile-recharge-btn {
  color: #b45309;
}
#navShell.scrolled #mobileMenu .mobile-recharge-btn:hover {
  background: rgba(245, 158, 11, 0.08);
}
#navShell.scrolled #mobileMenu .mobile-admin-btn {
  color: #be123c;
}
#navShell.scrolled #mobileMenu .mobile-admin-btn:hover {
  background: rgba(225, 29, 72, 0.06);
}
#navShell.scrolled #mobileMenu .h-px {
  background: rgba(226, 232, 240, 0.8);
}

.nav-link.active {
  color: #6d28d9;
  background: rgba(124, 58, 237, 0.08);
}

/* ---------- 行业标签 ---------- */
.industry-chip {
  background: #fff;
  border: 1px solid rgba(139, 92, 246, 0.30);
  color: #6d28d9;
  transition: all 0.25s ease;
}
.industry-chip:hover {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -8px rgba(124, 58, 237, 0.5);
}

/* ---------- 价值卡 / 步骤卡 ---------- */
.value-card {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 1px 2px rgba(23,20,60,.04), 0 10px 30px -14px rgba(99,102,241,.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.value-card:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 92, 246, 0.30);
  box-shadow: 0 6px 16px -6px rgba(23,20,60,.10), 0 24px 48px -16px rgba(124, 58, 237, 0.25);
}

.step-card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 1px 2px rgba(23,20,60,.04), 0 10px 30px -14px rgba(99,102,241,.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.step-card:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 92, 246, 0.30);
  box-shadow: 0 6px 16px -6px rgba(23,20,60,.10), 0 24px 48px -16px rgba(124, 58, 237, 0.25);
}
.step-num {
  position: absolute;
  top: -13px;
  left: 24px;
  padding: 3px 12px;
  border-radius: 9999px;
  background: linear-gradient(120deg, #6366f1, #8b5cf6, #d946ef);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  box-shadow: 0 8px 20px -6px rgba(124, 58, 237, 0.55);
}

/* ---------- 特性横条 ---------- */
.feature-pill {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: linear-gradient(135deg, #faf9ff, #f5f7ff);
  border: 1px solid rgba(139, 92, 246, 0.14);
  border-radius: 20px;
  padding: 24px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.feature-pill:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 92, 246, 0.32);
  box-shadow: 0 16px 36px -14px rgba(124, 58, 237, 0.22);
}

/* ---------- 案例卡 ---------- */
.case-card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px;
  overflow: hidden;
  backdrop-filter: blur(6px);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.case-card:hover {
  transform: translateY(-6px);
  border-color: rgba(196, 181, 253, 0.35);
  box-shadow: 0 30px 60px -20px rgba(124, 58, 237, 0.35);
}

/* ---------- 表单 ---------- */
.field {
  width: 100%;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  font-size: 14px;
  color: #0f1222;
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.field::placeholder { color: #9aa0b8; }
.field:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}
.field.err {
  border-color: #f43f5e;
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.10);
}
.field.err::placeholder { color: #fda4af; }

/* ---------- 工具卡入场 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Footer 链接 ---------- */
.footer-link {
  color: #94a3b8;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.footer-link:hover {
  color: #fff;
  padding-left: 4px;
}

/* ---------- Toast ---------- */
#toast.show {
  opacity: 1;
  transform: translate(-50%, -10px);
}

/* ---------- 返回顶部 ---------- */
#backTop.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f6f7fb; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c4b5fd, #818cf8);
  border-radius: 8px;
  border: 2px solid #f6f7fb;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #a78bfa, #6366f1); }

::selection {
  background: #8b5cf6;
  color: #fff;
}

/* =========================================================
   v5 · AI 生成器结构化点选面板
   - .mode-tab-pill        顶部 Mode Tabs
   - .industry-grid-btn    行业宫格
   - .tag-chip             多维标签
   - .mini-card            结构化团购卡片
   - .gen-stack-anim       chip 选中态抖动
   ========================================================= */

/* ---------- Mode Tabs（顶部模式切换） ---------- */
.mode-tab-bar {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border-radius: 14px;
  border: 1px solid rgba(167, 139, 250, 0.18);
}
.mode-tab-pill {
  flex: 1;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: #6d28d9;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  line-height: 1.1;
}
.mode-tab-pill:hover { background: rgba(255,255,255,0.6); }
.mode-tab-pill.active {
  background: #ffffff;
  color: #6d28d9;
  border-color: rgba(167, 139, 250, 0.35);
  box-shadow: 0 6px 16px -8px rgba(124, 58, 237, 0.45);
  transform: translateY(-1px);
}

/* ---------- 行业宫格（6 格 3x2） ---------- */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.industry-grid-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 6px 8px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  color: #475569;
}
.industry-grid-btn .ig-emoji {
  font-size: 20px;
  line-height: 1;
  transition: transform 0.25s ease;
}
.industry-grid-btn .ig-label {
  font-size: 11.5px;
  font-weight: 600;
}
.industry-grid-btn:hover { border-color: #c4b5fd; background: #faf8ff; }
.industry-grid-btn:hover .ig-emoji { transform: scale(1.12) rotate(-4deg); }
.industry-grid-btn.active {
  border-color: #8b5cf6;
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  color: #6d28d9;
  box-shadow: 0 8px 18px -10px rgba(139, 92, 246, 0.55);
  transform: translateY(-1px);
}
.industry-grid-btn.active .ig-emoji { transform: scale(1.08); }

/* ---------- Chip 标签（套餐类型 / 价位） ---------- */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-chip {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #475569;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.tag-chip:hover { border-color: #c4b5fd; background: #faf8ff; }
.tag-chip.active {
  border-color: #8b5cf6;
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
  color: #ffffff;
  box-shadow: 0 6px 14px -8px rgba(139, 92, 246, 0.6);
  transform: translateY(-1px);
}
.tag-chip.muted-active {
  border-color: #a78bfa;
  background: rgba(139, 92, 246, 0.08);
  color: #6d28d9;
}
.tag-chip.bump { animation: chipBump 0.32s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes chipBump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* ---------- 提示词 + 卡片预览分组标题 ---------- */
.gen-section-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #334155;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gen-section-title .opt { font-size: 11px; color: #94a3b8; font-weight: 600; text-transform: none; letter-spacing: 0; }

/* ---------- 输入框整体压紧 ---------- */
.gen-stack > * + * { margin-top: 14px; }

/* ---------- 结构化团购卡片（核心产出物） ---------- */
.mini-card {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(139, 92, 246, 0.18);
  box-shadow: 0 18px 40px -22px rgba(76, 29, 149, 0.35), 0 0 0 1px rgba(255,255,255,0.6) inset;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.mini-card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-align: center;
  padding: 16px;
  overflow: hidden;
}
.mini-card-cover::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(circle at 20% 25%, rgba(255,255,255,0.35) 0, transparent 35%),
    radial-gradient(circle at 80% 75%, rgba(255,255,255,0.25) 0, transparent 40%);
  animation: cardCoverDrift 9s ease-in-out infinite;
}
@keyframes cardCoverDrift {
  0%, 100% { transform: translate3d(0,0,0)    rotate(0deg); }
  50%      { transform: translate3d(2%,-2%,0) rotate(4deg); }
}
.mini-card-cover .mc-eyebrow {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.mini-card-cover .mc-headline {
  position: relative;
  z-index: 1;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.mini-card-cover .mc-cover-logo {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255,255,255,0.92);
  color: #6d28d9;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 4px 12px -4px rgba(0,0,0,0.3);
}
.mini-card-body { padding: 14px 16px 16px; }
.mini-card-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}
.mini-card-price-row {
  margin-top: 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.mini-card-price {
  color: #d946ef;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.mini-card-price-suffix { color: #d946ef; font-size: 12px; font-weight: 700; }
.mini-card-origin {
  color: #94a3b8;
  font-size: 12px;
  text-decoration: line-through;
}
.mini-card-save {
  padding: 2px 8px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}
.mini-card-reason {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fdf4ff, #fae8ff);
  border-left: 3px solid #a78bfa;
  font-size: 12px;
  color: #6b21a8;
  line-height: 1.5;
}
.mini-card-reason .lbl {
  display: inline-block;
  font-weight: 800;
  color: #7e22ce;
  margin-right: 6px;
}
.mini-card-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mini-card-list li {
  font-size: 12px;
  color: #475569;
  display: flex;
  gap: 6px;
  line-height: 1.5;
}
.mini-card-list li::before {
  content: "·";
  color: #a78bfa;
  font-weight: 900;
}
.mini-card-foot {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}
.mini-card-foot .pill {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.mini-card-foot .pill.ghost {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* ---------- 空态 / 加载态卡片 ---------- */
.mini-card-placeholder {
  background: linear-gradient(135deg, #faf8ff 0%, #f5f3ff 100%);
  border: 2px dashed rgba(167, 139, 250, 0.45);
  border-radius: 18px;
  padding: 28px 18px;
  text-align: center;
  color: #7c3aed;
}
.mini-card-placeholder .pc-emoji {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 10px;
  display: inline-block;
  animation: pcBob 2.4s ease-in-out infinite;
}
@keyframes pcBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.mini-card-placeholder p { font-size: 12.5px; color: #6d28d9; font-weight: 700; }
.mini-card-placeholder small { color: #a78bfa; font-size: 11px; display: block; margin-top: 4px; }

/* ---------- 完成态结构化结果区 ---------- */
#genCardResult {
  margin-top: 12px;
  max-height: 360px;
  overflow-y: auto;
  animation: modalPopIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
#genCardResult::-webkit-scrollbar { width: 4px; }
#genCardResult::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #c4b5fd, #a78bfa); border-radius: 4px; }

/* ---------- 视频模式缩略图 ---------- */
.mini-card.video .mini-card-cover { aspect-ratio: 9 / 16; max-height: 280px; }
.mini-card.video .mini-card-cover .mc-headline { font-size: 15px; }

/* ---------- 小屏适配 ---------- */
@media (max-width: 640px) {
  .mode-tab-pill { font-size: 11.5px; padding: 8px 6px; }
  .industry-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .industry-grid-btn { padding: 8px 4px; }
  .industry-grid-btn .ig-emoji { font-size: 18px; }
  .industry-grid-btn .ig-label { font-size: 10.5px; }
}

/* ---------- 尊重系统减弱动效（v5 加强） ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .text-gradient { animation: none; }
  .blob-a, .blob-b { animation: none !important; opacity: 0.30; }
  .btn-shimmer::after { display: none; }
  #liveActivity .live-dot::before { animation: none; }
  #heroChart .bar { transition: none; }
  .industry-grid-btn:hover .ig-emoji { transform: none; }
  .industry-grid-btn.active .ig-emoji { transform: none; }
  .tag-chip.bump { animation: none; }
  .mini-card-cover::before { animation: none; }
  .mini-card-placeholder .pc-emoji { animation: none; }
}

/* ---------- 小屏微调 ---------- */
@media (max-width: 640px) {
  .value-card, .step-card { padding: 22px; }
  .case-card .p-7 { padding: 22px; }
}

/* ============================================================
   v6: AI 生成器弹窗滚动与响应式
   - 弹窗整体 max-h-[88vh]，面板本身可滚动（兜底）
   - 桌面端左右两栏独立可滚动
   - 自定义精致细滚动条
   - 小屏（<md）切换为单列，整面板滚动
   ============================================================ */

/* 弹窗打开时锁住 body 滚动 */
html.modal-open, body.modal-open {
  overflow: hidden !important;
  touch-action: none;
}

/* 弹窗面板：核心修复 max-h + 整面板滚动 */
#genModal .modal-panel {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
#genModal .modal-panel::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
#genModal .modal-panel::-webkit-scrollbar-track {
  background: transparent;
}
#genModal .modal-panel::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.12);
  border-radius: 999px;
}
#genModal .modal-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.26);
}
#genModal .modal-panel {
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.14) transparent;
}

/* 弹窗层整体高度由 grid 撑开，左右两栏各占 1fr */
#genModal .modal-grid {
  min-height: 0;            /* 关键：允许 flex 子项收缩并触发 overflow */
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}

/* 左右两栏独立滚动容器（桌面端） */
.modal-col-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  max-height: 100%;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* =========================================================
   v8 致命修复：<1024px 强制上下单栏，禁止左右撑开截断
   - grid 变单列 + 取消 flex 收缩，改由整面板统一纵向滚动
   - 两栏取消独立滚动，避免嵌套滚动导致内容被裁切
   ========================================================= */
@media (max-width: 1023px) {
  #genModal .modal-panel {
    max-height: 92vh;
  }
  #genModal .modal-grid {
    grid-template-columns: 1fr;
    min-height: auto;
    flex: none;
  }
  #genModal .modal-col-scroll {
    overflow: visible;
    max-height: none;
    padding-right: 0;
  }
  #genModal .modal-col-scroll:last-child {
    border-top: 1px solid #f1f5f9;
  }
}

/* 自定义滚动条（WebKit） */
.modal-col-scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.modal-col-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.modal-col-scroll::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.14);
  border-radius: 999px;
  transition: background 0.18s ease;
}
.modal-col-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.28);
}

/* Firefox */
.modal-col-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.18) transparent;
}

/* 关闭按钮在滚动后仍然悬浮在右上 */
#genModalClose {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* 小屏微调：单栏堆叠时输入区在上、预览区在下 */
@media (max-width: 1023px) {
  #genModal .modal-grid > div:first-child { order: 1; }
  #genModal .modal-grid > div:last-child  { order: 2; }
  #genModal .modal-col-scroll { animation: none; }
}

/* 弹窗进入时双栏入场 */
@keyframes modalColIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal-col-scroll { animation: modalColIn 0.36s cubic-bezier(0.22, 1, 0.36, 1) both; }
.modal-col-scroll:nth-of-type(2) { animation-delay: 0.06s; }

@media (prefers-reduced-motion: reduce) {
  .modal-col-scroll { animation: none; }
  .modal-col-scroll::-webkit-scrollbar-thumb { background: rgba(15,23,42,0.22); }
}

/* 防止弹窗内部元素把横向撑开 */
#genModal img, #genModal video {
  max-width: 100%;
  height: auto;
}

/* ============================================================
   v7: 卡密充值弹窗样式
   ============================================================ */

#cardModal.show .card-modal-panel { animation: modalPopIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) both; }
#cardModal.leaving .card-modal-panel { animation: modalPopOut 0.22s ease both; }

.card-modal-panel .field {
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.card-modal-panel .field:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

/* 卡密输入框大写 */
#cardKeyInput {
  text-transform: uppercase;
}
#cardKeyInput::placeholder {
  text-transform: none;
}

/* 结果框入场 */
#cardResultBox.show {
  animation: cardResultIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes cardResultIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 顶部积分徽章（导航栏） */
#navPoints {
  transition: transform 0.18s ease, background 0.18s ease;
}
#navPoints.bump {
  animation: pointsBump 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes pointsBump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* 卡密充值按钮微光 */
#navRechargeBtn {
  transition: all 0.18s ease;
}
#navRechargeBtn:hover {
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .card-modal-panel, #cardResultBox.show, #navPoints.bump { animation: none; }
}

/* ============================================================
   v7: AI 工具箱 16:9 滑块 Modal
   ============================================================ */

#toolsModal.show .tools-modal-panel { animation: modalPopIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) both; }
#toolsModal.leaving .tools-modal-panel { animation: modalPopOut 0.22s ease both; }

.tools-modal-panel {
  max-height: 92vh;
  overflow-y: auto;
}

/* 滑块容器 */
.tools-slider {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0.75rem 1.25rem;
  /* 隐藏默认滚动条，保持界面干净 */
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.16) transparent;
}
.tools-slider::-webkit-scrollbar {
  height: 6px;
}
.tools-slider::-webkit-scrollbar-track {
  background: transparent;
}
.tools-slider::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.16);
  border-radius: 999px;
}
.tools-slider::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.28);
}

/* 单个 16:9 卡片 */
.tools-slide-card {
  flex: 0 0 auto;
  width: min(78vw, 360px);
  scroll-snap-align: start;
  background: #fff;
  border-radius: 24px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 30px -12px rgba(99, 102, 241, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}
.tools-slide-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px -12px rgba(124, 58, 237, 0.22);
}

/* 16:9 封面区 */
.tools-slide-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tools-slide-cover.amber {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.tools-slide-cover.rose {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
}

.tools-slide-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.tools-slide-badge.free { background: #10b981; }
.tools-slide-badge.points { background: rgba(0,0,0,0.35); backdrop-filter: blur(4px); }

/* 卡片 body */
.tools-slide-body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.tools-slide-body h4 {
  font-size: 17px;
  font-weight: 900;
  color: #0f1222;
  line-height: 1.25;
}
.tools-slide-body p {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: #5a5f7a;
  flex: 1;
}
.tools-slide-action {
  margin-top: 16px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 0;
  border-radius: 999px;
  background: linear-gradient(120deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.tools-slide-action:hover {
  opacity: 0.93;
  transform: translateY(-1px);
}
.tools-slide-action.amber-action {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.tools-slide-action.rose-action {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
}

/* 左右箭头 */
#toolsSliderPrev, #toolsSliderNext {
  opacity: 0.9;
}
#toolsSliderPrev:hover, #toolsSliderNext:hover {
  opacity: 1;
}
#toolsSliderPrev.hidden, #toolsSliderNext.hidden {
  display: none;
}

@media (max-width: 767px) {
  .tools-modal-panel { max-height: 95vh; border-radius: 20px; }
  .tools-slide-card { width: 82vw; }
  #toolsSliderPrev, #toolsSliderNext { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tools-slider, .tools-slide-card, #toolsModal .tools-modal-panel { animation: none; transition: none; }
}

/* ============================================================
   v8-1: 个人中心 / 卡密兑换弹窗（复刻商业化设计）
   ============================================================ */

/* 顶部渐变身份区 */
.pc-head {
  position: relative;
  overflow: hidden;
  padding: 26px 26px 22px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 52%, #d946ef 100%);
}
.pc-head-glow {
  position: absolute;
  top: -70px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  filter: blur(38px);
  pointer-events: none;
}
.pc-avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}
.pc-username {
  font-size: 17px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-account {
  margin-top: 3px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}
.pc-logout {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease;
}
.pc-logout:hover { background: rgba(255, 255, 255, 0.3); }
.pc-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.16s ease;
}
.pc-link:hover { color: #fff; text-decoration: underline; }

/* 积分展示卡片 */
.pc-points-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 20px;
  background: linear-gradient(120deg, #4f46e5 0%, #7c3aed 55%, #c026d3 100%);
  box-shadow: 0 12px 28px -14px rgba(99, 102, 241, 0.7);
}
.pc-points-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============================================================
   v8-2: 登录 / 注册弹窗
   ============================================================ */
.auth-tab {
  padding: 9px 0;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  color: #5a5f7a;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
}
.auth-tab.active {
  background: #fff;
  color: #6d28d9;
  box-shadow: 0 2px 8px -2px rgba(99, 102, 241, 0.35);
}

/* ============================================================
   v8-3: Root 管理员后台
   ============================================================ */
.admin-modal-panel { overflow-x: hidden; }

.admin-head {
  position: relative;
  overflow: hidden;
  padding: 24px 68px 22px 28px;
  background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 55%, #7c3aed 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 28px 28px 0 0;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px;
  border-radius: 16px;
  background: #f1f5f9;
}
.admin-tab {
  padding: 9px 18px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800;
  color: #5a5f7a;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
}
.admin-tab.active {
  background: #fff;
  color: #6d28d9;
  box-shadow: 0 2px 10px -3px rgba(99, 102, 241, 0.4);
}

.admin-panel { margin-top: 20px; }
.admin-panel.hidden { display: none !important; }

.admin-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 18px 20px;
  border-radius: 18px;
  background: linear-gradient(160deg, #f8f7ff 0%, #f1f4ff 100%);
  border: 1px solid #e8e9ff;
}
.admin-stat-label {
  font-size: 12px;
  font-weight: 700;
  color: #5a5f7a;
}
.admin-stat-value {
  font-size: 26px;
  font-weight: 900;
  color: #1e1b4b;
  letter-spacing: -0.02em;
}

.admin-card {
  border-radius: 18px;
  border: 1px solid #eef0f6;
  background: #fff;
  padding: 16px 18px 18px;
}
.admin-card-title {
  font-size: 13px;
  font-weight: 900;
  color: #1e1b4b;
  margin-bottom: 12px;
}
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.16) transparent;
}
.admin-list::-webkit-scrollbar { width: 6px; }
.admin-list::-webkit-scrollbar-track { background: transparent; }
.admin-list::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.14); border-radius: 999px; }
.admin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  font-size: 12.5px;
  color: #2a2e45;
}
.admin-list-item .muted { color: #94a3b8; font-size: 11px; }
.admin-list-empty {
  padding: 24px 0;
  text-align: center;
  font-size: 12.5px;
  color: #94a3b8;
}

.admin-ai-block {
  border-radius: 18px;
  border: 1px solid #eef0f6;
  background: #fff;
  padding: 16px 18px 18px;
}
.admin-ai-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.admin-ai-dot {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}
.admin-ai-dot.deepseek { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.admin-ai-dot.image2   { background: linear-gradient(135deg, #f59e0b, #d97706); }
.admin-ai-dot.grok     { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.admin-ai-title { font-size: 14px; font-weight: 900; color: #1e1b4b; }
.admin-ai-sub   { font-size: 11px; color: #94a3b8; margin-top: 1px; }
/* v11.3：AI 配置 Key 状态徽章 */
.admin-key-badge { display:inline-block; font-weight:700; font-size:10px; padding:1px 8px; border-radius:9999px; }
.admin-key-badge.on  { color:#059669; background:rgba(16,185,129,0.10); border:1px solid rgba(16,185,129,0.28); }
.admin-key-badge.off { color:#b45309; background:rgba(245,158,11,0.10); border:1px solid rgba(245,158,11,0.30); }

.admin-field-label {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  color: #2a2e45;
  margin-bottom: 6px;
}
.admin-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 12.5px;
  color: #0f1222;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.admin-input:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}
.admin-textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.65;
  font-family: inherit;
}
.admin-key-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.admin-key-row .admin-input { flex: 1; }
.admin-key-toggle {
  flex-shrink: 0;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 11.5px;
  font-weight: 700;
  color: #5a5f7a;
  cursor: pointer;
}

.admin-table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid #eef0f6;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 12.5px;
}
.admin-table thead th {
  text-align: left;
  padding: 12px 14px;
  background: #f8fafc;
  color: #5a5f7a;
  font-weight: 800;
  font-size: 11.5px;
  white-space: nowrap;
  border-bottom: 1px solid #eef0f6;
}
.admin-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #f6f7fb;
  color: #2a2e45;
  vertical-align: top;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: #fafbff; }

.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
}
.admin-badge.new      { background: #e0e7ff; color: #4338ca; }
.admin-badge.contacted{ background: #fef3c7; color: #b45309; }
.admin-badge.closed   { background: #dcfce7; color: #15803d; }

@media (max-width: 640px) {
  .pc-head { padding: 22px 20px 18px; }
  .admin-head { padding: 20px 60px 20px 20px; border-radius: 22px 22px 0 0; }
  .admin-stat-value { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .pc-head-glow { animation: none; }
}


/* ============================================================
   工具独立页面样式 (tool-pages.js)
   ============================================================ */
.tool-page-body {
  min-height: calc(100vh - 64px);
  /* v11.8 修复移动端：去掉固定 height（原 height 使手机端表单列被压扁、内容溢出覆盖结果面板）。
     移动端走自然文档流；固定高度+独立滚动仅桌面双栏需要，已移入下方 @media (min-width:1024px) */
  background: linear-gradient(135deg, #f5f3ff 0%, #eef2ff 100%);
  padding-bottom: 60px;
}
/* v9.2：桌面端左右两栏各自独立滚动 */
@media (min-width: 1024px) {
  .tool-page-body { height: calc(100vh - 64px); overflow-y: auto; }
  .tool-page-body > .max-w-5xl { height: calc(100vh - 64px); }
  .tool-page-body .lg\:col-span-3 {
    overflow-y: auto;
    padding-right: 12px;
    max-height: calc(100vh - 64px - 80px);
  }
  .tool-page-body .lg\:col-span-2 {
    overflow-y: auto;
    max-height: calc(100vh - 64px - 80px);
    padding-right: 4px;
  }
  .tool-page-body .tool-result-col { min-height: 100%; }
  .tool-page-body::-webkit-scrollbar { width: 6px; }
  .tool-page-body::-webkit-scrollbar-thumb { background: #c7d2fe; border-radius: 999px; }
  .tool-page-body .lg\:col-span-3::-webkit-scrollbar { width: 5px; }
  .tool-page-body .lg\:col-span-3::-webkit-scrollbar-thumb { background: #c7d2fe; border-radius: 999px; }
  .tool-page-body .lg\:col-span-2::-webkit-scrollbar { width: 5px; }
  .tool-page-body .lg\:col-span-2::-webkit-scrollbar-thumb { background: #c7d2fe; border-radius: 999px; }
}
.tool-field {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  padding: 20px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.tool-field:focus-within {
  border-color: #c7d2fe;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.08);
}
.tool-grid-btn.active,
.tool-chip.active {
  border-color: #6366f1 !important;
  background: #eef2ff !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15) !important;
  color: #4f46e5 !important;
}
.tool-category-chips { min-height: 28px; }
.tool-page-body #resultArea {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  min-height: 120px;
  padding: 16px;
}
.tool-page-body #resultArea pre,
.tool-page-body #resultArea div {
  font-family: inherit;
}
.tool-page-body #resultArea img {
  border-radius: 12px;
  max-height: 480px;
  object-fit: contain;
  background: #f9fafb;
}
.tool-page-body .sticky.top-24 {
  top: 96px;
}

/* 工具页面内滚动条 */
.tool-page-body::-webkit-scrollbar { width: 6px; }
.tool-page-body::-webkit-scrollbar-thumb { background: #c7d2fe; border-radius: 999px; }

/* ================= v9.0.4 · 我的生成 / 导航按钮 / 管理后台微调 ================= */

/* ---------- 我的生成卡片 ---------- */
/* v9.3：我的生成列表内部滚动（列表很长时只滚列表，不滚整个弹窗） */
#ordersList {
  max-height: 52vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, 0.35) transparent;
}
#ordersList::-webkit-scrollbar { width: 6px; }
#ordersList::-webkit-scrollbar-track { background: transparent; }
#ordersList::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.3);
  border-radius: 99px;
}
#ordersList::-webkit-scrollbar-thumb:hover { background: rgba(124, 58, 237, 0.5); }

.order-card {
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.order-card:hover {
  border-color: rgba(196, 181, 253, 0.6);
  box-shadow: 0 8px 24px -12px rgba(23, 20, 60, 0.18);
  transform: translateY(-1px);
}
.order-preview {
  width: 76px;
  height: 76px;
  border-radius: 14px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  flex: none;
}
.order-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(124, 58, 237, 0.06);
  color: #6d28d9;
  border: 1px solid rgba(124, 58, 237, 0.18);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.order-action:hover {
  background: rgba(124, 58, 237, 0.12);
  color: #5b21b6;
}
.order-action.delete {
  background: rgba(244, 63, 94, 0.05);
  color: #be123c;
  border-color: rgba(244, 63, 94, 0.2);
}
.order-action.delete:hover {
  background: rgba(244, 63, 94, 0.12);
  color: #9f1239;
}

/* v9.2：我的生成 · 点击内容区整块复制 */
.order-content-copy {
  display: block;
  width: 100%;
  background: #fafafa;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.order-content-copy:hover {
  background: #f5f3ff;
  border-color: rgba(124, 58, 237, 0.3);
}
.order-content-copy p {
  pointer-events: none;
}
.order-action.copy {
  background: rgba(16, 185, 129, 0.06);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.22);
}
.order-action.copy:hover {
  background: rgba(16, 185, 129, 0.14);
  color: #065f46;
}

/* line-clamp-3 兜底（防本地 Tailwind 未生成） */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 顶部导航「我的生成」按钮（未滚动：透明玻璃） ---------- */
#navOrdersBtn {
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.92);
}
#navOrdersBtn:hover {
  background: rgba(255, 255, 255, 0.16);
}
/* 滚动后：浅色玻璃，对齐 navAuthBtn */
#navShell.scrolled #navOrdersBtn {
  background: rgba(248, 250, 252, 0.9);
  border-color: rgba(226, 232, 240, 0.8);
  color: #334155;
}
#navShell.scrolled #navOrdersBtn:hover {
  background: rgba(241, 245, 249, 0.95);
  color: #6d28d9;
}

/* ---------- 移动端菜单「我的生成」按钮 ---------- */
#mobileMenu .mobile-orders-btn {
  color: rgba(255, 255, 255, 0.85);
}
#mobileMenu .mobile-orders-btn:hover {
  background: rgba(255, 255, 255, 0.10);
}
#navShell.scrolled #mobileMenu .mobile-orders-btn {
  color: #475569;
}
#navShell.scrolled #mobileMenu .mobile-orders-btn:hover {
  background: rgba(124, 58, 237, 0.07);
  color: #6d28d9;
}

/* ---------- 管理后台头部微调（v9.0.4 徽章不再被关闭按钮遮挡） ---------- */
#adminModal .admin-head {
  padding-right: 4.5rem;
}
#adminModal .admin-head #adminWho {
  flex-shrink: 0;
  white-space: nowrap;
  max-width: 40vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 480px) {
  #adminModal .admin-head { padding-right: 4rem; }
  #adminModal .admin-head h3 { font-size: 1rem; }
  #adminModal .admin-head #adminWho { max-width: 30vw; }
}

/* ---------- v9.1 游客态隐藏积分徽章（覆盖 sm:inline-flex） ---------- */
.guest-hide { display: none !important; }

/* ============================================================
   v9.3: Root 管理后台独立全屏页面
   ============================================================ */
.admin-page {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  scrollbar-width: thin;
  scrollbar-color: #c7d2fe transparent;
}
.admin-page::-webkit-scrollbar { width: 8px; }
.admin-page::-webkit-scrollbar-track { background: transparent; }
.admin-page::-webkit-scrollbar-thumb { background: #c7d2fe; border-radius: 999px; }
.admin-page::-webkit-scrollbar-thumb:hover { background: #a5b4fc; }

.admin-page-head {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 55%, #7c3aed 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 34px -16px rgba(76, 29, 149, 0.55);
}
.admin-page-glow {
  position: absolute;
  top: -90px;
  right: -40px;
  width: 320px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  filter: blur(46px);
  pointer-events: none;
}
/* 个人中心「管理后台」入口（仅 root 可见） */
.pc-admin-link {
  display: inline-flex;
  align-items: center;
  color: #fbbf24 !important;
}
.pc-admin-link:hover { color: #fcd34d !important; text-decoration: none !important; }

/* ============================================================
   v9.4: 导航栏三段式 + 视觉减法
   ============================================================ */

/* 中间 nav-links 在首屏是白色（深色 Hero 背景），无 hover 背景框 */
#navShell:not(.scrolled) .nav-link {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 500;
  letter-spacing: 0.01em;
}
#navShell:not(.scrolled) .nav-link:hover { color: #ffffff; background: rgba(255, 255, 255, 0.08); }
#navShell:not(.scrolled) .nav-link.active { color: #ffffff; background: rgba(255, 255, 255, 0.12); }

/* 积分胶囊（首屏暗态） */
#navShell:not(.scrolled) .nav-points-btn {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
#navShell .nav-points-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
}
#navShell:not(.scrolled) .nav-points-icon { color: #fbbf24; }

/* 我的生成图标按钮（首屏暗态） */
#navShell:not(.scrolled) .nav-orders-btn {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
#navShell .nav-orders-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

/* 用户头像胶囊（首屏暗态） */
#navShell:not(.scrolled) .nav-auth-btn {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
#navShell .nav-auth-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* 主转化 CTA（首屏——白底品牌紫字 + 阴影） */
#navShell:not(.scrolled) .nav-cta {
  background: #ffffff;
  color: #5b21b6;
  box-shadow: 0 6px 20px -6px rgba(255, 255, 255, 0.4), 0 4px 14px -4px rgba(124, 58, 237, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
#navShell .nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px -6px rgba(255, 255, 255, 0.45), 0 6px 18px -5px rgba(124, 58, 237, 0.7);
  color: #4c1d95;
}

/* 移动端汉堡（首屏暗态） */
#navShell:not(.scrolled) .nav-mobile-btn {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
#navShell .nav-mobile-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* 积分跳动动画（兑换 / 充值后） */
#navPointsBtn.bump { animation: pointsBump .46s cubic-bezier(.4,0,.2,1); }
@keyframes pointsBump {
  0%,100% { transform: scale(1); }
  40% { transform: scale(1.12); }
}

/* ============================================================
   v11: 营销工作台 (workbench.js)
   ============================================================ */
.workbench-page {
  background: linear-gradient(180deg, #f8fafc 0%, #f5f3ff 100%);
  scrollbar-width: thin;
  scrollbar-color: #c7d2fe transparent;
}
.workbench-page::-webkit-scrollbar { width: 8px; }
.workbench-page::-webkit-scrollbar-track { background: transparent; }
.workbench-page::-webkit-scrollbar-thumb { background: #c7d2fe; border-radius: 999px; }

.wb-head {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 34px -16px rgba(30, 27, 75, 0.55);
}

.wb-input {
  display: block;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.wb-input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.wb-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.3rem;
}

.wb-module { transition: box-shadow 0.15s; }
.wb-module:hover { box-shadow: 0 8px 24px -12px rgba(99, 102, 241, 0.25); }

.wb-act { border: none; background: transparent; cursor: pointer; font-weight: 600; }
.wb-act:disabled { opacity: 0.4; cursor: not-allowed; }

.nav-workbench-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
}
.nav-workbench-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}

/* ---------- v11.9：移动端触摸体验修复 ---------- */
/* 手机/平板默认的触摸高亮是矩形色块（叠在圆角按钮上像"变方块"），全局关闭 */
a, button, [role="button"] { -webkit-tap-highlight-color: transparent; }
/* 触摸按压时给轻微缩放反馈，替代原生的方块高亮 */
.btn-shimmer:active { transform: scale(0.97); }
.nav-cta:active { transform: scale(0.95); }
