/* ========== 完整样式 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0b0b12;
  --bg2: #11111b;
  --bg3: #1a1a28;
  --card-bg: #13131f;
  --card-border: rgba(255,255,255,0.06);
  --card-hover-border: rgba(255,255,255,0.12);
  --text: #e8e8ed;
  --text2: #92929d;
  --text3: #5c5c6e;
  --accent: #4a9eff;
  --accent2: #7c4dff;
  --accent-dim: rgba(74,158,255,0.1);
  --gradient: linear-gradient(135deg, #4a9eff, #7c4dff);
  --neon-glow: rgba(74,158,255,0.03);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans SC', sans-serif;
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh; min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}

/* ===== 渐变深色背景（与弹窗同款） ===== */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(160deg, #15152a 0%, #0d0d1a 100%);
}

/* 浮动光晕大球 */
.scene-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  mix-blend-mode: screen;
}

.scene-orb-1 {
  top: 5%; left: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(30,60,120,0.5) 0%, rgba(30,60,120,0.1) 40%, transparent 70%);
  animation: orb-drift 18s ease-in-out infinite;
}

.scene-orb-2 {
  top: 40%; right: -15%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(60,30,120,0.4) 0%, transparent 70%);
  animation: orb-drift 22s ease-in-out infinite reverse;
}

.scene-orb-3 {
  bottom: -10%; left: 30%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0,80,120,0.3) 0%, transparent 70%);
  animation: orb-drift 16s ease-in-out infinite;
  animation-delay: -7s;
}

@keyframes orb-drift {
  0%, 100% { transform: translate(0,0) scale(1); }
  25% { transform: translate(40px, -20px) scale(1.05); }
  50% { transform: translate(-20px, 30px) scale(0.95); }
  75% { transform: translate(30px, 10px) scale(1.02); }
}

/* 顶部光带 */
.scene-glow {
  position: absolute;
  top: -15%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(74,158,255,0.1) 0%, transparent 60%);
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 18, <%= typeof bgOverlay !== 'undefined' ? bgOverlay : '0.78' %>);
  z-index: 0;
  pointer-events: none;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }

/* ===== 导航栏 ===== */
.navbar {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(11,11,18,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-inner { display: flex; align-items: center; gap: 10px; }

.nav-back {
  color: var(--text2);
  text-decoration: none;
  font-size: 16px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-back:hover { color: var(--text); background: rgba(255,255,255,0.06); }

.nav-back span { font-size: 13px; }

@media (max-width: 480px) {
  .nav-back span { display: none; }
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-icon { color: var(--accent); font-size: 15px; }

.brand-text {
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(135deg, #4a9eff, #7c4dff, #4a9eff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  animation: title-shine 3s linear infinite;
  filter: drop-shadow(0 0 6px rgba(74,158,255,0.15));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-tg-group { display: flex; align-items: center; gap: 4px; }

.nav-link {
  color: var(--text2);
  text-decoration: none;
  font-size: 18px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.06); }

.nav-tg { color: var(--accent); }
.nav-tg:hover { background: rgba(74,158,255,0.15); }
.nav-ch { color: #ffd32a; }
.nav-ch:hover { background: rgba(255,211,42,0.15); }

.nav-sep { color: #444; font-size: 14px; }

.lang-btn {
  color: var(--text3);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.lang-btn.active {
  color: var(--accent);
  background: rgba(74,158,255,0.2);
  border: 1px solid rgba(74,158,255,0.3);
  font-weight: 700;
}
.lang-btn:not(.active) {
  color: #888;
  border: 1px solid rgba(255,255,255,0.08);
}
.lang-btn:not(.active):hover {
  color: #ccc;
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
}

/* ===== Hero ===== */
.hero { padding: 50px 0 36px; text-align: center; }
.hero-sm { padding: 30px 0 20px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--accent);
  padding: 5px 14px;
  border: 1px solid rgba(74,158,255,0.15);
  border-radius: 20px;
  background: rgba(74,158,255,0.04);
  margin-bottom: 14px;
}

.hero-badge i { font-size: 10px; }

.hero-title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #4a9eff 40%, #7c4dff 70%, #4a9eff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: title-shine 4s linear infinite;
  filter: drop-shadow(0 0 20px rgba(74,158,255,0.2));
}

@keyframes title-shine {
  0% { background-position: 0% center; }
  50% { background-position: 100% center; }
  100% { background-position: 0% center; }
}

@media (max-width: 768px) {
  .hero-title { font-size: 26px; }
}
@media (max-width: 420px) {
  .hero-title { font-size: 22px; }
}

.hero-subtitle { font-size: 14px; color: var(--text2); }

/* ===== 4大分类卡片网格 ===== */
.cat4-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.cat4-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 28px 16px;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}

.cat4-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s;
}

.cat4-card:hover::before,
.cat4-card:active::before { opacity: 1; }

.cat4-card:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(74,158,255,0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.cat4-card:active { transform: translateY(-2px); }

.cat4-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(74,158,255,0.12), rgba(124,77,255,0.12));
  border: 1px solid rgba(74,158,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 22px;
  color: var(--accent);
}

.cat4-num {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  font-variant-numeric: tabular-nums;
  opacity: 0.4;
}

.cat4-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.cat4-count {
  font-size: 12px;
  color: var(--text3);
}

/* ===== 分类区块 ===== */
.main-content { padding: 0 0 50px; }

.category-section { margin-bottom: 20px; }

.cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px 8px 0 0;
  background: rgba(255,255,255,0.02);
}

.cat-title-row { display: flex; align-items: center; gap: 10px; }

.cat-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.cat-title { font-size: 15px; font-weight: 600; color: #fff; }
.cat-desc { font-size: 12px; color: var(--text3); margin-top: 1px; }
.cat-meta { flex-shrink: 0; }
.cat-count { font-size: 11px; color: var(--text3); padding: 2px 8px; background: rgba(255,255,255,0.04); border-radius: 4px; }

/* 商品行 */
.product-table { overflow: hidden; }

.product-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.15s;
}

.product-row:last-child { border-bottom: none; }

.product-row:hover { background: rgba(255,255,255,0.02); }

.prod-id {
  font-size: 12px;
  color: var(--text3);
  min-width: 28px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.prod-info { flex: 1; min-width: 0; }

.prod-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 1px;
  word-break: break-word;
}

.prod-desc {
  font-size: 12px;
  color: var(--text3);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prod-extra {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}

.prod-extra i { color: var(--accent); opacity: 0.6; margin-right: 3px; }

.prod-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  min-width: 60px;
  text-align: right;
  flex-shrink: 0;
}

.prod-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
  -webkit-appearance: none;
}

.btn-copy {
  background: rgba(255,255,255,0.06);
  color: var(--text2);
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-copy:hover { background: rgba(255,255,255,0.12); color: var(--text); border-color: rgba(255,255,255,0.2); }
.btn-copy:active { background: rgba(255,255,255,0.18); }

.btn-buy {
  background: var(--gradient);
  background-size: 200% auto;
  color: #fff;
  font-weight: 700;
  transition: all 0.3s;
  letter-spacing: 0.3px;
}

.btn-buy:hover {
  background-position: right center;
  box-shadow: 0 4px 20px rgba(74,158,255,0.45);
  transform: translateY(-1px);
}

.btn-buy:active { transform: scale(0.96); }

/* ===== 页脚 ===== */
.site-footer {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 32px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}

.footer-col p { font-size: 12px; color: var(--text3); margin-bottom: 4px; }

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  margin-top: 4px;
  transition: all 0.2s;
}

.footer-link:hover { gap: 8px; }

.footer-bottom {
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.04);
  font-size: 12px;
  color: var(--text3);
}

/* ===== 弹窗 - 参考 chingis.cc / fraudenroll.io 风格 ===== */
.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  padding: 20px;
}

