/* =========================================================
   M9 — "Neon Ocean" theme
   Change colours in :root to re-theme the whole site.
   ========================================================= */
:root {
  --bg: #050b1f;
  --bg-2: #08132e;
  --surface: #0d1a3a;
  --surface-2: #132449;
  --line: rgba(120, 190, 255, 0.12);
  --line-strong: rgba(0, 200, 255, 0.45);
  --text: #eef6ff;
  --muted: #8ea6c9;
  --cyan: #00d2ff;
  --blue: #2a6bff;
  --grad: linear-gradient(135deg, #00d2ff 0%, #2a6bff 100%);
  --glow: 0 8px 24px rgba(0, 170, 255, 0.35);
  --radius: 16px;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --nav-h: 68px;
}

/* ---------- Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { max-width: 100%; overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(800px 480px at 50% -140px, rgba(0, 170, 255, 0.28), transparent 70%),
    radial-gradient(600px 500px at 110% 60%, rgba(42, 107, 255, 0.12), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 14px calc(var(--nav-h) + 40px);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  padding: 0 14px;
  background: rgba(5, 11, 31, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}
.site-header.scrolled { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
.logo img { height: 44px; width: auto; filter: drop-shadow(0 0 10px rgba(0, 200, 255, 0.45)); }
.header-actions { display: flex; gap: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.15s ease, filter 0.2s ease, background 0.2s ease;
}
.btn:active { transform: scale(0.96); }
.btn-outline { border: 1px solid rgba(255, 255, 255, 0.25); color: var(--text); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.08); }
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: var(--glow);
  animation: pulse 2.4s ease-in-out infinite;
}
.btn-primary:hover { filter: brightness(1.1); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 6px 16px rgba(0, 170, 255, 0.35); }
  50%      { box-shadow: 0 6px 28px rgba(0, 200, 255, 0.75); }
}

/* ---------- Banner slider ---------- */
.hero { position: relative; }
.slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  min-height: 120px;
}
.slider::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; }
.slide img { width: 100%; height: auto; }
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.slider-dots button {
  width: 8px; height: 8px;
  border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  transition: width 0.3s ease, background 0.3s ease;
}
.slider-dots button.active { width: 22px; background: var(--cyan); }

/* ---------- Announcement ticker ---------- */
.ticker {
  position: relative;
  display: flex;
  align-items: center;
  height: 38px;
  margin: 12px 0;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}
.ticker-icon {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 30px; height: 30px;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0 6px var(--surface);
}
.ticker-icon::after {
  content: "";
  position: absolute;
  inset: 7px;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10v4a1 1 0 0 0 1 1h3l5 4V5L7 9H4a1 1 0 0 0-1 1z'/%3E%3Cpath d='M16 9a4 4 0 0 1 0 6M19 6.5a8 8 0 0 1 0 11'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10v4a1 1 0 0 0 1 1h3l5 4V5L7 9H4a1 1 0 0 0-1 1z'/%3E%3Cpath d='M16 9a4 4 0 0 1 0 6M19 6.5a8 8 0 0 1 0 11'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ticker-track { position: relative; flex: 1; height: 100%; overflow: hidden; }
.ticker-track p {
  position: absolute;
  top: 0; left: 0;
  line-height: 36px;
  white-space: nowrap;
  font-size: 0.8rem;
  color: var(--muted);
  animation: ticker 22s linear -6s infinite;
}
@keyframes ticker {
  from { left: 100%; transform: translateX(0); }      /* enters from the right */
  to   { left: 0;    transform: translateX(-100%); }  /* leaves on the left   */
}

/* ---------- Wallet bar ---------- */
.wallet {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
}
.wallet-qr img,
.wallet-actions img {
  width: 50px; height: 50px;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.wallet-balance {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wallet-row { display: flex; align-items: baseline; gap: 6px; font-size: 0.8rem; }
.wallet-label { width: 54px; color: var(--muted); }
.wallet-cur { color: var(--cyan); font-weight: 600; font-size: 0.72rem; }
.wallet-val { font-weight: 600; }
.wallet-hint { font-size: 0.66rem; color: var(--muted); opacity: 0.8; }
.wallet-actions { display: flex; gap: 10px; }
.wallet-actions a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.66rem;
  color: var(--muted);
}

/* ---------- Game tabs ---------- */
.game-tabs {
  display: flex;
  gap: 8px;
  margin: 16px -14px 12px;
  padding: 4px 14px 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.game-tabs::-webkit-scrollbar { display: none; }
.game-tab {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 76px;
  height: 84px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.game-tab img { width: 42px; height: 42px; object-fit: contain; filter: grayscale(0.6) brightness(0.85); transition: filter 0.2s ease, transform 0.2s ease; }
.game-tab:hover { color: var(--text); }
.game-tab:hover img { filter: none; }
.game-tab.active {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--glow);
}
.game-tab.active img { filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35)); transform: scale(1.08); }

/* ---------- Games grid ---------- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.game-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  animation: pop 0.35s ease backwards;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.game-card img { width: 100%; height: auto; aspect-ratio: auto; }
.game-name {                         /* shown only if the image fails to load */
  display: none;
  padding: 26px 6px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}
.game-card.no-img img { display: none; }
.game-card.no-img .game-name { display: block; }
@media (hover: hover) {
  .game-card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: 0 10px 24px rgba(0, 170, 255, 0.25);
  }
}

