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

:root {
  --bg:         #020509;
  --card-bg:    #060D18;
  --primary:    #00B4FF;
  --primary2:   #0077DD;
  --text:       #FFFFFF;
  --text-muted: #B8C8D8;
  --border:     rgba(0, 180, 255, 0.22);
  --homepage-content-width: 1120px;
  --hero-grid-gap: 40px;
  --hero-link-max-width: 420px;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── HEADER ─── */

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 32px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(2, 5, 9, 0.90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 40px;
  width: auto;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(6, 13, 24, 0.85);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: border-color 0.2s, background 0.2s;
}

.lang-btn:hover {
  border-color: var(--primary);
  background: rgba(0, 180, 255, 0.08);
}

.lang-btn svg {
  width: 15px;
  height: 15px;
  opacity: 0.75;
  flex-shrink: 0;
}

/* ── HERO ── */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 65px 32px 90px;
}

/* layered background glows */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 55% 70% at 18% 60%, rgba(0, 120, 255, 0.18) 0%, transparent 65%),
    radial-gradient(ellipse 65% 65% at 26% 48%, rgba(0, 180, 255, 0.12) 0%, transparent 68%),
    radial-gradient(ellipse 45% 55% at 82% 32%, rgba(0, 140, 255, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 35% 40% at 70% 80%, rgba(0, 80, 200, 0.10) 0%, transparent 55%),
    var(--bg);
}

/* subtle grid */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 180, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 180, 255, 0.04) 1px, transparent 1px);
  background-size: 58px 58px;
}

/* angular slash lines */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, transparent 45%, rgba(0,180,255,0.07) 46%, rgba(0,180,255,0.07) 47%, transparent 48%),
    linear-gradient(145deg, transparent 55%, rgba(0,100,220,0.05) 56%, rgba(0,100,220,0.05) 57%, transparent 58%),
    linear-gradient(145deg, transparent 62%, rgba(0,180,255,0.04) 63%, rgba(0,180,255,0.04) 63.5%, transparent 64.5%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--homepage-content-width);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--hero-grid-gap);
}

/* ── Hero logo image ── */
.hero-content { min-width: 0; }
.hero-logo {
  display: flow-root;
  margin-bottom: 56px;
  user-select: none;
}

.hero-logo img {
  display: block;
  max-width: 100%;
  width: auto;
  /* Match V89's visible 106.67px letter height, not its padded image box. */
  height: calc(320px * 161 / 483 * 285 / 132);
  margin-top: calc(-320px * 161 / 483 * 74 / 132);
  margin-bottom: calc(-320px * 161 / 483 * 79 / 132);
  object-fit: contain;
  object-position: left center;
  filter:
    drop-shadow(0 0 24px rgba(0, 180, 255, 0.55))
    drop-shadow(0 0 55px rgba(0, 100, 220, 0.30));
}

/* H1 */
.hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 5px;
  margin-bottom: 16px;
  line-height: 1.0;
}

.hero h1 .accent {
  color: var(--primary);
  text-shadow:
    0 0 18px rgba(0, 180, 255, 0.65),
    0 0 45px rgba(0, 180, 255, 0.30);
}

.hero-title-line { display: block; width: max-content; white-space: nowrap; }

@media (min-width: 1100px) {
  /* Use the inter-column breathing room so both complete titles fit at V89's 62px. */
  .hero h1 { width: calc(100% + 80px); }
}

.hero-desc {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 34px;
  max-width: 380px;
  line-height: 1.75;
}

/* Keep language-sized slots stable, with shorter copy near the next block. */
@media (min-width: 801px) {
  .hero-visual { transform: translateY(16px); }
  .hero h1 { display: grid; align-content: end; }
  .hero-title-text { min-width: 0; }
  .hero-desc { display: flex; align-items: center; max-width: 500px; margin-bottom: 24px; }
}

/* ── Button wave animations ── */
@keyframes btn-shine {
  0%        { transform: skewX(-22deg) translateX(-320%); }
  72%, 100% { transform: skewX(-22deg) translateX(460%); }
}

@keyframes btn-glow-pulse {
  0%, 100% {
    box-shadow:
      0 0 28px rgba(0, 180, 255, 0.50),
      0 4px 18px rgba(0, 0, 0, 0.55);
  }
  50% {
    box-shadow:
      0 0 58px rgba(0, 180, 255, 0.85),
      0 6px 24px rgba(0, 0, 0, 0.60);
  }
}

