
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #07080d;
  --surface: #11131d;
  --surface-2: #161926;
  --border: #25283a;
  --pink: #ff2380;
  --pink-hi: #ff4093;
  --pink-glow: rgba(255, 35, 128, 0.42);
  --text: #ffffff;
  --muted: #989db3;
}
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }

/* Ambient top magenta glow */
.ambient-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(720px 320px at 50% -60px, rgba(255, 35, 128, 0.22), transparent 70%),
    radial-gradient(480px 260px at 12% 10%, rgba(168, 35, 255, 0.10), transparent 70%),
    radial-gradient(480px 260px at 88% 12%, rgba(255, 35, 128, 0.10), transparent 70%);
}

/* HEADER */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(7, 8, 13, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.header-inner {
  max-width: 1240px; margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.brand {
  font-size: 25px; font-weight: 900; letter-spacing: 0.5px; display: inline-flex; align-items: center;
}
.brand span {
  color: var(--pink);
  text-shadow: 0 0 18px rgba(255, 35, 128, 0.65);
}
.nav-links {
  display: flex; align-items: center; gap: 28px; font-size: 14.5px; font-weight: 600; color: #c7cbdc;
}
.nav-links a { transition: color .15s; position: relative; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--pink); border-radius: 2px; box-shadow: 0 0 10px var(--pink);
}

/* BUTTONS */
.btn-pink {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 26px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #ff2e87, #ff1774);
  color: #fff; font-weight: 800; font-size: 14.5px;
  box-shadow: 0 0 24px var(--pink-glow), inset 0 1px 0 rgba(255,255,255,0.28);
  transition: transform .12s, box-shadow .15s, filter .15s;
}
.btn-pink:hover { filter: brightness(1.08); box-shadow: 0 0 32px rgba(255,35,128,0.62); transform: translateY(-1px); }
.btn-pink:active { transform: translateY(1px); }
.btn-pink:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-glass {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 26px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e6e9f5; font-weight: 700; font-size: 14.5px;
  transition: border-color .15s, background .15s;
}
.btn-glass:hover { border-color: var(--pink); background: rgba(255, 35, 128, 0.09); color: #fff; }

/* MAIN CONTAINER */
.container {
  position: relative; z-index: 1;
  max-width: 1240px; width: 100%; margin: 0 auto; padding: 48px 24px 70px; flex: 1;
}

/* HERO */
.hero { text-align: center; margin-bottom: 48px; }
.hero h1 {
  font-size: clamp(32px, 4.6vw, 54px); font-weight: 900; letter-spacing: -1px;
  line-height: 1.08; margin-bottom: 16px;
}
.hero h1 em { font-style: normal; color: var(--pink); }
.hero p {
  max-width: 600px; margin: 0 auto 28px; font-size: 16px; line-height: 1.6; color: var(--muted);
}
.hero-cta { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* 4-CARD GAMES ROW */
.games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 1060px) { .games-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .games-grid { grid-template-columns: 1fr; } }

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 14px;
  display: flex; flex-direction: column; gap: 14px;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.game-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 35, 128, 0.55);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 24px rgba(255, 35, 128, 0.14);
}
.game-art {
  position: relative; height: 220px; border-radius: 14px; overflow: hidden;
  background-size: cover; background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; align-items: flex-end; justify-content: space-between; padding: 10px 12px;
}
.game-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,8,13,0.05) 35%, rgba(7,8,13,0.72) 100%);
  pointer-events: none;
}
.game-art img {
  position: relative; z-index: 2; image-rendering: pixelated; object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,0.85));
}
.game-art .spr-hero { width: 86px; height: 86px; }
.game-art .spr-boss { width: 112px; height: 112px; }

.game-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px;
}
.game-name { font-size: 21px; font-weight: 900; letter-spacing: 0.3px; }
.game-pill {
  padding: 4px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.6px; text-transform: uppercase;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: #cfd3e6;
}
.game-play { width: 100%; padding: 12px; font-size: 14px; letter-spacing: 0.5px; }

