/* ============================================================ *
 * 手游账号交易展示站 —— 全局样式
 * 主色：#2563eb（蓝·信任）/ 辅色：#f97316（橙·价格CTA）
 * 注意：所有封面图使用 CSS 渐变 + emoji 渲染，不依赖任何外部图片
 * ============================================================ */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --accent: #f97316;
  --accent-dark: #ea580c;
  --danger: #ef4444;
  --success: #10b981;

  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-light: #64748b;
  --text-lighter: #94a3b8;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

  --container: 1200px;
}

/* ---------- 重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================ *
 * 顶部导航
 * ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
  padding: 0 4px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
  padding-left: 8px;
}
.logo .logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}
.nav {
  display: flex;
  gap: 4px;
  flex: 1;
}
.nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text-light);
  font-weight: 500;
  transition: all 0.2s;
}
.nav a:hover { color: var(--primary); background: var(--primary-light); }
.nav a.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 16px;
  width: 280px;
  transition: border-color 0.2s;
}
.search-box:focus-within { border-color: var(--primary); }
.search-box input {
  border: none;
  background: none;
  outline: none;
  flex: 1;
  font-size: 14px;
  color: var(--text);
}
.search-box input::placeholder { color: var(--text-lighter); }
.search-box .search-btn { color: var(--text-light); font-size: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-ghost { color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-lg { padding: 13px 28px; font-size: 16px; }

/* ============================================================ *
 * Hero Banner —— 重新设计：多层渐变 + 装饰元素
 * 不再使用远程图片，改用纯 CSS
 * ============================================================ */
.hero {
  position: relative;
  border-radius: 0 0 28px 28px;
  overflow: hidden;
  margin-bottom: 40px;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 35%, #6366f1 60%, #8b5cf6 100%);
  padding: 60px 0 70px;
}
/* 装饰性背景层：移动的光斑 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(251, 191, 36, 0.35) 0, transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.45) 0, transparent 45%),
    radial-gradient(circle at 60% 20%, rgba(59, 130, 246, 0.4) 0, transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(244, 114, 182, 0.3) 0, transparent 30%);
  animation: heroShift 18s ease-in-out infinite;
  z-index: 0;
}
@keyframes heroShift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(1.02); }
}

/* 装饰性几何元素 */
.hero-deco {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  opacity: 0.85;
}
.hero-deco.emoji1 { top: 12%; right: 12%; font-size: 90px; animation: float 5s ease-in-out infinite; }
.hero-deco.emoji2 { bottom: 18%; right: 25%; font-size: 64px; animation: float 6s ease-in-out infinite 1s; }
.hero-deco.emoji3 { top: 25%; right: 35%; font-size: 48px; animation: float 7s ease-in-out infinite 2s; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(5deg); }
}

/* 网格背景纹理 */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  color: #fff;
  padding: 0 24px;
  margin: 0 auto;
  text-align: center;
}
.hero-content h1 {
  font-size: 44px;
  font-weight: 900;
  margin-bottom: 14px;
  line-height: 1.15;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  background: linear-gradient(120deg, #fff 0%, #fde68a 50%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 5s linear infinite;
  background-size: 200% auto;
}
@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}
.hero-content p {
  font-size: 17px;
  opacity: 0.95;
  margin-bottom: 28px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  line-height: 1.7;
}
.hero-cta {
  display: inline-flex;
  gap: 14px;
  margin-bottom: 36px;
}
.hero-cta .btn {
  padding: 14px 30px;
  font-size: 16px;
  font-weight: 700;
}
.hero-cta .btn-primary {
  background: linear-gradient(135deg, #f97316, #ea580c);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.hero-cta .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(249, 115, 22, 0.55); }
.hero-cta .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
}
.hero-cta .btn-ghost:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
}
.hero-stat {
  text-align: center;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  min-width: 140px;
}
.hero-stat strong {
  display: block;
  font-size: 32px;
  font-weight: 900;
  color: #fde68a;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.hero-stat span {
  font-size: 13px;
  opacity: 0.92;
  display: block;
  margin-top: 2px;
}