/* Primary Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg,
    #28CCFF 0%,
    #00B4FF 45%,
    #0098E0 100%
  );
  color: #000;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1.5px;
  padding: 16px 34px;
  border-radius: 10px;
  text-decoration: none;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  border-bottom: 1px solid rgba(0, 0, 0, 0.20);
  transition: filter 0.2s, transform 0.15s;
  animation: btn-glow-pulse 2.5s ease-in-out infinite;
}

/* shimmer sweep */
.btn-primary::after {
  content: '';
  position: absolute;
  top: -10%;
  left: 0;
  width: 38%;
  height: 120%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.60) 50%,
    transparent 100%
  );
  mix-blend-mode: overlay;
  transform: skewX(-22deg) translateX(-320%);
  animation: btn-shine 3s ease-in-out infinite;
  pointer-events: none;
}

.btn-primary:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
  animation-play-state: paused;
}

.btn-icon {
  font-size: 18px;
  line-height: 1;
}

/* ── Hero Visual — alternative links ── */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-links {
  width: 100%;
  max-width: var(--hero-link-max-width);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hero .alt-link + .alt-link { margin-top: 4px; }

.links-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
  opacity: 0.85;
}

.links-label svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: var(--primary);
}

.alt-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.22s, box-shadow 0.22s, background 0.22s, transform 0.18s;
}

.alt-link:hover {
  border-color: var(--primary);
  background: rgba(0, 180, 255, 0.07);
  box-shadow:
    0 0 24px rgba(0, 180, 255, 0.18),
    0 4px 16px rgba(0, 0, 0, 0.35);
  transform: translateX(4px);
}

.alt-link-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--primary);
  letter-spacing: 1px;
  line-height: 1;
  min-width: 28px;
  opacity: 0.85;
}

.alt-link-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.alt-link-body strong {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.alt-link-body small {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.alt-link-arrow {
  width: 20px;
  height: 20px;
  color: var(--primary);
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.18s, transform 0.18s;
}

.alt-link:hover .alt-link-arrow {
  opacity: 1;
  transform: translateX(3px);
}

/* ── APK SECTION ── */
.apk-section {
  padding: 80px 32px;
  position: relative;
  background: var(--bg);
}

/* Same outer width/edges as the first hero content block. */
.apk-section > .container {
  width: 100%;
  max-width: var(--homepage-content-width);
}

.apk-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--primary) 40%,
    var(--primary2) 60%,
    transparent 100%
  );
  opacity: 0.40;
}

.apk-card {
  display: grid;
  /* Hero's centered link column has a trailing gutter; align to its visible edge. */
  width: calc(100% - max(0px, (100% - var(--hero-grid-gap) - var(--hero-link-max-width) * 2) / 4));
  grid-template-columns: clamp(180px, 18vw, 220px) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 52px);
  align-items: stretch;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(36px, 4vw, 48px);
  position: relative;
  overflow: hidden;
}

/* subtle corner glow */
.apk-card::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(0,180,255,0.10) 0%, transparent 70%);
  pointer-events: none;
}

.apk-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  min-width: 0;
}
.apk-side .page-link { margin: 14px auto 0; text-align: center; font-size: 14px; line-height: 1.6; }
.apk-qr { width: 220px; max-width: 100%; margin-top: auto; text-align: center; }
.apk-qr p { color: var(--primary); font-size: 16px; font-weight: 800; line-height: 1.4; }
.apk-scan { display: block; width: 46px; height: 31px; margin: 2px auto 8px; }
.apk-qr-image {
  display: block;
  width: 200px;
  max-width: 100%;
  height: auto;
  padding: 8px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 180, 255, 0.2);
  image-rendering: pixelated;
}

.apk-icon {
  width: 200px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  justify-self: center;
}

.apk-icon svg {
  width: 52px;
  height: 52px;
}

/* One shared text/action column: the button cannot exceed the copy width. */
.apk-content { display: flex; flex-direction: column; min-width: 0; width: 100%; max-width: 640px; justify-self: end; }
.apk-content .section-title { font-family: inherit; font-size: clamp(26px, 3.5vw, 42px); font-weight: 700; text-align: left; letter-spacing: 0; line-height: 1.15; }
.apk-content .title-bar { margin: 8px 0 20px; }
/* Reserve the left guide link's 14px gap + 22.4px line below the QR baseline. */
.apk-actions { width: min(100%, var(--download-actions-width, 100%)); margin-top: auto; margin-bottom: 36.4px; min-width: 0; }
.apk-game-icons { display: block; width: 100%; height: auto; object-fit: contain; object-position: left center; margin: 8px 0 20px; }
.apk-content .btn-primary {
  width: 100%;
  min-height: 58px;
  justify-content: center;
  padding: 16px 24px;
  margin-top: 8px;
}

