:root {
  /* Football field palette */
  --grass-dark: #1f6b2c;
  --grass-mid: #2c8a3a;
  --grass-light: #4caf50;
  --grass-bright: #66c06b;
  --line: #fafaf6;
  --pitch-shadow: rgba(0, 0, 0, 0.35);
  --night-sky: #0a1f10;
  --night-sky-2: #14271a;

  --bg: #0c1a10;
  --bg-soft: #14271a;
  --panel: rgba(20, 38, 26, 0.92);
  --panel-strong: #1c3522;
  --border: rgba(220, 235, 220, 0.18);
  --border-strong: rgba(220, 235, 220, 0.32);
  --text: #f3fbef;
  --muted: #b6cdb1;

  /* Brand accents */
  --primary: #a6f25c;            /* fluorescent pitch green */
  --primary-2: #6cd449;
  --secondary: #ffe066;          /* corner flag / trophy gold */
  --warning: #ffb547;
  --danger: #ff6a6a;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    /* faint field-line texture */
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.012) 0px,
      rgba(255, 255, 255, 0.012) 2px,
      transparent 2px,
      transparent 6px
    ),
    /* subtle pitch glow at top */
    radial-gradient(circle at top, rgba(102, 192, 107, 0.18), transparent 55%),
    /* deep night-sky to grass gradient */
    linear-gradient(180deg, #08160d 0%, #0d2114 32%, #0a180e 100%);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

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

button, input, textarea { font: inherit; }

.container {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 12px 12px 42px;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(10, 24, 14, 0.92), rgba(10, 24, 14, 0.82));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  /* a single white hairline like a touchline */
}

.brand-wrap { display: flex; align-items: center; gap: 10px; }

.nav-toggle, .nav-close {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand img, .drawer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(166, 242, 92, 0.22), rgba(108, 212, 73, 0.22));
  border: 1px solid rgba(166, 242, 92, 0.45);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

/* ---------- Drawer ---------- */
.nav-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 8, 4, 0.65);
  z-index: 40;
}

.nav-drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: min(82vw, 300px);
  background: linear-gradient(180deg, #102016 0%, #08130c 100%);
  border-right: 1px solid var(--border);
  z-index: 60;
  transform: translateX(-105%);
  transition: transform 0.25s ease;
  padding: 16px 14px 20px;
  /* faint vertical stripes to mimic grass */
  background-image:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.018) 0px,
      rgba(255, 255, 255, 0.018) 6px,
      transparent 6px,
      transparent 14px
    ),
    linear-gradient(180deg, #102016 0%, #08130c 100%);
}
.nav-drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.drawer-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }

.drawer-nav { display: grid; gap: 8px; margin-top: 18px; }

.drawer-nav a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
}

/* ---------- Card panel (general) ---------- */
.card-panel {
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.02) 0px,
      rgba(255, 255, 255, 0.02) 6px,
      transparent 6px,
      transparent 14px
    ),
    linear-gradient(180deg, rgba(20, 38, 26, 0.92), rgba(12, 24, 16, 0.92));
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

/* ---------- Hero banner ---------- */
.hero-banner {
  margin-top: 14px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #08130c;
  position: relative;
}
.hero-banner img {
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 480;
  object-fit: cover;
  display: block;
}

/* ---------- Sections ---------- */
.section-block { margin-top: 18px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section-head h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}
.section-head h2::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 18px;
  background: var(--primary);
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: -2px;
}
.section-head a { color: var(--primary); font-size: 0.82rem; font-weight: 700; }

/* ---------- Info blocks ---------- */
.info-strip { display: grid; gap: 10px; margin-top: 18px; }

.info-panel, .info-copy-block {
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.02) 0px,
      rgba(255, 255, 255, 0.02) 6px,
      transparent 6px,
      transparent 14px
    ),
    linear-gradient(180deg, rgba(20, 38, 26, 0.85), rgba(12, 24, 16, 0.85));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 16px 18px;
}

