/* ============================================
   DHANI.WIN - Dark Purple Theme
   ============================================ */

:root {
  --primary: #E8453C;
  --primary-light: #ff6b6b;
  --primary-gradient: linear-gradient(135deg, #E8453C 0%, #ff6b6b 100%);
  --bg-dark: #1a0533;
  --bg-darker: #0d1b3e;
  --bg-card: rgba(255, 255, 255, 0.06);
  --bg-card-solid: #1e1245;
  --gold: #d4a837;
  --gold-gradient: linear-gradient(135deg, #d4a837, #f5d778);
  --white: #ffffff;
  --text-dark: #1a1a2e;
  --text-gray: #666;
  --text-light: #aab0c6;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --nav-height: 98px;
  --header-height: 50px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-dark);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   App Container
   ============================================ */
.app-container {
  max-width: 420px;
  margin: 0 auto;
  background: linear-gradient(180deg, #2d1560 0%, #1a0533 15%, #0d1b3e 50%, #1a0533 100%);
  min-height: 100vh;
  position: relative;
  padding-bottom: var(--nav-height);
}

/* ============================================
   Header
   ============================================ */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  height: 54px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(45, 21, 96, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0;
}

.logo img {
  height: 24px;
  object-fit: contain;
}

.logo-text {
  font-size: 20px;
  font-weight: 800;
  color: #ffc107;
  letter-spacing: -0.5px;
}

.logo-text .logo-dot {
  color: var(--white);
}

.header-actions {
  display: flex;
  gap: 10px;
}

.btn-register {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(180deg, #f7d057 0%, #c49221 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 10px rgba(196, 146, 33, 0.3);
}

.btn-login {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.25);
  border: 1.5px solid #fca000;
  color: #fca000;
}

/* Logged-in header actions: balance pill + add money + icons */
.user-actions {
  align-items: center;
  gap: 8px;
}

.balance-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 4px 4px 4px 11px;
  text-decoration: none;
}

.balance-pill .bp-coin {
  display: flex;
}

.balance-pill .bp-amount {
  font-size: 14px;
  font-weight: 800;
  color: #f5c542;
}

.balance-pill .bp-add {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f7d057 0%, #c49221 100%);
  color: #3a2500;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.user-actions .header-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.header-lang {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 6px 8px;
}

/* Split ribbon between banner area and featured games */
.banner-split {
  display: block;
  width: 100%;
  height: auto;
  margin: 14px 0 2px;
  opacity: 0.8;
}

/* ============================================
   Notification Bar
   ============================================ */
.notification-bar {
  display: flex;
  align-items: center;
  margin: 0 16px;
  padding: 10px 14px;
  background: url('assets/png/notification_bg-0d516983.webp') center / 100% 100% no-repeat;
  border-radius: var(--radius);
  gap: 10px;
}

.notif-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-text-wrapper {
  flex: 1;
  overflow: hidden;
}

.notif-text {
  font-size: 12px;
  color: #ccc;
  white-space: nowrap;
  display: block;
}

.notif-details-btn {
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  color: #ccc;
  font-size: 11px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

/* ============================================
   Banner Slider
   ============================================ */
.banner-slider {
  margin: 12px 16px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.slider-track {
  display: flex;
  transition: transform 0.5s ease;
}

.slide {
  min-width: 100%;
  flex-shrink: 0;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.3s;
}

.dot.active {
  background: var(--white);
  width: 16px;
  border-radius: 3px;
}

/* ============================================
   Section Headers
   ============================================ */
.section {
  margin: 20px 16px 0;
}

.game-category-section {
  background: rgba(30, 20, 55, 0.7);
  border-radius: 16px;
  padding: 16px;
  margin: 16px 16px 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.game-category-section .section-header {
  margin-top: 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.3px;
}

.section-header h2 img {
  width: 24px;
  height: 24px;
}

.view-all-link {
  font-size: 12px;
  color: var(--text-light);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================
   Featured Games (horizontal scroll)
   ============================================ */
.featured-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.featured-scroll::-webkit-scrollbar {
  display: none;
}

.featured-item {
  flex-shrink: 0;
  width: 110px;
  text-align: center;
  text-decoration: none;
}

.featured-item img {
  width: 100px;
  height: 100px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.2s;
}

.featured-item:active img {
  transform: scale(0.95);
}

.featured-item span {
  display: block;
  font-size: 11px;
  color: var(--text-light);
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================
   Promo Cards (Daily Login / Event)
   ============================================ */
.promo-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 16px 0;
}

.promo-card {
  border-radius: var(--radius);
  /* extra top padding clears the transparent strip where the 3D artwork
     pops above the card shape baked into the background images */
  padding: 32px 14px 18px;
  position: relative;
  min-height: 176px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.promo-card.daily {
  background: url('assets/png/login_awards-cb933a4e.webp') center / 100% 100% no-repeat;
}

.promo-card.event {
  background: url('assets/png/daily_rewards-7fd7bf33.webp') center / 100% 100% no-repeat;
}

.promo-card .promo-tag {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2px;
}

.promo-card .promo-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffc107;
  line-height: 1.2;
}

.promo-card .promo-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 8px;
  line-height: 1.4;
}

.promo-card .promo-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 20px;
  background: var(--gold-gradient);
  color: #1a0533;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

/* ============================================
   Top Games (large cards)
   ============================================ */
.top-games-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.top-games-scroll::-webkit-scrollbar {
  display: none;
}

.top-game-card {
  flex-shrink: 0;
  width: 130px;
  text-decoration: none;
  text-align: center;
}

.top-game-card img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s;
}

.top-game-card:active img {
  transform: scale(0.97);
}

.top-game-card span {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   Category Tabs (scrolling)
   ============================================ */
.category-tabs {
  display: flex;
  gap: 8px;
  padding: 0 16px;
  margin: 20px 0 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tabs .tab {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid transparent;
}

.category-tabs .tab.active {
  background: rgba(115, 72, 230, 0.4);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.1);
}

.category-tabs .tab .tab-icon-svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   Game Grids
   ============================================ */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.game-card-small {
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s;
  display: block;
}

.game-card-small:active {
  transform: scale(0.97);
}

.game-card-small img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Lottery grid (2 columns wider) */
.lottery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.lottery-card {
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: transform 0.2s;
}

.lottery-card:active {
  transform: scale(0.97);
}

.lottery-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Games horizontal scroll */
.games-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.games-scroll::-webkit-scrollbar {
  display: none;
}

.game-card {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: transform 0.2s;
}

.game-card:active {
  transform: scale(0.97);
}

.game-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
}

/* Section description text */
.section-desc {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.35;
  margin: 0;
}

/* Navigation arrows */
.nav-arrows {
  display: flex;
  gap: 6px;
}

.arrow-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
}

.section-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-link {
  font-size: 12px;
  color: var(--text-light);
  cursor: pointer;
}

/* ============================================
   Bottom Navigation
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 420px;
  height: var(--nav-height);
  background: url('assets/bar/downbar.webp') no-repeat center bottom;
  background-size: 100% 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  z-index: 100;
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0));
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  padding: 4px 0;
}

.nav-item img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: brightness(0.6);
  transition: filter 0.2s;
}

.nav-item span {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
  transition: color 0.2s;
}

.nav-item.active img {
  filter: brightness(1);
}

.nav-item.active span {
  color: #EBAC00;
}

/* Center wheel button */
.nav-item.center-btn {
  margin-top: -46px;
}

.center-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3d1a78 0%, #5b2a9e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #2d1560;
  box-shadow: 0 4px 15px rgba(91, 42, 158, 0.5);
  transform: translateY(-6px); /* nudge the wheel slightly up in the notch */
}

.center-circle img {
  width: 100px;
  height: 100px;
  filter: brightness(1) !important;
}

.center-label {
  font-size: 12px !important;
  color: #fff !important;
  font-weight: 700;
  margin-top: -24px; /* pulled up to overlap the bottom of the wheel */
  position: relative;
  z-index: 3;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* ============================================
   Wallet Section (used by other pages)
   ============================================ */
.wallet-section {
  margin: 12px 16px;
  padding: 18px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.wallet-info {
  margin-bottom: 14px;
}

.wallet-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-family: 'Poppins', sans-serif;
  color: var(--text-light);
}

.wallet-amount {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.rupee {
  font-size: 19px;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  color: var(--white);
}

.wallet-actions {
  display: flex;
  gap: 10px;
}

.btn-withdraw,
.btn-deposit {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  color: var(--white);
}

.btn-withdraw {
  background: linear-gradient(135deg, #00b894, #00cec9);
}

.btn-deposit {
  background: var(--primary-gradient);
}

/* ============================================
   Feature Cards (Wheel / VIP)
   ============================================ */
.feature-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 16px;
}

.feature-card {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}

.feature-card:active {
  transform: scale(0.97);
}

.feature-card img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   Animations
   ============================================ */
@keyframes marquee {
  0% {
    transform: translateX(100%);
  }

  100% {
    transform: translateX(-100%);
  }
}

.notif-text {
  animation: marquee 15s linear infinite;
}

/* ============================================
   Scrollbar Hiding
   ============================================ */
::-webkit-scrollbar {
  display: none;
}