/* ============================================================
   Nigma9 — Main Stylesheet v2 (batch1 recolour: Nigma9 -> Nigma9 palette)
   Mobile-first | Casino Premium UI | Cloudflare Pages
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --gold:        #1E6BFF;
  --gold-light:  #4DA6FF;
  --gold-dark:   #00478A;
  --gold-glow:   rgba(30,107,255,.4);
  --red:         #e94560;
  --green:       #27ae60;
  --bg-0:        #050B2E;
  --bg-1:        #0A1A4A;
  --bg-2:        #0D2158;
  --bg-card:     #0F2260;
  --bg-card2:    #14295E;
  --border:      rgba(30,107,255,.22);
  --border2:     rgba(255,255,255,.08);
  --text:        #FFFFFF;
  --text-muted:  #A8BEDB;
  --radius:      10px;
  --radius-lg:   18px;
  --radius-xl:   24px;
  --shadow-card: 0 4px 24px rgba(0,0,0,.45);
  --shadow-gold: 0 0 28px rgba(30,107,255,.35);
  --header-h:    64px;
  --mob-nav-h:   60px;
  --transition:  .22s ease;
  --font:        'Inter', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-heading: 'Rajdhani', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-body:    'Inter', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-num:     'Rajdhani', 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  /* Nigma9 true-gold accent layer (rewards / VIP / CTA highlight only) */
  --accent-gold:        #FFC42E;
  --accent-gold-light:  #FFD86B;
  --accent-gold-dark:   #C98A12;
  --accent-glow:        rgba(255,196,46,.45);
  --silver-1:           #E8F1FF;
  --silver-2:           #9FB8D9;
  --neon-cyan:           #00D4FF;
  --text-on-gold:        #0A1130;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100% }
body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block }
a { color: inherit; text-decoration: none }
ul, ol { list-style: none }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit }

/* ---------- Typography ---------- */
h1 { font-family: var(--font-heading); font-size: clamp(1.9rem, 6vw, 3.2rem); font-weight: 700; line-height: 1.15; letter-spacing: .01em }
h2 { font-family: var(--font-heading); font-size: clamp(1.35rem, 3.5vw, 2.1rem); font-weight: 700; letter-spacing: .01em }
h3 { font-family: var(--font-heading); font-size: clamp(1rem, 2.5vw, 1.3rem); font-weight: 600; letter-spacing: .01em }
p  { color: var(--text-muted); line-height: 1.7 }

/* ---------- Utility ---------- */
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 1rem }
@media(min-width:768px) { .container { padding: 0 1.5rem } }
.section-gap  { padding: 4rem 0 }
@media(min-width:768px) { .section-gap { padding: 5.5rem 0 } }
.text-gold    { color: var(--gold) }
.text-center  { text-align: center }
.sr-only      { position: absolute; width: 1px; height: 1px; clip: rect(0,0,0,0); overflow: hidden }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .8rem 1.9rem; border-radius: 50px;
  font-size: .95rem; font-weight: 700; letter-spacing: .03em;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), opacity var(--transition);
  white-space: nowrap; cursor: pointer;
}
.btn:active { transform: scale(.96) }

.btn-gold {
  background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold) 60%, var(--accent-gold-dark));
  color: var(--text-on-gold);
  box-shadow: 0 4px 18px var(--accent-glow);
}
.btn-gold:hover { box-shadow: 0 6px 30px var(--accent-glow); transform: translateY(-2px) }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--gold);
}
.btn-outline:hover { background: rgba(30,107,255,.1); box-shadow: 0 0 18px var(--gold-glow); transform: translateY(-2px) }

