/* ===========================================
   GoNewGames (GNG) — Shared stylesheet
   Dark theme with neon accents
   =========================================== */

:root {
  --bg-primary: #0a0a12;
  --bg-secondary: #12121e;
  --bg-card: #181826;
  --border-color: #26263a;

  --text-primary: #eaeaf5;
  --text-secondary: #a4a4bd;
  --text-muted: #6e6e88;

  --accent-orange: #ff5a1f;
  --accent-pink: #ff2d78;
  --accent-purple: #8b2ff7;
  --accent-blue: #2d7bff;

  --gradient-logo: linear-gradient(90deg, var(--accent-blue), var(--accent-purple), var(--accent-pink));
  --gradient-cta: linear-gradient(90deg, var(--accent-orange), var(--accent-pink));

  --radius: 12px;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent-pink); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent-orange); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 18, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
}

.nav-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: .5px;
  background: var(--gradient-logo);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: .95rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text-primary); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: none;
    gap: 14px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
}

/* ---------- Page content ---------- */
.page-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.page-wrap.wide { max-width: var(--max-width); }

.page-title {
  font-size: 2rem;
  margin-bottom: 4px;
  background: var(--gradient-logo);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.page-updated {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 32px;
}

h2 {
  margin-top: 40px;
  font-size: 1.3rem;
  color: var(--text-primary);
  border-left: 3px solid var(--accent-pink);
  padding-left: 12px;
}

h3 { color: var(--text-primary); font-size: 1.05rem; margin-top: 24px; }

p, li { color: var(--text-secondary); }

ul, ol { padding-left: 22px; }

.callout {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent-orange);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 20px 0;
  font-size: .95rem;
}

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

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  padding: 16px 18px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: "+";
  color: var(--accent-pink);
  font-size: 1.3rem;
  margin-left: 12px;
}
.faq-item.open .faq-question::after { content: "–"; }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease, padding .25s ease;
  padding: 0 18px;
}
.faq-item.open .faq-answer {
  max-height: 400px;
  padding: 0 18px 18px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 24px;
}

.btn {
  display: inline-block;
  background: var(--gradient-cta);
  color: #fff;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease;
}
.btn:hover { opacity: .9; transform: translateY(-1px); color: #fff; }

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
}
.about-card h3 { margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  padding: 36px 20px 24px;
  margin-top: 60px;
}

.footer-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links a { color: var(--text-secondary); font-size: .9rem; }
.footer-links a:hover { color: var(--text-primary); }

.footer-disclaimer {
  max-width: var(--max-width);
  margin: 24px auto 0;
  color: var(--text-muted);
  font-size: .8rem;
  line-height: 1.5;
  border-top: 1px solid var(--border-color);
  padding-top: 18px;
}

.footer-disclaimer strong { color: var(--text-secondary); }

/* ---------- Cookie consent banner ---------- */
#cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 16px 20px;
  display: none;
}
#cookie-banner.show { display: block; }

.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-inner p {
  margin: 0;
  font-size: .85rem;
  color: var(--text-secondary);
  flex: 1 1 400px;
}

.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
.btn-outline:hover { color: var(--text-primary); border-color: var(--text-secondary); }

/* ===========================================
   Homepage-specific
   =========================================== */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

body.home { font-family: "Inter", "Segoe UI", sans-serif; }

.home h1, .home h2, .home h3, .home .brand-font {
  font-family: "Rajdhani", "Segoe UI", sans-serif;
  letter-spacing: .3px;
}

.brand-logo-img { height: 34px; width: auto; }

/* Site nav (home variant) */
.home .nav-wrap { padding: 12px 24px; }
.home .search-box {
  flex: 1 1 auto;
  max-width: 380px;
  margin: 0 24px;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 8px 16px;
}
.home .search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: .9rem;
  width: 100%;
}
.home .search-box input::placeholder { color: var(--text-muted); }
.home .nav-icons { display: flex; align-items: center; gap: 16px; }
.home .nav-icons button {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.15rem;
  cursor: pointer;
}
.home .nav-icons button:hover { color: var(--accent-pink); }

