/* ==========================================================================
   ANVORA GAMES — Core Stylesheet
   Design system: dark glassmorphic sci-fi portal, neon blue → purple glow
   ========================================================================== */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  /* surfaces */
  --bg-void: #050512;
  --bg-deep: #090a1c;
  --bg-deep-2: #0d0f26;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.09);
  --surface-hover: rgba(255, 255, 255, 0.075);
  --border-glass: rgba(255, 255, 255, 0.10);
  --border-glow: rgba(120, 160, 255, 0.35);

  /* neon accents */
  --neon-blue: #3fd8ff;
  --neon-blue-2: #4d7fff;
  --neon-purple: #b565ff;
  --neon-purple-2: #7c3aed;
  --gradient-primary: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-blue-2) 45%, var(--neon-purple) 100%);
  --gradient-soft: linear-gradient(135deg, rgba(63, 216, 255, 0.18), rgba(181, 101, 255, 0.18));
  --gradient-text: linear-gradient(100deg, #6be2ff 0%, #8f9bff 45%, #cf8dff 100%);

  /* text */
  --text-primary: #f3f4fc;
  --text-muted: #9aa0c2;
  --text-dim: #6a6f92;

  /* status */
  --success: #33e39a;
  --warn: #ffb648;
  --danger: #ff5f7e;

  /* metrics */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --nav-h: 76px;
  --container: 1240px;
  --ease: cubic-bezier(.16, .84, .44, 1);
  --shadow-glow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 20px 60px -20px rgba(80, 80, 255, 0.35);
}

html[data-theme="light"] {
  --bg-void: #f4f5fb;
  --bg-deep: #eceef8;
  --bg-deep-2: #e4e7f5;
  --surface: rgba(20, 20, 45, 0.045);
  --surface-strong: rgba(20, 20, 45, 0.07);
  --surface-hover: rgba(20, 20, 45, 0.09);
  --border-glass: rgba(20, 20, 45, 0.10);
  --border-glow: rgba(90, 110, 255, 0.35);
  --text-primary: #12132a;
  --text-muted: #4c5170;
  --text-dim: #7a7fa0;
  --shadow-glow: 0 0 0 1px rgba(20, 20, 45, 0.06), 0 20px 60px -20px rgba(80, 80, 255, 0.20);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(1100px 600px at 12% -10%, rgba(77, 127, 255, 0.16), transparent 60%),
    radial-gradient(900px 700px at 90% 10%, rgba(181, 101, 255, 0.14), transparent 55%),
    var(--bg-void);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
  min-height: 100vh;
}

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

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input,
textarea {
  font-family: inherit;
}

::selection {
  background: rgba(181, 101, 255, 0.35);
  color: #fff;
}

h1,
h2,
h3,
h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--neon-blue);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gradient-primary);
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease);
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px) scale(.98);
}

.btn-primary {
  color: #04040c;
  background: var(--gradient-primary);
  background-size: 160% 160%;
  box-shadow: 0 10px 30px -8px rgba(90, 120, 255, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.btn-primary:hover {
  background-position: 100% 0;
  box-shadow: 0 14px 40px -6px rgba(140, 110, 255, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--text-primary);
  background: var(--surface);
  border-color: var(--border-glass);
  backdrop-filter: blur(14px);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -14px rgba(80, 120, 255, 0.5);
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-sm {
  padding: 10px 18px;
  font-size: .82rem;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: rgba(6, 7, 18, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--border-glass);
  transition: background-color .4s var(--ease), border-color .4s var(--ease);
}

html[data-theme="light"] .site-header {
  background: rgba(244, 245, 251, 0.65);
}

.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: .01em;
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-word small {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: .58rem;
  letter-spacing: .32em;
  color: var(--text-dim);
  font-weight: 500;
  margin-top: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  position: relative;
  padding: 10px 16px;
  font-size: .92rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  transition: color .3s var(--ease), background .3s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--surface);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 5px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  transition: border-color .3s var(--ease), background .3s var(--ease), width .3s var(--ease);
  width: 200px;
}

.search-box:focus-within {
  border-color: var(--border-glow);
  background: var(--surface-hover);
  width: 230px;
}

.search-box svg {
  width: 16px;
  height: 16px;
  color: var(--text-dim);
  flex-shrink: 0;
}

.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: .86rem;
  width: 100%;
}

.search-box input::placeholder {
  color: var(--text-dim);
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-glow);
  transform: translateY(-1px);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn .icon-moon {
  display: block;
}

.icon-btn .icon-sun {
  display: none;
}

html[data-theme="light"] .icon-btn .icon-moon {
  display: none;
}

html[data-theme="light"] .icon-btn .icon-sun {
  display: block;
}

.nav-burger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: var(--surface);
  position: relative;
}