/* ---------- About / SEO ---------- */
.about {
  margin-top: 36px;
  padding: 28px 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
}
.about .tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid var(--line-strong);
  color: var(--cyan);
  font-size: 0.7rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
}
.about h1 { font-size: 1.45rem; line-height: 1.3; margin-bottom: 14px; }
.about h2 { font-size: 1.15rem; margin: 30px 0 12px; }
.about h3 { font-size: 0.95rem; margin-bottom: 4px; }
.about p { font-size: 0.88rem; line-height: 1.75; color: var(--muted); margin-bottom: 12px; }
.about p strong { color: var(--text); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.ticks, .steps { list-style: none; display: grid; gap: 10px; }
.ticks li, .steps li { position: relative; padding-left: 30px; font-size: 0.88rem; line-height: 1.6; color: var(--muted); }
.ticks li strong, .steps li strong { color: var(--text); }
.ticks li::before, .steps li::before {
  position: absolute; left: 0; top: 2px;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--grad);
  color: #fff; font-size: 0.68rem; font-weight: 700;
}
.ticks li::before { content: "✓"; }
.steps { counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.feature {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.feature p { margin: 0; font-size: 0.8rem; line-height: 1.55; }

.faq {
  margin-bottom: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.faq summary {
  position: relative;
  padding: 13px 42px 13px 14px;
  font-size: 0.9rem; font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--cyan); font-size: 1.2rem;
}
.faq[open] { border-color: var(--line-strong); }
.faq[open] summary::after { content: "–"; }
.faq p { padding: 0 14px 12px; margin: 0; font-size: 0.85rem; }
.about .small { margin-top: 22px; font-size: 0.75rem; opacity: 0.8; }

/* ---------- Pop-up ---------- */
.popup {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 6, 18, 0.75);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.popup-box {
  position: relative;
  width: min(440px, 100%);
  padding: 10px 10px 14px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: zoomIn 0.3s ease;
}
@keyframes zoomIn { from { transform: scale(0.92); opacity: 0; } to { transform: none; opacity: 1; } }
.popup-box img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 14px; min-height: 120px; background: var(--surface-2); }
.popup-close {
  position: absolute;
  top: -12px; right: -12px;
  z-index: 2;
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 1.4rem; line-height: 1;
  box-shadow: var(--glow);
}
.popup-check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
}
.popup-check input { accent-color: var(--cyan); width: 16px; height: 16px; }

/* ---------- Bottom menu ---------- */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 20px);
  max-width: 560px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-radius: 22px;
  background: rgba(13, 26, 58, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.6);
}
.bottom-nav a { flex: 1; display: flex; justify-content: center; opacity: 0.8; transition: opacity 0.2s ease; }
.bottom-nav a:hover { opacity: 1; }
.bottom-nav a img { height: 40px; width: auto; }
.bottom-nav .nav-home { position: relative; align-self: stretch; opacity: 1; }
/* circle and logo share the same centre point → logo is always in the middle */
.bottom-nav .nav-home::before,
.bottom-nav .nav-home img {
  position: absolute;
  top: calc(50% - 18px);
  left: 50%;
  transform: translate(-50%, -50%);
}
.bottom-nav .nav-home::before {
  content: "";
  width: 68px; height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #12306b, #050b1f 75%);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 0 5px var(--bg), 0 0 22px rgba(0, 210, 255, 0.55);
}
.bottom-nav .nav-home img {
  width: 48px;
  height: auto;
  filter: drop-shadow(0 0 6px rgba(0, 210, 255, 0.8));
}

/* ---------- Chat bubble ---------- */
.chat-bubble {
  position: fixed;
  right: 14px;
  bottom: calc(var(--nav-h) + 26px + env(safe-area-inset-bottom));
  z-index: 90;
  animation: float 3s ease-in-out infinite;
}
.chat-bubble img { width: 56px; height: 56px; filter: drop-shadow(0 6px 14px rgba(0, 170, 255, 0.5)); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- Desktop ---------- */
@media (min-width: 768px) {
  .site-header { height: 72px; padding: 0 max(24px, calc((100% - 1100px) / 2 + 14px)); }
  .logo img { height: 54px; }
  .page { padding-top: 20px; }
  .hero { max-width: 860px; margin: 0 auto; }
  .wallet { padding: 16px 20px; }
  .wallet-qr img, .wallet-actions img { width: 58px; height: 58px; }
  .game-tabs { margin: 22px 0 16px; padding: 4px 0 6px; justify-content: center; }
  .game-tab { width: 104px; height: 96px; font-size: 0.82rem; }
  .game-tab img { width: 48px; height: 48px; }
  .games-grid { grid-template-columns: repeat(6, 1fr); gap: 14px; }
  .about { padding: 40px 36px; }
  .about h1 { font-size: 1.9rem; }
  .features { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Small phones ---------- */
@media (max-width: 360px) {
  .logo img { height: 36px; }
  .btn { padding: 0 12px; font-size: 0.76rem; height: 34px; }
  .wallet { gap: 8px; padding: 10px; }
  .wallet-qr img, .wallet-actions img { width: 42px; height: 42px; }
  .wallet-hint { display: none; }
  .bottom-nav a img { height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* announcement always runs */
.ticker-track p { animation: ticker 22s linear -6s infinite !important; }