@media (max-width: 900px) {
  .home .search-box { display: none; }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 24px 90px;
  text-align: left;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 30%, rgba(45,123,255,.35), transparent 45%),
    radial-gradient(circle at 55% 15%, rgba(139,47,247,.30), transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(255,45,120,.30), transparent 45%);
  filter: blur(10px);
}
.hero-inner { max-width: var(--max-width); margin: 0 auto; }
.hero-eyebrow {
  color: var(--text-secondary);
  font-size: .95rem;
  margin-bottom: 10px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.1;
  max-width: 14ch;
  margin: 0 0 18px;
  color: var(--text-primary);
}
.hero h1 .accent {
  background: var(--gradient-logo);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  max-width: 46ch;
  font-size: 1.05rem;
  margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-ghost {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 600;
}
.btn-ghost:hover { border-color: var(--accent-purple); color: var(--text-primary); }

/* Section shell */
.section { max-width: var(--max-width); margin: 0 auto; padding: 46px 24px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.section-head h2 { margin: 0; border: none; padding: 0; font-size: 1.5rem; }
.section-head .view-all { font-size: .9rem; font-weight: 600; color: var(--text-secondary); }
.section-head .view-all:hover { color: var(--accent-pink); }

/* Category tabs */
.tabs { display: flex; gap: 24px; margin-bottom: 18px; border-bottom: 1px solid var(--border-color); }
.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: "Rajdhani", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0 0 12px;
  cursor: pointer;
  position: relative;
}
.tab-btn.active { color: var(--text-primary); }
.tab-btn.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--gradient-cta);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Rail (horizontal scroll) */
.rail-wrap { position: relative; }
.rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.rail::-webkit-scrollbar { display: none; }

.rail-arrow {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rail-arrow:hover { border-color: var(--accent-pink); }
.rail-prev { left: -10px; }
.rail-next { right: -10px; }
@media (max-width: 700px) { .rail-arrow { display: none; } }

/* Game tile */
.tile {
  position: relative;
  flex: 0 0 190px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.tile:hover {
  transform: translateY(-3px);
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 1px var(--accent-purple), 0 8px 24px -8px rgba(139,47,247,.5);
}
.tile-cover {
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: rgba(255,255,255,.85);
  text-align: center;
  padding: 10px;
}
.tile-body { padding: 10px 12px 14px; }
.tile-title {
  font-size: .92rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile-meta { display: flex; align-items: center; justify-content: space-between; }
.tile-price { font-weight: 700; color: var(--text-primary); font-size: .95rem; }
.tile-price .was { color: var(--text-muted); text-decoration: line-through; font-weight: 400; font-size: .8rem; margin-right: 6px; }
.tile-badge {
  position: absolute;
  top: 10px; left: 10px;
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  color: #fff;
  background: var(--gradient-cta);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.tile-wishlist {
  position: absolute;
  top: 8px; right: 8px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(10,10,18,.6);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
}
.tile-wishlist:hover { color: var(--accent-pink); }

/* Featured 3-up grid */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 800px) { .featured-grid { grid-template-columns: 1fr; } }
.featured-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  border: 1px solid var(--border-color);
}
.featured-card h3 {
  color: #fff;
  font-size: 1.3rem;
  margin: 0;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}

/* Promo strip */
.promo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 760px) { .promo-strip { grid-template-columns: 1fr; } }
.promo-card {
  border-radius: var(--radius);
  padding: 20px 22px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}
.promo-card .tag { font-size: .78rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.promo-card h3 { margin: 6px 0 0; font-size: 1.15rem; }
.promo-card.deals .tag { color: var(--accent-orange); }
.promo-card.new .tag { color: var(--accent-pink); }
.promo-card.gems .tag { color: var(--accent-purple); }

/* Sponsors */
.sponsor-row {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  opacity: .8;
}
.sponsor-row span {
  color: var(--text-muted);
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  border: 1px dashed var(--border-color);
  padding: 10px 20px;
  border-radius: 8px;
}

/* Dynamic tile link + empty/loading state (used once real data loads via app.js) */
a.tile { color: inherit; display: block; }
.rail-empty {
  color: var(--text-muted);
  font-size: .9rem;
  padding: 20px 4px;
}
.tile-badge.sponsored {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 600;
}