.btn-red {
  background: linear-gradient(135deg, #ff5e7a, var(--red), #b52038);
  color: #fff;
  box-shadow: 0 4px 18px rgba(233,69,96,.35);
}
.btn-red:hover { box-shadow: 0 6px 28px rgba(233,69,96,.55); transform: translateY(-2px) }

.btn-sm  { padding: .55rem 1.3rem; font-size: .85rem }
.btn-lg  { padding: 1rem 2.4rem; font-size: 1.05rem }

/* GLOBAL FIX: .seo-content forces all <a> gold, which made gold buttons unreadable
   (gold text on gold). Keep button text its intended colour everywhere. */
.seo-content a.btn-gold, .seo-content a.btn.btn-gold { color: var(--text-on-gold); }
.seo-content a.btn-red, .seo-content a.btn.btn-red { color: #fff; }
.seo-content a.btn-outline { color: var(--gold); }
.btn-xl  { padding: 1.15rem 2.8rem; font-size: 1.1rem }
.btn-full { width: 100%; justify-content: center }

/* ============================================================
   SECTION TITLE
   ============================================================ */
.section-title { text-align: center; margin-bottom: 2.5rem }
.section-title h2 {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .4rem;
}
.section-title .sub { font-size: 1rem; color: var(--text-muted) }
.title-line {
  width: 52px; height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
  border-radius: 2px; margin: .7rem auto 0;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 800;
  height: var(--header-h);
  background: rgba(5,11,46,.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}
.site-header.scrolled { background: rgba(5,11,46,.98) }

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}

/* Logo */
.logo {
  display: flex; align-items: center; gap: .55rem;
  flex-shrink: 0;
}
.logo-img { height: 38px; width: auto; object-fit: contain }
.logo-text {
  font-size: 1.4rem; font-weight: 900; letter-spacing: .04em;
  display: none;
}
@media(min-width:480px) { .logo-text { display: block } }
.logo-text em { color: var(--gold); font-style: normal }

/* Desktop nav links — hidden on mobile */
.nav-links {
  display: none;
  gap: 1.75rem; align-items: center;
}
@media(min-width:768px) { .nav-links { display: flex } }

.nav-link {
  font-size: .9rem; font-weight: 600; color: var(--text-muted);
  position: relative; transition: color var(--transition);
}
.nav-link::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--gold);
  transform: scaleX(0); transition: transform var(--transition); border-radius: 2px;
}
.nav-link:hover, .nav-link.active { color: var(--gold) }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1) }

/* Desktop CTA */
.nav-cta { display: flex; gap: .6rem; align-items: center }
/* Hide cta on very small screens */
@media(max-width:480px) { .nav-cta .btn-outline { display: none } }

/* Desktop "Games" nav dropdown (5 product lines) */
.nav-dd { position: relative }
.nav-dd-menu {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  min-width: 200px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .5rem; box-shadow: 0 16px 40px rgba(0,0,0,.5);
  opacity: 0; pointer-events: none; transition: opacity var(--transition), transform var(--transition);
}
.nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu { opacity: 1; pointer-events: all }
.nav-dd-menu a { display: block; padding: .6rem .8rem; border-radius: 8px; font-size: .88rem; color: var(--text) }
.nav-dd-menu a:hover { background: rgba(30,107,255,.1); color: var(--gold) }
.nav-dd-menu .nav-dd-divider { height: 1px; background: var(--border2); margin: .35rem .2rem }

/* Language switch button */
.lang-switch {
  font-size: .8rem; font-weight: 700; letter-spacing: .06em;
  color: var(--text-muted);
  padding: .35rem .65rem;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 6px;
  transition: color var(--transition), border-color var(--transition);
}
.lang-switch:hover { color: var(--gold); border-color: rgba(30,107,255,.35) }
.lang-switch.active { color: var(--gold); border-color: rgba(30,107,255,.35) }

/* 3-language dropdown */
.lang-dd { position: relative; display: inline-block; }
.lang-dd > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 700; color: var(--text); padding: .45rem .85rem; border: 1px solid rgba(30,107,255,.5); border-radius: 999px; background: rgba(30,107,255,.1); transition: .2s; }
.lang-dd > summary::-webkit-details-marker { display: none; }
.lang-dd > summary::before { content: "🌐"; font-size: .95rem; line-height: 1; }
.lang-dd > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-left: .1rem; opacity: .85; transition: transform .2s; }
.lang-dd[open] > summary::after { transform: rotate(-135deg); }
.lang-dd > summary:hover, .lang-dd[open] > summary { color: var(--gold); border-color: var(--gold); background: rgba(30,107,255,.18); }
.lang-dd-menu { position: absolute; right: 0; top: calc(100% + 6px); background: #0E1C4C; border: 1px solid var(--border); border-radius: 10px; padding: .3rem; min-width: 150px; z-index: 900; box-shadow: 0 12px 32px rgba(0,0,0,.55); }
.lang-dd-menu a { display: flex; align-items: center; gap: .5rem; padding: .55rem .65rem; border-radius: 7px; font-size: .85rem; color: var(--text); white-space: nowrap; }
.lang-dd-menu a:hover { background: rgba(30,107,255,.15); color: var(--gold); }
.lang-dd-menu a.active { color: var(--gold); }

/* Footer language links */
.footer-langs { display: flex; align-items: center; gap: .5rem; font-size: .82rem }
.footer-langs a { color: var(--text-muted); transition: color var(--transition) }
.footer-langs a:hover, .footer-langs .lang-active { color: var(--gold); font-weight: 700 }
.footer-divider { color: rgba(255,255,255,.15) }

/* ============================================================
   LEFT SIDE DRAWER (mobile menu — replaces hamburger)
   ============================================================ */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.drawer-overlay.open { opacity: 1; pointer-events: all }

.side-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 1200;
  width: min(300px, 85vw);
  background: var(--bg-1);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform .32s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
.side-drawer.open { transform: translateX(0) }

/* Drawer header */
.drawer-head {
  padding: 1.25rem 1.1rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-2);
}
.drawer-logo { display: flex; align-items: center }
.drawer-logo img { height: 44px; width: auto; object-fit: contain }
.drawer-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.drawer-close:hover { background: rgba(30,107,255,.15); color: var(--gold) }

