:root {
  --bg: #050915;
  --bg-soft: #0a1020;
  --panel: #10172a;
  --panel-2: #141c30;
  --text: #f7f8ff;
  --muted: #aab3ca;
  --purple: #9b4dff;
  --purple-2: #c77dff;
  --cyan: #16e5ec;
  --border: rgba(255,255,255,.09);
  --shadow: 0 24px 70px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 90% 8%, rgba(110,66,255,.18), transparent 24rem),
    linear-gradient(180deg, #050915 0%, #080d18 45%, #050915 100%);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(5,9,21,.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.nav-wrap { height: 78px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 190px; }
.brand img { width: 46px; height: 46px; object-fit: cover; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,.35); }
.brand span { display: grid; line-height: 1; }
.brand strong { font-family: "Space Grotesk", sans-serif; font-size: 17px; letter-spacing: .08em; }
.brand small { color: var(--purple-2); font-weight: 800; letter-spacing: .28em; font-size: 10px; margin-top: 6px; }
.nav { display: flex; align-items: center; justify-content: center; gap: 28px; flex: 1; }
.nav a { color: #d8dced; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; transition: .2s ease; }
.nav a:hover, .nav a.active { color: var(--purple-2); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, #6e2df1, #a647ef); box-shadow: 0 14px 30px rgba(127,57,244,.25); }
.btn-outline { border: 1px solid rgba(180,91,255,.75); color: #d696ff; background: rgba(145,57,255,.06); }
.btn-secondary { border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.04); }

.hero {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  min-height: 640px;
  display: grid;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5,9,21,.98) 0%, rgba(5,9,21,.86) 39%, rgba(5,9,21,.36) 67%, rgba(5,9,21,.62) 100%),
    radial-gradient(circle at 68% 38%, rgba(125,58,255,.26), transparent 22rem),
    linear-gradient(180deg, #10182c, #060a16);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 220px;
  background: linear-gradient(180deg, transparent, rgba(1,4,11,.78));
}
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 50px; padding: 64px 0; }
.eyebrow { margin: 0 0 8px; color: var(--purple-2); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; }
.hero h1 { margin: 0; font-family: "Space Grotesk", sans-serif; font-size: clamp(60px, 7vw, 96px); line-height: .9; letter-spacing: -.05em; }
.hero h1 span { color: #a54cff; }
.hero-text { width: min(520px, 100%); margin: 28px 0 30px; color: #d7dbeb; font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-art { position: relative; min-height: 470px; display: grid; place-items: center; }
.hero-art img { width: min(470px, 86%); border-radius: 34px; transform: rotate(-1deg); box-shadow: 0 45px 80px rgba(0,0,0,.55), 0 0 80px rgba(139,70,255,.18); position: relative; z-index: 2; }
.logo-halo { position: absolute; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(circle, rgba(255,130,187,.25), rgba(124,61,255,.18) 44%, transparent 70%); filter: blur(4px); }
.hero-orb { position: absolute; border-radius: 999px; filter: blur(2px); opacity: .55; }
.hero-orb-a { width: 120px; height: 120px; right: 4%; top: 16%; background: rgba(255,117,196,.12); }
.hero-orb-b { width: 70px; height: 70px; left: 45%; bottom: 16%; background: rgba(24,229,236,.12); }

.section { padding: 78px 0; }
.section-heading { margin-bottom: 34px; }
.section-heading h2, .about-copy h2, .cta h2 { margin: 0; font-family: "Space Grotesk", sans-serif; font-size: clamp(32px, 4vw, 48px); line-height: 1.05; }
.section-heading > p:last-child { margin: 8px 0 0; color: var(--muted); }
.accent-line { position: relative; padding-left: 22px; }
.accent-line::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; background: var(--cyan); border-radius: 8px; box-shadow: 0 0 18px rgba(22,229,236,.35); }

.games-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: start; }
.game-card {
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(180deg, #121a2d, #0d1424);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform .25s ease, border-color .25s ease;
}
.game-card:hover { transform: translateY(-6px); border-color: rgba(169,83,255,.38); }
.game-card img { width: 100%; aspect-ratio: 16/8.8; object-fit: cover; }
.game-card-body { padding: 18px 18px 20px; }
.game-card h3 { margin: 0 0 12px; font-size: 18px; }
.game-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.game-meta a { margin-left: auto; color: #b86cff; font-size: 13px; font-weight: 700; }
.tag { color: #16f2ee; background: rgba(0,221,226,.09); border: 1px solid rgba(0,221,226,.28); padding: 4px 8px; border-radius: 6px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.games-grid .game-card:nth-child(4) { grid-column: 1; }

.about { padding-top: 28px; }
.about-panel { display: grid; grid-template-columns: 1.15fr 1.85fr; gap: 50px; padding: 36px; background: linear-gradient(120deg, rgba(26,35,59,.92), rgba(11,16,31,.94)); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); }
.about-copy p:not(.eyebrow) { color: var(--muted); margin: 18px 0 24px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; }
.stat { min-height: 170px; display: grid; place-items: center; align-content: center; text-align: center; border-left: 1px solid var(--border); }
.stat-icon { font-size: 28px; }
.stat strong { display: block; margin-top: 10px; font-size: 34px; font-family: "Space Grotesk", sans-serif; }
.stat small { color: #c7cde1; line-height: 1.3; }

.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.service-card { padding: 26px; min-height: 220px; background: linear-gradient(180deg, rgba(18,26,45,.95), rgba(9,14,27,.95)); border: 1px solid var(--border); border-radius: 16px; }
.service-card span { font-size: 30px; }
.service-card h3 { margin: 16px 0 8px; }
.service-card p { margin: 0; color: var(--muted); font-size: 14px; }

.cta { position: relative; overflow: hidden; padding: 62px 0; background: radial-gradient(circle at 50% 20%, rgba(149,72,255,.22), transparent 24rem), linear-gradient(90deg, #11162a, #16132b, #11162a); border-top: 1px solid rgba(255,255,255,.05); border-bottom: 1px solid rgba(255,255,255,.05); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.cta p:last-child { color: var(--muted); margin-bottom: 0; }

footer { padding: 50px 0 24px; background: #050811; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .8fr 1fr .8fr; gap: 36px; }
.footer-brand p { color: var(--muted); font-size: 13px; margin-top: 14px; }
footer h4 { margin: 0 0 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
footer div > a:not(.brand), footer div > div > a { display: block; color: var(--muted); font-size: 13px; margin: 8px 0; }
.socials { display: flex; gap: 8px; }
.socials a { width: 36px; height: 36px; display: grid !important; place-items: center; border-radius: 8px; background: rgba(255,255,255,.06); color: white !important; }
.copyright { color: #717b94; border-top: 1px solid var(--border); padding-top: 20px; margin-top: 34px; font-size: 12px; text-align: center; }

@media (max-width: 980px) {
  .nav { display: none; }
  .nav-wrap { justify-content: space-between; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { display: grid; justify-items: center; }
  .hero-art { min-height: 360px; }
  .hero-art img { width: min(420px, 80%); }
  .games-grid { grid-template-columns: repeat(2, 1fr); }
  .about-panel { grid-template-columns: 1fr; }
  .stats-grid { border-top: 1px solid var(--border); padding-top: 24px; }
  .stat:first-child { border-left: 0; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1180px); }
  .site-header .btn-outline { display: none; }
  .hero { min-height: auto; }
  .hero-grid { padding-top: 44px; }
  .hero h1 { font-size: clamp(52px, 18vw, 78px); }
  .hero-text { font-size: 16px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; }
  .hero-art { min-height: 300px; }
  .section { padding: 58px 0; }
  .games-grid, .services-grid, .footer-grid { grid-template-columns: 1fr; }
  .games-grid .game-card:nth-child(4) { grid-column: auto; }
  .about-panel { padding: 24px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; border-top: 1px solid var(--border); }
  .stat:nth-child(4) { border-top: 1px solid var(--border); }
  .cta-inner { align-items: flex-start; flex-direction: column; }
}

/* Background video */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

/* Dark/gradient overlay for readability */
.hero-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      90deg,
      rgba(5, 8, 20, 0.92) 0%,
      rgba(5, 8, 20, 0.72) 38%,
      rgba(5, 8, 20, 0.35) 70%,
      rgba(5, 8, 20, 0.55) 100%
    ),
    linear-gradient(
      180deg,
      rgba(5, 8, 20, 0.35) 0%,
      rgba(5, 8, 20, 0.15) 50%,
      rgba(5, 8, 20, 0.75) 100%
    );
}

/* Keep your decorative elements above the video */
.hero-orb {
  z-index: 2;
}

/* =========================================================
   GAME VIDEO MODAL
   ========================================================= */

.game-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.game-modal.active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.game-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 15, 0.88);
  backdrop-filter: blur(12px);
}

.game-modal-content {
  position: relative;
  width: min(1100px, 100%);
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  background: #0b1020;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.65);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s ease;
}

.game-modal.active .game-modal-content {
  transform: translateY(0) scale(1);
}

.game-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;

  width: 42px;
  height: 42px;

  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;

  background: rgba(0, 0, 0, 0.65);
  color: white;

  font-size: 28px;
  line-height: 1;

  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.game-modal-close:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: rotate(90deg);
}

.game-modal-video-wrap {
  width: 100%;
  background: #000;
  aspect-ratio: 16 / 9;
}

.game-modal-video-wrap video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.game-modal-info {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  padding: 35px 40px 40px;
}

.game-modal-info h2 {
  margin: 5px 0 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
}

.game-modal-info p {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
}

.game-modal-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.game-modal-platforms span {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.06);

  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.game-downloads {
  min-width: 220px;
}

.game-downloads h3 {
  margin: 0 0 12px;
  font-family: "Space Grotesk", sans-serif;
}

#gameModalDownloads {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 48px;
  padding: 0 20px;

  border-radius: 10px;

  background: white;
  color: #080b16;

  font-weight: 700;
  text-decoration: none;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.game-download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.15);
}

/* Mobile */

@media (max-width: 700px) {

  .game-modal {
    padding: 12px;
  }

  .game-modal-content {
    max-height: calc(100vh - 24px);
    border-radius: 14px;
  }

  .game-modal-info {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 25px;
  }

  .game-downloads {
    min-width: 0;
  }

  .game-modal-close {
    top: 8px;
    right: 8px;
  }
}