/* ============ GamerBhaijaan (working title) — site design system ============ */

:root {
  --bg: #0b0e14;
  --bg-2: #0f1420;
  --card: #141a28;
  --card-2: #181f31;
  --border: #232b3d;
  --border-soft: #1c2333;
  --text: #e8ebf2;
  --muted: #9aa5bd;
  --faint: #6b7690;
  --accent: #7c5cff;
  --accent-2: #ff5c8a;
  --green: #3ddc97;
  --yellow: #ffd166;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 45px -20px rgba(0, 0, 0, .65);
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: .01em;
  margin: 0 0 .5em;
  color: #fff;
}

.container { width: min(1120px, 92%); margin-inline: auto; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 14, 20, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.navbar { display: flex; align-items: center; gap: 22px; min-height: 64px; }

.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 20px; color: #fff; letter-spacing: .02em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; }

.nav-links { display: flex; gap: 4px; margin-left: auto; }

.nav-links a {
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 9px;
}
.nav-links a:hover { color: #fff; background: var(--card); text-decoration: none; }
.nav-links a[aria-current="page"] { color: #fff; background: var(--card); }

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 9px 16px !important;
  border-radius: 10px !important;
  margin-left: 8px;
}
.nav-cta:hover { filter: brightness(1.1); }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--border); border-radius: 9px;
  color: var(--text); padding: 8px 12px; cursor: pointer; font-size: 18px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 56px;
}
.hero::before {
  content: "";
  position: absolute; inset: -40% -10% 0 -10%;
  background:
    radial-gradient(42% 55% at 18% 0%, rgba(124, 92, 255, .22), transparent 60%),
    radial-gradient(38% 50% at 82% 8%, rgba(255, 92, 138, .16), transparent 60%),
    radial-gradient(30% 45% at 55% 100%, rgba(61, 220, 151, .12), transparent 60%);
  pointer-events: none;
}
.hero .container { position: relative; display: grid; gap: 40px; align-items: center; }

.hero h1 {
  font-size: clamp(34px, 6vw, 62px);
  margin-bottom: 14px;
}
.hero h1 .grad {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: 24px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 16px/1 var(--font-display);
  padding: 14px 22px; border-radius: 12px; cursor: pointer;
  border: 1px solid transparent;
  color: #0b0e14;
}
.btn--primary { background: var(--green); }
.btn--primary:hover { filter: brightness(1.08); text-decoration: none; }
.btn--ghost { background: transparent; color: #fff; border-color: var(--border); }
.btn--ghost:hover { background: var(--card); text-decoration: none; }
.btn--block { width: 100%; justify-content: center; }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 26px;
  color: var(--faint); font-size: 14px; font-weight: 600;
  margin-top: 6px;
}
.hero-stats b { display: block; color: #fff; font-size: 20px; font-family: var(--font-display); }

.hero-search {
  margin-top: 26px;
  display: flex; gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px;
  max-width: 480px;
}
.hero-search input {
  flex: 1; background: none; border: 0; outline: 0;
  color: var(--text); font: inherit; padding: 10px 12px;
}
.hero-search input::placeholder { color: var(--faint); }
.hero-search .btn { border-radius: 10px; }

/* ---------- Sections ---------- */
.section { padding: 48px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(22px, 3.4vw, 32px); margin-bottom: 4px; }
.section-head p { color: var(--muted); margin: 0; }
.section-head .more { font-weight: 700; font-size: 15px; white-space: nowrap; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  font: 600 14px/1 var(--font-body); padding: 9px 15px; border-radius: 999px; cursor: pointer;
  transition: all .15s ease;
}
.pill:hover { color: #fff; border-color: var(--accent); }
.pill[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: #fff;
}

/* ---------- Game cards ---------- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }

.game-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.game-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: var(--shadow); }
.game-card:hover .game-card__thumb img { transform: scale(1.06); }

.game-card__thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-2); }
.game-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.game-card__tag {
  position: absolute; top: 12px; left: 12px;
  background: rgba(11, 14, 20, .7);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .05em;
  padding: 5px 10px; border-radius: 999px;
}
.game-card__tag--featured { background: var(--green); color: #06130c; border: 0; }

.game-card__body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.game-card__body h3 { font-size: 18px; margin: 0; }
.game-card__body p { color: var(--muted); font-size: 14px; margin: 0 0 10px; flex: 1; }
.game-card__meta { display: flex; gap: 10px; color: var(--faint); font-size: 12.5px; font-weight: 600; }

/* ---------- Play page ---------- */
.play-wrap { display: grid; gap: 26px; padding: 34px 0 20px; }
.play-frame {
  position: relative;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.play-frame iframe {
  display: block; width: 100%; aspect-ratio: 16 / 10; max-height: 78vh;
  border: 0; background: #0b0e14;
}
.play-frame--tall iframe { aspect-ratio: 4 / 4.4; max-height: 82vh; }
.play-frame__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--bg-2); border-top: 1px solid var(--border-soft);
  padding: 10px 14px;
}
.play-frame__bar .hint { color: var(--faint); font-size: 13px; }
.icon-btn {
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  font: 700 13px/1 var(--font-body); padding: 9px 14px; border-radius: 9px; cursor: pointer;
}
.icon-btn:hover { background: var(--card-2); }
.icon-btn--ghost { background: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.play-title h1 { font-size: clamp(24px, 4vw, 38px); margin-bottom: 6px; }
.play-title .meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--faint); font-size: 14px; font-weight: 600; }
.chip {
  background: var(--card); border: 1px solid var(--border);
  padding: 5px 12px; border-radius: 999px; color: var(--muted); font-size: 12.5px;
}