/* Quick actions */
.drawer-actions {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: .6rem; padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
}
.drawer-action-btn {
  display: flex; align-items: center; gap: .45rem;
  padding: .7rem .8rem; border-radius: var(--radius);
  font-size: .85rem; font-weight: 700;
  transition: all var(--transition);
}
.drawer-action-btn.topup {
  background: linear-gradient(135deg, rgba(30,107,255,.2), rgba(30,107,255,.08));
  border: 1px solid rgba(30,107,255,.3); color: var(--gold);
}
.drawer-action-btn.withdraw {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border2); color: var(--text);
}
.drawer-action-btn:hover { transform: translateY(-1px); opacity: .85 }
.drawer-action-btn .icon { font-size: 1.15rem }

/* Nav items */
.drawer-nav { flex: 1; padding: .5rem 0 }
.drawer-nav-item {
  display: flex; align-items: center; gap: .8rem;
  padding: .9rem 1.25rem;
  font-size: .93rem; font-weight: 600; color: var(--text);
  transition: background var(--transition), color var(--transition);
  border-left: 3px solid transparent;
}
.drawer-nav-item:hover, .drawer-nav-item.active {
  background: rgba(30,107,255,.07);
  color: var(--gold);
  border-left-color: var(--gold);
}
.drawer-nav-item .di {
  width: 18px; height: 18px; flex-shrink: 0;
  color: var(--text-muted);
  stroke: var(--text-muted);
}
.drawer-nav-item:hover .di, .drawer-nav-item.active .di {
  color: var(--gold);
  stroke: var(--gold);
}
.drawer-divider { height: 1px; background: var(--border); margin: .4rem 1.25rem }

/* Drawer footer */
.drawer-foot {
  padding: .8rem 1.1rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.drawer-support {
  display: flex; align-items: center; gap: .4rem;
  font-size: .85rem; color: var(--text-muted);
}
.drawer-settings { display: flex; gap: .6rem; align-items: center; color: var(--text-muted); font-size: .9rem }
.drawer-settings button { padding: .3rem; border-radius: 4px; transition: color var(--transition) }
.drawer-settings button:hover { color: var(--gold) }

/* Flag button in drawer footer */
.lang-flag-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  transition: background var(--transition), border-color var(--transition);
  cursor: pointer;
}
.lang-flag-btn:hover { background: rgba(30,107,255,.15); border-color: rgba(30,107,255,.3) }
.flag-icon { font-size: 1.15rem; line-height: 1; display: block }

/* Language switching modal overlay */
.lang-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 2000;
  backdrop-filter: blur(4px);
}
.lang-modal-overlay.open { display: block }

/* Language switching modal */
.lang-modal {
  display: none; position: fixed;
  left: 50%; top: 50%; transform: translate(-50%,-50%) scale(.92);
  z-index: 2001; width: min(340px, 90vw);
  background: #0B1740;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.7);
  overflow: hidden;
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), opacity .18s;
  opacity: 0;
}
.lang-modal.open {
  display: block;
  transform: translate(-50%,-50%) scale(1);
  opacity: 1;
}

/* Modal head */
.lang-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem .9rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.lang-modal-title {
  font-size: .95rem; font-weight: 700; color: #fff; letter-spacing: .02em;
}
.lang-modal-close {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.07); color: rgba(255,255,255,.5);
  font-size: .85rem; display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.lang-modal-close:hover { background: rgba(255,255,255,.13); color: #fff }

/* Language options */
.lang-modal-body { padding: .6rem .75rem .85rem }
.lang-option {
  display: flex; align-items: center; gap: .85rem;
  padding: .85rem .75rem; border-radius: 10px;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
  cursor: pointer;
}
.lang-option:hover { background: rgba(255,255,255,.04) }
.lang-option.active {
  background: rgba(30,107,255,.07);
  border-color: rgba(30,107,255,.18);
}
.lang-flag { font-size: 1.55rem; line-height: 1; flex-shrink: 0 }
.lang-name { flex: 1; font-size: .9rem; font-weight: 600; color: rgba(255,255,255,.8) }
.lang-option.active .lang-name { color: #fff }

/* Mobile: tighten lang-modal option rows so 2 options + header never exceed ~40% viewport height (踩坑修复) */
@media(max-width:480px) {
  .lang-option { padding: .7rem .65rem }
  .lang-flag { font-size: 1.3rem }
  .lang-name { font-size: .85rem }
}

/* Radio dot */
.lang-radio {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.lang-option.active .lang-radio { border-color: var(--gold) }
.lang-radio-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: transparent;
}
.lang-option.active .lang-radio-dot { background: var(--gold) }

/* ============================================================
   HERO BANNER + CAROUSEL
   ============================================================ */
.hero {
  position: relative;
  margin-top: var(--header-h);
  background: linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 100%);
  border-bottom: 1px solid var(--border);
}
.hero-carousel {
  position: relative; z-index: 1; width: 100%;
  aspect-ratio: 16 / 9;   /* three source banners measured exactly 1672x941 = 16:9 */
  max-height: 720px;
  overflow: hidden;
}
@media(max-width:600px) { .hero-carousel { aspect-ratio: 16 / 9; max-height: none } }

.hero-slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity .7s ease;
  display: block;
}
.hero-slide.active { opacity: 1 }
.hero-slide img {
  width: 100%; height: 100%;
  object-fit: contain;   /* whole banner always visible, never cropped */
  object-position: center;
  display: block;
}