/* SUBPAGE PANELS (Promo / BattlePass / Pay) */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 28px;
  margin-bottom: 24px;
}
.panel h2 { font-size: 24px; font-weight: 800; margin-bottom: 10px; }
.panel .sub { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin-bottom: 20px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 680px) { .form-grid { grid-template-columns: 1fr; } }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: #b7bcd1; margin-bottom: 7px; }
.field input, .field select {
  width: 100%; padding: 13px 15px; border-radius: 12px;
  background: #090b12; border: 1px solid #2b2f45; color: #fff; font: inherit; font-size: 15px;
  transition: border-color .15s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--pink); }

.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 24px; }
@media (max-width: 820px) { .tier-grid { grid-template-columns: 1fr; } }
.tier-card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 24px; cursor: pointer; transition: .18s; display: block;
}
.tier-card:hover { border-color: rgba(255,35,128,0.5); }
.tier-card.selected {
  border-color: var(--pink);
  box-shadow: 0 0 28px rgba(255,35,128,0.22);
  background: linear-gradient(180deg, rgba(255,35,128,0.08), var(--surface));
}
.tier-card input[type=radio] { accent-color: var(--pink); margin-bottom: 12px; transform: scale(1.2); }
.tier-card h3 { font-size: 26px; font-weight: 900; margin-bottom: 6px; }
.tier-price { font-size: 32px; font-weight: 900; color: var(--pink); margin: 12px 0 6px; }
.tier-meta { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

.msg-ok { margin-top: 16px; color: #4ade80; font-weight: 700; white-space: pre-line; line-height: 1.6; }
.msg-err { margin-top: 12px; color: #fb7185; font-weight: 700; font-size: 14px; }
.note-sm { font-size: 13px; color: var(--muted); line-height: 1.55; margin-top: 14px; }

/* FOOTER */
.site-footer {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 24px; text-align: center; color: #6e738a; font-size: 13px;
}
.site-footer a { color: #b5bad0; margin: 0 10px; }
.site-footer a:hover { color: var(--pink); }

/* UNIFIED AUTH MODAL */
.auth-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4, 5, 10, 0.82); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.auth-modal {
  width: 100%; max-width: 430px;
  background: var(--surface); border: 1px solid #2e324a; border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 40px rgba(255, 35, 128, 0.14);
  overflow: hidden;
}
.auth-head {
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.auth-head h3 { font-size: 18px; font-weight: 800; }
.auth-x {
  background: #1b1f30; border: 1px solid #2f344d; color: #fff;
  width: 32px; height: 32px; border-radius: 10px; cursor: pointer; font-weight: 800;
}
.auth-body { padding: 22px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; background: #0a0c14; padding: 5px; border-radius: 12px; }
.auth-tab {
  flex: 1; padding: 10px; border: 0; border-radius: 9px; cursor: pointer;
  background: transparent; color: var(--muted); font-weight: 800; font-size: 14px;
}
.auth-tab.active { background: var(--pink); color: #fff; box-shadow: 0 0 16px var(--pink-glow); }
.auth-info {
  font-size: 13px; color: #c7cbdc; line-height: 1.5;
  background: rgba(255, 35, 128, 0.08); border: 1px solid rgba(255, 35, 128, 0.25);
  border-radius: 12px; padding: 11px 13px; margin-bottom: 16px;
}
.profile-kv { display: grid; gap: 10px; margin-bottom: 18px; font-size: 14.5px; }
.profile-kv div {
  display: flex; justify-content: space-between; padding: 10px 14px;
  background: #0a0c14; border: 1px solid var(--border); border-radius: 12px;
}


/* MOBILE & HIGH-RES ADAPTATION */
@media (min-width: 1600px) {
  .header-inner, .container { max-width: 1380px; }
  .game-art { height: 250px; }
}
@media (max-width: 760px) {
  .header-inner { padding: 12px 14px; gap: 10px; justify-content: center; }
  .brand { width: 100%; justify-content: center; font-size: 22px; }
  .nav-links { gap: 14px; font-size: 13.5px; justify-content: center; flex-wrap: wrap; }
  #portalAuthBtn { padding: 9px 20px; font-size: 13.5px; }
  .container { padding: 26px 14px 50px; }
  .hero { margin-bottom: 28px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 14.5px; margin-bottom: 20px; }
  .game-art { height: 185px; }
  .game-art .spr-hero { width: 72px; height: 72px; }
  .game-art .spr-boss { width: 94px; height: 94px; }
  .panel { padding: 18px 16px; border-radius: 16px; }
  .auth-modal { max-height: 92dvh; overflow-y: auto; }
}
