:root {
  --bg-obsidian: #090d16;
  --bg-surface: #0e1320;
  --bg-card: #131929;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-blue: #00A8FF;
  --accent-emerald: #22c55e;
  --accent-amber: #facc15;
  --border-subtle: rgba(148, 163, 184, 0.18);
}

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

body {
  background-color: var(--bg-obsidian);
  background-image:
    radial-gradient(circle at 15% 15%, rgba(0, 168, 255, 0.14), transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(34, 197, 94, 0.12), transparent 45%);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(9, 13, 22, 0.92);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 2px;
  line-height: 1.05;
}

.brand-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent-blue);
  letter-spacing: 1px;
}

.btn-tiktok {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1.5px solid var(--accent-blue);
  color: var(--text-primary);
  font-weight: 800;
  font-size: 0.88rem;
  text-decoration: none;
  transition: transform 180ms ease, background-color 180ms ease;
}

.btn-tiktok:hover {
  transform: translateY(-2px);
  background: rgba(0, 168, 255, 0.16);
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}

/* Hero */
.hero-card {
  margin-top: 28px;
  padding: 32px 28px;
  border-radius: 28px;
  background: linear-gradient(145deg, #111827 0%, #0b101d 100%);
  border: 1.5px solid rgba(0, 168, 255, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.hero-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(0, 168, 255, 0.16);
  color: var(--accent-blue);
  border: 1px solid rgba(0, 168, 255, 0.4);
  margin-bottom: 14px;
}

.hero-card h1 {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.35rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.hero-card h1 span {
  color: var(--accent-blue);
}

.hero-desc {
  max-width: 680px;
  margin: 12px auto 22px;
  color: var(--text-secondary);
  font-size: 0.98rem;
}

.hero-desc code {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-emerald);
  background: rgba(34, 197, 94, 0.12);
  padding: 2px 7px;
  border-radius: 6px;
}

.search-bar {
  position: relative;
  max-width: 640px;
  margin: 0 auto 20px;
}

.search-bar input {
  width: 100%;
  height: 56px;
  padding: 0 48px 0 20px;
  border-radius: 16px;
  background: var(--bg-obsidian);
  border: 2px solid rgba(0, 168, 255, 0.45);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.search-bar input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(0, 168, 255, 0.2);
}

.btn-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 800;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.pill {
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 160ms ease;
}

.pill:hover, .pill.active {
  background: var(--accent-blue);
  color: #040810;
  border-color: var(--accent-blue);
}

/* Games Grid */
.games-section {
  margin-top: 28px;
}

.games-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.game-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 22px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  transition: transform 180ms ease, border-color 180ms ease;
}

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

.game-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.game-code {
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  font-size: 0.88rem;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(0, 168, 255, 0.16);
  color: var(--accent-blue);
  border: 1px solid rgba(0, 168, 255, 0.45);
}

.game-video-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent-emerald);
}

.game-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.game-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.14);
}

.game-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.2;
}

.game-genre {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.game-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.spec-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--bg-obsidian);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.spec-chip.size {
  color: var(--accent-amber);
  border-color: rgba(250, 204, 21, 0.35);
}

.game-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.game-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--accent-blue);
  color: #030712;
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  transition: filter 160ms ease, transform 160ms ease;
}

.btn-download:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.btn-info {
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-obsidian);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-info:hover {
  border-color: var(--accent-blue);
}

/* Help Section */
.help-section {
  margin-top: 48px;
  padding: 28px;
  border-radius: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.help-section h2 {
  font-family: 'Unbounded', sans-serif;
  font-size: 1.25rem;
  margin-bottom: 20px;
  text-align: center;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.help-card {
  padding: 20px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.help-num {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  color: var(--accent-blue);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.help-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.help-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Footer */
.site-footer {
  margin-top: 56px;
  padding: 28px 0;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* Modal */
.guide-modal {
  margin: auto;
  border: none;
  border-radius: 22px;
  background: var(--bg-card);
  color: var(--text-primary);
  max-width: 520px;
  width: calc(100% - 32px);
  padding: 0;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85);
}

.guide-modal::backdrop {
  background: rgba(3, 7, 18, 0.78);
}

.modal-box {
  padding: 24px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-obsidian);
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 800;
}

.modal-body p {
  margin-bottom: 12px;
  font-size: 0.94rem;
  color: var(--text-secondary);
}

.modal-body strong {
  color: var(--text-primary);
}
