/* ============================================================
   WORLI-555 — Global Stylesheet
   Usage: <link rel="stylesheet" href="/assets/css/worli-global.css">
   ============================================================ */

/* ── CSS Variables ── */
:root {
  --w-purple:        #7c3aed;
  --w-purple-dark:   #4c1d95;
  --w-purple-light:  #a78bfa;
  --w-purple-bg:     #f3f4ff;
  --w-orange:        #f97316;
  --w-green:         #22c55e;
  --w-red:           #ef4444;
  --w-blue:          #0d6efd;
  --w-gold:          #fbbf24;
  --w-text-dark:     #1e293b;
  --w-text-muted:    #6b7280;
  --w-border:        #e5e7eb;
  --w-bg:            #f7f8ff;
  --w-white:         #ffffff;

  --w-gradient-purple: linear-gradient(135deg, #7c3aed, #4f46e5);
  --w-gradient-banner: linear-gradient(90deg, #4c1d95, #a21caf);
  --w-gradient-card:   linear-gradient(135deg, #5D9FFF 0%, #B8DCFF 55%, #6BBBFF 100%);

  --w-radius-sm:  8px;
  --w-radius-md:  12px;
  --w-radius-lg:  16px;
  --w-radius-xl:  24px;
  --w-radius-pill: 999px;

  --w-shadow-sm:   0 2px 8px rgba(0,0,0,.08);
  --w-shadow-md:   0 4px 16px rgba(0,0,0,.12);
  --w-shadow-purple: 0 4px 14px rgba(124,58,237,.35);
}

/* ── Reset / Base ── */
*, *::before, *::after { box-sizing: border-box; }
body {
  max-width: 480px;
  margin: 0 auto;
  background: var(--w-white);
  min-height: 100vh;
  padding-bottom: 70px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--w-text-dark);
}
a { text-decoration: none; }

/* ── Scrollbar hide ── */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }


/* ============================================================
   SIDEBAR
   ============================================================ */
#sidebarOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
}
#sidebarOverlay.active { display: block; }

#sidebar {
  position: fixed;
  left: -300px;
  top: 0;
  height: 100%;
  width: 280px;
  background: var(--w-white);
  z-index: 201;
  box-shadow: 4px 0 20px rgba(0,0,0,.2);
  overflow-y: auto;
  transition: left .3s ease;
}
#sidebar.open { left: 0; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-brand-icon {
  width: 32px; height: 32px;
  background: #6d28d9;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-style: italic;
}
.sidebar-brand-name {
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  font-size: 1.1rem;
  color: #3b0764;
}

.sidebar-refer {
  margin: 0 12px 12px;
  padding: 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(90deg, #fffbeb, #fff7ed);
  border: 1px solid #fed7aa;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  color: var(--w-text-muted);
  font-weight: 600;
  font-size: .9rem;
  border-bottom: 1px solid var(--w-border);
  background: #f3f4f6;
  margin-bottom: 2px;
  text-decoration: none;
}
.sidebar-link.danger { background: #fecaca; color: var(--w-red); }
.sidebar-link i { width: 16px; text-align: center; }


/* ============================================================
   TOP NAVBAR  (sticky)
   ============================================================ */
#mainNav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--w-white);
  border-bottom: 1px solid var(--w-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
}
.nav-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--w-text-muted);
  font-weight: 600;
}
.btn-login {
  background: var(--w-purple);
  color: #fff;
  border: none;
  border-radius: var(--w-radius-pill);
  padding: 6px 18px;
  font-weight: 700;
  font-size: .82rem;
}


/* ============================================================
   DOWNLOAD BANNER
   ============================================================ */
#downloadBanner {
  overflow: hidden;
  max-height: 80px;
  transition: max-height .35s cubic-bezier(.4,0,.2,1), padding .35s;
  background: var(--w-gradient-banner);
  color: #fff;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#downloadBanner.hide {
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.banner-download-btn {
  background: var(--w-orange);
  color: #fff;
  border: none;
  border-radius: var(--w-radius-pill);
  padding: 5px 14px;
  font-size: .72rem;
  font-weight: 700;
}
.banner-close-btn {
  background: transparent;
  border: none;
  color: #fff;
  padding: 4px;
  cursor: pointer;
  line-height: 1;
}


/* ============================================================
   HERO SLIDER
   ============================================================ */
#heroSlider { display: block; }
#heroSlider .carousel-inner { padding: 1em; border-radius: 0; }
#heroSlider .carousel-item img {
  width: 100%; display: block;
  object-fit: cover;
  max-height: 200px;
  border-radius: 10px;
}
.carousel-indicators { bottom: 8px; margin: 0; gap: 4px; }
.carousel-indicators button {
  box-sizing: content-box;
  width: 8px !important; height: 8px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border-top: none !important;
  border-bottom: none !important;
  background: rgba(255,255,255,.55) !important;
  opacity: 1 !important;
  margin: 0 3px !important;
  transition: background .2s;
}
.carousel-indicators button.active { background: var(--w-gold) !important; }


/* ============================================================
   CATEGORY TABS  (sticky below nav)
   ============================================================ */
