/* MEGA999 Landing Page — dark luxury casino theme
   Colors: deep black/purple bg, champagne gold primary, neon glow. */

:root {
  --bg-0: #0a0612;
  --bg-1: #120b20;
  --bg-2: #1a1030;
  --purple: #7b2ff7;
  --purple-2: #9d4bff;
  --gold: #e6c15c;
  --gold-2: #f5d97a;
  --gold-3: #b8912e;
  --gold-grad: linear-gradient(135deg, #f7e08a 0%, #e6c15c 40%, #b8912e 100%);
  --text: #f4efe4;
  --text-dim: #b9aec8;
  --card: rgba(255,255,255,0.04);
  --card-border: rgba(230,193,92,0.18);
  --glow: 0 0 22px rgba(230,193,92,0.45);
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 80% -10%, #2a1650 0%, transparent 55%),
              radial-gradient(900px 500px at -10% 20%, #1c0e3a 0%, transparent 50%),
              linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.05em;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  text-transform: uppercase;
}
.btn:active { transform: scale(0.97); }
.btn-gold {
  background: var(--gold-grad);
  color: #2a1b05;
  box-shadow: 0 6px 20px rgba(230,193,92,0.35), inset 0 1px 0 rgba(255,255,255,0.6);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(230,193,92,0.55), inset 0 1px 0 rgba(255,255,255,0.6); }
.btn-ghost {
  background: transparent;
  color: var(--gold-2);
  border: 1.5px solid var(--gold-3);
}
.btn-ghost:hover { background: rgba(230,193,92,0.1); box-shadow: var(--glow); }
.btn-sm { padding: 10px 20px; font-size: 13px; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(10,6,18,0.72);
  border-bottom: 1px solid var(--card-border);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand-logo {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--gold-grad);
  color: #2a1b05;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 18px;
  box-shadow: var(--glow);
}
.brand-name { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-tagline { display: block; font-size: 10px; font-weight: 500; letter-spacing: 0.18em; color: var(--text-dim); text-transform: uppercase; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  flex: 1;
  flex-wrap: wrap;
}
.nav-links a {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold-2); background: rgba(230,193,92,0.08); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* lang button */
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text);
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.lang-btn:hover { border-color: var(--gold-3); box-shadow: var(--glow); }

/* user chip */
.user-chip { display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-2), var(--gold-2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: #1a0b2c;
}
.user-meta { line-height: 1.15; }
.user-name { font-size: 13px; font-weight: 700; }
.user-balance { font-size: 12px; color: var(--gold-2); font-weight: 700; }

/* mobile menu toggle */
.menu-toggle {
  display: none;
  background: var(--card); border: 1px solid var(--card-border);
  color: var(--text); width: 42px; height: 42px; border-radius: 10px;
  font-size: 20px; cursor: pointer;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding: 80px 20px 90px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(700px 400px at 50% -10%, rgba(123,47,247,0.35), transparent 60%),
    radial-gradient(500px 300px at 85% 20%, rgba(230,193,92,0.18), transparent 60%);
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  font-size: 12px; letter-spacing: 0.22em; font-weight: 600;
  color: var(--gold-2);
  background: rgba(230,193,92,0.06);
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0.01em;
  margin: 0 auto 20px;
  max-width: 900px;
  background: linear-gradient(180deg, #fff8e0 0%, var(--gold-2) 55%, var(--gold-3) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 40px rgba(230,193,92,0.2);
}
.hero h1 .hero-line1, .hero h1 .hero-line2 { display: block; }
.hero h1 .hero-line2 { color: var(--gold-2); }
.hero .subtitle {
  font-size: clamp(15px, 2.2vw, 19px);
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 34px;
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* floating neon orbs */
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.5; pointer-events: none; }
.orb.purple { width: 320px; height: 320px; background: var(--purple); top: -60px; left: -80px; }
.orb.gold { width: 280px; height: 280px; background: var(--gold); bottom: -60px; right: -60px; }

/* ---- Section common ---- */
section { position: relative; }
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}
.section-head { text-align: center; margin-bottom: 40px; }
.section-title {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 900;
  letter-spacing: 0.01em;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-subtitle { color: var(--text-dim); margin-top: 10px; font-size: 16px; }

/* ---- Category chips ---- */
.categories { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 34px; }
.chip {
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text-dim);
  font-size: 14px; font-weight: 600; letter-spacing: 0.04em;
  cursor: pointer;
  transition: all .18s ease;
}
.chip:hover { color: var(--gold-2); border-color: var(--gold-3); }
.chip.active { background: var(--gold-grad); color: #2a1b05; border-color: transparent; box-shadow: var(--glow); }

/* ---- Game cards ---- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.game-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--card-border);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  cursor: pointer;
}
.game-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-3);
  box-shadow: 0 14px 40px rgba(0,0,0,0.5), var(--glow);
}
.game-cover {
  aspect-ratio: 16/10;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(123,47,247,0.55), rgba(26,16,48,0.9)),
              linear-gradient(160deg, #2a1650, #120b20);
}
.game-cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10,6,18,0.6) 100%);
}
/* category-scoped cover tint (keeps icon<->category consistent) */
.game-cover.cover-slots   { background: radial-gradient(circle at 30% 20%, rgba(153,69,255,0.55), rgba(30,15,55,0.9)), linear-gradient(160deg, #2a1650, #120b20); }
.game-cover.cover-fishing { background: radial-gradient(circle at 30% 20%, rgba(0,168,220,0.55), rgba(10,35,55,0.9)), linear-gradient(160deg, #0b2a3a, #07141f); }
.game-cover.cover-table   { background: radial-gradient(circle at 30% 20%, rgba(230,80,60,0.5), rgba(55,20,15,0.9)), linear-gradient(160deg, #3a1510, #1f0b08); }
.game-cover.cover-arcade  { background: radial-gradient(circle at 30% 20%, rgba(52,199,123,0.5), rgba(15,50,35,0.9)), linear-gradient(160deg, #133a24, #0a1f14); }
.game-cover .cover-mono {
  position: relative; z-index: 1;
  font-size: 42px; font-weight: 900; letter-spacing: 0.02em;
  background: linear-gradient(180deg, #fff8e0, #f5d97a 55%, #b8912e);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 26px rgba(230,193,92,0.35);
}
.game-cover .cover-emblem {
  position: absolute; z-index: 1; right: 12px; bottom: 10px;
  font-size: 30px; opacity: 0.9;
  text-shadow: 0 0 18px rgba(230,193,92,0.6);
}
.game-cover .icon { position: relative; z-index: 1; text-shadow: 0 0 24px rgba(230,193,92,0.6); }
.game-body { padding: 16px; }
.game-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; word-break: break-word; }
.game-cat { font-size: 12px; color: var(--gold-2); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px; }
.game-play {
  width: 100%;
  padding: 9px;
  border-radius: 999px;
  background: var(--gold-grad);
  color: #2a1b05;
  font-weight: 800; font-size: 12px; letter-spacing: 0.08em;
  border: none; cursor: pointer;
  transition: filter .15s;
}
.game-play:hover { filter: brightness(1.1); }

/* ---- Featured horizontal row ---- */
.featured-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 280px);
  gap: 20px;
  overflow-x: auto;
  padding: 6px 4px 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-3) transparent;
  margin-bottom: 40px;
}
.featured-row::-webkit-scrollbar { height: 8px; }
.featured-row::-webkit-scrollbar-thumb { background: var(--gold-3); border-radius: 999px; }
.featured-row .game-card { scroll-snap-align: start; }

/* loading / empty states */
.state-msg {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-dim);
  padding: 40px;
}
.spinner {
  width: 38px; height: 38px; margin: 0 auto 16px;
  border: 3px solid rgba(230,193,92,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Why choose us ---- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.why-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.why-card:hover { transform: translateY(-4px); border-color: var(--gold-3); box-shadow: var(--glow); }
.why-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(123,47,247,0.4);
}
.why-card h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.why-card p { font-size: 14px; color: var(--text-dim); }

/* ---- promotions ---- */
.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.promo-card {
  position: relative;
  border-radius: var(--radius);
  padding: 28px 24px;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(230,193,92,0.14), rgba(123,47,247,0.12));
  border: 1px solid var(--card-border);
}
.promo-card::before {
  content: ""; position: absolute; top: -40px; right: -40px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(230,193,92,0.5), transparent 70%);
}
.promo-emoji { font-size: 34px; margin-bottom: 12px; }
.promo-card h3 { font-size: 19px; font-weight: 900; margin-bottom: 8px; color: var(--gold-2); }
.promo-card p { font-size: 14px; color: var(--text-dim); }
.promo-note { text-align: center; margin-top: 22px; color: var(--text-dim); font-size: 14px; }

/* ---- how to play ---- */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.how-step {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
}
.how-num {
  width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--gold-grad); color: #2a1b05;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900;
  box-shadow: var(--glow);
}
.how-step h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.how-step p { font-size: 14px; color: var(--text-dim); }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--card-border);
  background: rgba(10,6,18,0.6);
  margin-top: 30px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 50px 20px 30px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
}
.footer-col h4 {
  font-size: 13px; letter-spacing: 0.14em; font-weight: 800;
  color: var(--gold-2); margin-bottom: 16px; text-transform: uppercase;
}
.footer-col a { display: block; font-size: 14px; color: var(--text-dim); padding: 5px 0; transition: color .15s; }
.footer-col a:hover { color: var(--gold-2); }
.footer-brand p { font-size: 13px; color: var(--text-dim); margin-top: 12px; max-width: 280px; }
.footer-bottom {
  border-top: 1px solid var(--card-border);
  padding: 18px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}
.footer-bottom .disclaimer { font-size: 11px; margin-top: 6px; opacity: 0.7; }

/* ---- Language panel modal ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6,3,12,0.7);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%; max-width: 460px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), var(--glow);
  transform: scale(0.96); transition: transform .2s;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.modal-head h2 { font-size: 20px; font-weight: 900; }
.modal-sub { color: var(--text-dim); font-size: 13px; margin-bottom: 18px; }
.modal-close { background: none; border: none; color: var(--text-dim); font-size: 24px; cursor: pointer; }
.lang-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lang-option {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--card); border: 1px solid transparent;
  cursor: pointer; font-size: 14px; font-weight: 600;
  transition: border-color .15s, background .15s;
}
.lang-option:hover { border-color: var(--gold-3); background: rgba(230,193,92,0.08); }
.lang-option.active { border-color: var(--gold-3); background: rgba(230,193,92,0.12); color: var(--gold-2); }
.lang-option .flag { font-size: 20px; }

/* ---- reveal animation (non-blocking: visible by default) ---- */
.reveal { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }
.reveal.pre-hidden { opacity: 0; transform: translateY(24px); }
.reveal.visible { opacity: 1; transform: none; }

/* ---- announcement marquee ---- */
.notice-bar {
  max-width: 1200px;
  margin: 22px auto 0;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(230,193,92,0.08);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-dim);
}
.notice-ico { font-size: 18px; }
.notice-label { font-weight: 800; color: var(--gold-2); white-space: nowrap; }
.notice-text { color: var(--text); }

/* ---- game badges ---- */
.game-cover { position: relative; }
.badge {
  position: absolute;
  top: 8px; left: 8px;
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
  z-index: 2;
  color: #fff;
}
.badge-hot { background: linear-gradient(135deg, #ff5e3a, #d61f1f); box-shadow: 0 2px 8px rgba(255,80,40,0.5); }
.badge-new { background: linear-gradient(135deg, #34d399, #0ea968); box-shadow: 0 2px 8px rgba(20,180,100,0.5); }

/* ---- jackpot ---- */
.jackpot {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}
.jackpot-main, .jackpot-winners {
  background: linear-gradient(150deg, rgba(230,193,92,0.14), rgba(123,47,247,0.12));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
}
.jackpot-main { display: flex; align-items: center; gap: 22px; }
.jackpot-emoji { font-size: 56px; filter: drop-shadow(0 0 14px rgba(230,193,92,0.6)); }
.jackpot-label { font-size: 14px; color: var(--text-dim); letter-spacing: 0.1em; text-transform: uppercase; }
.jackpot-amount {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 30px rgba(230,193,92,0.3);
}
.jackpot-winners-title { font-size: 15px; font-weight: 800; color: var(--gold-2); margin-bottom: 14px; letter-spacing: 0.06em; }
.winner-row {
  display: flex; justify-content: space-between;
  padding: 8px 0; font-size: 13px;
  color: var(--text-dim);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.winner-row:last-child { border-bottom: none; }

/* ---- payment methods ---- */
.pay-row {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}
.pay-badge {
  padding: 13px 22px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text);
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
}

/* ---- responsive ---- */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .jackpot { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .menu-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: rgba(10,6,18,0.98);
    border-bottom: 1px solid var(--card-border);
    padding: 10px 20px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 15px; }
  .header-actions { gap: 8px; }
  .user-meta { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .lang-list { grid-template-columns: 1fr; }
  .hero { padding: 50px 16px 60px; }
}
@media (max-width: 480px) {
  .games-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .game-cover { font-size: 38px; }
  .why-grid, .promo-grid, .how-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1; }
  .jackpot-main { flex-direction: column; text-align: center; }
  .notice-bar { flex-wrap: wrap; }
  .notice-label { width: 100%; }
}