.page-link.mobile-page-link { display: none; }
.hero-links .hero-faq-link { margin: 14px auto 0; text-align: center; }
@media (max-width: 900px) {
  .hero-links .desktop-page-link { display: none; }
  .hero-links .hero-faq-link { display: block; margin: 24px auto 0; text-align: center; font-weight: 600; letter-spacing: 1px; }
  .hero-links .hero-faq-link.desktop-page-link { display: none; }
}

.apk-desc {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.80;
  margin-bottom: 24px;
  max-width: 100%;
}

.apk-features {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 28px;
  margin-bottom: 28px;
}

.apk-features li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 0;
  align-items: flex-start;
}

.apk-features li svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── ABOUT + FEATURES ─────────────────────────────────── */

.about {
  padding: 80px 32px 70px;
  background: var(--card-bg);
  position: relative;
}

/* top glow border */
.about::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--primary) 35%,
    var(--primary2) 65%,
    transparent 100%
  );
  opacity: 0.50;
}

.container {
  max-width: 880px;
  margin: 0 auto;
}
.about > .container {
  width: 100%;
  max-width: var(--homepage-content-width);
  padding-right: max(0px, (min(100%, var(--homepage-content-width)) - var(--hero-grid-gap) - var(--hero-link-max-width) * 2) / 4);
}

.section-title {
  font-family: 'Bebas Neue', sans-serif;
  text-align: center;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 10px;
}

.section-title .accent { color: var(--primary); }

.title-bar {
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary2), var(--primary));
  border-radius: 2px;
  margin: 0 auto 28px;
  box-shadow: 0 0 12px rgba(0, 180, 255, 0.55);
}

.about-body {
  color: var(--text-muted);
  font-size: 15px;
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
  line-height: 1.85;
}

/* Feature cards grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(32px, 5vw, 64px);
}

.feat-card {
  background: rgba(2, 5, 9, 0.55);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 20px 30px;
  text-align: center;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.22s;
}

.feat-card:hover {
  border-color: rgba(0, 180, 255, 0.55);
  box-shadow:
    0 0 28px rgba(0, 180, 255, 0.14),
    0 8px 28px rgba(0, 0, 0, 0.45);
  transform: translateY(-5px);
}

.feat-icon {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 2.5px solid var(--primary);
  background: rgba(0, 180, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
  box-shadow:
    0 0 18px rgba(0, 180, 255, 0.30),
    inset 0 0 16px rgba(0, 180, 255, 0.07);
  transition: box-shadow 0.25s;
}

.feat-card:hover .feat-icon {
  box-shadow:
    0 0 30px rgba(0, 180, 255, 0.50),
    inset 0 0 20px rgba(0, 180, 255, 0.12);
}

.feat-icon svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.feat-card h3 {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 10px;
}

.feat-card p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.75;
}

/* ── FINAL CTA ───────────────────────────────────────── */

.cta {
  padding: 80px 32px;
  text-align: center;
  position: relative;
  background:
    radial-gradient(ellipse 70% 90% at 50% 110%, rgba(0, 180, 255, 0.07) 0%, transparent 65%),
    var(--bg);
}

/* top glow line */
.cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--primary2) 35%,
    var(--primary) 65%,
    transparent 100%
  );
  opacity: 0.45;
}

.cta .section-title { margin-bottom: 10px; }

.cta p {
  color: var(--text-muted);
  font-size: 15px;
  margin: 14px 0 32px;
}

/* Outline Button */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 2px solid var(--primary);
  color: var(--text);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1.5px;
  padding: 15px 38px;
  border-radius: 50px;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s, border-color 0.2s;
}

.btn-outline:hover {
  background: rgba(0, 180, 255, 0.12);
  border-color: rgba(0, 180, 255, 0.90);
  box-shadow:
    0 0 32px rgba(0, 180, 255, 0.28),
    0 4px 14px rgba(0, 0, 0, 0.45);
  transform: translateY(-3px);
}

.btn-outline svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ── FOOTER ──────────────────────────────────────────── */

footer {
  padding: 28px 32px 34px;
  text-align: center;
  border-top: 1px solid var(--border);
}

footer p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 14px;
}