/* Dots row — moved OUT of the image area (was absolute-positioned on top of the banner) */
.hero-dots-row {
  display: flex; justify-content: center; gap: .5rem;
  padding: .9rem 0; background: var(--bg-0);
}
.carousel-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.25);
  transition: background var(--transition), transform var(--transition);
  cursor: pointer;
}
.carousel-dot.active { background: var(--gold); transform: scale(1.3); box-shadow: 0 0 8px var(--gold-glow) }

/* ── Intro / H1 section directly under the Hero carousel ── */
.intro-section {
  padding: 3.5rem 0 4rem;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 100%);
}
.intro-eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  color: var(--accent-gold-light); text-transform: uppercase; margin-bottom: .9rem;
}
.intro-section h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  background: linear-gradient(100deg, var(--silver-1) 0%, var(--gold-light) 45%, var(--silver-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 1rem; line-height: 1.2;
}
.intro-section .lead { max-width: 640px; margin: 0 auto 1.75rem; color: var(--text-muted); font-size: 1.05rem; line-height: 1.75 }
.intro-cta { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap }

/* ── First section of pages WITHOUT a hero carousel (fixed header clearance fix) ── */
.page-first-section {
  padding-top: calc(var(--header-h) + 1.75rem);
}

/* ============================================================
   GAME SECTION
   ============================================================ */
.games-section { background: var(--bg-1) }

/* Category tabs */
.game-tabs {
  display: flex; gap: .4rem; flex-wrap: wrap;
  margin-bottom: 1.75rem; padding-bottom: .25rem;
  overflow-x: auto; scrollbar-width: none;
}
.game-tabs::-webkit-scrollbar { display: none }
.tab-btn {
  display: flex; align-items: center; gap: .4rem;
  padding: .55rem 1.2rem; border-radius: 50px;
  font-size: .83rem; font-weight: 700; letter-spacing: .03em;
  color: var(--text-muted);
  border: 1px solid var(--border2);
  white-space: nowrap;
  transition: all var(--transition);
}
.tab-btn:hover { border-color: rgba(30,107,255,.3); color: var(--gold) }
.tab-btn.active {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #ffffff; border-color: transparent;
  box-shadow: 0 3px 14px var(--gold-glow);
}

/* Game grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .7rem;
}
@media(min-width:480px) { .games-grid { grid-template-columns: repeat(4, 1fr) } }
@media(min-width:768px) { .games-grid { grid-template-columns: repeat(5, 1fr); gap: 1rem } }
@media(min-width:1024px) { .games-grid { grid-template-columns: repeat(6, 1fr) } }

.game-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-card); aspect-ratio: 3/4;
  border: 1px solid var(--border2);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.game-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0,0,0,.5), 0 0 18px rgba(30,107,255,.12);
  border-color: rgba(30,107,255,.35);
}
.game-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.game-card:hover img { transform: scale(1.07) }

.game-card-badge {
  position: absolute; top: .4rem; left: .4rem;
  font-size: .65rem; font-weight: 800; text-transform: uppercase;
  padding: .15rem .45rem; border-radius: 4px;
}
.badge-hot { background: var(--red); color: #fff }
.badge-new { background: var(--accent-gold-light); color: var(--text-on-gold) }

/* Play hover overlay */
.game-card-overlay {
  position: absolute; inset: 0;
  background: rgba(5,11,46,.82);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .5rem;
  opacity: 0; transition: opacity var(--transition);
}
.game-card:hover .game-card-overlay { opacity: 1 }
.game-card-name {
  font-size: .78rem; font-weight: 700; color: #fff; text-align: center; padding: 0 .5rem;
}
.game-card-play {
  display: flex; align-items: center; gap: .35rem;
  padding: .5rem 1.1rem; border-radius: 50px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #ffffff; font-size: .8rem; font-weight: 800;
}

/* Emoji fallback cards */
.game-card-emoji {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card2));
}