#categoryTabs {
  position: sticky;
  top: 45px;
  z-index: 99;
  background: var(--w-white);
  border-bottom: 1px solid var(--w-border);
  display: flex;
}
.main-cat-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px 0;
  flex: 1;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: border-color .15s;
}
.main-cat-tab img { width: 54px; height: 54px; object-fit: contain; }
.main-cat-tab span {
  font-size: .7rem; font-weight: 700;
  color: var(--w-text-muted);
  margin-top: 2px; padding-bottom: 6px;
}
.main-cat-tab.tab-active { border-bottom: 3px solid var(--w-purple); }
.main-cat-tab.tab-active span { color: var(--w-purple); }
.main-cat-tab.tab-active img { filter: drop-shadow(0 0 5px rgba(124,58,237,.5)); }
.main-cat-tab.tab-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }


/* ============================================================
   PROVIDER SUB-NAV  (sticky below category tabs)
   ============================================================ */
#providerContainer {
  position: sticky;
  top: 136px;
  z-index: 98;
  background: var(--w-white);
  border-bottom: 1px solid var(--w-border);
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding: 10px 14px;
}
.sub-tab-btn {
  border: 2px solid var(--w-border);
  background: var(--w-white);
  border-radius: var(--w-radius-md);
  padding: 6px 14px;
  font-weight: 600;
  font-size: .8rem;
  color: var(--w-text-muted);
  white-space: nowrap;
  transition: all .2s;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sub-tab-active {
  background: var(--w-gradient-purple) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: var(--w-shadow-purple);
}
.sub-tab-active img { filter: none !important; }


/* ============================================================
   SECTION BAR (colored left accent)
   ============================================================ */
.section-bar {
  width: 6px; height: 18px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}


/* ============================================================
   PLAY OVERLAY  (on lottery cards)
   ============================================================ */
.play-overlay {
  position: absolute;
  bottom: 10px; left: 10px; right: 10px;
}
.play-overlay button {
  width: 100%;
  padding: 5px 0;
  background: rgba(255,255,255,.28);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  font-weight: 700;
  font-size: .7rem;
  text-transform: uppercase;
  border-radius: var(--w-radius-sm);
}


/* ============================================================
   DIGIT / LOTTERY CARD
   ============================================================ */
.digit-card {
  border-radius: var(--w-radius-md);
  overflow: hidden;
  border: 1px solid var(--w-border);
  background: var(--w-white);
  box-shadow: var(--w-shadow-sm);
}
.digit-card img { width: 100%; display: block; }
.timer-box {
  background: #1e293b;
  color: #fff;
  font-size: .63rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  min-width: 20px;
  text-align: center;
  line-height: 1.4;
}


/* ============================================================
   MATKA CARD
   ============================================================ */
.matka-card {
  border-radius: var(--w-radius-md);
  border-left: 4px solid var(--w-purple);
  background: var(--w-gradient-card);
  box-shadow: 0 4px 14px rgba(93,159,255,.3);
  padding: 14px;
}
.play-btn-red {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(45deg,#ff8200,#ff2600);
  animation: pulse 1.6s infinite;
  border: none; color: #fff; font-size: .9rem; flex-shrink: 0;
}
.play-btn-blue {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(45deg,#0d6efd,#0dcaf0);
  animation: bluePulse 1.6s infinite;
  border: none; color: #fff; font-size: .9rem; flex-shrink: 0;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,0,0,.6); }
  70%  { box-shadow: 0 0 0 12px rgba(255,0,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,0,0,0); }
}
@keyframes bluePulse {
  0%   { box-shadow: 0 0 0 0 rgba(13,110,253,.6); }
  70%  { box-shadow: 0 0 0 12px rgba(13,110,253,0); }
  100% { box-shadow: 0 0 0 0 rgba(13,110,253,0); }
}


/* ============================================================
   ROULETTE CARD
   ============================================================ */
.roulette-card {
  overflow: hidden;
  border-radius: var(--w-radius-md);
  box-shadow: 0 4px 16px rgba(75,13,136,.3);
}
.roulette-card img { width: 100%; display: block; }


/* ============================================================
   WHATSAPP FLOAT BUTTON
   ============================================================ */
.wa-float {
  position: fixed;
  bottom: 88px;
  right: 14px;
  z-index: 80;
  text-align: center;
}


/* ============================================================
   FOOTER NAV  (fixed bottom)
   ============================================================ */
#footerNav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: var(--w-white);
  border-top: 1px solid var(--w-border);
  z-index: 90;
  height: 60px;
  display: flex;
  align-items: flex-end;
  padding: 4px 0 6px;
}
#footerNav .nav-tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  cursor: pointer;
  text-decoration: none;
}
#footerNav .nav-tab i    { font-size: 1.5rem; color: #9ca3af; }
#footerNav .nav-tab span { font-size: .62rem; font-weight: 700; color: #9ca3af; }
#footerNav .nav-tab.active i,
#footerNav .nav-tab.active span { color: var(--w-purple); }

/* Center bubble button */
#footerNav .nav-center { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }
#footerNav .nav-center .cw {
  position: absolute; bottom: 4px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
#footerNav .nav-center .ci {
  background: var(--w-red);
  border-radius: 50%;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--w-white);
  box-shadow: 0 4px 14px rgba(239,68,68,.4);
}
#footerNav .nav-center .ci img { width: 40px; height: 40px; object-fit: contain; }
#footerNav .nav-center span { font-size: .62rem; font-weight: 700; color: #6b7280; }

