:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-glass: rgba(255, 255, 255, 0.7);
  --color-glass-border: rgba(255, 255, 255, 0.65);
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-line: rgba(15, 23, 42, 0.08);
  --color-accent: #7c3aed;
  --color-accent-soft: #a78bfa;
  --color-cta: #f97316;
  --color-cta-ink: #ffffff;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --shadow-soft: 0 4px 20px rgba(15, 23, 42, 0.06);
  --shadow-lift: 0 12px 32px rgba(124, 58, 237, 0.12);
  --font-head: 'Outfit', system-ui, sans-serif;
  --font-body: 'Work Sans', system-ui, sans-serif;
  --container: 1120px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

::selection { background: var(--color-accent-soft); color: #fff; }

/* ===== Background glow ===== */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bg-glow__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.bg-glow__blob--violet {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #c4b5fd 0%, transparent 70%);
  top: -120px;
  right: -80px;
}

.bg-glow__blob--orange {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, #fed7aa 0%, transparent 70%);
  bottom: -100px;
  left: -60px;
  opacity: 0.3;
}

@media (prefers-reduced-motion: reduce) {
  .bg-glow__blob { filter: blur(80px); }
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  background: rgba(248, 250, 252, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-line);
}

.site-header nav {
  display: flex;
  gap: 28px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.95rem;
}

.site-header nav a {
  color: var(--color-muted);
  transition: color 0.2s;
}

.site-header nav a:hover { color: var(--color-accent); }

.lang-switch {
  border: 1px solid var(--color-line);
  background: var(--color-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--color-text);
  padding: 7px 16px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.lang-switch:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* ===== Hero ===== */
.hero {
  padding: 72px 28px 48px;
  max-width: var(--container);
  margin-inline: auto;
}

.hero__inner {
  max-width: 720px;
}

.hero__eyebrow {
  margin: 0 0 14px;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  animation: fadeUp 0.7s var(--ease-out) both;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 700;
  margin-bottom: 16px;
  animation: fadeUp 0.7s var(--ease-out) 0.06s both;
}

.hero__subtitle {
  margin: 0 0 30px;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--color-muted);
  max-width: 520px;
  animation: fadeUp 0.7s var(--ease-out) 0.12s both;
}

.hero__terms {
  margin: 0 0 30px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-muted);
  width: 100%;
  max-width: none;
  opacity: 0.85;
  animation: fadeUp 0.7s var(--ease-out) 0.15s both;
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  animation: fadeUp 0.7s var(--ease-out) 0.18s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s var(--ease-out), box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}

.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.25);
}

.btn--primary:hover {
  background: #6d28d9;
  box-shadow: 0 10px 26px rgba(124, 58, 237, 0.35);
}

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

.btn--ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.hero__meta {
  list-style: none;
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--color-line);
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-muted);
  animation: fadeUp 0.7s var(--ease-out) 0.24s both;
}

.hero__meta li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero__meta li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent-soft);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Section heads ===== */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--color-line);
}

.section-eyebrow {
  display: block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 6px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}

/* ===== Games ===== */
.games-section {
  padding: 48px 28px;
  max-width: var(--container);
  margin-inline: auto;
}

.games-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .games-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .games-grid { grid-template-columns: repeat(3, 1fr); }
}

.game-card {
  background: var(--color-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.25s;
}

.game-card:hover,
.game-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--color-accent-soft);
  outline: none;
}

.game-card__cover {
  aspect-ratio: 9 / 16;
  background: #1a1a2e;
  overflow: hidden;
}

.game-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card__body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.game-card__genre {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.game-card__title {
  font-size: 1.2rem;
  margin: 0;
}

.game-card__desc {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin: 0;
  flex: 1;
}

.game-card__platforms {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 500;
  background: rgba(124, 58, 237, 0.08);
  color: var(--color-accent);
}

.pill::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent-soft);
}

/* ===== About ===== */
.about-section {
  padding: 48px 28px;
  max-width: var(--container);
  margin-inline: auto;
}

.about__mission {
  margin: 0 0 32px;
  font-family: var(--font-head);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 500;
  max-width: 620px;
  line-height: 1.45;
  color: var(--color-text);
}

