/* ============================================================
   GameGuideHub - Core Stylesheet
   Dark Gaming Theme · Mobile-First · WCAG 2.1 AA
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colors - Dark Theme (Default) */
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --bg-elevated: #1e1e2a;
  --bg-input: #1a1a26;
  --bg-code: #0d1117;

  --border-primary: #252536;
  --border-secondary: #1e1e30;
  --border-accent: #3a3a5c;

  --text-primary: #e8e8f0;
  --text-secondary: #a0a0b8;
  --text-tertiary: #6a6a80;
  --text-inverse: #0a0a0f;

  --accent-primary: #6c5ce7;
  --accent-primary-hover: #7d6ff0;
  --accent-primary-glow: rgba(108, 92, 231, 0.25);
  --accent-secondary: #a855f7;
  --accent-tertiary: #06d6a0;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;

  --tier-s: #ff6b6b;
  --tier-a: #ffd93d;
  --tier-b: #6bcb77;
  --tier-c: #4d96ff;
  --tier-d: #a0a0b8;

  --gradient-hero: linear-gradient(135deg, #6c5ce7 0%, #a855f7 50%, #06d6a0 100%);
  --gradient-card: linear-gradient(135deg, rgba(108,92,231,0.15) 0%, rgba(168,85,247,0.1) 100%);
  --gradient-btn: linear-gradient(135deg, #6c5ce7, #a855f7);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px var(--accent-primary-glow);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Fira Code', 'Cascadia Code', 'Consolas', 'Courier New', monospace;

  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;

  --container-max: 1280px;
  --header-height: 64px;
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #f8f8fc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f4f4fa;
  --bg-elevated: #ffffff;
  --bg-input: #f0f0f6;
  --bg-code: #f4f4fa;

  --border-primary: #e2e2ea;
  --border-secondary: #eeeef4;
  --border-accent: #c4c4d8;

  --text-primary: #1a1a2e;
  --text-secondary: #555570;
  --text-tertiary: #8888a0;
  --text-inverse: #f8f8fc;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-glow: 0 0 20px rgba(108,92,231,0.15);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition-normal), color var(--transition-normal);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-primary-hover);
}

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

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  outline: none;
}

ul, ol {
  list-style: none;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }

/* ---------- Container ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: var(--header-height);
  transition: background var(--transition-normal), border-color var(--transition-normal);
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-hero);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
}

.logo-text {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-nav a {
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.search-toggle,
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  font-size: 1.1rem;
}

.search-toggle:hover,
.theme-toggle:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* ---------- Search Overlay ---------- */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}

.search-overlay.active {
  display: flex;
}

.search-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 600px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.search-input-wrap {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-secondary);
}

.search-input-wrap input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-family: inherit;
  outline: none;
}

.search-input-wrap input::placeholder {
  color: var(--text-tertiary);
}

.search-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem;
}

.search-result-item {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-result-item:hover {
  background: var(--bg-card);
}

.search-result-item .game-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.search-result-item .result-info h4 {
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.search-result-item .result-info span {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.no-results {
  padding: 2rem;
  text-align: center;
  color: var(--text-tertiary);
}

/* ---------- Hero Section ---------- */
.hero {
  padding: 3rem 0 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-primary-glow) 0%, transparent 70%);
  pointer-events: none;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: 50px;
  padding: 0.35rem 1rem;
  font-size: 0.85rem;
  color: var(--accent-primary);
  margin-bottom: 1.25rem;
}

.hero-badge .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-tertiary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 0.75rem;
  line-height: 1.15;
}

.hero h1 span {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-primary-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-primary-glow);
  color: #fff;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-copy {
  background: var(--bg-code);
  color: var(--accent-tertiary);
  border: 1px solid var(--border-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.btn-copy:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-tertiary);
}

.btn-copy.copied {
  background: rgba(6, 214, 160, 0.15);
  border-color: var(--accent-tertiary);
  color: var(--accent-tertiary);
}

