/* ========== Base ========== */
:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1c212b;
  --text: #e6e9ef;
  --muted: #98a0ad;
  --accent: #b6ff00; /* neon-lime */
  --accent-2: #9be000;
  --card: #151822;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 150px; /* space for bottom nav */
}

.container { width: min(1100px, 94vw); margin: 0 auto; }

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: center; /* center by default on mobile */
  padding: 0.5rem 1rem;
  position: relative;
}

@media (min-width: 720px) {
  .topbar {
    justify-content: space-between; /* normal layout on desktop */
  }
}

.icon-btn { background: transparent; color: var(--text); border: 0; font-size: 22px; cursor: pointer; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { background: var(--accent); color: #0b0d10; font-weight: 900; padding: 4px 8px; border-radius: 8px; }
.brand-name { font-weight: 700; letter-spacing: .3px; }

/* CTA Row */
.cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px auto; }
.btn {
  appearance: none; border: 0; padding: 12px 14px; border-radius: 10px;
  font-weight: 700; background: var(--accent); color: #0a0c0f; cursor: pointer;
  box-shadow: var(--shadow);
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn-muted { background: #242a36; color: var(--text); border: 1px solid #2a3140; }

/* Hero */
.hero {
  border-radius: var(--radius);
  background: radial-gradient(110% 120% at 80% -10%, #3f2d8c, transparent 60%),
              linear-gradient(135deg, #1d2240, #0f132a);
  padding: 24px;
  box-shadow: var(--shadow);
  display: grid;
}
.hero-content h1 { margin: 0 0 6px; font-size: clamp(20px, 3.8vw, 32px); }
.hero-content p { margin: 0 0 8px; color: var(--muted); }
.brand-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.brand-strip span {
  font-size: 12px; background: rgba(255,255,255,.08);
  padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1);
}

/* Mini promos */
.mini-promos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px auto; }
.mini-card {
  background: var(--panel); border: 1px solid #212836; border-radius: 12px;
  padding: 12px; text-decoration: none; color: var(--text);
  display: grid; gap: 4px; box-shadow: var(--shadow);
}
.mini-card strong { font-size: 14px; }
.mini-card span { color: var(--muted); font-size: 12px; }

/* Tabs */
.tabs { display: flex; gap: 8px; margin: 14px auto; overflow-x: auto; padding-bottom: 4px; }
.tab {
  background: #1a1f2b; color: var(--text);
  border: 1px solid #242b39; border-radius: 999px; padding: 8px 14px; cursor: pointer;
  font-weight: 700; white-space: nowrap;
}
.tab.is-active, .tab:hover { border-color: var(--accent); color: #0c0f12; background: var(--accent); }

/* Sections */
.section { margin: 22px auto; }
.section-title { margin: 0 0 12px; font-size: 18px; color: var(--text); }

/* Grid of cards */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(6, 1fr); }
}
.card {
  width: 100%;          /* or set: 250px */
  height: auto;        /* manually adjust this */ /* set fixed height for consistent card layout */
  aspect-ratio: 31 / 40; 
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.card .thumb {
  width: 100%;
  height: 100%;
  background-size: cover;           /* 👈 fills card */
  background-position: center;      /* 👈 centers image */
  background-repeat: no-repeat;
  color: transparent;
}
.card-meta {
  display: none; justify-content: space-between; align-items: center;
  padding: 10px 12px; font-size: 12px; color: var(--muted);
}
/* Maintenance overlay */
.status--maintenance::after {
  content: "Under Maintenance";
  position: absolute; inset: 8px; border-radius: 10px;
  display: grid; place-items: center; text-transform: uppercase;
  font-size: 11px; font-weight: 900; letter-spacing: .8px;
  color: #fff; background: rgba(0,0,0,.55);
  border: 1px dashed rgba(255,255,255,.25);
  pointer-events: none;
}

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.step {
  display: grid; grid-template-columns: 44px auto; gap: 12px; align-items: center;
  background: var(--panel); border: 1px solid #232a38; border-radius: 12px; padding: 12px;
}
.step-icon { font-size: 24px; }
.step h3 { margin: 0 0 4px; font-size: 15px; }
.step p { margin: 0; color: var(--muted); font-size: 13px; }

/* App cards */
.app-cards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 680px) { .app-cards { grid-template-columns: 1fr 1fr 1fr; } }
.app-card {
  display: grid; grid-template-columns: 40px auto; gap: 12px; align-items: center;
  background: var(--panel-2); border: 1px solid #2a3140; border-radius: 12px; padding: 12px;
}
.app-icon { font-size: 22px; }

/* Support bubble */
.support-bubble {
  position: fixed; right: 16px; bottom: 86px; z-index: 50;
  width: 54px; height: 54px; border-radius: 999px; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--accent); color: #0b0d10;
  box-shadow: var(--shadow);
  bottom: calc(100px + env(safe-area-inset-bottom)) !important; /* Lift bubble up */
}

/* Bottom nav */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  background: #0f131a; border-top: 1px solid #202635;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom); /* Safe area for iOS devices */
}
.bn-item {
  display: grid; place-items: center; gap: 2px; padding: 10px 0; text-decoration: none; color: var(--muted);
  font-size: 12px;
}
.bn-ico { font-size: 16px; }
.bn-item.is-active, .bn-item:hover { color: var(--accent); }

