/* ===== 游戏索引站点样式 ===== */
:root {
  --bg: #0d1220;
  --bg-soft: #151c31;
  --card: #1a2340;
  --card-hover: #232f57;
  --accent: #5b8cff;
  --accent-2: #7dd3fc;
  --gold: #ffc86b;
  --text: #e8edf7;
  --text-dim: #9aa7c7;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(91, 140, 255, 0.18), transparent 60%),
    radial-gradient(900px 400px at 0% 10%, rgba(125, 211, 252, 0.12), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 18, 32, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #7c5bff);
  display: grid; place-items: center; font-size: 18px; color: #fff;
  box-shadow: 0 4px 12px rgba(91, 140, 255, 0.4);
}
.brand .sub { font-size: 12px; color: var(--text-dim); font-weight: 400; margin-left: 2px; }
.header-nav { display: flex; gap: 8px; }
.header-nav a {
  padding: 7px 14px; border-radius: 20px; font-size: 13px; color: var(--text-dim);
  transition: all 0.2s;
}
.header-nav a:hover, .header-nav a.active { color: #fff; background: var(--card-hover); }

/* ===== 主区域 ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }

.hero { text-align: center; padding: 36px 10px 28px; }
.hero h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: 1px; }
.hero h1 .grad {
  background: linear-gradient(90deg, var(--accent-2), var(--accent) 55%, #a78bfa);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--text-dim); margin-top: 10px; font-size: 15px; }
.hero .stats { display: flex; gap: 22px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.hero .stats b { font-size: 22px; color: var(--gold); }
.hero .stats span { display: block; font-size: 12px; color: var(--text-dim); }

/* ===== 筛选栏 ===== */
.filter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--bg-soft); border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px; padding: 12px 16px; margin-bottom: 24px;
}
.filter-bar .label { font-size: 13px; color: var(--text-dim); white-space: nowrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 6px 14px; border-radius: 20px; font-size: 13px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12); color: var(--text-dim);
  background: transparent; transition: all 0.2s; user-select: none;
}
.chip:hover { border-color: var(--accent); color: #fff; }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.spacer { flex: 1; }
select.sort-select {
  background: var(--card); color: var(--text); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px; padding: 7px 12px; font-size: 13px; outline: none; cursor: pointer;
}

/* ===== 游戏卡片网格 ===== */
.grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.game-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: block;
}
.game-card:hover { transform: translateY(-6px); border-color: rgba(91, 140, 255, 0.45); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
.game-card .thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0a0e1c; }
.game-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.game-card:hover .thumb img { transform: scale(1.07); }
.game-card .type-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(13, 18, 32, 0.78); backdrop-filter: blur(6px);
  color: var(--accent-2); font-size: 12px; padding: 3px 10px; border-radius: 20px;
  border: 1px solid rgba(125, 211, 252, 0.35);
}
.game-card .date-badge {
  position: absolute; top: 10px; right: 10px;
  background: rgba(13, 18, 32, 0.78); color: var(--text-dim); font-size: 11px;
  padding: 3px 8px; border-radius: 20px;
}
.game-card .info { padding: 14px 16px 16px; }
.game-card .title-row { display: flex; align-items: center; gap: 10px; }
.game-card h3 { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-card .en { font-size: 11px; color: var(--text-dim); opacity: 0.75; }
.game-card .desc {
  font-size: 13px; color: var(--text-dim); margin-top: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 40px;
}
.game-card .meta { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.game-card .meta .engine-tag {
  font-size: 11px; color: var(--text-dim); background: rgba(255, 255, 255, 0.06);
  padding: 3px 9px; border-radius: 6px;
}
.game-card .play-cta {
  margin-left: auto; font-size: 13px; color: var(--accent-2); font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}
.game-card:hover .play-cta { color: #fff; }

.empty-tip { text-align: center; color: var(--text-dim); padding: 60px 0; font-size: 15px; }

/* ===== 详情页 ===== */
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: 14px; margin: 6px 0 18px; transition: color 0.2s; }
.back-link:hover { color: #fff; }

.game-hero {
  display: grid; grid-template-columns: 220px 1fr; gap: 26px; align-items: start;
  background: var(--bg-soft); border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius); padding: 24px; margin-bottom: 26px;
}
.game-hero .g-icon {
  width: 220px; height: 220px; border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, 0.1);
}
.game-hero .g-icon img { width: 100%; height: 100%; object-fit: cover; }
.game-hero h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
.game-hero .en-name { color: var(--text-dim); font-size: 14px; margin-top: 2px; }
.game-hero .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tag {
  font-size: 12px; padding: 4px 12px; border-radius: 20px;
  background: rgba(91, 140, 255, 0.14); color: var(--accent-2);
  border: 1px solid rgba(91, 140, 255, 0.3);
}
.tag.alt { background: rgba(255, 200, 107, 0.12); color: var(--gold); border-color: rgba(255, 200, 107, 0.3); }
.game-hero .desc { margin-top: 14px; color: var(--text-dim); font-size: 14.5px; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.btn-play {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--accent), #7c5bff);
  color: #fff; font-weight: 700; font-size: 15px;
  padding: 12px 26px; border-radius: 30px; border: none; cursor: pointer;
  box-shadow: 0 8px 24px rgba(91, 140, 255, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-play:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(91, 140, 255, 0.55); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--text); font-size: 14px;
  padding: 11px 22px; border-radius: 30px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2); transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--accent); color: #fff; }