/* ============================================================
   PROVIDERS / LICENSE
   ============================================================ */
.providers-section {
  background: var(--bg-0);
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
/* 35 logos, 3 mixed source ratios (1:1 / 3:1 / 2.3~4.5:1) — uniform card + contain, never stretched */
.providers-grid {
  display: grid;
  gap: .8rem;
  grid-template-columns: repeat(2, 1fr);                                /* <480px: 2 col */
  justify-items: center;
}
@media(min-width:480px)  { .providers-grid { grid-template-columns: repeat(3, 1fr) } }   /* mobile: 3 col */
@media(min-width:768px)  { .providers-grid { grid-template-columns: repeat(5, 1fr) } }   /* tablet: 5 col */
@media(min-width:1200px) { .providers-grid { grid-template-columns: repeat(7, 1fr) } }   /* desktop: 7 col */

.provider-card {
  width: 168px; height: 84px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  padding: 14px 18px;
  max-width: 100%;
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}
.provider-card:hover {
  border-color: rgba(30,107,255,.35);
  background: rgba(255,255,255,.07);
  transform: translateY(-2px);
}
.provider-card img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;   /* core: keep each logo's native ratio, never stretch */
}

/* Legacy chip class kept only so any stray unmigrated markup doesn't break visually */
.provider-chip {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: .6rem 1.2rem;
  display: flex; align-items: center; gap: .5rem;
  transition: all var(--transition);
}
.provider-chip img { height: 26px; width: auto; object-fit: contain }
.provider-chip span { font-size: .78rem; font-weight: 700; color: var(--text-muted) }

/* ============================================================
   WHY CHOOSE Nigma9
   ============================================================ */
.why-section {
  background: linear-gradient(160deg, var(--bg-1) 0%, var(--bg-0) 100%);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.4rem;
  text-align: center;
  position: relative; overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 50%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card), var(--shadow-gold);
  border-color: rgba(30,107,255,.3);
}
.feature-icon {
  width: 64px; height: 64px; margin: 0 auto 1.1rem;
  background: linear-gradient(135deg, rgba(30,107,255,.15), rgba(30,107,255,.04));
  border: 1px solid rgba(30,107,255,.2); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
}
.feature-icon svg { stroke: var(--gold) }
.feature-card h3 { color: var(--gold); margin-bottom: .6rem; font-size: 1.05rem }
.feature-card p { font-size: .9rem; line-height: 1.65 }

/* ============================================================
   PROMOTIONS
   ============================================================ */
.promo-section { background: var(--bg-1) }
.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}
.promo-card {
  border-radius: var(--radius-lg); overflow: hidden;
  position: relative; min-height: 200px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.75rem 1.4rem 1.4rem;
  border: 1px solid var(--border2);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.promo-card:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(0,0,0,.5) }