.stats {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  background: var(--color-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.stat {
  flex: 1;
  min-width: 160px;
  padding: 22px 24px;
  border-right: 1px solid var(--color-line);
}

.stat:last-child { border-right: none; }

.stat__value {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  color: var(--color-text);
}

.stat__label {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}

@media (max-width: 640px) {
  .stats { flex-direction: column; }
  .stat { border-right: none; border-bottom: 1px solid var(--color-line); }
  .stat:last-child { border-bottom: none; }
}

/* ===== Footer ===== */
.site-footer {
  padding: 48px 28px 28px;
  max-width: var(--container);
  margin-inline: auto;
  border-top: 1px solid var(--color-line);
}

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 24px;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__brand p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.92rem;
}

.footer__links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.9rem;
}

.footer__links a {
  color: var(--color-muted);
  transition: color 0.2s;
}

.footer__links a:hover { color: var(--color-accent); }

.footer__copy {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--color-line);
  font-size: 0.8rem;
  color: var(--color-muted);
  letter-spacing: 0.02em;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.modal-overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  width: min(100%, 700px);
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
  transform: scale(0.97);
  transition: transform 0.25s var(--ease-out);
}

.modal-overlay[aria-hidden="false"] .modal { transform: scale(1); }

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--color-text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.modal__close:hover {
  background: var(--color-accent);
  color: #fff;
}

.modal__gallery {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 16px;
  background: var(--color-bg);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}

.modal__shot-stage {
  position: relative;
  width: auto;
  height: 480px;
  max-height: 60vh;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

.modal__shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s;
}

.modal__shot.is-active { opacity: 1; }

.modal__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-text);
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.modal__arrow:hover {
  background: var(--color-accent);
  color: #fff;
}

.modal__arrow--prev { left: 12px; }
.modal__arrow--next { right: 12px; }

.modal__dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.modal__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}

.modal__dot.is-active { background: var(--color-accent); }

.modal__content { padding: 24px 26px 28px; }

.modal__genre {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.modal__content h2 {
  margin: 8px 0 12px;
  font-size: 1.6rem;
}

.modal__content p {
  color: var(--color-muted);
  margin: 0 0 22px;
  font-size: 0.96rem;
}

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

.modal__objective {
  margin: 0 0 18px;
  color: var(--color-muted);
  font-size: 0.96rem;
  line-height: 1.5;
}

.modal__section-label {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 8px;
}

.modal__mechanics {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}

.modal__mechanics li {
  padding: 4px 0 4px 18px;
  position: relative;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--color-text);
}

.modal__mechanics li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

.modal__meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.modal__meta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.modal__meta-label {
  font-family: var(--font-head);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-right: 4px;
}

.modal__shot-state {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 4;
}

.games-loading,
.games-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--color-muted);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

@media (max-width: 767px) {
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal {
    max-height: 95vh;
    width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}

/* ===== Terms Modal ===== */
.modal--terms { width: min(100%, 720px); }
.modal__content--terms { padding: 32px 36px 36px; }

.terms__updated {
  font-size: 0.78rem;
  color: var(--color-muted);
  letter-spacing: 0.02em;
  margin: 0 0 20px;
}

.terms__body h3 {
  font-family: var(--font-head);
  font-size: 0.98rem;
  font-weight: 600;
  margin: 22px 0 8px;
  color: var(--color-text);
}

.terms__body h3:first-child { margin-top: 0; }

.terms__body p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--color-text);
  margin: 0 0 10px;
}

/* Slim rounded scrollbar so the modal's rounded right corners stay visible */
.modal--terms {
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, 0.35) transparent;
}

.modal--terms::-webkit-scrollbar {
  width: 8px;
}

.modal--terms::-webkit-scrollbar-track {
  background: transparent;
}

.modal--terms::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.35);
  border-radius: 999px;
}

.modal--terms::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 58, 237, 0.55);
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero h1, .hero__eyebrow, .hero__subtitle, .hero__actions, .hero__meta { animation: none; }
  html { scroll-behavior: auto; }
}