/* ============================================================ *
 * 安全保障条
 * ============================================================ */
.safety-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 36px;
}
.safety-item { display: flex; gap: 12px; align-items: flex-start; }
.safety-item .si-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.safety-item h6 { font-size: 14px; margin-bottom: 2px; font-weight: 700; }
.safety-item p { font-size: 12px; color: var(--text-light); line-height: 1.5; }

/* ============================================================ *
 * 游戏分类 + 筛选
 * ============================================================ */
.section { margin-bottom: 40px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: "";
  width: 5px;
  height: 22px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
  border-radius: 3px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.25s;
  cursor: pointer;
}
.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}
.game-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.game-card .game-name { font-size: 15px; font-weight: 700; }
.game-card .game-count { font-size: 12px; color: var(--text-lighter); }
.game-card.active { border-color: var(--primary); background: var(--primary-light); }

.shop-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}

.filter-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky;
  top: 80px;
}
.filter-group { margin-bottom: 22px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-group h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
.filter-list { display: flex; flex-direction: column; gap: 4px; }
.filter-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-light);
  cursor: pointer;
  transition: background 0.15s;
}
.filter-list label:hover { background: var(--bg); color: var(--text); }
.filter-list input[type="radio"],
.filter-list input[type="checkbox"] { accent-color: var(--primary); }

.price-range {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.price-range input {
  width: 100%;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
}
.price-range input:focus { border-color: var(--primary); }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.toolbar .result-count { font-size: 14px; color: var(--text-light); }
.toolbar .result-count strong { color: var(--primary); font-size: 16px; }
.sort-bar { display: flex; gap: 6px; flex-wrap: wrap; }
.sort-btn {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-light);
  background: var(--card);
  transition: all 0.15s;
}
.sort-btn:hover { color: var(--primary); border-color: var(--primary); }
.sort-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============================================================ *
 * 商品卡片 —— 核心修复：固定最小高度 + 底部固定按钮
 * ============================================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

/* 封面：固定比例 + CSS 渐变背景（而非 <img>） */
.product-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
/* 封面图：用 data-image 属性 + CSS 渲染（data.js 传入渐变配置） */
.product-cover[data-bg] {
  background: attr(data-bg string);
}
.product-cover .cover-gradient {
  position: absolute;
  inset: 0;
}
.product-cover .cover-emoji {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 90px;
  opacity: 0.85;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  animation: coverFloat 4s ease-in-out infinite;
  z-index: 1;
}
@keyframes coverFloat {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -55%) scale(1.05); }
}
.product-cover .cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.35) 100%);
  z-index: 2;
}

.product-cover .game-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  z-index: 3;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.product-cover .verified-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(16, 185, 129, 0.95);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 内容区：弹性布局，footer 靠下 */
.product-body {
  padding: 14px 14px 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.product-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
  word-break: break-all;
}
.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-light);
}
.product-meta span { display: inline-flex; align-items: center; gap: 3px; }
.product-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; min-height: 0; }
.product-tags .tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--primary-dark);
  white-space: nowrap;
}

/* 底部：固定可见，绝对不会被挤出卡片 */
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  margin-top: auto;
  flex-shrink: 0;
}
.product-price { display: flex; flex-direction: column; }
.product-price .now {
  font-size: 22px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}
.product-price .now small { font-size: 13px; font-weight: 700; }
.product-price .origin {
  font-size: 12px;
  color: var(--text-lighter);
  text-decoration: line-through;
  margin-top: 3px;
}
.buy-btn {
  padding: 9px 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.15s;
  box-shadow: 0 3px 10px rgba(249, 115, 22, 0.35);
  white-space: nowrap;
  flex-shrink: 0;
}
.buy-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(249, 115, 22, 0.45); }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-lighter);
}
.empty-state .emoji { font-size: 48px; margin-bottom: 12px; }

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 14px;
  color: var(--text-light);
  transition: all 0.15s;
}
.page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================================ *
 * 底部
 * ============================================================ */
.footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 48px 0 24px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.footer-col h5 { color: #fff; font-size: 15px; margin-bottom: 16px; font-weight: 700; }
.footer-col p { font-size: 13px; line-height: 1.8; color: #94a3b8; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 13px; color: #94a3b8; transition: color 0.15s; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #1e293b;
  font-size: 12px;
  color: #64748b;
}

/* ============================================================ *
 * 详情页
 * ============================================================ */
.detail-wrap { padding: 28px 0; }
.breadcrumb { font-size: 13px; color: var(--text-lighter); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 6px; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
  align-items: start;
}

.gallery {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}
.gallery-main {
  aspect-ratio: 16 / 10;
  position: relative;
}
.gallery-main .cover-gradient {
  position: absolute;
  inset: 0;
}
.gallery-main .cover-emoji {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 140px;
  opacity: 0.9;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
  animation: coverFloat 4s ease-in-out infinite;
}
.gallery-main .cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.45) 100%);
}
.gallery-thumbs { display: flex; gap: 10px; padding: 12px; background: var(--bg); }
.gallery-thumbs .thumb {
  width: 90px;
  height: 56px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 3px solid transparent;
  transition: border-color 0.15s;
}
.gallery-thumbs .thumb.active { border-color: var(--primary); }
.gallery-thumbs .thumb .cover-emoji {
  font-size: 32px;
}

.detail-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.detail-card h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 14px;
  line-height: 1.4;
}
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.detail-tags .tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}
.attrs-table {
  width: 100%;
  border-collapse: collapse;
}
.attrs-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.attrs-table td:first-child {
  width: 140px;
  color: var(--text-light);
  background: var(--bg);
}
.attrs-table tr:last-child td { border-bottom: none; }
.detail-desc { font-size: 14px; color: var(--text); line-height: 1.85; }

.buy-panel {
  position: sticky;
  top: 80px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.buy-panel .price-box {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.buy-panel .price-box .now {
  font-size: 34px;
  font-weight: 900;
  color: var(--accent);
}
.buy-panel .price-box .now small { font-size: 18px; }
.buy-panel .price-box .origin {
  font-size: 14px;
  color: var(--text-lighter);
  text-decoration: line-through;
}
.buy-panel .save-tip {
  font-size: 12px;
  color: var(--danger);
  margin-bottom: 18px;
  font-weight: 600;
}
.buy-panel .btn { width: 100%; margin-bottom: 10px; }
.buy-panel .meta-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-light);
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.buy-panel .meta-line:last-of-type { border-bottom: none; }
.seller-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-top: 16px;
}
.seller-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}
.seller-card .s-name { font-size: 14px; font-weight: 600; }
.seller-card .s-meta { font-size: 12px; color: var(--text-light); }
.seller-card .s-meta .star { color: var(--accent); }

