:root {
  --bg: #0f1115;
  --bg-soft: #171a21;
  --card: #1d212b;
  --border: #2a2f3b;
  --text: #e8eaf0;
  --muted: #9aa3b2;
  --accent: #5b8cff;
  --accent-soft: rgba(91, 140, 255, 0.15);
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1040px, 92%);
  margin: 0 auto;
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 17, 21, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.nav .brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.nav .brand:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 48px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 10px;
}

.hero .tagline {
  color: var(--muted);
  font-size: 1.15rem;
}

/* ---------- Sections ---------- */
section {
  padding: 48px 0;
}

section h2 {
  font-size: 1.6rem;
  margin-bottom: 24px;
}

/* ---------- Games grid ---------- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  color: var(--text);
}

.game-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.game-icon {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
  color: var(--bg);
  background: linear-gradient(135deg, var(--accent), #7c4dff);
}

.game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.game-body h3 {
  font-size: 1.1rem;
}

.game-body .tagline {
  color: var(--muted);
  font-size: 0.9rem;
  flex: 1;
}

.badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(91, 140, 255, 0.35);
}

.badge-muted {
  background: var(--bg-soft);
  color: var(--muted);
  border-color: var(--border);
}

/* ---------- About ---------- */
.about {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 32px;
}

.about h2 {
  margin-bottom: 12px;
}

.about p {
  color: var(--muted);
  max-width: 70ch;
}

/* ---------- Contact ---------- */
.contact-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.contact-list a {
  display: inline-block;
  padding: 10px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.92rem;
}

.contact-list a:hover {
  border-color: var(--accent);
  text-decoration: none;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

/* ---------- Game detail ---------- */
.back {
  display: inline-block;
  margin: 24px 0 12px;
  color: var(--muted);
}

.game-detail-header {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.game-detail-icon {
  width: 120px;
  height: 120px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--bg);
  background: linear-gradient(135deg, var(--accent), #7c4dff);
  flex-shrink: 0;
}

.game-detail-icon img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  object-fit: cover;
}

.game-detail-title h1 {
  font-size: 2rem;
  margin-bottom: 6px;
}

.game-detail-title .tagline {
  color: var(--muted);
}

.game-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}

.btn:hover {
  background: #4a7dff;
  text-decoration: none;
}

.btn-ghost {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--bg-soft);
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  margin-bottom: 28px;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.gallery img,
.gallery .shot-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.shot-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
  background: var(--bg-soft);
  text-align: center;
  padding: 16px;
}

.game-description {
  color: var(--muted);
  max-width: 72ch;
  font-size: 1.02rem;
}

.meta-row {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 14px;
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .nav-links {
    gap: 14px;
  }

  .hero {
    padding: 48px 0 32px;
  }

  section {
    padding: 36px 0;
  }

  .game-detail-icon {
    width: 90px;
    height: 90px;
    font-size: 2.4rem;
  }
}