.article-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.article-card {
  background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 22px; transition: transform .18s ease, border-color .18s ease;
}
.article-card:hover { transform: translateY(-4px); border-color: var(--accent-2); }
.article-card .kicker { color: var(--accent-2); font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.article-card h3 { font-size: 19px; margin: 8px 0 8px; }
.article-card p { color: var(--muted); font-size: 14.5px; margin: 0 0 12px; }
.article-card .more { font-weight: 700; font-size: 14px; }

/* ---------- Content / article ---------- */
.page { padding: 46px 0 60px; }
.page-header { margin-bottom: 30px; }
.page-header h1 { font-size: clamp(26px, 4.5vw, 44px); }
.page-header .kicker { color: var(--accent-2); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }

.prose { max-width: 720px; }
.prose h2 { font-size: 24px; margin-top: 1.7em; }
.prose h3 { font-size: 19px; margin-top: 1.4em; }
.prose p { color: #c6cde0; margin: 0 0 1.1em; }
.prose ul, .prose ol { color: #c6cde0; margin: 0 0 1.2em; padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose strong { color: #fff; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  background: var(--card);
  margin: 1.4em 0; padding: 14px 18px; border-radius: 0 12px 12px 0;
  color: var(--muted);
}
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.prose th { background: var(--card); color: #fff; }

.controls-table td:first-child { font-weight: 700; color: #fff; min-width: 160px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 16px; max-width: 560px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font: inherit; padding: 12px 14px; outline: 0;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }

/* ---------- Split / info panels ---------- */
.info-panel {
  background: linear-gradient(160deg, var(--card), var(--bg-2));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px;
}
.info-panel h3 { margin-top: 0; font-size: 17px; }
.info-panel ul { margin: 0; padding-left: 1.2em; color: var(--muted); }
.info-panel li { margin-bottom: .5em; }

.badge-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border-soft); padding: 46px 0 30px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.footer-grid h4 { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.footer-grid a { display: block; color: var(--muted); font-size: 14.5px; margin-bottom: 9px; }
.footer-grid a:hover { color: #fff; text-decoration: none; }
.footer-note { color: var(--faint); font-size: 13.5px; max-width: 42ch; }
.footer-bottom {
  margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--border-soft);
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; color: var(--faint); font-size: 13.5px;
}

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 90px 0 70px; }
.notfound .big { font-family: var(--font-display); font-size: clamp(70px, 14vw, 140px); line-height: 1; font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 2px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 12px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-links .nav-cta { margin-left: 0; text-align: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .play-frame iframe { aspect-ratio: 16/10; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 36px 0; }
  .hero { padding: 48px 0 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
}