/* ---------- Section Styles ---------- */
.section {
  padding: 2.5rem 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-title .icon {
  font-size: 1.3rem;
}

.section-link {
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ---------- Game Cards Grid ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

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

.game-card-banner {
  height: 140px;
  position: relative;
  overflow: hidden;
}

.game-card-banner .banner-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, var(--bg-card) 100%);
}

.banner-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.game-card-body {
  padding: 1rem 1.15rem 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.game-card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.game-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.game-card-meta .platform {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 50px;
  background: var(--bg-input);
  color: var(--text-secondary);
}

.game-card-meta .category {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.game-card-body p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  flex: 1;
}

.game-card-stats {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-tertiary);
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-secondary);
}

.game-card-stats span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ---------- Featured / Trending Games ---------- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
}

.featured-card {
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition-normal);
  text-decoration: none;
  color: inherit;
  display: flex;
  gap: 1.25rem;
  position: relative;
  overflow: hidden;
}

.featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-primary);
  border-radius: 4px 0 0 4px;
}

.featured-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.featured-card.new::before { background: var(--accent-tertiary); }
.featured-card.trending::before { background: var(--accent-warning); }

.featured-card .card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.featured-card .card-info h3 {
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.featured-card .card-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.featured-card .card-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 50px;
}

.featured-card.new .card-badge {
  background: rgba(6,214,160,0.15);
  color: var(--accent-tertiary);
}

.featured-card.trending .card-badge {
  background: rgba(245,158,11,0.15);
  color: var(--accent-warning);
}

/* ---------- Stats Bar ---------- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
}

.stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
}

/* ---------- Game Hub Page ---------- */
.game-hub {
  padding: 2rem 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--accent-primary);
}

.breadcrumb .sep {
  color: var(--text-tertiary);
}

.breadcrumb .current {
  color: var(--text-primary);
}

.game-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.game-header-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.game-header-info h1 {
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

.game-header-info .game-version {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
}

.game-header-info .game-description {
  color: var(--text-secondary);
  max-width: 700px;
}

.game-quick-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.game-quick-nav a {
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  transition: all var(--transition-fast);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.game-quick-nav a:hover,
.game-quick-nav a.active {
  color: var(--text-primary);
  border-color: var(--accent-primary);
  background: rgba(108,92,231,0.1);
}

.game-content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  transition: all var(--transition-normal);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.content-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.content-card .card-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

.content-card h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.content-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  flex: 1;
}

.content-card .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-secondary);
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

/* ---------- Codes Page ---------- */
.codes-page {
  padding: 2rem 0;
}

.codes-header {
  margin-bottom: 1.5rem;
}

.codes-header .last-updated {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.codes-header .verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(6,214,160,0.1);
  color: var(--accent-tertiary);
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.code-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
  margin-bottom: 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

thead {
  background: var(--bg-code);
  position: sticky;
  top: 0;
}

th {
  padding: 0.9rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-primary);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

th:hover {
  color: var(--text-primary);
}

th.sort-asc::after { content: ' \25B2'; font-size: 0.65rem; }
th.sort-desc::after { content: ' \25BC'; font-size: 0.65rem; }

td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-secondary);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--bg-card-hover);
}

td .code-text {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--accent-tertiary);
  background: var(--bg-code);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.03em;
}

.status-verified {
  color: var(--accent-tertiary);
  font-weight: 600;
  font-size: 0.82rem;
}

.status-expired {
  color: var(--accent-danger);
  text-decoration: line-through;
  font-size: 0.82rem;
}

.expired-section {
  margin-bottom: 2rem;
}

.expired-section summary {
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-tertiary);
  font-weight: 600;
  padding: 0.6rem 0;
}

.expired-section .code-table-wrap {
  margin-top: 0.75rem;
}

/* ---------- Redeem Guide ---------- */
.redeem-guide {
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.redeem-guide h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.redeem-steps {
  counter-reset: step;
}

.redeem-step {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  counter-increment: step;
}

.redeem-step + .redeem-step {
  border-top: 1px solid var(--border-secondary);
}

.redeem-step .step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-btn);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.redeem-step .step-content {
  flex: 1;
}