.footer-logo img {
  height: 30px;
  width: auto;
  opacity: 0.70;
}

/* ── RESPONSIVE ──────────────────────────────────────── */

@media (max-width: 800px) {
  .about > .container { padding-right: 0; }
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content { order: 1; }
  .hero-visual  { order: 2; }
  .hero-logo, .hero h1 { transform: none; }

  .hero-links { max-width: 100%; }
  .alt-link   { text-align: left; }

  /* Compact the first screen while preserving the logo and two full link cards. */
  .hero-inner { gap: 20px; }
  .hero-logo { text-align: center; margin-bottom: 24px; }
  .hero-logo img { height: calc(240px * 161 / 483 * 285 / 132); margin-top: calc(-240px * 161 / 483 * 74 / 132); margin-bottom: calc(-240px * 161 / 483 * 79 / 132); margin-inline: auto; object-position: center; }
  .hero h1 { line-height: 1.1; margin-bottom: 12px; }
  .hero-title-line { margin-inline: auto; }
  .hero-desc { display: flex; align-items: center; margin-left: auto; margin-right: auto; margin-bottom: 16px; }
  .btn-primary { justify-content: center; }

  .features-grid { grid-template-columns: 1fr; max-width: 340px; gap: 20px; }

  /* APK section stacks on mobile */
  .apk-card {
    width: 100%;
    grid-template-columns: 1fr;
    padding: 32px 24px;
    gap: 24px;
  }

  .apk-icon { width: 128px; height: auto; }
  .apk-icon svg { width: 38px; height: 38px; }
  .apk-qr { display: none; }
  .apk-side .page-link { margin-top: 0; }

  .apk-content { max-width: 640px; text-align: center; justify-self: center; }
  .apk-content .section-title { text-align: center; }
  .apk-content .title-bar { margin-inline: auto; }
  .apk-desc { margin-inline: auto; text-align: left; }
  .apk-actions { margin-inline: auto; margin-bottom: 0; }
  .apk-actions .mobile-page-link { display: block; margin: 16px auto 0; font-size: 14px; line-height: 1.6; }
  .apk-features { grid-template-columns: 1fr 1fr; text-align: left; }
}

@media (max-width: 500px) {
  .header      { padding: 12px 16px; }
  .hero        { min-height: 0; padding: 50px 16px 28px; }
  .about       { padding: 60px 16px 56px; }
  .apk-section { padding: 60px 16px; }
  .cta         { padding: 60px 16px; }
  .apk-card { padding: 28px 20px; gap: 22px; }
  .apk-icon { width: 120px; }
  .apk-features { grid-template-columns: 1fr; gap: 12px; }
  .apk-features li { font-size: 13px; }
  .apk-content .btn-primary { min-height: 56px; padding-inline: 16px; font-size: 12px; letter-spacing: 1px; }
}

/* MG666 branding fit, integrated navigation, and source accessibility fixes. */
.header-actions, .header-nav { display: flex; align-items: center; gap: 22px; }
.header-nav a, .footer-nav a { color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.header-nav a:hover, .footer-nav a:hover { color: var(--primary); }
.footer-nav { display: flex; justify-content: center; gap: 24px; margin-bottom: 18px; }
.page-link { display: block; width: fit-content; margin-top: 18px; color: var(--primary); text-decoration: none; font-size: 14px; }
.page-link { cursor: pointer; transition: color 0.2s, text-shadow 0.2s; }
.page-link:hover,
.page-link:focus-visible { color: #ffd34f; text-decoration: none; text-shadow: 0 0 12px rgba(255, 179, 0, 0.3); }
.page-link:active { color: #ffab26; }
.cta .page-link { margin-inline: auto; }
.apk-icon img { width: 100%; height: 100%; object-fit: contain; }
.btn-primary, .btn-outline { max-width: 100%; min-height: 48px; }
.btn-primary > span[data-i18n], .btn-outline > span[data-i18n] { min-width: 0; }
.logo img { max-width: 100%; object-fit: contain; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--primary); outline-offset: 5px; }
@media (max-width: 800px) {
  .features-grid { margin-inline: auto; }
}
@media (max-width: 500px) {
  .hero h1 { letter-spacing: 2px; }
  .btn-primary, .btn-outline { padding-inline: 20px; gap: 8px; letter-spacing: 1px; }
  .logo { max-width: calc(100% - 94px); }
  .header { flex-wrap: wrap; gap: 14px; }
  .header-actions { display: contents; }
  .header-nav { order: 3; flex: 0 0 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