.info-panel h3, .info-copy-block h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.info-panel p, .info-copy-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.info-copy-block { margin-top: 18px; }

.footer-copy { margin-top: 0; margin-bottom: 16px; }

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(166, 242, 92, 0.14);
  border: 1px solid rgba(166, 242, 92, 0.4);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Featured (hero game) panel ---------- */
.feature-highlight {
  margin-top: 18px;
  padding: 12px;
}
.featured-spotlight { display: grid; gap: 12px; }
.feature-media {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #0a1322;
}
.feature-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.feature-content { display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 4px; }
.feature-content h2 { margin: 0; font-size: clamp(1.6rem, 5vw, 2.2rem); letter-spacing: -0.03em; }
.feature-meta, .cta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.feature-meta span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
}

/* ---------- Buttons ---------- */
.primary-btn, .ghost-btn, .filter-chip, .play-top-btn,
.detail-cta, .secondary-cta {
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.primary-btn, .detail-cta {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #06130a;
  padding: 12px 18px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(102, 192, 107, 0.28);
}
.ghost-btn, .secondary-cta {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 12px 18px;
  font-weight: 700;
}

.primary-btn:hover, .ghost-btn:hover, .filter-chip:hover,
.play-top-btn:hover, .detail-cta:hover, .secondary-cta:hover,
.primary-btn:focus-visible, .ghost-btn:focus-visible,
.filter-chip:focus-visible, .play-top-btn:hover,
.detail-cta:focus-visible, .secondary-cta:focus-visible {
  transform: translateY(-1px);
}

/* ---------- Game grid ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.game-grid.compact .game-card { min-height: 0; }

.game-card {
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.02) 0px,
      rgba(255, 255, 255, 0.02) 6px,
      transparent 6px,
      transparent 14px
    ),
    linear-gradient(180deg, rgba(20, 38, 26, 0.95), rgba(10, 20, 14, 0.95));
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.game-card-link { display: block; height: 100%; }

.game-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1.1;
  overflow: hidden;
  background: #0a1322;
}
.game-cover img { width: 100%; height: 100%; object-fit: cover; }

.game-card-body { padding: 10px 10px 12px; }
.card-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 8px;
}
.game-icon { font-size: 1.3rem; }
.game-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 224, 102, 0.14);
  color: #ffe066;
  font-size: 0.7rem;
  font-weight: 700;
}
.game-card h3 { margin: 0 0 6px; font-size: 1rem; }
.game-subtitle { margin: 0 0 8px; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }
.game-stats {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; color: var(--muted); font-size: 0.72rem;
}
.game-stats strong { color: var(--text); font-weight: 700; }

/* new badge for newest games */
.game-new-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(135deg, var(--secondary), #ffb84a);
  color: #2b1a00;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 999px;
  letter-spacing: 0.06em;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(255, 180, 71, 0.45);
}

/* ---------- Category intro grid ---------- */
.category-intro {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.category-card {
  position: relative;
  display: block;
  border-radius: 18px;
  border: 1px solid var(--border);
  overflow: hidden;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.025) 0px,
      rgba(255, 255, 255, 0.025) 2px,
      transparent 2px,
      transparent 6px
    ),
    linear-gradient(180deg, rgba(20, 38, 26, 0.92), rgba(10, 20, 14, 0.92));
  padding: 16px 14px;
  min-height: 116px;
  text-decoration: none;
}
.category-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--cat-accent, var(--primary));
}
.category-card .cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  font-size: 1.3rem;
}
.category-card .cat-icon svg { width: 26px; height: 26px; fill: var(--cat-accent, var(--primary)); }
.category-card h4 {
  margin: 0 0 4px;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.category-card p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}