.redeem-step .step-content strong {
  display: block;
  margin-bottom: 0.2rem;
}

.redeem-step .step-content span {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* ---------- Tier List Page ---------- */
.tier-list-page {
  padding: 2rem 0;
}

.tier-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  align-items: center;
}

.tier-filters input,
.tier-filters select {
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.tier-filters input:focus,
.tier-filters select:focus {
  border-color: var(--accent-primary);
}

.tier-filters input {
  flex: 1;
  min-width: 200px;
}

.tier-filters select {
  min-width: 140px;
}

.tier-legend {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.tier-legend-item {
  padding: 0.3rem 0.7rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-inverse);
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.tier-legend-item:hover { opacity: 0.8; }

.tier-legend-item.s { background: var(--tier-s); }
.tier-legend-item.a { background: var(--tier-a); color: #1a1a2e; }
.tier-legend-item.b { background: var(--tier-b); }
.tier-legend-item.c { background: var(--tier-c); }
.tier-legend-item.d { background: var(--tier-d); }

.tier-legend-item.muted {
  opacity: 0.25;
}

.tier-table {
  margin-bottom: 2rem;
}

.tier-table td .tier-badge {
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-inverse);
}

.tier-badge.s { background: var(--tier-s); }
.tier-badge.a { background: var(--tier-a); color: #1a1a2e; }
.tier-badge.b { background: var(--tier-b); }
.tier-badge.c { background: var(--tier-c); }
.tier-badge.d { background: var(--tier-d); }

/* Compare Mode */
.compare-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-primary);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 50;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
  transform: translateY(100%);
  transition: transform var(--transition-normal);
}

.compare-bar.active {
  transform: translateY(0);
}

.compare-bar .compare-slots {
  display: flex;
  gap: 0.75rem;
}

.compare-slot {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 2px dashed var(--border-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.compare-slot.filled {
  border-style: solid;
  border-color: var(--accent-primary);
  background: rgba(108,92,231,0.1);
}

.compare-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.compare-modal.active {
  display: flex;
}

.compare-modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
}

.compare-modal-content h2 {
  margin-bottom: 1rem;
}

.compare-table {
  width: 100%;
  font-size: 0.88rem;
}

.compare-table th {
  background: var(--bg-card);
}

.compare-table th:first-child,
.compare-table td:first-child {
  font-weight: 600;
  color: var(--text-secondary);
}

/* ---------- Guide Page ---------- */
.guide-page {
  padding: 2rem 0;
}

.guide-toc {
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.guide-toc h3 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

.guide-toc ul li {
  padding: 0.35rem 0;
}

.guide-toc ul li a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.guide-toc ul li a:hover {
  color: var(--accent-primary);
}

.guide-content {
  max-width: 800px;
}

.guide-content h2 {
  margin-top: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-secondary);
}

.guide-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.guide-content p {
  color: var(--text-secondary);
  line-height: 1.8;
}

.guide-content ul,
.guide-content ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

.guide-content ul { list-style: disc; }
.guide-content ol { list-style: decimal; }

.guide-content li {
  padding: 0.25rem 0;
}

.guide-tip {
  background: rgba(6,214,160,0.08);
  border: 1px solid rgba(6,214,160,0.2);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.guide-tip strong {
  color: var(--accent-tertiary);
}

.guide-warning {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.guide-warning strong {
  color: var(--accent-warning);
}

.progress-tracker {
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.progress-tracker h3 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.progress-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  cursor: pointer;
}

.progress-item + .progress-item {
  border-top: 1px solid var(--border-secondary);
}

.progress-item .checkbox {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid var(--border-accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  font-size: 0.7rem;
}

.progress-item.checked .checkbox {
  background: var(--accent-tertiary);
  border-color: var(--accent-tertiary);
  color: var(--text-inverse);
}

.progress-item.checked span {
  text-decoration: line-through;
  color: var(--text-tertiary);
}

/* ---------- FAQ Page ---------- */
.faq-list {
  max-width: 800px;
}

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

.faq-question {
  width: 100%;
  padding: 1.1rem 1.25rem;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  background: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-question .arrow {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

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

.faq-answer {
  padding: 0 1.25rem 1.1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  display: none;
}

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

/* ---------- Code Banner Alert ---------- */
.code-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(108,92,231,0.08);
  border: 1px solid rgba(108,92,231,0.25);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.code-alert .alert-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ---------- About Page ---------- */
.about-page {
  padding: 2rem 0;
  max-width: 800px;
  margin: 0 auto;
}

.about-page h1 {
  margin-bottom: 1rem;
}

.about-intro {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.about-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
}

.pillar-card .pillar-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.pillar-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.pillar-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-primary);
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 1rem;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.footer-col ul li a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-secondary);
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

/* ---------- Category Tabs ---------- */
.category-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.category-tab {
  padding: 0.5rem 1.1rem;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-secondary);
  transition: all var(--transition-fast);
}

.category-tab:hover {
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.category-tab.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}

/* ---------- Toast Notification ---------- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  transition: transform var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast.success { border-color: var(--accent-tertiary); }

/* ---------- Related Guides ---------- */
.related-guides {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-secondary);
}

.related-guides h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

/* ---------- Calculator Page ---------- */
.calculator-card {
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  max-width: 600px;
}

.calculator-card h2 {
  margin-bottom: 1rem;
  font-size: 1.15rem;
}

.calc-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.calc-row label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  min-width: 120px;
}

.calc-row input,
.calc-row select {
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  flex: 1;
}

.calc-result {
  background: rgba(108,92,231,0.06);
  border: 1px solid rgba(108,92,231,0.2);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

.calc-result .result-label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calc-result .result-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-primary);
}

/* ---------- Update Log / News Page ---------- */
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: all var(--transition-normal);
}