.promo-bg { position: absolute; inset: 0; z-index: 0 }
.promo-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 60%, transparent 100%);
}
.promo-card:nth-child(1) .promo-bg { background: linear-gradient(135deg, #0A1A4A, #1E3A8A) } /* 首存100% */
.promo-card:nth-child(2) .promo-bg { background: linear-gradient(135deg, #081540, #0D2A6B) } /* RM10注册彩金 */
.promo-card:nth-child(3) .promo-bg { background: linear-gradient(135deg, #0B1030, #142A5C) } /* 3%返水 */
.promo-emoji { display: none }
.promo-content { position: relative; z-index: 1 }
.promo-label {
  display: inline-block;
  background: var(--accent-gold); color: var(--text-on-gold);
  font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .07em;
  padding: .2rem .65rem; border-radius: 4px; margin-bottom: .65rem;
}
.promo-card h3 { color: #fff; font-size: 1.2rem; margin-bottom: .3rem }
.promo-amount { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 1.8rem; font-weight: 900; color: var(--accent-gold-light); line-height: 1; margin-bottom: .55rem }
.promo-card p { font-size: .88rem; color: rgba(255,255,255,.65); margin-bottom: 1rem }

/* ============================================================
   FAQ
   ============================================================ */
.faq-section { background: linear-gradient(160deg, var(--bg-1) 0%, var(--bg-0) 100%) }
.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: .6rem }
.faq-item {
  background: var(--bg-card); border: 1px solid var(--border2);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item.open { border-color: rgba(30,107,255,.3) }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.3rem; text-align: left;
  font-size: .95rem; font-weight: 600; color: var(--text);
  transition: color var(--transition);
}
.faq-q:hover { color: var(--gold) }
.faq-item.open .faq-q { color: var(--gold) }
.faq-icon {
  flex-shrink: 0; width: 22px; height: 22px;
  border: 1px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; color: var(--gold);
  transition: transform var(--transition), background var(--transition);
}
.faq-item.open .faq-icon { transform: rotate(45deg); background: rgba(30,107,255,.12) }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .4s ease, padding .3s ease;
  padding: 0 1.3rem;
}
.faq-item.open .faq-a { max-height: 500px; padding-bottom: 1.1rem }
.faq-a p { font-size: .9rem; line-height: 1.75 }

/* ============================================================
   SEO LONG-FORM TEXT SECTION
   ============================================================ */
.seo-section {
  background: var(--bg-0);
  border-top: 1px solid var(--border);
}
.seo-content { max-width: 960px; margin: 0 auto }
.seo-content h2 {
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  color: var(--gold); margin-bottom: 1rem; margin-top: 2.5rem; font-weight: 800;
}
.seo-content h2:first-child { margin-top: 0 }
.seo-content h1 {
  font-size: clamp(1.6rem, 4.5vw, 2.3rem);
  color: var(--gold); margin: 0 0 1rem; font-weight: 800; line-height: 1.2;
}
.seo-content .legal-meta {
  font-size: .85rem; color: var(--text-muted); margin: 0 0 2rem;
  padding-bottom: 1.25rem; border-bottom: 1px solid var(--border);
}
.seo-content .lead { font-size: 1.05rem; color: var(--text); line-height: 1.8; margin-bottom: 1.5rem }

/* .auth-launch-btn: kept (recoloured to true-gold) — still used standalone as a big CTA
   pill on tutorial.html, independent of the deleted iframe login/register panel markup */
.auth-launch-btn {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  margin-top: .35rem; padding: 1.15rem 1.75rem;
  background: linear-gradient(135deg, var(--accent-gold-light) 0%, var(--accent-gold) 55%, var(--accent-gold-dark) 100%);
  color: var(--text-on-gold); font-weight: 800; font-size: 1.15rem; letter-spacing: .01em;
  border-radius: 14px; text-decoration: none;
  box-shadow: 0 10px 30px var(--accent-glow);
  animation: authBtnGlow 2.4s ease-in-out infinite;
  transition: transform .15s, box-shadow .2s;
}
.auth-launch-btn svg { width: 22px; height: 22px; flex-shrink: 0 }
.auth-launch-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 42px var(--accent-glow); animation: none }
@keyframes authBtnGlow {
  0%, 100% { box-shadow: 0 10px 28px var(--accent-glow) }
  50% { box-shadow: 0 12px 40px var(--accent-glow) }
}

.seo-content h3 {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text); margin-bottom: .65rem; margin-top: 1.75rem;
}
.seo-content p { font-size: .95rem; line-height: 1.85; margin-bottom: 1rem }
.seo-content ul { margin-bottom: 1rem; padding-left: 1.25rem }
.seo-content ul li {
  font-size: .95rem; color: var(--text-muted); line-height: 1.8; list-style: disc;
  margin-bottom: .3rem;
}
.seo-content strong { color: var(--text); font-weight: 700 }
.seo-content a { color: var(--gold); transition: opacity var(--transition) }
.seo-content a:hover { opacity: .8 }
.seo-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 1.5rem }
@media(min-width:640px) { .seo-grid { grid-template-columns: 1fr 1fr } }
.seo-card {
  background: var(--bg-card); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 1.25rem;
}
.seo-card h3 { color: var(--gold); font-size: 1rem; margin-bottom: .5rem; margin-top: 0 }

/* Mechanism-explainer table (replaces the old rebate-table.webp image) */
.info-table { width: 100%; border-collapse: collapse; background: var(--bg-card); border: 1px solid var(--border2); border-radius: var(--radius-lg); overflow: hidden }
.info-table th { background: rgba(30,107,255,.12); color: var(--gold-light); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; padding: .85rem 1.1rem; text-align: left }
.info-table td { padding: .85rem 1.1rem; font-size: .92rem; color: var(--text-muted); border-top: 1px solid var(--border2) }
.info-table tr:hover td { background: rgba(30,107,255,.05) }

/* Placeholder notice panel ("details announced soon") */
.notice-panel {
  background: rgba(30,107,255,.08); border: 1px dashed var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem; text-align: center;
  color: var(--text-muted); font-size: .92rem;
}

/* ── Tutorial: quick-jump buttons ── */
.tut-toc { display:grid; grid-template-columns:repeat(2,1fr); gap:.75rem; margin:1.5rem 0 2.5rem; }
@media(min-width:560px){ .tut-toc { grid-template-columns:repeat(3,1fr); } }
.tut-toc a {
  display:flex; align-items:center; justify-content:center; gap:.5rem; text-align:center;
  padding:.9rem .9rem; border-radius:12px; font-size:.95rem; font-weight:700;
  color:var(--gold-light); text-decoration:none;
  background:linear-gradient(135deg, rgba(30,107,255,.14), rgba(30,107,255,.03));
  border:1px solid rgba(30,107,255,.45); transition:all var(--transition);
}
.tut-toc a:hover {
  background:linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark)); color:#fff;
  border-color:var(--gold); opacity:1; transform:translateY(-2px); box-shadow:0 8px 22px var(--gold-glow);
}