.category-card .cat-count {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.7rem;
  color: var(--cat-accent, var(--primary));
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* ---------- Catalog / list ---------- */
.catalog { margin-top: 12px; }
.filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px;
  margin-top: 12px;
}
.filter-chip {
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 8px 12px;
  font-weight: 700;
}
.filter-chip.active {
  background: rgba(166, 242, 92, 0.14);
  border-color: rgba(166, 242, 92, 0.4);
  color: var(--primary);
}

/* ---------- Ad slot ---------- */
.ad-slot { margin-top: 18px; padding: 8px 0; }

/* ---------- Detail page ---------- */
.game-detail { padding: 16px; margin-top: 16px; }
.detail-top { display: flex; flex-direction: column; gap: 14px; }
.detail-cover {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #0a1322;
}
.detail-cover img { width: 100%; aspect-ratio: 1 / 1.1; object-fit: cover; }
.detail-meta { display: flex; flex-direction: column; gap: 8px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-badges span, .badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.7rem;
}
.detail-meta h1 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.3rem); }
.detail-meta .tagline { color: var(--muted); }
.detail-score { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.score-pill {
  display: inline-flex; align-items: center; gap: 5px;
  color: #ffe066; font-weight: 800;
}
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.detail-content {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.detail-grid { display: grid; gap: 16px; }

.instructions, .review-list, .policy-card, .contact-card {
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.02) 0px,
      rgba(255, 255, 255, 0.02) 6px,
      transparent 6px,
      transparent 14px
    ),
    linear-gradient(180deg, rgba(20, 38, 26, 0.85), rgba(12, 24, 16, 0.85));
  border: 1px solid var(--border);
  border-radius: 18px;
}
.instructions { padding: 14px 14px 8px; }
.instructions h3, .policy-card h2, .contact-item h2 { margin: 0 0 10px; }
.instructions ol { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.7; }
.instructions li + li { margin-top: 6px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag-list span {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(108, 212, 73, 0.10);
  color: var(--primary-2);
  border: 1px solid rgba(108, 212, 73, 0.32);
  font-size: 0.72rem;
  text-transform: capitalize;
}

.review-list { padding: 14px; }
.review-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.review-item:last-child { border-bottom: none; }
.review-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 6px;
}
.review-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.review-date { color: var(--muted); font-size: 0.72rem; }
.review-stars { color: #ffe066; letter-spacing: 0.06em; font-size: 0.8rem; }
.review-text { margin: 0; color: var(--muted); line-height: 1.7; }

/* ---------- Policy / Contact ---------- */
.policy-page, .contact-card { padding-top: 14px; }
.policy-card, .contact-card { padding: 18px 16px 20px; }
.policy-card h1, .contact-card h1 { margin-bottom: 12px; }
.policy-card h2 { margin-top: 18px; font-size: 1.1rem; }

.contact-grid { display: grid; gap: 12px; margin: 18px 0; }
.contact-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 12px;
}
.contact-form { display: grid; gap: 12px; margin-top: 12px; }
.contact-form label { display: grid; gap: 8px; color: var(--muted); font-weight: 600; }
.contact-form input, .contact-form textarea {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(8, 12, 22, 0.8);
  color: var(--text);
  padding: 12px 14px;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 22px 14px 34px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(10, 20, 14, 0.6), rgba(8, 14, 10, 0.95));
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}
.footer-links a { color: var(--text); font-weight: 600; }
.footer-contact {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.78rem;
  margin-bottom: 8px;
  color: var(--muted);
}

/* ---------- Play page ---------- */
.play-page-body { background: #02060c; }
.play-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(2, 5, 12, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.play-top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 42px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
}
.back-btn { border-radius: 12px; font-size: 1.4rem; }
.home-btn { border-radius: 12px; padding: 0 14px; }
.play-title {
  min-width: 0;
  flex: 1;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.play-frame-wrap {
  position: relative;
  width: 100%;
  height: calc(100vh - 72px);
  background: #000;
}
#gameFrame { width: 100%; height: 100%; border: 0; background: #000; }
