﻿/* ===== 折扣手游平台 - 全局样式 ===== */
:root {
  --bg: #0d1320;
  --bg-soft: #111a2c;
  --panel: #182136;
  --panel-2: #1f2a42;
  --border: #2a3750;
  --text: #e9eef7;
  --text-muted: #9aa8c0;
  --accent: #3d8bff;
  --accent-2: #2f6bd8;
  --cta: #ff8a34;
  --cta-2: #f97316;
  --gold: #ffc233;
  --green: #22c55e;
  --red: #ef4444;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: #6ba9ff; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 19, 32, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; color: var(--text); }
.logo .logo-badge {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 12px; font-weight: 700;
  padding: 2px 8px; border-radius: 6px;
}
.logo .logo-badge.gold { background: linear-gradient(135deg, #ffb347, #f97316); }
.main-nav { display: flex; gap: 22px; font-size: 15px; }
.main-nav a { color: var(--text-muted); }
.main-nav a:hover, .main-nav a.active { color: var(--text); }
.header-search { display: flex; align-items: center; gap: 6px; }
.header-search input {
  width: 200px; height: 36px; padding: 0 12px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-size: 14px; outline: none;
}
.header-search input:focus { border-color: var(--accent); }

/* ===== 首屏 Hero ===== */
.hero {
  background:
    radial-gradient(1000px 400px at 80% -10%, rgba(61, 139, 255, 0.18), transparent 60%),
    radial-gradient(700px 300px at 10% 10%, rgba(255, 138, 52, 0.10), transparent 60%),
    var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 46px 0 38px;
}
.hero h1 { font-size: clamp(24px, 4vw, 38px); font-weight: 800; line-height: 1.3; }
.hero h1 .hl { color: var(--cta); }
.hero p.sub { margin-top: 10px; color: var(--text-muted); font-size: 15px; max-width: 720px; }
.hero .stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 22px; }
.hero .stat { text-align: center; }
.hero .stat .num { font-size: 26px; font-weight: 800; color: var(--gold); }
.hero .stat .lbl { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ===== 筛选栏 ===== */
.filter-bar { padding: 18px 0 6px; }
.filter-search { display: flex; gap: 10px; margin-bottom: 14px; }
.filter-search input {
  flex: 1; max-width: 420px; height: 42px; padding: 0 16px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-size: 15px; outline: none;
}
.filter-search input:focus { border-color: var(--accent); }
.filter-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-tags button {
  padding: 6px 14px; font-size: 13px; color: var(--text-muted);
  background: var(--panel); border: 1px solid var(--border); border-radius: 20px;
  cursor: pointer; transition: all .2s;
}
.filter-tags button:hover { color: var(--text); border-color: var(--accent); }
.filter-tags button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.result-count { margin: 14px 0 4px; font-size: 13px; color: var(--text-muted); }

/* ===== 游戏卡片网格 ===== */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; padding: 14px 0 40px; }
.game-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex; flex-direction: column;
}
.game-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent); }
.card-thumb { position: relative; aspect-ratio: 1/1; background: var(--panel-2); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-badge {
  position: absolute; top: 8px; left: 8px;
  padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; color: #fff;
}
.badge-discount { background: linear-gradient(135deg, #ff8a34, #f97316); }
.badge-ratio { position: absolute; top: 8px; right: 8px; background: linear-gradient(135deg, #ffc233, #f59e0b); color: #221a00; }
.card-body { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card-title { font-size: 15px; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); }
.card-meta { font-size: 12px; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.card-tags span { font-size: 11px; color: var(--accent); background: rgba(61, 139, 255, 0.12); padding: 1px 7px; border-radius: 4px; }
.card-foot { margin-top: auto; display: flex; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 14px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; transition: all .2s; text-align: center;
}
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-primary { background: linear-gradient(135deg, var(--cta), var(--cta-2)); color: #fff; flex: 1; }
.btn-primary:hover { filter: brightness(1.1); color: #fff; }
.btn-ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.btn-block { width: 100%; }

/* ===== 详情页 ===== */
.breadcrumb { padding: 16px 0 4px; font-size: 13px; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 6px; opacity: .5; }

.game-hero {
  display: flex; gap: 26px; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; margin-top: 14px;
}
.game-hero .icon-wrap { position: relative; flex-shrink: 0; }
.game-hero .icon-wrap img { width: 148px; height: 148px; border-radius: 16px; object-fit: cover; border: 2px solid var(--border); }
.game-hero .icon-discount {
  position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #ff8a34, #f97316); color: #fff;
  font-size: 13px; font-weight: 800; padding: 3px 14px; border-radius: 14px; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}
.game-hero h1 { font-size: clamp(20px, 3vw, 28px); font-weight: 800; line-height: 1.35; margin-bottom: 8px; }
.game-hero .hero-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 10px; }
.game-hero .hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.game-hero .hero-tags span { font-size: 12px; padding: 2px 10px; border-radius: 14px; background: var(--panel-2); color: var(--text-muted); border: 1px solid var(--border); }
.game-hero .hero-tags .t-ratio { color: #221a00; background: linear-gradient(135deg, #ffc233, #f59e0b); border: none; font-weight: 700; }
.game-hero .hero-tags .t-free { color: #fff; background: rgba(34, 197, 94, .2); border-color: rgba(34, 197, 94, .5); }
.game-hero .hero-main { flex: 1; min-width: 0; }
.hero-qr { flex-shrink: 0; text-align: center; background: #ffffff; padding: 12px 12px 10px; border-radius: 14px; box-shadow: var(--shadow); margin-left: 24px; }
.hero-qr canvas, .hero-qr img { border-radius: 6px; display: block; margin: 0 auto; }
.hero-qr p { margin-top: 8px; font-size: 13px; font-weight: 700; color: #0d1320; line-height: 1.5; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.hero-cta .btn-primary { flex: 0 0 auto; min-width: 160px; padding: 12px 22px; font-size: 15px; }

.section { margin-top: 26px; }
.section-title {
  font-size: 18px; font-weight: 800; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.section-title::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: linear-gradient(var(--accent), var(--accent-2)); }

.screens { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.screens img { border-radius: 10px; border: 1px solid var(--border); width: 100%; aspect-ratio: 3/5; object-fit: cover; }

.content-panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.content-panel p { margin-bottom: 12px; color: #c9d4e6; font-size: 14.5px; }
.fuli-list { list-style: none; }
.fuli-list li { position: relative; padding: 9px 0 9px 26px; color: #c9d4e6; font-size: 14.5px; border-bottom: 1px dashed var(--border); }
.fuli-list li:last-child { border-bottom: none; }
.fuli-list li::before { content: "✦"; position: absolute; left: 2px; color: var(--gold); }

.info-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.info-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.info-table td:first-child { color: var(--text-muted); width: 130px; }
.info-table tr:last-child td { border-bottom: none; }
.info-table .hl { color: var(--gold); font-weight: 700; }
.info-table .hl2 { color: var(--green); font-weight: 700; }

.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }

/* ===== 页脚 ===== */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 34px 0 26px; background: var(--bg-soft); }
.footer-seo { color: var(--text-muted); font-size: 12.5px; line-height: 2; max-width: 1000px; margin-bottom: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 14px; font-size: 13px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }
.footer-note { color: #5b6b84; font-size: 12px; }
.footer-copy { color: #5b6b84; font-size: 12px; margin-top: 10px; }

/* ===== 404 ===== */
.error-page { text-align: center; padding: 100px 20px; }
.error-page .code { font-size: 80px; font-weight: 800; color: var(--accent); }
.error-page p { color: var(--text-muted); margin: 12px 0 26px; }

/* ===== 响应式 ===== */
@media (max-width: 760px) {
  .header-search { display: none; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .game-hero { flex-direction: column; align-items: center; text-align: center; }
  .hero-qr { margin-left: 0; margin-top: 18px; }
  .game-hero .hero-cta { justify-content: center; }
  .hero .stats { gap: 18px; }
}
@media (max-width: 480px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .card-body { padding: 10px; }
  .card-title { font-size: 13.5px; min-height: 38px; }
}