/* ── Tutorial: blue-framed cards (numbers are step indicators, not rewards — stay on --gold family) ── */
.tut-card {
  position:relative; background:var(--bg-card); overflow:hidden;
  border:1px solid rgba(30,107,255,.4); border-radius:var(--radius-lg);
  margin-bottom:1.6rem; scroll-margin-top:84px; box-shadow:0 6px 26px rgba(0,0,0,.4);
}
.tut-card::before { content:''; position:absolute; left:0; top:0; bottom:0; width:4px; background:linear-gradient(180deg, var(--gold-light), var(--gold), var(--gold-dark)); }
.tut-card-head {
  display:flex; align-items:center; gap:.9rem; margin:0; padding:1.05rem 1.4rem;
  background:linear-gradient(135deg, rgba(30,107,255,.18), rgba(30,107,255,.04));
  border-bottom:1px solid rgba(30,107,255,.3);
}
.tut-num { flex-shrink:0; width:42px; height:42px; border-radius:11px; display:flex; align-items:center; justify-content:center; font-weight:900; font-size:1.2rem; font-family: var(--font-num); color:#fff; background:linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-dark)); box-shadow:0 6px 16px var(--gold-glow); }
.tut-card-head h2 { margin:0 !important; font-size:clamp(1.1rem,3vw,1.4rem); color:#fff !important; line-height:1.25; }
.tut-steps { list-style:none; padding:1.1rem 1.4rem .4rem; margin:0; counter-reset:tut; }
.tut-steps li { position:relative; padding:.7rem 0 .7rem 2.5rem; border-bottom:1px dashed var(--border); color:var(--text); line-height:1.7; font-size:.95rem; list-style:none; }
.tut-steps li:last-child { border-bottom:0; }
.tut-steps li::before { counter-increment:tut; content:counter(tut); position:absolute; left:0; top:.62rem; width:1.55rem; height:1.55rem; border-radius:50%; background:rgba(30,107,255,.18); border:1px solid rgba(30,107,255,.5); color:var(--gold-light); font-size:.8rem; font-weight:700; display:flex; align-items:center; justify-content:center; }
.tut-tip { margin:.2rem 1.4rem 1.2rem; padding:.75rem 1rem; background:rgba(30,107,255,.1); border:1px solid rgba(30,107,255,.3); border-left:3px solid var(--gold); border-radius:8px; font-size:.88rem; color:var(--text-muted); line-height:1.6; }
.tut-tip strong { color:var(--gold); }
.tut-cta { text-align:center; margin-top:2rem; }
.seo-card p { font-size: .88rem; margin-bottom: 0 }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: linear-gradient(180deg, var(--bg-1) 0%, #030308 100%);
  border-top: 1px solid var(--border); padding: 3.5rem 0 1.5rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 2rem; margin-bottom: 2.5rem;
}
@media(min-width:580px) { .footer-grid { grid-template-columns: repeat(2,1fr) } }
@media(min-width:900px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr } }

.footer-brand .logo { margin-bottom: .9rem }
.footer-brand p { font-size: .88rem; line-height: 1.7; margin-bottom: 1rem }
.footer-age {
  display: inline-flex; align-items: center; gap: .35rem;
  background: rgba(233,69,96,.1); border: 1px solid rgba(233,69,96,.2);
  border-radius: 6px; padding: .28rem .75rem;
  font-size: .78rem; font-weight: 700; color: var(--red);
}

.footer-col h4 {
  font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold); margin-bottom: .85rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: .4rem }
.footer-col a {
  font-size: .88rem; color: var(--text-muted);
  transition: color var(--transition), padding-left var(--transition); display: inline-block;
}
.footer-col a:hover { color: var(--gold); padding-left: 4px }

.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 1.25rem;
  display: flex; flex-wrap: wrap; gap: .75rem;
  align-items: center; justify-content: space-between;
}
.footer-bottom p { font-size: .8rem; color: var(--text-muted) }
.footer-bottom a { color: var(--gold-dark); transition: color var(--transition) }
.footer-bottom a:hover { color: var(--gold) }

