:root {
  --bg-deep: #05060a;
  --bg-panel: rgba(12, 16, 26, 0.78);
  --border: rgba(224, 192, 90, 0.22);
  --gold: #e0c05a;
  --gold-dim: #9a7b2c;
  --accent: #2f7a58;
  --text: #eef1f7;
  --muted: #9aa3b5;
  --safe-x: max(1rem, env(safe-area-inset-left, 0px));
  --safe-r: max(1rem, env(safe-area-inset-right, 0px));
  --safe-t: max(0.5rem, env(safe-area-inset-top, 0px));
  --safe-b: max(0.75rem, env(safe-area-inset-bottom, 0px));
  --touch-min: 44px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Source Sans 3", system-ui, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  font-size: 1.02rem;
  overflow-x: hidden;
}

.fx-grid,
.fx-orb,
.fx-orb-2,
.fx-scan {
  pointer-events: none;
  position: fixed;
  z-index: 0;
}
.fx-grid {
  inset: 0;
  background-image:
    linear-gradient(rgba(224, 192, 90, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224, 192, 90, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 18%, black 10%, transparent 72%);
  animation: grid-drift 28s linear infinite;
}
.fx-orb {
  width: min(70vw, 520px);
  height: min(70vw, 520px);
  border-radius: 50%;
  top: -12%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(224, 192, 90, 0.16) 0%, transparent 68%);
  filter: blur(8px);
  animation: orb-pulse 8s ease-in-out infinite;
}
.fx-orb-2 {
  width: min(50vw, 380px);
  height: min(50vw, 380px);
  border-radius: 50%;
  bottom: 8%;
  right: -8%;
  background: radial-gradient(circle, rgba(47, 122, 88, 0.18) 0%, transparent 70%);
  filter: blur(10px);
  animation: orb-float 12s ease-in-out infinite;
}
.fx-scan {
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.35;
  animation: scan 7s ease-in-out infinite;
}

@keyframes grid-drift {
  from { background-position: 0 0; }
  to { background-position: 48px 48px; }
}
@keyframes orb-pulse {
  0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}
