﻿/* ================================================================
   游戏分享网站样式表
   配色：深色科技风 + 霓虹点缀
   ================================================================ */

:root {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-card: #16213e;
  --bg-card-hover: #1f3460;
  --text-primary: #e8e8e8;
  --text-secondary: #a0a0b8;
  --text-muted: #6c6c8a;
  --accent: #00d4aa;
  --accent-glow: rgba(0, 212, 170, 0.3);
  --accent2: #7c5cfc;
  --accent2-glow: rgba(124, 92, 252, 0.3);
  --danger: #ff4757;
  --warning: #ffa502;
  --gold: #f9ca24;
  --border: #2a2a4a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.5);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== 浅色模式 ========== */
[data-theme="light"] {
  --bg-primary: #f0f2f5;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f6fa;
  --text-primary: #1a1a2e;
  --text-secondary: #555770;
  --text-muted: #8e8ea0;
  --accent: #00b894;
  --accent-glow: rgba(0, 184, 148, 0.2);
  --accent2: #6c5ce7;
  --accent2-glow: rgba(108, 92, 231, 0.2);
  --border: #e0e0e8;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* 浅色模式下导航栏背景 */
[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #e8e8f0;
}

/* 浅色模式下的 Hero 区域暗色元素保持不变（hero 始终深色） */
[data-theme="light"] .hero,
[data-theme="light"] .game-hero .hero-overlay {
  /* hero 区域保持深色不变 */
}

/* ========== 主题切换按钮 ========== */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
  margin-left: 4px;
  padding: 0;
  color: var(--text-secondary);
}
.theme-toggle:hover {
  background: var(--bg-card);
  color: var(--accent);
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: all 0.25s ease;
}
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  transition: all 0.3s ease;
}
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
:root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }

/* 导航栏左右对齐 */
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent2); }

img { max-width: 100%; height: auto; display: block; }

/* ==================== 导航栏 ==================== */
.navbar {
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0 24px;
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-logo .logo-icon {
  font-size: 28px;
  animation: pulse 2s ease-in-out infinite;
}

.nav-logo .logo-image {
  height: 28px;
  width: auto;
  border-radius: 4px;
  vertical-align: middle;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.nav-logo span {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: rgba(0, 212, 170, 0.1);
}

/* 桌面端：隐藏"更多"下拉按钮（移动端专用）；FAQ/Contact 作为普通链接显示 */
.nav-more-li { display: none; }
.nav-desktop-only { display: list-item; }

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.nav-right input {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 14px;
  width: 200px;
  outline: none;
  transition: var(--transition);
}

.nav-search input:focus,
.nav-right input:focus {
  border-color: var(--accent);
  width: 260px;
  box-shadow: 0 0 16px var(--accent-glow);
}

.nav-search button,
.nav-search-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 24px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.nav-search button:hover,
.nav-search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent2-glow);
}

/* 移动端汉堡菜单 */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
}

/* ==================== 通用容器 ==================== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==================== 首页 Banner（背景覆盖到搜索框下方） ==================== */
.hero {
  /* 底层：深色渐变（方案5风格：深蓝→暗紫→墨绿） */
  background: 
    /* 暗黑科技网格线（微妙的六边形+线条纹理） */
    linear-gradient(rgba(0,212,170,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,170,0.03) 1px, transparent 1px),
    linear-gradient(rgba(124,92,252,0.02) 2px, transparent 2px),
    linear-gradient(90deg, rgba(124,92,252,0.02) 2px, transparent 2px),
    /* 主渐变：深蓝→暗紫→墨绿，流体感 */
    linear-gradient(160deg, 
      #080d1a 0%,
      #0f1b3a 25%,
      #1a1145 50%,
      #0d1f2d 75%,
      #080d1a 100%
    );
  background-size: 
    40px 40px,
    40px 40px,
    80px 80px,
    80px 80px,
    100% 100%;
  padding: 80px 0 90px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  /* 双层光晕：暖青 + 冷紫，模拟氖光灯束 */
  background: 
    radial-gradient(ellipse at 25% 60%, rgba(0,212,170,0.12) 0%, transparent 45%),
    radial-gradient(ellipse at 75% 40%, rgba(124,92,252,0.10) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(0,212,170,0.06) 0%, transparent 35%);
  animation: heroGlow 10s ease-in-out infinite alternate;
  opacity: 0.85;
}

