/* ═══════════════════════════════════════════════════════
   SafariGames Kenya – Main Stylesheet
   Framework: Bootstrap 5.3 + Custom Design System
   Theme: Dark / Light (CSS custom properties)
═══════════════════════════════════════════════════════ */

/* ── THEME TOKENS ── */
:root {
  /* Brand palette — gold ladder. Used wherever a "win/positive" accent is
     wanted. Error/validation reds are intentionally NOT branded — they keep
     their universal red so users can still read failure at a glance. */
  --brand:     #f5c518; /* primary gold */
  --brand-2:   #e8921a; /* darker amber for gradients / depth */
  --brand-ink: #111;    /* foreground text on brand surfaces */
}
[data-theme="dark"] {
  --bg:           #0d0d0d;
  --bg2:          #161616;
  --border:       rgba(255,255,255,0.08);
  --text:         #f0f0f0;
  --muted:        #888;
  --nav-bg:       #111111;
  --card-bg:      #1e1e1e;
  --card2:        #252525;
  --input-bg:     #2a2a2a;
  --input-border: rgba(255,255,255,0.12);
  --pill-bg:      #252525;
}
[data-theme="light"] {
  --bg:           #f0f0f0;
  --bg2:          #e4e4e4;
  --border:       rgba(0,0,0,0.1);
  --text:         #111;
  --muted:        #666;
  --nav-bg:       #ffffff;
  --card-bg:      #ffffff;
  --card2:        #ebebeb;
  --input-bg:     #e8e8e8;
  --input-border: rgba(0,0,0,0.15);
  --pill-bg:      #e0e0e0;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  transition: background .25s, color .25s;
}
::-webkit-scrollbar { width: 5px; background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

/* ── HEADER ── */
.sg-header {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000;
  padding: .65rem 0;
  transition: background .25s;
}
.sg-logo {
  display: flex; align-items: center; gap: .45rem; text-decoration: none;
}
.sg-logo-icon {
  width: 36px; height: 36px; background: var(--brand); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', sans-serif; font-size: 1.05rem; color: var(--brand-ink); flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(245,197,24,.25);
}
.sg-logo-text {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.55rem;
  letter-spacing: .04em; color: var(--text);
}
.sg-logo-text span { color: var(--brand); }

/* Shared button base */
.btn-sg {
  font-weight: 800; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase;
  border: none; border-radius: 6px; padding: .45rem 1.3rem; transition: opacity .2s;
  text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; cursor: pointer;
  white-space: nowrap;
}
.btn-sg:hover { opacity: .85; }
.btn-sg-login    { background: var(--brand); color: var(--brand-ink) !important; }
/* Register keeps prominence via a gold→amber gradient so it still reads as a
   distinct CTA next to the solid-gold Login button. */
.btn-sg-register {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: var(--brand-ink) !important;
  box-shadow: 0 2px 10px rgba(245,197,24,.3);
}
.btn-sg-deposit  { background: var(--brand); color: var(--brand-ink) !important; }

/* Icon-only deposit button on mobile */
.btn-sg-icon-only {
  width: 34px; height: 34px;
  padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}

.balance-chip {
  display: flex; align-items: center; gap: .3rem; background: var(--card2);
  border: 1.5px solid var(--border); border-radius: 6px;
  padding: .32rem .65rem;
  font-weight: 700; font-size: clamp(.68rem, 3vw, .82rem); color: var(--text);
}
.balance-chip i { color: #f5c518; }
.balance-currency { opacity: .6; font-size: .75em; margin-right: 1px; }

.user-avatar-btn {
  width: 34px; height: 34px; border-radius: 50%; background: #f5c518;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; flex-shrink: 0; transition: opacity .2s; text-decoration: none;
}
.user-avatar-btn:hover { opacity: .85; }
.user-avatar-btn i { font-size: 1rem; color: #111; }

.theme-toggle {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--border);
  background: var(--pill-bg); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; transition: border-color .2s, transform .2s;
}
.theme-toggle:hover { border-color: #f5c518; transform: rotate(20deg); }

@media (max-width: 575px) {
  .not-logged-in { display: none; }
}

/* ── SUBNAV ── */
.sg-subnav {
  background: var(--bg2); border-bottom: 1px solid var(--border);
  transition: background .25s;
  position: relative;
}
.sg-subnav-scroller {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.sg-subnav-scroller::-webkit-scrollbar { display: none; }
.sg-subnav .nav-link {
  color: var(--muted); font-weight: 700; font-size: .8rem; text-transform: uppercase;
  letter-spacing: .07em; padding: .72rem 1.2rem; white-space: nowrap;
  transition: color .2s; border-bottom: 2px solid transparent;
  scroll-snap-align: start;
}
.sg-subnav .nav-link:hover { color: #f5c518; }
.sg-subnav .nav-link.active { color: #f5c518; border-bottom-color: #f5c518; }

/* Tablet — slightly tighter so all 7 items can fit comfortably */
@media (max-width: 991.98px) {
  .sg-subnav .nav-link {
    padding: .68rem .9rem;
    font-size: .76rem;
    letter-spacing: .05em;
  }
}

/* Phone — tightest density. Escape container-lg gutters so the scroller
   uses the full viewport width and items don't bunch up against the edges. */
@media (max-width: 575.98px) {
  .sg-subnav .sg-subnav-inner {
    padding-left: 0;
    padding-right: 0;
  }
  .sg-subnav .nav-link {
    padding: .55rem .5rem;
    font-size: .7rem;
    letter-spacing: .02em;
  }
  /* Keep first/last items off the screen edges */
  .sg-subnav-scroller > .nav-link:first-child { padding-left: .9rem; }
  .sg-subnav-scroller > .nav-link:last-child  { padding-right: .9rem; }

  /* Soft fade on the right edge to hint that the nav is scrollable */
  .sg-subnav::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 1px; /* sit above the border */
    right: 0;
    width: 28px;
    background: linear-gradient(to right, transparent, var(--bg2));
    pointer-events: none;
  }
}

/* Very small phones (≤360px) — drop letter-spacing entirely to squeeze more in */
@media (max-width: 360px) {
  .sg-subnav .nav-link {
    padding: .5rem .42rem;
    font-size: .68rem;
    letter-spacing: 0;
  }
}

/* ── FLASH MESSAGES ── */
.sg-flash {
  padding: .8rem 0; font-size: .88rem; font-weight: 600;
}
.sg-flash-success {
  background: rgba(22,163,74,.12); border-bottom: 1px solid rgba(22,163,74,.25); color: #4ade80;
}
.sg-flash-error {
  background: rgba(239,68,68,.12); border-bottom: 1px solid rgba(239,68,68,.25); color: #f87171;
}
[data-theme="light"] .sg-flash-success { color: #15803d; }
[data-theme="light"] .sg-flash-error   { color: #dc2626; }

/* ── CAROUSEL ── */
.sg-carousel-slide {
  height: 220px; border-radius: 16px; position: relative; overflow: hidden;
  display: flex; align-items: center; padding: 2rem 2.5rem;
}
.slide-bonus   { background: linear-gradient(110deg,#1a1305 0%,#5c4200 45%,#e8921a 100%); }
.slide-jackpot { background: linear-gradient(110deg,#071228 0%,#1a3a6b 50%,#2563eb 100%); }
.slide-crash   { background: linear-gradient(110deg,#081208 0%,#1a4d1a 50%,#16a34a 100%); }
.slide-tag {
  display: inline-block; background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2); color: #fff;
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  border-radius: 4px; padding: .22rem .65rem; margin-bottom: .7rem;
}
.slide-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.2rem,5vw,4rem); color: #fff; line-height: .95; margin-bottom: .5rem;
}
.slide-title .yellow { color: #f5c518; }
.slide-sub { font-size: .88rem; font-weight: 600; color: rgba(255,255,255,.78); margin-bottom: 1.1rem; }
.btn-slide {
  background: #f5c518; color: #111 !important; font-weight: 800; font-size: .8rem;
  letter-spacing: .06em; text-transform: uppercase; border: none; border-radius: 6px;
  padding: .5rem 1.4rem; transition: transform .15s, opacity .2s;
  text-decoration: none; display: inline-block;
}
.btn-slide:hover { transform: translateY(-1px); opacity: .9; }
.slide-deco {
  position: absolute; right: 2rem; top: 50%; transform: translateY(-50%);
  font-size: 6rem; opacity: .1; pointer-events: none; user-select: none;
}
.carousel-indicators [data-bs-target] {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.3); border: none;
}
.carousel-indicators .active { background: #f5c518; }
.carousel-control-prev, .carousel-control-next {
  width: 34px; height: 34px; background: rgba(0,0,0,.55); border-radius: 50%;
  top: 50%; bottom: auto; transform: translateY(-50%); margin: 0 .5rem; opacity: .85;
}

/* ── FILTER PILLS ── */
.sg-filters {
  display: flex; align-items: center; gap: .45rem;
  overflow-x: auto; padding: .3rem 0; scrollbar-width: none;
}
.sg-filters::-webkit-scrollbar { display: none; }
.filter-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--pill-bg); border: 1.5px solid var(--border);
  color: var(--muted); font-size: .78rem; font-weight: 600;
  border-radius: 50px; padding: .38rem 1rem; cursor: pointer; white-space: nowrap;
  transition: all .2s; user-select: none; flex-shrink: 0;
}
.filter-pill:hover  { border-color: #f5c518; color: var(--text); }
.filter-pill.active { background: #f5c518; border-color: #f5c518; color: #111; font-weight: 800; }
.pill-count {
  background: rgba(0,0,0,.15); border-radius: 50px; padding: 0 .4rem;
  font-size: .7rem; font-weight: 700;
}
.search-pill {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--input-bg); border: 1.5px solid var(--border);
  border-radius: 50px; padding: .38rem 1.1rem; flex-shrink: 0; transition: border-color .2s;
}
.search-pill:focus-within { border-color: #f5c518; }
.search-pill input {
  background: transparent; border: none; outline: none;
  color: var(--text); font-size: .78rem; font-weight: 500; width: 130px;
}
.search-pill input::placeholder { color: var(--muted); }
.search-pill i { color: var(--muted); font-size: .88rem; }

/* ── SECTION HEADERS ── */
.sec-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.sec-title { font-weight: 800; font-size: .95rem; color: var(--text); display: flex; align-items: center; gap: .45rem; }
.sec-title i { color: #f5c518; }
.view-all {
  color: #f5c518; font-size: .78rem; font-weight: 700; text-decoration: none;
  display: flex; align-items: center; gap: .25rem; transition: gap .2s;
}
.view-all:hover { gap: .5rem; color: #f5c518; }

/* ── GAME CARDS ── */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(148px,1fr)); gap: .65rem; }
@media (max-width: 576px) { .games-grid { grid-template-columns: repeat(3,1fr); gap: .45rem; } }
.game-card {
  position: relative; border-radius: 12px; overflow: hidden; cursor: pointer;
  aspect-ratio: 1 / 1; background: var(--card-bg);
  transition: transform .25s, box-shadow .25s;
}
.game-card:hover { transform: translateY(-4px) scale(1.025); box-shadow: 0 14px 36px rgba(0,0,0,.45); z-index: 2; }
.game-card .card-inner {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px; padding: 8px;
}
.game-card .card-emoji   { font-size: 2.8rem; line-height: 1; }
.game-card .card-name    { font-weight: 800; font-size: .7rem; color: rgba(255,255,255,.92); text-align: center; line-height: 1.2; }
.game-card .card-players { font-size: .6rem; color: rgba(255,255,255,.45); }
.game-card .game-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 55%);
  opacity: 0; transition: opacity .25s;
  display: flex; align-items: flex-end; padding: .7rem;
}
.game-card:hover .game-overlay { opacity: 1; }
.game-card .play-btn {
  background: #f5c518; color: #111; border: none; border-radius: 50px;
  font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: .28rem .85rem; width: 100%; cursor: pointer;
}
.game-badge {
  position: absolute; top: 7px; left: 7px;
  font-size: .58rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  border-radius: 4px; padding: .18rem .48rem; color: #fff;
}
.b-top   { background: #2563eb; }
.b-hot   { background: #f97316; } /* warm orange — "trending", not error */
.b-new   { background: #16a34a; }
.b-crash { background: #ea580c; }

/* ── PROVIDER CARDS ── */
.cat-pill {
  display: flex; align-items: center; gap: .6rem; background: var(--card-bg);
  border: 1.5px solid var(--border); border-radius: 12px; padding: .9rem 1.1rem;
  cursor: pointer; transition: border-color .2s, transform .2s;
  text-decoration: none; color: var(--text);
}
.cat-pill:hover { border-color: #f5c518; transform: translateY(-2px); color: var(--text); }
.cat-icon  { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.cat-name  { font-weight: 700; font-size: .82rem; }
.cat-count { font-size: .7rem; color: var(--muted); }

/* ── PROMO STRIP ── */
.promo-strip {
  background: linear-gradient(90deg,#f5c518 0%,#e8921a 100%);
  border-radius: 12px; padding: 1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.promo-strip .promo-text { font-weight: 800; color: #111; font-size: .88rem; }
.promo-strip .promo-sub  { font-size: .73rem; font-weight: 600; color: rgba(0,0,0,.6); }
.btn-promo {
  background: #111; color: #f5c518 !important; border: none; border-radius: 6px;
  font-weight: 800; font-size: .77rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .5rem 1.2rem; white-space: nowrap; flex-shrink: 0; transition: opacity .2s;
  text-decoration: none; display: inline-block;
}
.btn-promo:hover { opacity: .85; }

/* ── SIDEBAR ── */
.sg-sidebar {
  position: sticky; top: 112px;
  max-height: calc(100vh - 130px); overflow-y: auto; scrollbar-width: none;
}
.sg-sidebar::-webkit-scrollbar { display: none; }
.sb-title {
  font-size: .68rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .1em; margin: 1.1rem 0 .5rem;
}
.sb-item {
  display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem;
  border-radius: 9px; cursor: pointer; transition: background .2s;
  text-decoration: none; color: var(--text); font-size: .83rem; font-weight: 500;
}
.sb-item:hover, .sb-item.active { background: rgba(245,197,24,.1); color: #f5c518; }
.sb-item.active { font-weight: 700; }
.sb-item i    { font-size: .95rem; width: 18px; text-align: center; flex-shrink: 0; }
.sb-count {
  margin-left: auto; font-size: .68rem; color: var(--muted);
  background: var(--pill-bg); padding: .08rem .4rem; border-radius: 50px;
}

/* ── AUTH PAGES ── */
.auth-wrap {
  min-height: calc(100vh - 110px);
  display: flex; align-items: center; justify-content: center; padding: 2rem 1rem;
}
.auth-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 18px; padding: 2.5rem 2rem; width: 100%; max-width: 460px;
  transition: background .25s;
}

/* Auth branding inside card */
.auth-brand {
  display: inline-flex; align-items: center; gap: .4rem;
  text-decoration: none; margin-bottom: .5rem;
}
.auth-brand-icon {
  width: 36px; height: 36px; background: var(--brand); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', sans-serif; font-size: 1.05rem; color: var(--brand-ink); flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(245,197,24,.25);
}
.auth-brand-name {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.55rem; letter-spacing: .04em; color: var(--text);
}
.auth-brand-name span { color: var(--brand); }

/* Icon wrap for forgot password */
.auth-icon-wrap {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(245,197,24,.12); border: 2px solid rgba(245,197,24,.25);
  display: flex; align-items: center; justify-content: center; margin: 0 auto .9rem;
}

.auth-title {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.8rem; letter-spacing: .04em;
  color: var(--text); text-align: center; margin-bottom: .4rem;
}
.auth-sub { text-align: center; font-size: .84rem; color: var(--muted); margin-bottom: 1.8rem; }
.auth-link  { color: #f5c518; font-weight: 700; text-decoration: none; }
.auth-link:hover { text-decoration: underline; color: #f5c518; }
.forgot-link { color: #f5c518; font-size: .8rem; font-weight: 600; text-decoration: none; }
.forgot-link:hover { text-decoration: underline; color: #f5c518; }

/* Yii2 ActiveForm styled inputs */
.sg-label { display: block; font-size: .82rem; font-weight: 700; color: var(--text); margin-bottom: .45rem; }
.sg-input {
  display: block; width: 100%; background: var(--input-bg);
  border: 1.5px solid var(--input-border); border-radius: 10px;
  color: var(--text); font-size: .9rem; font-family: 'Inter', sans-serif;
  padding: .75rem 1rem; outline: none; transition: border-color .2s;
}
.sg-input:focus { border-color: #f5c518; }
.sg-input::placeholder { color: var(--muted); }

/* Yii2 error message styling */
.sg-field-error { color: #f87171; font-size: .75rem; margin-top: .35rem; font-weight: 600; }
.field-loginform-phone.has-error .sg-input,
.field-registerform-phone.has-error .sg-input,
.field-loginform-password.has-error .sg-input,
.field-registerform-password.has-error .sg-input { border-color: #ef4444; }

/* Eye toggle on password fields */
.input-wrap { position: relative; }
.input-wrap .sg-input { padding-right: 2.8rem; }
.eye-btn {
  position: absolute; right: .85rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 1rem; padding: 0; transition: color .2s;
}
.eye-btn:hover { color: #f5c518; }

/* Submit / action buttons */
.btn-auth {
  display: block; width: 100%; background: var(--brand); color: var(--brand-ink);
  font-weight: 800; font-size: .95rem; letter-spacing: .04em;
  border: none; border-radius: 10px; padding: .8rem 1rem;
  transition: opacity .2s, transform .15s; cursor: pointer; font-family: 'Inter', sans-serif;
  text-align: center; text-decoration: none;
  box-shadow: 0 2px 12px rgba(245,197,24,.25);
}
.btn-auth:hover { opacity: .88; transform: translateY(-1px); color: var(--brand-ink); }

/* ── PROFILE / WALLET ── */
.profile-hero {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 18px; padding: 2rem; text-align: center; margin-bottom: 1.5rem;
}
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%; background: #f5c518;
  display: flex; align-items: center; justify-content: center; margin: 0 auto .8rem;
}
.profile-phone { font-weight: 700; font-size: 1rem; color: var(--text); margin-bottom: 1.2rem; }
.profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 380px; margin: 0 auto; }
.pstat {
  background: var(--card2); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 1.1rem 1rem; text-align: left;
}
.pstat-icon  { color: #f5c518; font-size: 1.3rem; margin-bottom: .4rem; }
.pstat-label { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.pstat-value { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; color: var(--text); line-height: 1.1; margin-top: .15rem; }

.profile-section {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 18px; padding: 1.8rem; margin-bottom: 1.2rem;
}
.profile-section h5 { font-weight: 800; font-size: .95rem; color: var(--text); margin-bottom: .3rem; }
.profile-section p  { font-size: .8rem; color: var(--muted); }

.amount-presets { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .8rem; }
.preset-btn {
  background: var(--card2); border: 1.5px solid var(--border); color: var(--text);
  border-radius: 8px; font-size: .8rem; font-weight: 700; padding: .38rem .9rem;
  cursor: pointer; transition: all .2s;
}
.preset-btn:hover, .preset-btn.active { background: rgba(245,197,24,.15); border-color: #f5c518; color: #f5c518; }

.btn-action {
  display: block; width: 100%; background: var(--brand); color: var(--brand-ink);
  font-weight: 800; font-size: .9rem; border: none; border-radius: 10px; padding: .75rem 1rem;
  cursor: pointer; transition: opacity .2s, transform .15s; font-family: 'Inter', sans-serif;
  text-align: center;
}
.btn-action:hover { opacity: .88; transform: translateY(-1px); }
.btn-withdraw {
  background: transparent !important; border: 2px solid var(--brand) !important;
  color: var(--brand) !important;
}
.btn-withdraw:hover { background: rgba(245,197,24,.1) !important; }

.profile-menu-item {
  display: flex; align-items: center; gap: .8rem; padding: .8rem .2rem;
  border-bottom: 1px solid var(--border); text-decoration: none;
  color: var(--text); transition: color .2s;
}
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item:hover { color: #f5c518; }
.profile-menu-item i { width: 20px; font-size: 1rem; flex-shrink: 0; }
.menu-label { font-weight: 600; font-size: .88rem; }
.menu-sub   { font-size: .73rem; color: var(--muted); }
.chevron    { margin-left: auto; color: var(--muted); }
.badge-new-pill {
  background: var(--brand); color: var(--brand-ink); font-size: .65rem; font-weight: 700;
  border-radius: 50px; padding: .12rem .45rem;
}

/* ── FOOTER ── */
.sg-footer {
  background: var(--nav-bg); border-top: 1px solid var(--border);
  padding: 2.5rem 0 1.5rem; margin-top: 2rem; transition: background .25s;
}
.footer-logo { font-family: 'Bebas Neue', sans-serif; font-size: 1.75rem; letter-spacing: .04em; color: var(--text); }
.footer-logo span { color: var(--brand); }
.sg-footer a { color: var(--muted); text-decoration: none; font-size: .82rem; transition: color .2s; }
.sg-footer a:hover { color: #f5c518; }
.ft-title { font-weight: 700; font-size: .78rem; color: var(--text); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .8rem; }
.sg-footer hr { border-color: var(--border); }
.disclaimer { font-size: .72rem; color: var(--muted); line-height: 1.6; }
.footer-social-icon {
  width: 34px; height: 34px; border-radius: 8px; background: var(--card2);
  border: 1px solid var(--border); display: inline-flex; align-items: center;
  justify-content: center; font-size: 1rem; color: var(--muted); transition: all .2s;
  text-decoration: none;
}
.footer-social-icon:hover { background: #f5c518; color: #111 !important; border-color: #f5c518; }
.footer-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  background: var(--card2); border: 1px solid var(--border); border-radius: 6px;
  padding: .28rem .7rem; font-size: .7rem; font-weight: 700; color: var(--muted);
}
.footer-badge i { color: #f5c518; }

/* ── TOAST ── */
.sg-toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1.2rem;
  display: flex; align-items: center; gap: .7rem; font-size: .85rem; font-weight: 600;
  z-index: 9999; transform: translateY(120%); transition: transform .3s;
  box-shadow: 0 8px 32px rgba(0,0,0,.3); max-width: 320px;
}
.sg-toast.show { transform: translateY(0); }
.sg-toast i { font-size: 1.1rem; }
.sg-toast.success i { color: #16a34a; }
.sg-toast.error   i { color: #ef4444; }

/* ── UTILITIES ── */
.content-gap { margin-bottom: 1.25rem; }

/* ── OTP INPUT ── */
/* Single paste-friendly OTP input. Generous font + slight letter-spacing
   gives the four digits room to breathe without splitting them into
   visually-separate boxes (the goal: one input, easy to paste into). */
.otp-input {
  text-align: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem;
  letter-spacing: .25em;
  padding: .75rem 1rem !important;
}
.otp-input::placeholder {
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: rgba(255, 255, 255, .35);
}

/* ── OTP STEP PROGRESS BAR ── */
.otp-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.otp-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
}
.otp-step-dot {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--card2); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 800; color: var(--muted);
  transition: all .3s;
}
.otp-step.active   .otp-step-dot { background: #f5c518; border-color: #f5c518; color: #111; }
.otp-step.done     .otp-step-dot { background: #16a34a; border-color: #16a34a; color: #fff; }
.otp-step-label {
  font-size: .68rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
}
.otp-step.active .otp-step-label { color: #f5c518; }
.otp-step.done   .otp-step-label { color: #16a34a; }
.otp-step-line {
  flex: 1; height: 2px; background: var(--border);
  min-width: 40px; margin: 0 4px; margin-bottom: 22px;
}

/* ── FLASH INFO ── */
.sg-flash-info {
  background: rgba(59,130,246,.12);
  border-bottom: 1px solid rgba(59,130,246,.25);
  color: #60a5fa;
}
[data-theme="light"] .sg-flash-info { color: #2563eb; }

/* ═══════════════════════════════════════════════════════════════════════════
   BOTTOM NAV  — mobile only. Hidden by default, only shows on phones/tablets.
═══════════════════════════════════════════════════════════════════════════ */
.sg-bottomnav {
  display: none; /* hidden on desktop — top subnav handles nav */
}

@media (max-width: 767.98px) {
  .sg-bottomnav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 1000;
    background: var(--bg2);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .25);
    /* respect iPhone home indicator / Android gesture bar */
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: .55rem .25rem .5rem;
    color: var(--muted);
    text-decoration: none;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    transition: color .15s;
    /* keep tap target ≥ 44px tall (Apple HIG) */
    min-height: 56px;
  }
  .bn-item i {
    font-size: 1.25rem;
    line-height: 1;
  }
  .bn-item.active,
  .bn-item:hover {
    color: var(--brand);
  }
  .bn-item.active i {
    /* subtle "lifted" feel for the active tab */
    transform: translateY(-1px);
  }

  /* Body must clear the fixed nav so footer + content aren't hidden under it. */
  body {
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
  }

  /* Top subnav becomes redundant on mobile — bottom nav covers primary destinations.
     Live Casino / Virtuals can be reached via Casino landing page filters. */
  .sg-subnav {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE NAV DRAWER — hamburger + slide-out menu
═══════════════════════════════════════════════════════════════════════════ */

/* Hamburger lives in the header. Hidden on desktop because the subnav is
   visible there. Surfaced only on mobile (≤767.98px). */
.sg-hamburger {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  padding: 0;
}
.sg-hamburger:hover {
  border-color: rgba(245, 197, 24, .35);
  color: #f5c518;
}
.sg-hamburger:active {
  transform: scale(.96);
}

@media (max-width: 767.98px) {
  .sg-hamburger {
    display: inline-flex;
  }
}

/* Backdrop covers the page when drawer is open. */
.sg-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(2px);
  z-index: 1099;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.sg-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* The drawer panel itself. Slides in from the left. */
.sg-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 82vw;
  max-width: 340px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  z-index: 1100;
  transform: translateX(-105%);
  transition: transform .28s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 6px 0 24px rgba(0, 0, 0, .35);
}
.sg-drawer.is-open {
  transform: translateX(0);
}

.sg-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
}
.sg-drawer-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
}
.sg-drawer-logo .sg-logo-icon {
  width: 34px;
  height: 34px;
  font-size: .85rem;
}
.sg-drawer-logo .sg-logo-text {
  font-size: 1.1rem;
}
.sg-drawer-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: color .15s, border-color .15s;
  padding: 0;
}
.sg-drawer-close:hover {
  color: #f5c518;
  border-color: rgba(245, 197, 24, .35);
}

.sg-drawer-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: .6rem .5rem 1.2rem;
  gap: .15rem;
  overflow-y: auto;
}
.sg-drawer-link {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .85rem 1rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .02em;
  transition: background .15s, color .15s;
}
.sg-drawer-link i {
  font-size: 1.05rem;
  color: var(--muted);
  width: 1.4rem;
  text-align: center;
  transition: color .15s;
}
.sg-drawer-link:hover {
  background: rgba(245, 197, 24, .08);
  color: #f5c518;
}
.sg-drawer-link:hover i {
  color: #f5c518;
}
.sg-drawer-link.active {
  background: rgba(245, 197, 24, .12);
  color: #f5c518;
}
.sg-drawer-link.active i {
  color: #f5c518;
}

/* When drawer is open, lock body scroll under it. */
body.sg-drawer-open {
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE LAYOUT TIGHTENING — reclaim wasted vertical/horizontal space
═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 575.98px) {
  /* Header: shrink the LOGIN/REGISTER buttons so the logo isn't cramped */
  .btn-sg {
    padding: .4rem .85rem;
    font-size: .72rem;
    letter-spacing: .03em;
  }
  .sg-logo-text {
    font-size: 1.3rem;
  }
  .sg-logo-icon {
    width: 32px; height: 32px;
    font-size: .95rem;
  }
  .sg-header .container-lg {
    padding-left: .75rem;
    padding-right: .75rem;
  }

  /* Provider cards: tighter padding so 2-column grid is more compact */
  .cat-pill {
    padding: .65rem .8rem;
    gap: .5rem;
    border-radius: 10px;
  }
  .cat-icon {
    width: 32px; height: 32px;
    font-size: 1.05rem;
    border-radius: 8px;
  }
  .cat-name { font-size: .78rem; }
  .cat-count { font-size: .65rem; }

  /* Search/filter pills row: tighter so the row uses less width */
  .filter-pill {
    padding: .32rem .75rem;
    font-size: .72rem;
  }
  .search-pill {
    padding: .32rem .9rem;
  }
  .search-pill input {
    font-size: .72rem;
    width: 100px;
  }

  /* Section headers: slightly smaller */
  .sec-title {
    font-size: .88rem;
  }
  .sec-hdr {
    margin-bottom: .55rem; /* was 1rem desktop */
  }

  /* Tighten section-to-section vertical spacing.
     Desktop sets .content-gap { margin-bottom: 2.2rem }; on phone that's ~35px
     of dead space between every section. Cut to ~.85rem so games rise sooner. */
  .content-gap {
    margin-bottom: .85rem;
  }

  /* ─────────────────────────────────────────────────────────────────────
     SEARCH / FILTERS / PROVIDERS — three-row mobile layout
     Row 1: full-width search
     Row 2: filter chips (horizontal scroll)
     Row 3: providers (horizontal scroll of compact tiles)
     ───────────────────────────────────────────────────────────────────── */

  /* Stack the .sg-filters container vertically so search and filter-scroll
     each get their own row instead of fighting for one cramped row.
     Padding kept light on phones — the carousel above and providers below
     already have their own margins, so .sg-filters doesn't need much of its own. */
  .sg-filters {
    flex-direction: column;
    align-items: stretch;
    overflow: visible; /* the inner .filter-scroll handles its own overflow */
    gap: .55rem;
    padding: .35rem 0; /* was .7rem 0 — tighter top/bottom */
  }
  .sg-filters .search-pill {
    width: 100%;
  }
  .sg-filters .search-pill input {
    /* override the fixed 100/130px width set above so search uses the full row */
    width: 100%;
    flex: 1;
  }

  /* Hide the "Game Providers" section title on phones — the row of provider
     tiles is self-explanatory and the header just costs ~40px of vertical
     space that's better spent on visible games. */
  .content-gap:has(.sg-providers-row) .sec-hdr {
    display: none;
  }
  /* And pull the providers section tight against its neighbours since its
     header no longer separates it visually. */
  .content-gap:has(.sg-providers-row) {
    margin-top: 0;
    margin-bottom: .25rem; /* was .7rem — tight against next section */
  }

  /* Game Providers: 2-col grid → horizontal scroll of fixed-width tiles. */
  .sg-providers-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: .55rem;
    margin: 0;
    /* trimmed bottom padding so the row sits tight against the next section
       (was .35rem). Side padding keeps focus-ring breathing room. */
    padding: .1rem .15rem .1rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .sg-providers-row::-webkit-scrollbar { display: none; }
  .sg-providers-row > [class*="col-"] {
    /* Fixed tile width — about 2.5 visible on a 390px viewport so the third peeks */
    flex: 0 0 auto;
    width: 160px;
    max-width: 60vw;
    padding: 0; /* kill the bootstrap col gutter inside the scroller */
    scroll-snap-align: start;
  }
}