@keyframes orb-float {
  0%, 100% { opacity: 0.55; transform: translate(0, 0); }
  50% { opacity: 0.9; transform: translate(-18px, -12px); }
}
@keyframes scan {
  0% { transform: translateY(0); opacity: 0; }
  12% { opacity: 0.45; }
  100% { transform: translateY(100dvh); opacity: 0; }
}
@keyframes shine {
  to { background-position: 200% center; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes logo-in {
  from { opacity: 0; transform: translateY(16px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 122, 88, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(47, 122, 88, 0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fx-grid, .fx-orb, .fx-orb-2, .fx-scan,
  .hero .tag, .hero h1, .hero-lead, .games h2, .game-card, .feat {
    animation: none !important;
  }
  .game-card:hover, .feat:hover { transform: none; }
}

header, main, footer { position: relative; z-index: 1; }

.wrap {
  width: min(1080px, 100%);
  margin-inline: auto;
  padding-left: var(--safe-x);
  padding-right: var(--safe-r);
}

header {
  padding: calc(0.7rem + var(--safe-t)) 0 0.7rem;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  background: rgba(5, 6, 10, 0.72);
  position: sticky;
  top: 0;
  z-index: 200;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--text);
}
.brand-mark {
  font-family: Orbitron, sans-serif;
  font-weight: 900;
  letter-spacing: 0.2em;
  font-size: 0.86rem;
  color: var(--gold);
}
.brand-sub {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-links {
  display: flex;
  gap: 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.22s ease;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }
.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.lang-switch button {
  background: transparent;
  color: var(--muted);
  border: 0;
  min-height: 40px;
  padding: 0 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lang-switch button[aria-pressed="true"] {
  background: rgba(224, 192, 90, 0.16);
  color: var(--gold);
}

.stage {
  padding: clamp(2rem, 8vh, 4.2rem) 0 1.8rem;
}

.hero {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 2rem;
}
.tag {
  display: inline-block;
  font-family: Orbitron, sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  color: var(--gold);
  border: 1px solid var(--border);
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
  animation: rise 0.7s ease both;
}
.hero h1 {
  font-family: Orbitron, sans-serif;
  font-weight: 900;
  letter-spacing: 0.12em;
  font-size: clamp(1.7rem, 5.2vw, 2.85rem);
  line-height: 1.1;
  margin: 0 0 0.35rem;
  animation: rise 0.8s 0.08s ease both;
}
.hero h1 .wm {
  display: block;
  background: linear-gradient(90deg, #fff 0%, var(--gold) 45%, #fff 90%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 7s linear infinite;
}
.hero h1 .wm-g {
  display: block;
  font-size: 0.42em;
  letter-spacing: 0.42em;
  color: var(--muted);
  margin-top: 0.35rem;
  font-weight: 700;
}
.hero-lead {
  margin: 0.85rem auto 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: clamp(0.95rem, 2vw, 1.08rem);
  animation: rise 0.85s 0.16s ease both;
}

.games {
  text-align: center;
}
.games h2 {
  font-family: Orbitron, sans-serif;
  letter-spacing: 0.22em;
  font-size: 0.68rem;
  color: var(--gold);
  margin: 0 0 1.15rem;
  font-weight: 700;
  animation: rise 0.7s 0.22s ease both;
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.55rem, 1.6vw, 1.1rem);
  width: min(720px, 100%);
  margin: 0 auto;
  align-items: start;
}
.game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  overflow: hidden;
  animation: logo-in 0.7s ease both;
  transition: transform 0.22s ease;
}
.game-card:nth-child(1) { animation-delay: 0.28s; }
.game-card:nth-child(2) { animation-delay: 0.38s; }
.game-card:nth-child(3) { animation-delay: 0.48s; }
.game-card:nth-child(4) { animation-delay: 0.58s; }
.game-card:hover { transform: translateY(-6px); }
.game-card .logo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 22%;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  background: #111;
  transition: border-color 0.22s, box-shadow 0.22s;
}
.game-card:hover .logo {
  border-color: rgba(224, 192, 90, 0.55);
  box-shadow: 0 14px 36px rgba(224, 192, 90, 0.18);
}
.game-card .logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.35s ease;
}
.game-card:hover .logo img { transform: scale(1.06); }
.game-card h3 {
  margin: 0.5rem 0 0.2rem;
  font-family: Orbitron, sans-serif;
  font-size: clamp(0.5rem, 1.7vw, 0.72rem);
  letter-spacing: 0.02em;
  line-height: 1.2;
  font-weight: 700;
  width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.badge {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-size: clamp(0.5rem, 2.1vw, 0.62rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  border-radius: 8px;
  padding: 0.18rem 0.2rem;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.badge-live {
  color: #b7f7c8;
  background: rgba(47, 122, 88, 0.32);
  animation: live-pulse 2.4s ease-in-out infinite;
}
.badge-dev {
  color: #f0d48a;
  background: rgba(154, 123, 44, 0.28);
}

.features {
  padding: 0.6rem 0 2.8rem;
}
.feat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}
.feat {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.05rem 0.95rem 1.1rem;
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.7s ease both;
  transition: border-color 0.22s, transform 0.22s;
}
.feat:nth-child(1) { animation-delay: 0.5s; }
.feat:nth-child(2) { animation-delay: 0.6s; }
.feat:nth-child(3) { animation-delay: 0.7s; }
.feat:nth-child(4) { animation-delay: 0.8s; }
.feat:hover {
  border-color: rgba(224, 192, 90, 0.45);
  transform: translateY(-3px);
}
.feat .k {
  font-family: Orbitron, sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 0.4rem;
}
.feat h3 {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
}
.feat p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

footer {
  border-top: 1px solid var(--border);
  padding: 1.2rem 0 calc(1.2rem + var(--safe-b));
}
.foot-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}
.foot-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
}
.foot-links a:hover { color: var(--gold); }

@media (max-width: 860px) {
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .feat-grid { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
  .game-grid { gap: 0.4rem; }
  .game-card h3 { font-size: 0.5rem; }
  .game-card .logo { border-radius: 20%; }
  .badge { font-size: 0.48rem; padding: 0.12rem 0.08rem; }
  .fx-scan { display: none; }
}