/* 暗黑科技粒子流（第二层伪元素） */
.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  /* 散布的发光粒子点阵 */
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(0,212,170,0.5), transparent),
    radial-gradient(1px 1px at 25% 55%, rgba(124,92,252,0.4), transparent),
    radial-gradient(1.5px 1.5px at 45% 30%, rgba(0,212,170,0.6), transparent),
    radial-gradient(1px 1px at 60% 70%, rgba(124,92,252,0.5), transparent),
    radial-gradient(1.5px 1.5px at 80% 15%, rgba(0,212,170,0.4), transparent),
    radial-gradient(1px 1px at 90% 60%, rgba(96,239,255,0.5), transparent),
    radial-gradient(1px 1px at 15% 80%, rgba(124,92,252,0.3), transparent),
    radial-gradient(1.5px 1.5px at 70% 45%, rgba(0,212,170,0.5), transparent),
    radial-gradient(1px 1px at 35% 10%, rgba(96,239,255,0.4), transparent),
    radial-gradient(1px 1px at 55% 85%, rgba(124,92,252,0.4), transparent);
  background-size: 100% 100%;
  pointer-events: none;
  animation: particleDrift 15s linear infinite;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-3%, -2%) scale(1.05); }
  100% { transform: translate(2%, 3%) scale(1); }
}

@keyframes particleDrift {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* 当设置了自定义背景图时，叠加在渐变之上 */
.hero.has-bg {
  background: 
    /* 网格线依然保留 */
    linear-gradient(rgba(0,212,170,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,170,0.03) 1px, transparent 1px),
    linear-gradient(rgba(124,92,252,0.02) 2px, transparent 2px),
    linear-gradient(90deg, rgba(124,92,252,0.02) 2px, transparent 2px),
    /* 图片叠加暗色遮罩，不遮挡内容 */
    linear-gradient(180deg, rgba(8,13,26,0.75), rgba(8,13,26,0.85)),
    var(--hero-bg-image) center/cover no-repeat;
  background-size: 
    40px 40px,
    40px 40px,
    80px 80px,
    80px 80px,
    100% 100%,
    cover;
}
/* 有背景图时隐藏网格和粒子（避免遮挡图片） */
.hero.has-bg::before,
.hero.has-bg::after {
  opacity: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--accent), #60efff, var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ==================== 首页大型搜索框（嵌在 Hero 底部） ==================== */
.hero-search-section {
  margin-top: 32px;
  padding: 20px 0 30px;
  position: relative;
  z-index: 2;
}

.hero-search-box {
  display: flex;
  align-items: center;
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 50px;
  padding: 6px 6px 6px 24px;
  transition: var(--transition);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.hero-search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 4px 32px var(--accent-glow);
  transform: translateY(-2px);
}

.hero-search-icon {
  font-size: 20px;
  margin-right: 12px;
  flex-shrink: 0;
}

.hero-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 16px;
  padding: 12px 0;
  outline: none;
  min-width: 0;
}

.hero-search-input::placeholder {
  color: var(--text-muted);
  font-size: 15px;
}

.hero-search-btn {
  flex-shrink: 0;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  color: #fff;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.hero-search-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 20px var(--accent2-glow);
}

/* ==================== 加载更多按钮 ==================== */
.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 10px 0 40px;
}

.load-more-btn {
  padding: 12px 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 50px;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.load-more-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 212, 170, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.load-more-arrow {
  font-size: 14px;
  transition: transform 0.3s;
}

.load-more-btn:hover:not(:disabled) .load-more-arrow {
  transform: translateY(3px);
}

/* ==================== 回到顶部按钮 ==================== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 212, 170, 0.1);
  transform: translateY(-4px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

/* ==================== 热门标签云 ==================== */
.tag-cloud-section {
  padding: 30px 0 20px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  border-radius: 2px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  /* 默认只显示2行高度，超过折叠 */
  max-height: 80px;
  overflow: hidden;
  position: relative;
  transition: max-height 0.4s ease;
}

.tag-cloud.expanded {
  max-height: 600px;
}

.tag-cloud::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, var(--bg-primary));
  pointer-events: none;
  transition: opacity 0.3s;
}