.flow-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.flow-card h3 { font-size: 17px; margin-bottom: 18px; font-weight: 700; }
.flow-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.flow-step { text-align: center; position: relative; }
.flow-step .step-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  position: relative;
  z-index: 1;
}
.flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 24px;
  left: 60%;
  width: 80%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.flow-step .step-title { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.flow-step .step-desc { font-size: 11px; color: var(--text-lighter); }

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ============================================================ *
 * 购买弹窗
 * ============================================================ */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: maskIn 0.18s ease;
}
.modal-mask[hidden] { display: none; }
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--card);
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  padding: 28px 26px 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: modalIn 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes modalIn { from { transform: translateY(16px) scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 22px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.modal-close:hover { background: var(--bg); color: var(--text); }

.modal h3 { font-size: 18px; margin-bottom: 4px; font-weight: 700; }
.modal .modal-sub { font-size: 13px; color: var(--text-light); margin-bottom: 18px; }
.modal .modal-account {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
}
.modal .modal-account .ma-title { font-size: 14px; font-weight: 600; line-height: 1.4; margin-bottom: 6px; }
.modal .modal-account .ma-price { font-size: 22px; font-weight: 800; color: var(--accent); }
.modal .modal-account .ma-price .origin { font-size: 12px; color: var(--text-lighter); text-decoration: line-through; margin-left: 8px; font-weight: 400; }

.modal .field { margin-bottom: 14px; }
.modal .field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.modal .field label .req { color: var(--danger); }
.modal .field input,
.modal .field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  resize: vertical;
}
.modal .field input:focus,
.modal .field textarea:focus { border-color: var(--primary); }
.modal .field .err { color: var(--danger); font-size: 12px; margin-top: 5px; display: none; }
.modal .field.invalid input { border-color: var(--danger); }
.modal .field.invalid .err { display: block; }

.modal .modal-submit { width: 100%; margin-top: 6px; }
.modal .modal-tip {
  margin-top: 14px;
  padding: 11px 13px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--primary-dark);
  line-height: 1.6;
  text-align: center;
}

.modal-success { text-align: center; padding: 10px 0; }
.modal-success .ok-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
}
.modal-success h3 { margin-bottom: 8px; }
.modal-success p { font-size: 14px; color: var(--text-light); line-height: 1.7; margin-bottom: 20px; }
.modal-success .order-no { font-weight: 700; color: var(--primary); }

/* ============================================================ *
 * 响应式
 * ============================================================ */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .buy-panel { position: static; }
}

@media (max-width: 768px) {
  body { padding-top: env(safe-area-inset-top, 12px); }
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 4px; gap: 12px; }
  .logo { font-size: 18px; padding-left: 4px; }
  .logo .logo-mark { width: 32px; height: 32px; font-size: 17px; }
  .search-box { flex: 1 1 0; width: auto; min-width: 0; max-width: 260px; order: 2; padding: 6px 12px; }
  .search-box input { font-size: 13px; }
  .nav {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    gap: 2px;
  }
  .nav::-webkit-scrollbar { display: none; height: 0; }
  .nav a { flex-shrink: 0; white-space: nowrap; padding: 7px 12px; font-size: 14px; }

  .hero { padding: 40px 0 50px; margin-bottom: 28px; }
  .hero-content h1 { font-size: 28px; }
  .hero-content p { font-size: 15px; margin-bottom: 22px; }
  .hero-stats { gap: 16px; flex-wrap: wrap; }
  .hero-stat { padding: 12px 18px; min-width: 100px; }
  .hero-stat strong { font-size: 24px; }
  .hero-cta { gap: 10px; margin-bottom: 28px; }
  .hero-cta .btn { padding: 12px 22px; font-size: 15px; }
  .hero-deco.emoji1 { font-size: 64px; top: 8%; right: 6%; }
  .hero-deco.emoji2 { font-size: 46px; right: 18%; bottom: 20%; }
  .hero-deco.emoji3 { font-size: 36px; right: 28%; top: 18%; }

  .game-grid { grid-template-columns: repeat(3, 1fr); }
  .shop-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }

  .safety-bar { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .flow-steps { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .flow-step:not(:last-child)::after { display: none; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .toolbar { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (max-width: 480px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: 1fr; gap: 16px; }
  .related-grid { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  .hero-content h1 { font-size: 24px; }
  .product-title { font-size: 14px; min-height: 40px; }
  .product-cover .cover-emoji { font-size: 64px; }
  .buy-btn { padding: 8px 12px; font-size: 12px; }
  .product-price .now { font-size: 18px; }
  .hero-stats { gap: 10px; }
  .hero-stat { padding: 10px 14px; min-width: 80px; }
  .hero-stat strong { font-size: 20px; }
}