/* Lucide-style footer (used on inner pages) */
footer.fixed-bottom { max-width: 480px; margin: 0 auto; }
.footer-icon    { width: 28px; height: 28px; }
.footer-icon-sm { width: 23px; height: 23px; }
.footer-text    { font-size: 10px; white-space: nowrap; }
.profile-circle { width: 33px; height: 33px; border-radius: 50%; }

.center-btn-wrapper {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  top: -28px;
  display: flex; flex-direction: column; align-items: center;
}
.center-btn-circle {
  background-color: var(--w-red);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.center-btn-circle img { width: 55px; height: 55px; }
.txt-active { color: var(--w-purple); }


/* ============================================================
   MODAL BACKDROP  (shared by gift, logout, lucky spin)
   ============================================================ */
.w-modal-backdrop {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,.6);
  display: none;
  justify-content: center; align-items: center;
  z-index: 3000;
}
.w-modal-backdrop.show { display: flex; }

.w-modal-card {
  width: 90%; max-width: 340px;
  background: var(--w-white);
  border-radius: 20px;
  padding: 25px;
  position: relative;
  text-align: center;
  animation: wModalIn .3s ease-out;
}
@keyframes wModalIn {
  from { transform: scale(.9); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}
.w-modal-close {
  position: absolute; top: -45px; right: 0;
  color: #fff; font-size: 2rem; cursor: pointer;
  background: none; border: none; line-height: 1;
}

.w-input-box {
  background: #f4f7ff;
  border: 1px solid #eef2ff;
  border-radius: 10px;
  padding: 12px 15px;
  display: flex; align-items: center;
  margin-bottom: 16px;
}
.w-input-box input {
  border: none; background: transparent;
  outline: none; width: 100%;
  font-size: .9rem; color: var(--w-text-dark);
}

.w-btn-purple {
  background: #b366ff;
  color: #fff; border: none;
  width: 100%; padding: 12px;
  border-radius: var(--w-radius-pill);
  font-weight: 700; font-size: 1rem;
  box-shadow: 0 4px 15px rgba(179,102,255,.3);
}


/* ============================================================
   WALLET / PROFILE CARDS  (mine page)
   ============================================================ */
.w-wallet-card {
  margin: -10px 15px 15px;
  border-radius: 35px 10px 10px 10px;
  padding: 20px;
  color: #fff;
  box-shadow: 0 10px 20px rgba(147,51,234,.2);
  background: url('https://singamlotterys.com/static/media/money-background.04980385db2b8585eaa0.webp');
}
.w-recharge-btn {
  background: #9333ea;
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  border-radius: var(--w-radius-pill);
  padding: 4px 18px;
  font-size: .85rem; font-weight: 600;
  border: none; cursor: pointer;
}

.w-icon-grid {
  background: var(--w-white);
  margin: 15px;
  border-radius: 15px;
  padding: 20px 10px;
  display: flex;
  justify-content: space-around;
}
.w-grid-item { text-align: center; text-decoration: none; color: #444; width: 25%; }
.w-grid-item img { width: 38px; height: 38px; margin-bottom: 8px; display: block; margin-inline: auto; }
.w-grid-item span { font-size: .75rem; font-weight: 500; display: block; }

.w-menu-box { background: var(--w-white); margin: 15px; border-radius: 15px; overflow: hidden; }
.w-list-item {
  display: flex; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #f8f9fa;
  text-decoration: none; color: #333;
}
.w-list-item:last-child { border-bottom: none; }
.w-list-item img { width: 30px; margin-right: 15px; }
.w-item-label { flex-grow: 1; font-size: .9rem; font-weight: 500; }
.w-badge-hot {
  background: #ff4d4d; color: #fff;
  font-size: .6rem; padding: 2px 6px;
  border-radius: 4px; margin-left: 8px; font-weight: 800;
}


/* ============================================================
   INVITE / EARN PAGE
   ============================================================ */
.w-ticket-body {
  background: #fff200;
  display: flex; align-items: center;
  padding: 15px;
  border-top: 2px dashed #eecd10;
}
.w-copy-btn {
  background: #9333ea; color: #fff;
  border: none; border-radius: 25px;
  padding: 6px 30px;
  font-weight: 800; margin-left: 15px; font-size: .9rem;
}

/* ============================================================
   UTILITY HELPERS
   ============================================================ */
.text-purple   { color: var(--w-purple); }
.bg-purple     { background: var(--w-purple); }
.border-purple { border-color: var(--w-purple); }
.fw-900 { font-weight: 900; }
.rounded-xl { border-radius: var(--w-radius-xl); }
.shadow-purple { box-shadow: var(--w-shadow-purple); }