.popup-overlay.show { opacity: 1; visibility: visible; }

.popup-modal {
  background: linear-gradient(160deg, #15152a 0%, #0d0d1a 100%);
  border: 1px solid rgba(74,158,255,0.15);
  border-radius: 20px;
  padding: 48px 30px 32px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  position: relative;
  transform: translateY(30px) scale(0.92);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 0 1px rgba(74,158,255,0.05), 0 32px 80px rgba(0,0,0,0.7);
  overflow: hidden;
}

.popup-modal::before {
  content: '';
  position: absolute;
  top: -1px; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}

.popup-overlay.show .popup-modal { transform: translateY(0) scale(1); }

.popup-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text3);
  font-size: 14px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  line-height: 1;
  transition: all 0.2s;
  z-index: 10;
}

.popup-close:hover { color: var(--text); background: rgba(255,255,255,0.08); }

.popup-body-content {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text2);
}

.popup-modal strong { color: var(--accent); }

.popup-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.popup-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--gradient);
  background-size: 200% auto;
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  width: 100%;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}

.popup-btn-primary:hover {
  background-position: right center;
  box-shadow: 0 4px 20px rgba(74,158,255,0.35);
}

.popup-btn-secondary {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text2);
  font-size: 13px;
  cursor: pointer;
  padding: 10px 20px;
  width: 100%;
  border-radius: 10px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.popup-btn-secondary:hover { background: rgba(255,255,255,0.07); color: var(--text); }

.popup-title-wrap {
  font-size: 22px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: rgba(0,0,0,0.88);
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 13px;
  opacity: 0;
  transition: all 0.25s;
  pointer-events: none;
  z-index: 99999;
  border: 1px solid rgba(255,255,255,0.08);
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== 空状态 ===== */
.empty-state, .empty-sub {
  text-align: center;
  padding: 50px 20px;
  color: var(--text3);
}

.empty-state i { font-size: 36px; margin-bottom: 10px; opacity: 0.15; }

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
  .container { padding: 0 14px; }

  .hero { padding: 40px 0 28px; }
  .hero-sm { padding: 24px 0 16px; }
  .hero-title { font-size: 26px; }

  /* 大分类：2列 */
  .cat4-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat4-card { padding: 24px 14px; }
  .cat4-icon { width: 46px; height: 46px; font-size: 18px; }
  .cat4-title { font-size: 15px; }

  /* 商品行 */
  .category-section { margin-bottom: 16px; }
  .product-row { padding: 10px 12px; gap: 8px; flex-wrap: nowrap; }
  .prod-id { display: none; }
  .prod-price { font-size: 14px; min-width: 50px; }
  .btn { padding: 8px 14px; font-size: 13px; }
  .btn .fa-copy { font-size: 13px; }

  /* 页脚 */
  .footer-grid { grid-template-columns: 1fr; gap: 16px; }

  /* 弹窗 */
  .popup-modal { padding: 36px 20px 24px; }
}

@media (max-width: 420px) {
  .hero-title { font-size: 22px; }
  .cat4-grid { gap: 10px; }
  .cat4-card { padding: 18px 12px; }
  .cat4-icon { width: 40px; height: 40px; font-size: 16px; }
  .cat4-title { font-size: 14px; }

  .product-row { flex-wrap: wrap; padding: 12px 10px; }
  .prod-info { min-width: 100%; order: -1; margin-bottom: 8px; }
  .prod-price { text-align: left; }
  .prod-actions { width: 100%; gap: 8px; }
  .prod-actions .btn { flex: 1; justify-content: center; padding: 10px 0; }
}