/* ============================================================
   MOBILE BOTTOM NAV — v3 (SVG icons, pill active, no emoji)
   ============================================================ */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 900;
  height: var(--mob-nav-h);
  background: #050E33;
  border-top: 1px solid rgba(30,107,255,.1);
  box-shadow: 0 -8px 32px rgba(0,0,0,.6);
}
@media(max-width:767px) {
  .mobile-bottom-nav { display: flex }
  body { padding-bottom: var(--mob-nav-h) }
}

body.auth-page .mobile-bottom-nav { display: none !important }
body.auth-page { padding-bottom: 0 !important }

.mob-nav-items {
  width: 100%; display: flex; align-items: center;
  padding: 0 .25rem;
  gap: .25rem;
}

/* Each nav item */
.mob-nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px; height: 50px;
  border-radius: 12px;
  font-size: .58rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: #6B84B0;
  position: relative; transition: color .2s, background .2s; cursor: pointer;
  border: none; background: transparent;
}

/* Active / hover state */
.mob-nav-item.active {
  color: var(--gold);
  background: rgba(30,107,255,.1);
}
.mob-nav-item:hover:not(.mob-register) { color: rgba(255,255,255,.6) }

/* SVG icon container */
.mob-svg {
  width: 20px; height: 20px;
  display: block; flex-shrink: 0;
  transition: transform .2s;
}
.mob-nav-item.active .mob-svg { transform: scale(1.12) }

/* Gold top dot indicator for active */
.mob-nav-item.active::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 20px; height: 2.5px; border-radius: 0 0 3px 3px;
  background: var(--gold);
  box-shadow: 0 1px 8px var(--gold-glow);
}

/* Register button: true-gold fill — text/icon MUST use --text-on-gold, not white
   (历史坑: 白字在亮金底上对比度不足，见 02-ux-design.md §6.1) */
.mob-nav-item.mob-register {
  background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold));
  color: var(--text-on-gold);
  box-shadow: 0 2px 14px var(--accent-glow);
}
.mob-nav-item.mob-register::before { display: none }
.mob-nav-item.mob-register:hover { opacity: .92; color: var(--text-on-gold) }
.mob-nav-item.mob-register .mob-svg path,
.mob-nav-item.mob-register .mob-svg rect,
.mob-nav-item.mob-register .mob-svg circle { stroke: var(--text-on-gold) }

/* ============================================================
   SCROLL TOP
   ============================================================ */
#scrollTop {
  position: fixed; right: 1rem; bottom: calc(var(--mob-nav-h) + .75rem); z-index: 850;
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #ffffff;
  box-shadow: var(--shadow-gold);
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  cursor: pointer;
}
#scrollTop.visible { opacity: 1; pointer-events: all }
#scrollTop:hover { transform: translateY(-3px) }
@media(min-width:768px) { #scrollTop { bottom: 1.25rem } }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
  font-size: .82rem; color: var(--text-muted);
}
.breadcrumb a { color: var(--gold-dark); transition: color var(--transition) }
.breadcrumb a:hover { color: var(--gold) }
.breadcrumb .sep { color: rgba(255,255,255,.2) }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease }
.reveal.visible { opacity: 1; transform: none }
@keyframes fadeUp { from { opacity: 0; transform: translateY(28px) } to { opacity: 1; transform: none } }
.animate-up { animation: fadeUp .65s ease both }
.d1 { animation-delay: .1s } .d2 { animation-delay: .2s }
.d3 { animation-delay: .3s } .d4 { animation-delay: .4s }

/* ============================================================
   AUTH PAGES (login / register)
   ============================================================ */
.auth-hero {
  min-height: calc(100vh - var(--header-h));
  display: flex; flex-direction: column;
  background: radial-gradient(ellipse 90% 50% at 50% 0%, rgba(30,107,255,.1) 0%, transparent 65%);
}
.auth-top {
  text-align: center; padding: 3rem 1.25rem 2rem;
}
.auth-top h1 {
  background: linear-gradient(135deg, #fff, var(--gold-light), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  text-transform: uppercase; margin-bottom: .6rem;
}
.auth-top .h2-desc { font-size: 1rem; color: var(--text-muted); margin-bottom: 1.25rem; font-weight: 400 }
.auth-trust {
  display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap;
  font-size: .8rem; font-weight: 600; color: var(--text-muted);
}
.auth-trust .t-icon { color: var(--gold) }

.auth-switch {
  text-align: center; padding: 1.25rem 0;
  font-size: .9rem; color: var(--text-muted);
}
.auth-switch a { color: var(--gold); font-weight: 700 }
.auth-switch a:hover { text-decoration: underline }

/* ============================================================
   RESPONSIVE / PERFORMANCE
   ============================================================ */
@media(prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important }
}
@media print {
  .site-header, .mobile-bottom-nav, .side-drawer, .drawer-overlay, #scrollTop { display: none }
}