.tag-cloud.expanded::after {
  opacity: 0;
}

.tag-expand-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.tag-expand-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tag-cloud a {
  display: inline-block;
  padding: 6px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.tag-cloud a:hover,
.tag-cloud a.active {
  background: rgba(0, 212, 170, 0.15);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--accent-glow);
  z-index: 2;
}

/* ==================== 游戏卡片网格 ==================== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 24px 0;
  align-items: stretch;
}

.game-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
}

.game-card .rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--gold), #ff6348);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #000;
}

.game-card .card-cover {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--bg-secondary);
}

.game-card .card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.game-card .card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.game-card .card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.game-card .card-tags span {
  font-size: 11px;
  padding: 2px 8px;
  background: rgba(0, 212, 170, 0.1);
  color: var(--accent);
  border-radius: 4px;
}

.game-card .card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: auto;
}

.game-card .card-meta .views {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==================== 首页双栏布局 ==================== */
.home-two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  padding: 20px 0 40px;
}

.home-main-col {
  min-width: 0;
}

/* 主页左侧固定3列，避免 auto-fill 导致最后一行不齐 */
.home-main-col .game-grid {
  grid-template-columns: repeat(3, 1fr);
}

.home-sidebar-col {
  min-width: 0;
}

/* ==================== TOP排行榜（左侧热门推荐） ==================== */
.hot-section {
  padding: 0;
}

/* ==================== 右侧边栏：近期浏览榜 ==================== */
.sidebar-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.sidebar-card-header {
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-card-body {
  padding: 8px 0;
}

.sidebar-hot-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.sidebar-hot-item:hover {
  background: var(--bg-card-hover);
}

.sidebar-hot-item .side-rank-wrap {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
}

.sidebar-hot-item .side-cover {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  background: var(--bg-secondary);
}

.sidebar-hot-item .side-cover-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-muted);
}