/* 游戏iframe容器 */
.play-section {
  background: var(--bg-soft); border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius); padding: 20px; margin-bottom: 26px;
}
.play-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.play-header h2 { font-size: 18px; }
.play-frame-wrap {
  position: relative; width: 100%;
  border-radius: 12px; overflow: hidden; background: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.play-frame-wrap.portrait { max-width: 520px; margin: 0 auto; aspect-ratio: 9 / 16; }
.play-frame-wrap.landscape { aspect-ratio: 16 / 10; }
.play-frame-wrap.fullscreen {
  position: fixed; inset: 0; z-index: 100; max-width: none; margin: 0;
  aspect-ratio: auto; width: 100vw; height: 100vh; border-radius: 0;
}
#gameFrame { width: 100%; height: 100%; border: 0; display: block; }

/* 截图区 */
.shots-section { margin-bottom: 26px; }
.section-title { font-size: 19px; font-weight: 700; 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), #7c5bff); }
.shots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.shot-item { position: relative; border-radius: 12px; overflow: hidden; cursor: zoom-in; border: 1px solid rgba(255, 255, 255, 0.07); }
.shot-item img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; transition: transform 0.3s; }
.shot-item:hover img { transform: scale(1.05); }

/* 介绍区块 */
.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
.panel {
  background: var(--bg-soft); border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius); padding: 22px;
}
.panel h3 { font-size: 17px; margin-bottom: 14px; }
.feature-list { list-style: none; }
.feature-list li { position: relative; padding: 6px 0 6px 26px; color: var(--text-dim); font-size: 14px; }
.feature-list li::before {
  content: "✓"; position: absolute; left: 0; top: 6px;
  color: var(--accent-2); font-weight: 700;
}
.info-table { width: 100%; border-collapse: collapse; }
.info-table td { padding: 9px 0; font-size: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.info-table td:first-child { color: var(--text-dim); width: 96px; white-space: nowrap; }
.controls-tip {
  margin-top: 16px; padding: 12px 14px; border-radius: 10px;
  background: rgba(125, 211, 252, 0.08); border: 1px solid rgba(125, 211, 252, 0.2);
  font-size: 13px; color: var(--accent-2);
}

/* 图片灯箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, 0.9);
  display: none; align-items: center; justify-content: center; cursor: zoom-out;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 92vw; max-height: 90vh; border-radius: 10px; }

/* 页脚 */
.site-footer { text-align: center; color: var(--text-dim); font-size: 12.5px; padding: 30px 20px 40px; border-top: 1px solid rgba(255, 255, 255, 0.05); }

/* ===== 响应式 ===== */
@media (max-width: 860px) {
  .game-hero { grid-template-columns: 1fr; }
  .game-hero .g-icon { width: 140px; height: 140px; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .header-inner { padding: 12px 14px; }
  .container { padding: 16px 14px 50px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 12px; }
  .game-card h3 { font-size: 15px; }
  .game-card .desc { font-size: 12px; -webkit-line-clamp: 2; min-height: 0; }
  .play-frame-wrap.portrait { max-width: 100%; }
  .filter-bar { padding: 10px 12px; }
}