.nav-burger span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform .35s var(--ease), opacity .35s var(--ease), top .35s var(--ease);
}

.nav-burger span:nth-child(1) {
  top: 15px;
}

.nav-burger span:nth-child(2) {
  top: 21px;
}

.nav-burger span:nth-child(3) {
  top: 27px;
}

.nav-burger.open span:nth-child(1) {
  top: 20px;
  transform: rotate(45deg);
}

.nav-burger.open span:nth-child(2) {
  opacity: 0;
}

.nav-burger.open span:nth-child(3) {
  top: 20px;
  transform: rotate(-45deg);
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 60px) 24px 100px;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-glow {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  width: 900px;
  height: 900px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(90, 110, 255, 0.16), transparent 60%);
  filter: blur(10px);
}

.portal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%);
  width: min(78vw, 780px);
  height: min(78vw, 780px);
  z-index: 0;
  pointer-events: none;
  opacity: .75;
}

.portal svg {
  width: 100%;
  height: 100%;
}

.portal-ring {
  transform-origin: center;
  animation: spin 40s linear infinite;
}

.portal-ring.rev {
  animation-direction: reverse;
  animation-duration: 60s;
}

.portal-ring.slow {
  animation-duration: 90s;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero .eyebrow {
  justify-content: center;
  margin-bottom: 22px;
}

.hero .eyebrow::before {
  display: none;
}

.hero-title {
  font-size: clamp(3rem, 9vw, 6.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: .98;
  margin-bottom: 22px;
}

.hero-title span {
  display: block;
}

.hero-subtitle {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 42px;
  line-height: 1.45;
}

.hero-subtitle strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.hero-stats .stat {
  padding: 0 28px;
  text-align: left;
}

.hero-stats .stat+.stat {
  border-left: 1px solid var(--border-glass);
}

.hero-stats .stat b {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.hero-stats .stat span {
  font-size: .76rem;
  color: var(--text-dim);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.scroll-cue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  z-index: 2;
}

.scroll-cue .line {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--neon-blue), transparent);
  animation: scrollcue 2s var(--ease) infinite;
}

@keyframes scrollcue {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }

  50% {
    transform: scaleY(1);
    transform-origin: top;
  }

  50.01% {
    transform-origin: bottom;
  }

  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */
section {
  position: relative;
  padding: 120px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-top: 14px;
}

.section-head p {
  color: var(--text-muted);
  max-width: 480px;
}

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

.game-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(14px);
  transition: transform .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease);
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.game-thumb {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.game-thumb .art {
  width: 100%;
  height: 100%;
  transition: transform .6s var(--ease);
}

.game-card:hover .game-thumb .art {
  transform: scale(1.08) rotate(1deg);
}

.game-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5, 5, 18, 0.85) 100%);
}

.badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-family: 'JetBrains Mono', monospace;
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(8px);
}

.badge-live {
  background: rgba(51, 227, 154, 0.16);
  color: var(--success);
  border: 1px solid rgba(51, 227, 154, 0.35);
}

.badge-soon {
  background: rgba(255, 182, 72, 0.14);
  color: var(--warn);
  border: 1px solid rgba(255, 182, 72, 0.32);
}

.badge-cat {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  font-size: .68rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  backdrop-filter: blur(8px);
}