.sidebar-hot-item .side-rank-badge {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.sidebar-hot-item:nth-child(1) .side-rank-badge { background: #ff6348; color: #fff; }
.sidebar-hot-item:nth-child(2) .side-rank-badge { background: #ffa502; color: #fff; }
.sidebar-hot-item:nth-child(3) .side-rank-badge { background: #2ed573; color: #fff; }
.sidebar-hot-item:nth-child(n+4) .side-rank-badge { background: var(--bg-secondary); color: var(--text-muted); }

.sidebar-hot-item .side-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-hot-item .side-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-primary);
}

.sidebar-hot-item .side-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.sidebar-hot-item .side-time {
  display: flex;
  align-items: center;
  gap: 3px;
}

.sidebar-hot-item .side-views {
  display: flex;
  align-items: center;
  gap: 3px;
}

ot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.hot-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 12px;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}

.hot-item:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.hot-item .hot-rank {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.hot-item:nth-child(1) .hot-rank { background: #ff6348; color: #fff; }
.hot-item:nth-child(2) .hot-rank { background: #ffa502; color: #fff; }
.hot-item:nth-child(3) .hot-rank { background: #ffd32a; color: #333; }
.hot-item:nth-child(n+4) .hot-rank { background: var(--bg-secondary); color: var(--text-muted); }

.hot-item .hot-cover {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

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

.hot-item .hot-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.hot-item .hot-views {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==================== 面包屑 ==================== */
.breadcrumb {
  padding: 20px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 8px; }

/* ==================== 筛选栏 ==================== */
.filter-bar-wrap {
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  padding-bottom: 4px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0 8px;
  overflow: hidden;
  /* 折叠状态：最多显示2行（每行约38px，加gap约46px） */
  max-height: 96px;
  transition: max-height 0.3s ease;
}

.filter-bar.expanded {
  max-height: 2000px;
}

.filter-tag {
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-tag:hover,
.filter-tag.active {
  background: rgba(0, 212, 170, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

/* 展开/收起按钮 */
.filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
  margin: 4px 0 10px;
}
.filter-toggle-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.filter-toggle-btn .toggle-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 10px;
}
.filter-toggle-btn.expanded .toggle-arrow {
  transform: rotate(180deg);
}

/* ==================== 分页 ==================== */
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 40px 0;
  overflow: hidden;
}

.pagination button {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}

.pagination button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination button.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
  color: #fff;
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination .page-info {
  font-size: 14px;
  color: var(--text-muted);
  padding: 0 8px;
}

/* ==================== 游戏详情页 ==================== */
etail-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  padding: 30px 0;
}

.detail-main { min-width: 0; }

.detail-cover {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.detail-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.detail-tags span {
  padding: 4px 12px;
  background: rgba(0, 212, 170, 0.1);
  color: var(--accent);
  border-radius: 16px;
  font-size: 13px;
}

.detail-content {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  line-height: 1.8;
  font-size: 15px;
  color: var(--text-secondary);
}

/* ==================== 下载侧边栏 / 二维码下载 ==================== */
ownload-sidebar {
  position: sticky;
  top: 84px;
}

.download-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.download-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.download-card h3::before {
  content: '📥';
  font-size: 20px;
}

.qr-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.qr-tab {
  flex: 1;
  padding: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.qr-tab:hover,
.qr-tab.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 212, 170, 0.1);
}

.qr-display {
  text-align: center;
  padding: 20px;
  background: #fff;
  border-radius: var(--radius);
}

.qr-display img {
  width: 200px;
  height: 200px;
  margin: 0 auto;
}

.qr-display .qr-label {
  margin-top: 12px;
  font-size: 13px;
  color: #666;
}

.qr-display .qr-hint {
  margin-top: 6px;
  font-size: 12px;
  color: #999;
}

.download-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  margin-top: 12px;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--accent2-glow);
}

/* ==================== FAQ页面 ==================== */
.faq-section {
  padding: 30px 0;
}

.faq-category {
  margin-bottom: 40px;
}

.faq-category h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
}

.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.faq-question:hover { color: var(--accent); }

.faq-question .arrow {
  font-size: 12px;
  transition: transform 0.3s;
}

.faq-item.open .faq-question .arrow {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 20px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  display: none;
}

.faq-item.open .faq-answer { display: block; }

/* ==================== 搜索页 ==================== */
.search-header {
  padding: 40px 0 20px;
  text-align: center;
}

.search-header h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

.search-header p {
  color: var(--text-muted);
}

/* ==================== 页脚 ==================== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 30px 0;
  text-align: center;
  margin-top: 60px;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-links a:hover { color: var(--accent); }

.footer p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==================== 加载动画 ==================== */
.loading {
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted);
}

.loading::after {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 10px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==================== 空状态 ==================== */
.empty-state {
  text-align: center;
  padding: 80px 0;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

/* ==================== 响应式布局 ==================== */
@media (max-width: 768px) {
  .hero {
    padding: 60px 0 40px;
  }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 14px; margin-bottom: 12px; }

  /* ===== 移动端导航栏：上下架构 ===== */
  /* 上排：Logo左对齐 + 主题切换右上角 | 下排：4个主链接居中 + 右侧"更多"下拉 */
  .navbar { padding: 0; }
  .nav-inner {
    flex-direction: column;
    height: auto;
    align-items: stretch;
    position: relative;
    padding: 0;
  }
  .nav-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0;
  }

  /* ── 上排：Logo（左对齐，留足空间） + 主题切换（右上角） ── */
  .nav-logo {
    justify-content: flex-start;
    padding: 14px 50px 10px 16px;
    font-size: 16px;
    flex-shrink: 0;
  }
  .nav-logo img {
    max-height: 44px;
    max-width: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
  }
  .nav-right {
    position: absolute;
    top: 14px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }
  .nav-right input,
  .nav-right .nav-search-btn,
  .nav-right .menu-toggle { display: none; }
  .nav-right .theme-toggle { display: flex; }

  /* ── 下排：4个主链接居中 + 右侧"更多"下拉按钮 ── */
  .nav-links {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 8px;
    padding: 4px 12px 12px;
    position: relative;
  }
  .nav-links li {
    flex-shrink: 0;
    list-style: none;
  }
  .nav-links a {
    display: block;
    padding: 7px 16px;
    font-size: 13px;
    white-space: nowrap;
    border-radius: 6px;
    background: var(--bg-secondary);
    transition: all 0.25s ease;
  }
  .nav-links a:hover,
  .nav-links a.active {
    background: var(--accent);
    color: #fff;
  }

  /* "更多"按钮项（仅移动端显示，桌面端隐藏） */
  .nav-more-li {
    display: flex !important;
    align-items: center;
    position: relative;
  }
  /* FAQ/Contact 桌面端链接在移动端隐藏 */
  .nav-desktop-only { display: none; }
  .nav-more-btn-m {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 7px 14px;
    font-size: 13px;
    white-space: nowrap;
    border-radius: 6px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s ease;
  }
  .nav-more-btn-m:hover { background: var(--accent); color: #fff; }
  .nav-more-btn-m .more-arrow {
    display: inline-block;
    font-size: 10px;
    transition: transform 0.2s;
  }
  .nav-more-btn-m.open .more-arrow { transform: rotate(180deg); }
  
  .nav-more-dropdown-m {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 120px;
    padding: 4px 0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    z-index: 999;
  }
  .nav-more-dropdown-m.open { display: block; }
  .nav-more-dropdown-m a {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
    border-radius: 0;
    background: transparent;
    transition: background 0.15s;
  }
  .nav-more-dropdown-m a:hover { background: var(--bg-secondary); color: var(--accent); }

  .nav-search,
  .nav-search-btn,
  .menu-toggle { display: none; }
  
  /* 移动端防横向溢出 */
  body {
    overflow-x: hidden;
  }
  .filter-bar-wrap {
    overflow: hidden;
  }
  
  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }
  
  .game-card .card-cover { height: 120px; }

  /* 移动端分页 */
  .pagination {
    gap: 4px;
    padding: 24px 0;
  }
  .pagination button {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 4px;
  }
  .pagination .page-info {
    font-size: 12px;
    padding: 0 2px;
  }
  
  .game-card .card-title { font-size: 13px; }
  
  /* 移动端容器留白调整 */
  .container {
    padding: 0 12px;
  }
  
  /* 移动端双栏→单栏 */
  .home-two-col {
    grid-template-columns: 1fr;
    padding: 12px 0 32px;
  }
  
  .home-sidebar-col {
    order: -1;
    padding: 0 4px;
  }
  
  .home-main-col {
    padding: 0 4px;
  }
  
  /* 移动端主页游戏网格强制每行2个 */
  .home-main-col .game-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* 移动端侧边栏卡片留白 */
  .sidebar-card {
    margin: 0 4px 16px;
  }
  
  /* 移动端搜索框：横排，紧凑 */
  .hero-search-section {
    padding: 12px 0 20px;
  }
  .hero-search-box {
    flex-direction: row;
    padding: 4px 4px 4px 14px;
    gap: 6px;
    border-radius: 50px;
  }
  .hero-search-icon {
    font-size: 16px;
    margin-right: 0;
    flex-shrink: 0;
  }
  .hero-search-input {
    flex: 1;
    text-align: left;
    font-size: 14px;
    padding: 8px 0;
  }
  .hero-search-btn {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 50px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* 移动端回到顶部按钮 */
  .back-to-top {
    bottom: 20px;
    right: 16px;
    width: 42px;
    height: 42px;
    font-size: 16px;
  }
  
  /* 移动端加载更多按钮 */
  .load-more-btn {
    padding: 10px 32px;
    font-size: 14px;
  }
}

/* ==================== FAQ & Contact 页面 ==================== */
.faq-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.faq-category {
  margin-bottom: 32px;
}

.faq-category h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  color: var(--text-primary);
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 0.2s;
}

.faq-item:hover {
  border-color: var(--accent);
}

.faq-item.open {
  border-color: var(--accent);
}

/* 短答案（≤3行）始终展开，不显示箭头光标 */
.faq-item.no-collapse {
  cursor: default;
}
.faq-item.no-collapse:hover {
  border-color: var(--border);
}
.faq-item.no-collapse .arrow {
  display: none;
}

.faq-question {
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
  user-select: none;
}

.faq-question .arrow {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.faq-item.open .faq-question .arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 16px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.faq-item.open .faq-answer,
.faq-item.no-collapse .faq-answer {
  max-height: 2000px;
  padding: 0 16px 16px;
}

.faq-answer a {
  color: var(--accent);
  text-decoration: underline;
}

.faq-answer a:hover {
  color: var(--accent2);
}

.faq-answer img {
  max-width: 100%;
  border-radius: 8px;
  margin: 8px 0;
}