.news-card:hover {
  border-color: var(--border-accent);
}

.news-card .news-meta {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.news-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.news-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.news-card .tag {
  padding: 0.15rem 0.5rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
}

.tag-update { background: rgba(108,92,231,0.15); color: var(--accent-primary); }
.tag-event { background: rgba(6,214,160,0.15); color: var(--accent-tertiary); }
.tag-guide { background: rgba(245,158,11,0.15); color: var(--accent-warning); }

/* ---------- All Games Page ---------- */
.games-page {
  padding: 2rem 0;
}

/* ---------- Mobile Nav ---------- */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 150;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
}

.mobile-nav.active {
  transform: translateX(0);
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.mobile-nav a {
  display: block;
  padding: 0.85rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-secondary);
}

.mobile-nav a:hover {
  color: var(--text-primary);
}

/* ---------- Skeleton Loading ---------- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-accent);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ---------- Back to Top ---------- */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 40;
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition-normal);
  pointer-events: none;
  box-shadow: var(--shadow-md);
}

.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

/* ---------- Accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .header-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .game-content-grid {
    grid-template-columns: 1fr;
  }

  .game-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .game-header-icon {
    width: 64px;
    height: 64px;
    font-size: 2rem;
  }

  .game-header-info h1 {
    font-size: 1.5rem;
  }

  .game-quick-nav {
    justify-content: center;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-pillars {
    grid-template-columns: 1fr;
  }

  .tier-filters {
    flex-direction: column;
  }

  .tier-filters input,
  .tier-filters select {
    width: 100%;
  }

  .compare-bar {
    padding: 0.6rem 0.75rem;
  }

  .hero {
    padding: 2rem 0 1.5rem;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  th, td {
    padding: 0.6rem 0.7rem;
    font-size: 0.82rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .header-actions .search-toggle,
  .header-actions .theme-toggle {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .logo {
    font-size: 1.1rem;
  }

  .logo-icon {
    width: 30px;
    height: 30px;
    font-size: 0.95rem;
  }
}

/* ---------- Print Styles ---------- */
@media print {
  .site-header,
  .site-footer,
  .back-to-top,
  .compare-bar,
  .mobile-nav,
  .search-overlay {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}