.game-info {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.game-info h3 {
  font-size: 1.2rem;
}

.game-info p {
  color: var(--text-muted);
  font-size: .9rem;
  flex: 1;
}

.game-info .btn {
  margin-top: 8px;
  align-self: flex-start;
}

/* thumbnail original art (CSS-generated, no external images) */
.art {
  position: relative;
  background: var(--bg-deep-2);
}

.art-snake {
  background: radial-gradient(circle at 30% 20%, rgba(63, 216, 255, 0.35), transparent 55%), linear-gradient(135deg, #0c3b45, #071019);
}

.art-space {
  background: radial-gradient(circle at 70% 30%, rgba(181, 101, 255, 0.4), transparent 55%), linear-gradient(135deg, #1c0c3d, #070313);
}

.art-racer {
  background: radial-gradient(circle at 25% 70%, rgba(255, 182, 72, 0.32), transparent 55%), linear-gradient(135deg, #3d1c0c, #0f0703);
}

.art-brick {
  background: radial-gradient(circle at 75% 75%, rgba(51, 227, 154, 0.32), transparent 55%), linear-gradient(135deg, #0c3d2c, #030f09);
}

.art-glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: 'Space Grotesk';
  font-weight: 700;
  font-size: 3.4rem;
  color: rgba(255, 255, 255, 0.14);
  letter-spacing: -.02em;
}

/* ---------- Category chips ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}

.cat-card {
  padding: 26px 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform .4s var(--ease), border-color .4s var(--ease), background .4s var(--ease);
  cursor: pointer;
}

.cat-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  background: var(--surface-hover);
}

[data-filter-chip] {
  width: 100%;
  text-align: left;
}

[data-filter-chip].active {
  border-color: var(--border-glow);
  background: var(--surface-hover);
  box-shadow: 0 0 0 1px rgba(120, 160, 255, 0.15);
}

[data-filter-chip].active .cat-icon {
  background: var(--gradient-primary);
  color: #04040c;
}

.cat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--gradient-soft);
  color: var(--neon-blue);
}

.cat-icon svg {
  width: 22px;
  height: 22px;
}

.cat-card h4 {
  font-size: 1.02rem;
}

.cat-card span {
  font-size: .78rem;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}

/* ---------- Feature strip ---------- */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-item {
  padding: 32px 26px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-glass);
}

.feature-item .cat-icon {
  margin-bottom: 20px;
}

.feature-item h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.feature-item p {
  color: var(--text-muted);
  font-size: .92rem;
}

/* ---------- CTA band ---------- */
.cta-band {
  border-radius: var(--radius-lg);
  padding: 70px 40px;
  text-align: center;
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(63, 216, 255, 0.16), transparent 60%),
    radial-gradient(600px 300px at 80% 100%, rgba(181, 101, 255, 0.16), transparent 60%),
    var(--surface);
  border: 1px solid var(--border-glass);
  position: relative;
  overflow: hidden;
}

.cta-band h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 16px;
}

.cta-band p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 32px;
}

/* ==========================================================================
   PAGE HEADER (interior pages)
   ========================================================================== */
.page-hero {
  padding: calc(var(--nav-h) + 90px) 0 80px;
  text-align: center;
  position: relative;
}

.page-hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  margin-top: 16px;
}

.page-hero p {
  max-width: 640px;
  margin: 18px auto 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ==========================================================================
   ABOUT PAGE
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 60px;
  align-items: center;
}

.about-copy h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  margin-bottom: 20px;
}

.about-copy p {
  color: var(--text-muted);
  margin-bottom: 18px;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.about-visual {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border-glass);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.about-visual svg {
  width: 70%;
  height: 70%;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 60px;
}

.value-card {
  padding: 26px 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-glass);
  text-align: left;
}

.value-card .num {
  font-family: 'JetBrains Mono', monospace;
  color: var(--neon-blue);
  font-size: .78rem;
  letter-spacing: .1em;
  margin-bottom: 14px;
  display: block;
}

.value-card h4 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.value-card p {
  font-size: .86rem;
  color: var(--text-muted);
}

.timeline {
  margin-top: 70px;
  border-left: 1px solid var(--border-glass);
  padding-left: 36px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -42px;
  top: 4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--gradient-primary);
  box-shadow: 0 0 0 4px rgba(80, 120, 255, 0.15);
}

.timeline-item b {
  font-family: 'JetBrains Mono', monospace;
  color: var(--neon-blue);
  font-size: .8rem;
  display: block;
  margin-bottom: 6px;
}

.timeline-item p {
  color: var(--text-muted);
  max-width: 560px;
}

/* ==========================================================================
   CONTACT PAGE
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 38px;
  backdrop-filter: blur(14px);
}

.field {
  margin-bottom: 22px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .02em;
}

.field input,
.field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text-primary);
  outline: none;
  transition: border-color .3s var(--ease), background .3s var(--ease);
  font-size: .95rem;
}

html[data-theme="light"] .field input,
html[data-theme="light"] .field textarea {
  background: rgba(20, 20, 45, 0.02);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--border-glow);
  background: rgba(255, 255, 255, 0.05);
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

.form-note {
  font-size: .78rem;
  color: var(--text-dim);
  margin-top: 10px;
}

.form-success {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(51, 227, 154, 0.12);
  border: 1px solid rgba(51, 227, 154, 0.3);
  color: var(--success);
  font-size: .88rem;
  margin-top: 18px;
}

.form-success.show {
  display: flex;
}

.contact-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-card {
  padding: 26px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.info-card .cat-icon {
  flex-shrink: 0;
}

.info-card h4 {
  font-size: .98rem;
  margin-bottom: 4px;
}

.info-card p {
  color: var(--text-muted);
  font-size: .88rem;
}

.social-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.social-row a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border-glass);
  transition: transform .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
  color: var(--text-muted);
}

.social-row a:hover {
  transform: translateY(-3px);
  border-color: var(--border-glow);
  color: var(--neon-blue);
}

.social-row svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   LEGAL PAGES
   ========================================================================== */
