@charset "UTF-8";

/*
  Game Store - Shared Styles
  - Clean, modern, responsive design for dark background
  - Works on desktop and mobile without JS frameworks
*/

/* CSS Reset (minimal) */
* { box-sizing: border-box; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; display: block; height: auto; }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }

:root {
  --bg: #0f172a;
  --text: #f1f5f9;
  --muted-text: #cbd5e1;
  --soft-text: #94a3b8;
  --card: #1e293b;
  --card-border: #334155;
  --accent: #3b82f6;
  --accent-strong: #60a5fa;
  --accent-weak: #1e3a8a;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.3);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --container: 1200px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 16px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--card-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #60a5fa);
}

.brand-name { color: var(--text); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-links a {
  color: var(--muted-text);
  padding: 8px 10px;
  border-radius: 8px;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--accent-strong);
  background: var(--accent-weak);
}

.search-bar {
  flex: 1 1 auto;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-input {
  flex: 1 1 auto;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  outline: none;
  background: var(--card);
  color: var(--text);
}
.search-btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.search-btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); }

/* Hero */
.hero {
  padding: 32px 0 8px;
}
.hero-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  padding: 20px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}
.hero img { border-radius: var(--radius-md); }
.hero-content h1 { margin: 0 0 8px; font-size: 28px; }
.hero-content p { margin: 0 0 16px; color: var(--soft-text); }

.btn {
  --btn-bg: var(--accent);
  --btn-bg-hover: var(--accent-strong);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--btn-bg);
  background: var(--btn-bg);
  color: #fff;
  cursor: pointer;
}
.btn:hover { background: var(--btn-bg-hover); border-color: var(--btn-bg-hover); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--card-border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-strong); }

/* Sections */
.section { padding: 28px 0; }
.section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.section-title { font-size: 20px; margin: 0; }
.muted { color: var(--muted-text); }

/* Filters */
.filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--card-border);
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.filter-chips { display:flex; align-items:center; gap:8px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: #0f172a;
  color: var(--soft-text);
  cursor: pointer;
  user-select: none;
}
.chip:hover { border-color: var(--accent); color: var(--accent-strong); }
.chip.active { background: var(--accent-weak); color: var(--accent-strong); border-color: var(--accent); }

.sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.sort-select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
}

/* Grid */
.grid {
  display: grid;
  gap: 16px;
}
.grid.cards-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cards-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cards-2 { grid-template-columns: repeat(2, 1fr); }

/* Card */
.card {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--card);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card-media { aspect-ratio: 16/9; background: #0f172a; }
.card-body { padding: 12px; display:flex; flex-direction:column; gap:8px; }
.card-title { font-weight: 700; margin: 0; }
.card-meta { color: var(--soft-text); font-size: 14px; }
.price { font-weight: 700; }
.badge { display:inline-block; font-size:12px; padding:4px 8px; border-radius:999px; background: var(--accent-weak); color: var(--accent-strong); }

/* Details layout */
.details {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
.details .panel {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--card);
  padding: 16px;
  box-shadow: var(--shadow);
}
/* 为详情页的游戏图片添加专门的样式 */
.details .panel img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}
.list { margin: 0; padding-left: 18px; color: var(--soft-text); }

/* Footer */
.site-footer { border-top: 1px solid var(--card-border); padding: 24px 0; margin-top: 40px; color: var(--soft-text); }
.footer-grid { display:grid; grid-template-columns: 1fr 1fr; gap:16px; align-items:center; }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--soft-text);
  background: var(--card);
}
.page:hover { border-color: var(--accent); color: var(--accent-strong); }
.page.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.page.disabled { opacity: .5; pointer-events: none; }

/* Play button styles */
.play-btn {
  display: block;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  color: white;
  font-weight: 600;
  font-size: 16px;
  text-align: center;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.play-btn:hover {
  background: linear-gradient(135deg, var(--accent-strong), #93c5fd);
  box-shadow: 0 6px 8px rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

.play-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

/* Utilities */
.spacer { height: 16px; }
.row { display:flex; align-items:center; gap:12px; }
.wrap { flex-wrap: wrap; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

/* Responsive */
@media (max-width: 1024px) {
  .grid.cards-4 { grid-template-columns: repeat(3, 1fr); }
  .details { grid-template-columns: 1fr; }
  .hero-card { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav { height: auto; padding: 12px 0; flex-wrap: wrap; }
  .search-bar { order: 3; width: 100%; max-width: none; }
  .nav-links { order: 2; width: 100%; justify-content: space-between; }
  .grid.cards-3 { grid-template-columns: repeat(2, 1fr); }
  .filters { flex-direction: column; align-items: flex-start; }
  .sort { width: 100%; justify-content: flex-start; }
}

@media (max-width: 520px) {
  .grid.cards-4, .grid.cards-3, .grid.cards-2 { grid-template-columns: 1fr; }
}

.ad-box{
  position: relative;
  max-width: 100%;
  overflow: hidden;
  text-align: center;
  margin: 20px auto;
}