/* Utilities */
.clickable { cursor: pointer; }
.clickable:focus { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }


/* ===== Responsive overrides for App Install cards ===== */
.app-cards { --gap: 12px; gap: var(--gap); }

@media (max-width: 480px) {
  .app-cards {
    display: flex !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: var(--gap);
    padding: 4px 2px;
    margin-bottom: 50px; /* keep above bottom nav */
  }
  .app-card {
    flex: 0 0 clamp(260px, 88vw, 340px);
    scroll-snap-align: start;
  }
}

@media (min-width: 481px) and (max-width: 680px) {
  .app-cards {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gap);
    margin-bottom : 80px;
  }
}

@media (min-width: 681px) {
  .app-cards {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gap);
  }
}


/* ===== Final mobile sizing for app-cards ===== */
@media (max-width: 480px) {
  .app-cards {
    display: flex !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 10px;
    padding: 4px;
    justify-content: space-between;
  }
  .app-card {
    flex: 0 0 calc(50% - 12px);
    min-width: 100px;
    max-width: 140px;
    scroll-snap-align: center;
    font-size: 13px;
    padding: 8px;
  }
  .app-card h3 { font-size: 14px; }
  .app-card p { font-size: 12px; }
}

@media (min-width: 481px) and (max-width: 680px) {
  .app-cards {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

.container {
  padding-bottom: 20px;  /* ✅ Add this! */
}

.promo-slider-wrapper {
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  padding: 0 0;
}
.promo-slider {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  padding: 6px 2px;
  overflow: hidden;
}
/* Promo Slider Mobile */
@media (max-width: 719px) {
  .promo-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
  }

  .promo-slider .mini-card {
    flex: 1 0 100%;
    scroll-snap-align: start;
  }
}
.promo-slider .mini-card {
  width: 100%;
  aspect-ratio: 16 / 6; /* ✅ Keeps consistent size and responsiveness */
  background-size: cover;       /* ✅ Fill the box fully */
  background-position: center;  /* ✅ Keep image centered */
  background-repeat: no-repeat;
  border-radius: 14px;
}

@media (max-width: 720px) {
  .promo-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
  }

  .promo-slider .mini-card {
    flex: 0 0 80%; /* Adjust width on mobile */
    scroll-snap-align: start;
  }
}

.hero-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 16px;
  padding: 0 2px;
  -webkit-overflow-scrolling: touch;
}
.hero-slider::-webkit-scrollbar {
  display: none;
}
.hero-slider .hero-content {
  flex: 0 0 100%;
  scroll-snap-align: center;
  border-radius: var(--radius);
  background: radial-gradient(110% 120% at 80% -10%, #3f2d8c, transparent 60%),
              linear-gradient(135deg, #1d2240, #0f132a);
  padding: 24px;
  box-shadow: var(--shadow);
  display: grid;
}

/* Desktop CTA buttons inside topbar */
.cta-buttons {
  display: none;
  gap: 8px;
  margin-left: auto;
}

@media (min-width: 720px) {
  .cta-buttons {
    display: flex;
    align-items: center;
  }
  .cta-buttons .btn {
    padding: 8px 14px;
    font-size: 14px;
  }

  /* Hide mobile CTA on desktop */
  .cta-row.mobile-only {
    display: none;
  }
}

/* MOBILE: show brand-logo-link */
.brand-logo-link {
  display: inline-block;
  width: 120px;
  height: 36px;
  background-image: url('../images/logo.webp'); /* Your mobile logo */
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

.hero-slider {
  display: flex;
  overflow: hidden;
  scroll-behavior: smooth;
  width: 100%;
  height: 170px;
  position: relative;
  border-radius: var(--radius);
}

.hero-slider .hero-content {
  flex: 0 0 100%;
  background-size: cover;
  background-position: center;
  padding: 20px;
  color: white;
}

/* Add your banners */
.hero-slider .hero-content:nth-child(1) {
  background-image: url('../images/slide/Sport20EN_05062025_083610.webp');
}
.hero-slider .hero-content:nth-child(2) {
  background-image: url('../images/slide/Live05062025_083945.webp');
}
.hero-slider .hero-content:nth-child(3) {
  background-image: url('../images/slide/Lottery05062025_084054.webp');
}
.hero-slider .hero-content:nth-child(4) {
  background-image: url('../images/slide/Rebate05062025_084211.webp');
}

.hero-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

.hero-slider::-webkit-scrollbar {
  display: none;
}

@media (max-width: 799px) {
  .hero-slider .hero-content {
    background-size: 100% 100% !important;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #000; /* Optional filler */
  }
}

/* Promo Slider Image Backgrounds */
.promo-slider .mini-card:nth-child(1) {
  background-image: url('../images/promo/PROMOTIONB1_14062025_082939.webp');
  background-size: 100% 100% !important;
  background-position: center;
  color: white;
  position: relative;
}

.promo-slider .mini-card:nth-child(2) {
  background-image: url('../images/promo/PROMOTIONB1_14062025_082959.webp');
  background-size: 100% 100% !important;
  background-position: center;
  color: white;
  position: relative;
}

.promo-slider .mini-card:nth-child(3) {
  background-image: url('../images/promo/B1_05062025_113049.webp');
  background-size: 100% 100% !important;
  background-position: center;
  color: white;
  position: relative;
}

.promo-slider .mini-card:nth-child(4) {
  background-image: url('../images/promo/20EN_06062025_121230.webp');
  background-size: 100% 100% !important;
  background-position: center;
  color: white;
  position: relative;
}

.promo-slider .mini-card:nth-child(5) {
  background-image: url('../images/promo/20EN_06062025_145505.webp');
  background-size: 100% 100% !important;
  background-position: center;
  color: white;
  position: relative;
}

/* === IMAGE MAPPING BASED ON YOUR HTML ORDER === */

/* 1 - Lottery */
#gameGrid .card:nth-child(1) .thumb {
  background-image: url('../images/lottery/Lottery_EKOR_310x400_08062025_144311.webp');
}

/* 2 - Zeus (Slots) */
#gameGrid .card:nth-child(2) .thumb {
  background-image: url('../images/slot/LUCKY365_07062025_225209.webp');
}

/* 3 - Monkey King (Slots) */
#gameGrid .card:nth-child(3) .thumb {
  background-image: url('../images/slot/MONKEY_KING_07062025_225321.webp');
}