.legal-body {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.legal-body h2 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.legal-body p,
.legal-body li {
  color: var(--text-muted);
  margin-bottom: 10px;
}

.legal-body ul {
  padding-left: 20px;
  list-style: disc;
}

.legal-body .updated {
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem;
  color: var(--text-dim);
  letter-spacing: .05em;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-glass);
  padding: 70px 0 30px;
  position: relative;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: .9rem;
  margin-top: 16px;
  max-width: 280px;
}

.footer-col h5 {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 18px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: .9rem;
  transition: color .3s var(--ease);
}

.footer-col a:hover {
  color: var(--neon-blue);
}

.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-bottom p {
  color: var(--text-dim);
  font-size: .84rem;
}

.footer-bottom .dev-credit {
  color: var(--text-muted);
}

.footer-bottom .dev-credit b {
  color: var(--neon-blue);
  font-weight: 600;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  transition: color .3s var(--ease), border-color .3s var(--ease);
}

.footer-social a:hover {
  color: var(--neon-blue);
  border-color: var(--border-glow);
}

.footer-social svg {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   PAGE LOADER
   ========================================================================== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: var(--bg-void);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .6s var(--ease), visibility .6s var(--ease);
}

.loader.hide {
  opacity: 0;
  visibility: hidden;
}

.loader-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--neon-blue);
  border-right-color: var(--neon-purple);
  animation: spin 1s linear infinite;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 980px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-visual {
    order: -1;
    max-width: 340px;
    margin: 0 auto;
  }

  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .feature-strip {
    grid-template-columns: 1fr;
  }
}

.nav-mobile {
  display: none;
}

@media (max-width: 860px) {

  .nav-links,
  .search-box {
    display: none;
  }

  .nav-burger {
    display: block;
  }

  .nav-mobile {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(8, 9, 22, 0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    padding: 20px 24px 30px;
    flex-direction: column;
    gap: 6px;
    transform: translateY(-12px);
    opacity: 0;
    transition: opacity .35s var(--ease), transform .35s var(--ease);
    z-index: 999;
  }

  html[data-theme="light"] .nav-mobile {
    background: rgba(244, 245, 251, 0.98);
  }

  .nav-mobile.open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
  }

  .nav-mobile a {
    padding: 14px 6px;
    font-size: 1.02rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border-glass);
    color: var(--text-muted);
  }

  .nav-mobile a.active {
    color: var(--neon-blue);
  }

  .nav-mobile .search-box {
    display: flex;
    width: 100%;
    margin-top: 14px;
  }
}

@media (max-width: 640px) {
  .hero-stats {
    gap: 10px 0;
  }

  .hero-stats .stat {
    padding: 0 16px;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  section {
    padding: 80px 0;
  }

  .contact-form {
    padding: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Snake Master thumbnail */
.art-snake {
  overflow: hidden;
}

.art-snake img {

  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.game-thumbnail-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* Game thumbnail images */
.game-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.game-thumbnail-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.game-thumb {
  height: 200px;
  overflow: hidden;
}

.game-thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==========================================================
   GAME FILTER / SEARCH FIX
   ========================================================== */

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
  width: 100%;
}

.game-card {
  width: 100%;
  min-width: 0;
  height: auto;
  display: flex;
  flex-direction: column;
}

.game-card[hidden] {
  display: none !important;
}

.game-thumb {
  width: 100%;
  overflow: hidden;
  flex-shrink: 0;
}

@media (max-width: 1100px) {
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .game-grid {
    grid-template-columns: 1fr;
  }
}
/* ==========================================================
   FINAL GAME GRID / SEARCH FIX
   ========================================================== */

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
  width: 100%;
  align-items: start;
}

.game-card {
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-self: start;
}

.game-card[hidden] {
  display: none !important;
}

.game-thumb {
  position: relative;
  width: 100%;
  height: 200px;
  min-height: 200px;
  aspect-ratio: auto;
  overflow: hidden;
  flex-shrink: 0;
}

.game-thumb .art {
  width: 100%;
  height: 100%;
}

.game-info {
  width: 100%;
  min-height: 190px;
  display: flex;
  flex-direction: column;
}

.game-info p {
  flex: 1;
}

.game-thumbnail-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Tablet */
@media (max-width: 1100px) {
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile */
@media (max-width: 640px) {
  .game-grid {
    grid-template-columns: 1fr;
  }

  .game-thumb {
    height: 200px;
    min-height: 200px;
  }
}