/* 4 - Lucky 888 (Slots) */
#gameGrid .card:nth-child(4) .thumb {
  background-image: url('../images/slot/MICROSLOT_07062025_225229.webp');
}

/* 5 - Aristocrat (Casino) */
#gameGrid .card:nth-child(5) .thumb {
  background-image: url('../images/casino/SEXY_07062025_225302.webp');
}

/* 6 - JDB (Casino) */
#gameGrid .card:nth-child(6) .thumb {
  background-image: url('../images/slot/JDB_07062025_225148.webp');
}

/* 7 - MicroSlot (Slots - label Reels) */
#gameGrid .card:nth-child(7) .thumb {
  background-image: url('../images/slot/JILI_07062025_225104.webp');
}

/* 8 - Sexy (Casino) */
#gameGrid .card:nth-child(8) .thumb {
  background-image: url('../images/casino/HOTROAD_07062025_225250.webp');
}

/* 9 - HotRoad (Slots) */
#gameGrid .card:nth-child(9) .thumb {
  background-image: url('../images/slot/ASKMESLOT_07062025_225158.webp');
}

/* 10 - Evolution (Slots) */
#gameGrid .card:nth-child(10) .thumb {
  background-image: url('../images/slot/Slots_PragmaticPlay_310x400_17072025_102058.webp');
}

/* 11 - Gaming (Casino) */
#gameGrid .card:nth-child(11) .thumb {
  background-image: url('../images/casino/BIG_GAMING_07062025_225040.webp');
}

/* 12 - Play! Sportsbook (Sports) */
#gameGrid .card:nth-child(12) .thumb {
  background-image: url('../images/sports/MAXBET_07062025_225122.webp');
}

/* 13 - MaxBet (Casino) */
#gameGrid .card:nth-child(13) .thumb {
  background-image: url('../images/sports/SV388_07062025_225219.webp');
}

/* 14 - BigWin (Slots) */
#gameGrid .card:nth-child(14) .thumb {
  background-image: url('../images/sports/RCB988_07062025_225239.webp');
}

/* 15 - (Unused - you only have 14 cards) */
#gameGrid .card:nth-child(15) .thumb {
  background-image: url('../images/casino/PRAGMATTIC_PLAY_LIVE_07062025_225136.webp');
}

.footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #000000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  box-shadow: 0 -2px 5px rgba(255, 255, 255, 0.2);
}

.footer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
}

.footer-item img {
  width: 25px;
  height: 20px;
  margin-bottom: 5px;
}

.footer-item span {
  display: block;
}

.instruction-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.instruction-content {
  background: #333;
  color: white;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  position: relative;
}

.instruction-img {
  width: 100%;
  margin: 1rem 0;
  border-radius: 8px;
}

.instruction-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.instruction-step-text {
  margin-bottom: 0.5rem;
}

.instruction-step-number {
  margin-bottom: 1rem;
  font-weight: bold;
}

.instruction-nav button {
  background: #444;
  border: none;
  color: white;
  padding: 8px 14px;
  margin: 0 10px;
  border-radius: 4px;
  cursor: pointer;
}

.instruction-nav button:disabled {
  opacity: 0.4;
  cursor: default;
}

.cta-marquee {
  margin-top: 10px;
  overflow: hidden;
  white-space: nowrap;
  height: 28px;
}

.marquee {
  display: inline-block;
  padding-left: 100%;
  animation: scroll-left 15s linear infinite;
  color: var(--accent);
  font-weight: bold;
  font-size: 14px;
}

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

@media (min-width: 769px) {
  .footer-nav {
    display: none;
  }
}
