/* ==========================================================================
   Grippywins - Master Professional Design System (Mobile-First & Desktop Friendly)
   ========================================================================== */

:root {
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --secondary-gradient: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --emerald-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --rose-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --violet-gradient: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  --amber-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  
  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --bg-surface: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 20px -5px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 8px 24px -4px rgba(79, 70, 229, 0.3);
}

/* ==========================================================================
   Viewport Architecture
   ========================================================================== */
html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
  background-color: #090d16;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
  background-color: #090d16;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* App Centered Container */
.app-container,
.app-wrapper,
#appCapsule {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin-left: auto !important;
  margin-right: auto !important;
  background-color: #ffffff;
  position: relative;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.45);
  padding-bottom: 76px;
}

@media (max-width: 540px) {
  body {
    background-color: #ffffff;
  }
  .app-container,
  .app-wrapper,
  #appCapsule {
    max-width: 100%;
    box-shadow: none;
  }
}

/* ==========================================================================
   Fixed Header & Navigation
   ========================================================================== */
.appHeader,
.appHeader1,
.app-header-home {
  position: fixed !important;
  top: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 100% !important;
  max-width: 480px !important;
  height: 56px !important;
  z-index: 1030 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid var(--border-color) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 16px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

.appHeader1 .pageTitle,
.appHeader .pageTitle {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--text-main) !important;
  margin: 0;
  text-align: center;
}

.appHeader1 .icon.goBack,
.appHeader .icon.goBack {
  color: var(--text-main) !important;
  font-size: 18px;
  display: flex;
  align-items: center;
  text-decoration: none !important;
}

/* Bottom Floating Navigation */
.appBottomMenu {
  position: fixed !important;
  bottom: 0 !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  width: 100% !important;
  max-width: 480px !important;
  height: calc(58px + env(safe-area-inset-bottom, 0px)) !important;
  min-height: calc(58px + env(safe-area-inset-bottom, 0px)) !important;
  z-index: 1030 !important;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-top: 1px solid var(--border-color) !important;
  display: flex !important;
  justify-content: space-around !important;
  align-items: center !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08) !important;
  padding: 0 0 env(safe-area-inset-bottom, 0px) 0 !important;
}

.appBottomMenu .item {
  flex: 1 1 0% !important;
  width: 25% !important;
  max-width: 25% !important;
  height: 58px !important;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box !important;
}

.appBottomMenu .item a {
  color: var(--text-muted) !important;
  text-decoration: none !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.appBottomMenu .item i {
  font-size: 20px !important;
  margin-bottom: 2px;
}

.appBottomMenu .item.active a {
  color: #4f46e5 !important;
  font-weight: 700;
}

.appBottomMenu .item.active i {
  color: #4f46e5 !important;
  transform: translateY(-1px);
}

@media (max-width: 540px) {
  .appHeader,
  .appHeader1,
  .app-header-home,
  .appBottomMenu {
    max-width: 100% !important;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    margin: 0 !important;
  }
}

/* ==========================================================================
   Carousel & Banner Slider
   ========================================================================== */
.banner-carousel-wrap {
  margin: 12px 14px 16px 14px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px -4px rgba(79, 70, 229, 0.18), 0 2px 6px -1px rgba(0, 0, 0, 0.06);
  background: #1e1b4b;
  position: relative;
}

.banner-carousel-wrap .carousel,
.banner-carousel-wrap .carousel-inner {
  border-radius: 16px;
  overflow: hidden;
}

.banner-carousel-wrap .carousel-item {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 165px;
  max-height: 230px;
  background: #0f172a;
}

.banner-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

.banner-carousel-wrap:hover .banner-img {
  transform: scale(1.02);
}

.banner-carousel-wrap .carousel-indicators {
  margin-bottom: 10px;
  gap: 2px;
}

.banner-carousel-wrap .carousel-indicators li {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin: 0 3px;
  background-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(4px);
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.banner-carousel-wrap .carousel-indicators .active {
  background: #ffffff;
  width: 22px;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
}

/* ==========================================================================
   Announcement Ticker
   ========================================================================== */
.ticker-container {
  display: flex;
  align-items: center;
  background: #fdf2f8;
  border: 1px solid #fbcfe8;
  color: #be185d;
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  gap: 8px;
}

.ticker-icon {
  color: #db2777;
  font-size: 14px;
  flex-shrink: 0;
}

.ticker-marquee {
  white-space: nowrap;
  overflow: hidden;
  display: flex;
  gap: 24px;
  animation: marquee-scroll 18s linear infinite;
}

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

/* ==========================================================================
   Section Titles & Headers
   ========================================================================== */
.section-title-modern {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 14px 10px 14px;
}

.section-title-modern .badge-link {
  font-size: 12px;
  color: #4f46e5;
  text-decoration: none !important;
  font-weight: 600;
}

/* ==========================================================================
   Game Cards & Hub Grid
   ========================================================================== */
.game-grid-modern {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 14px 16px 14px;
}

.game-hub-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none !important;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: var(--text-main);
}

.game-hub-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.game-hub-card .game-thumb {
  position: relative;
  width: 100%;
  height: 110px;
  background: #f1f5f9;
  overflow: hidden;
}

.game-hub-card .game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-hub-card .game-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: #ffffff;
  box-shadow: var(--shadow-xs);
  letter-spacing: 0.04em;
}

.badge-hot { background: linear-gradient(135deg, #ef4444, #f97316); }
.badge-fast { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.badge-popular { background: linear-gradient(135deg, #ec4899, #d946ef); }
.badge-new { background: linear-gradient(135deg, #10b981, #059669); }

.game-hub-card .game-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.game-hub-card .game-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-hub-card .game-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
}

.game-hub-card .game-play-btn {
  margin-top: 6px;
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: #ede9fe;
  color: #6d28d9;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Arena Big Game Cards (games.php) */
.arena-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
  margin: 12px 14px;
  padding: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
  text-decoration: none !important;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.arena-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #c7d2fe;
}

.arena-card-thumb {
  width: 84px;
  height: 84px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f1f5f9;
}

.arena-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   Product Showcase Grid (E-Commerce Mall)
   ========================================================================== */
.product-grid-modern {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 14px 24px 14px;
}

.product-card-modern {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: var(--text-main);
}

.product-card-modern:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.product-card-modern .product-img-wrap {
  width: 100%;
  height: 140px;
  background: #ffffff;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.product-card-modern .product-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.product-card-modern .product-details {
  padding: 10px 12px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card-modern .product-title {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  height: 32px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 6px;
}

.product-card-modern .product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.product-card-modern .product-price {
  font-size: 14px;
  font-weight: 800;
  color: #dc2626;
}

.product-card-modern .product-btn {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: #ede9fe;
  color: #6d28d9;
}

/* ==========================================================================
   Balance Hero & Quick Actions
   ========================================================================== */
.balance-hero-card,
.arena-hero,
.account-profile-hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 12px 14px;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.btn-pill {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-pill-primary {
  background: #10b981;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.btn-pill-primary:hover {
  background: #059669;
}

.btn-pill-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-pill-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   Color Prediction Arena (gamedashboard.php)
   ========================================================================== */
.countdown-box {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 12px 14px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.period-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #f1f5f9;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.timer-display {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Inter', monospace;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.bet-color-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 14px;
}

.bet-btn-card {
  padding: 12px 8px;
  border-radius: var(--radius-md);
  border: none;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bet-btn-card:active {
  transform: scale(0.96);
}

.bet-green { background: var(--emerald-gradient); box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35); }
.bet-violet { background: var(--violet-gradient); box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35); }
.bet-red { background: var(--rose-gradient); box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35); }

.bet-size-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 14px 14px 14px;
}

.bet-size-btn {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: none;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 48px;
  position: relative;
  overflow: hidden;
}

.bet-size-btn:hover {
  opacity: 0.95;
}

.bet-size-btn:active {
  transform: scale(0.97);
}

.bet-size-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.bet-size-btn .size-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.bet-size-btn .size-sub {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.9;
  letter-spacing: 0.05em;
  line-height: 1.2;
  margin-top: 2px;
}

.bet-small-btn {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.bet-big-btn {
  background: var(--amber-gradient);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 14px;
}

.number-btn {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #ffffff;
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.number-btn:hover {
  border-color: #4f46e5;
  color: #4f46e5;
}

.number-btn.num-red { color: #dc2626; }
.number-btn.num-green { color: #059669; }
.number-btn.num-split {
  background: linear-gradient(135deg, rgba(239,68,68,0.12) 0%, rgba(139,92,246,0.18) 100%);
  color: #7c3aed;
}

/* ==========================================================================
   Modals & Stepper
   ========================================================================== */
.modal-dialog {
  max-width: 420px !important;
  margin: 1.75rem auto !important;
}

.modal-content {
  border-radius: var(--radius-lg) !important;
  border: none !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
  overflow: hidden;
}

.contract-pills {
  display: flex;
  gap: 8px;
  margin: 10px 0 16px 0;
}

.contract-pills label {
  flex: 1;
  text-align: center;
  padding: 9px 4px;
  background: #f1f5f9;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s ease;
  margin: 0;
}

.contract-pills label.active,
.contract-pills label:hover {
  background: #ede9fe;
  color: #7c3aed;
  border-color: #7c3aed;
}

.stepper-modern {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px;
  margin: 8px 0 16px 0;
}

.stepper-modern .stepper-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: none;
  background: #ffffff;
  color: var(--text-main);
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
}

.stepper-modern input {
  width: 80px;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.bet-total-box {
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px dashed var(--border-color);
  margin-bottom: 12px;
}

.bet-total-box .total-value {
  font-size: 17px;
  font-weight: 800;
  color: #dc2626;
}

/* ==========================================================================
   Account Dashboard (myaccount.php)
   ========================================================================== */
.account-user-info {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.account-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  background: #312e81;
}

.account-meta h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.account-meta p {
  margin: 2px 0 0 0;
  font-size: 13px;
  color: #c7d2fe;
}

.account-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-item .stat-label {
  font-size: 11px;
  color: #cbd5e1;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.stat-item .stat-value {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 2px;
}

.menu-group-modern {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
  margin: 10px 14px;
  overflow: hidden;
}

.menu-group-modern .menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  color: var(--text-main);
  text-decoration: none !important;
  border-bottom: 1px solid #f1f5f9;
}

.menu-group-modern .menu-item:last-child {
  border-bottom: none;
}

.menu-item .menu-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
}

.menu-item .menu-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.icon-purple { background: #ede9fe; color: #7c3aed; }
.icon-blue { background: #e0f2fe; color: #0284c7; }
.icon-green { background: #dcfce7; color: #16a34a; }
.icon-amber { background: #fef3c7; color: #d97706; }
.icon-rose { background: #ffe4e6; color: #e11d48; }

.menu-item .menu-chevron {
  color: var(--text-light);
  font-size: 13px;
}

/* ==========================================================================
   Auth Cards (login.php & signup.php)
   ========================================================================== */
.auth-wrapper {
  padding: 24px 16px;
}

.auth-card-modern {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 24px 20px;
}

.auth-header {
  text-align: center;
  margin-bottom: 20px;
}

.auth-logo {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-md);
  margin-bottom: 12px;
}

.auth-title {
  font-size: 21px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.input-group-modern {
  position: relative;
  margin-bottom: 14px;
}

.input-group-modern .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
}

.input-group-modern input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  font-size: 14px;
  font-family: inherit;
  background: #ffffff;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.input-group-modern input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.btn-primary-gradient {
  background: var(--primary-gradient);
  color: #ffffff !important;
  border: none;
  border-radius: var(--radius-md);
  padding: 13px;
  font-size: 14px;
  font-weight: 700;
  width: 100%;
  box-shadow: var(--shadow-glow);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none !important;
}

.btn-primary-gradient:hover {
  opacity: 0.95;
}

/* ==========================================================================
   Single Flagship Game Showcase (index.php)
   ========================================================================== */
.flagship-game-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1.5px solid #e0e7ff;
  border-radius: var(--radius-lg);
  margin: 0 14px 20px 14px;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.1), 0 4px 6px -4px rgba(79, 70, 229, 0.05);
  text-decoration: none !important;
  display: block;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.flagship-game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px -6px rgba(79, 70, 229, 0.2);
  border-color: #c7d2fe;
}

.flagship-banner-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 165px;
  max-height: 230px;
  background: #0f172a;
  overflow: hidden;
}

.flagship-banner-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

.flagship-game-card:hover .flagship-banner-wrap img {
  transform: scale(1.03);
}

.flagship-live-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 1.4s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.flagship-content {
  padding: 16px;
}

.flagship-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.flagship-title {
  font-size: 18px;
  font-weight: 800;
  color: #1e1b4b;
  margin: 0;
  letter-spacing: -0.01em;
}

.flagship-server-tag {
  background: #ede9fe;
  color: #7c3aed;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.flagship-desc {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 12px 0;
  line-height: 1.4;
}

.flagship-payout-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.payout-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.payout-green { background: #dcfce7; color: #166534; }
.payout-violet { background: #f3e8ff; color: #6b21a8; }
.payout-red { background: #fee2e2; color: #991b1b; }
.payout-gold { background: #fef3c7; color: #92400e; }

.flagship-btn {
  background: var(--primary-gradient);
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 700;
  padding: 12px;
  border-radius: var(--radius-md);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

/* ==========================================================================
   Recharge & Withdrawal Modern Elements
   ========================================================================== */
.recharge-amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.recharge-pill-btn {
  background: #f8fafc;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 6px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #1e1b4b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.recharge-pill-btn:hover,
.recharge-pill-btn.active {
  background: #ede9fe;
  border-color: #7c3aed;
  color: #7c3aed;
}

.info-notice-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-left: 4px solid #4f46e5;
  border-radius: var(--radius-sm);
  padding: 12px;
  margin: 14px 0;
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
}

.info-notice-box strong {
  color: #1e1b4b;
}

/* Table Responsive Adjustments */
.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
  border-radius: var(--radius-md);
}

.table thead th {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  border-top: none;
}

.table td {
  font-size: 13px;
  vertical-align: middle;
}

.point {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}

.point2 {
  flex: 1;
  font-size: 12px;
  padding: 2px 0;
}

/* ==========================================================================
   BDG Game / Daman Dark Theme Styles (Reference Design System)
   ========================================================================== */
.bdg-theme {
  background-color: #1a1d24 !important;
  color: #f1f5f9;
  min-height: 100vh;
}

.bdg-header {
  background-color: #1f242e !important;
  border-bottom: 1px solid #2b3342 !important;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.bdg-header .brand-title {
  font-size: 19px;
  font-weight: 900;
  color: #e5b858;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.bdg-header-icons {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bdg-header-icons a, .bdg-header-icons button {
  color: #cbd5e1;
  font-size: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}

.bdg-header-icons a:hover, .bdg-header-icons button:hover {
  color: #e5b858;
}

/* Time Modes Bar (1Min, 2Min, 3Min, 5Min) */
.bdg-modes-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px;
}

@media (max-width: 360px) {
  .bdg-modes-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

.bdg-mode-tab {
  background: #222834 !important;
  border: 1px solid #334155 !important;
  border-radius: 12px !important;
  padding: 10px 4px !important;
  color: #94a3b8 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  outline: none !important;
  width: 100% !important;
  min-height: 58px !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

.bdg-mode-tab:hover {
  background: #2a3444 !important;
  color: #cbd5e1 !important;
  border-color: #475569 !important;
}

.bdg-mode-tab:active {
  transform: scale(0.96) !important;
}

.bdg-mode-tab i {
  font-size: 16px !important;
  margin-bottom: 2px !important;
}

.bdg-mode-tab .mode-title {
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.bdg-mode-tab .mode-duration {
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  white-space: nowrap !important;
}

.bdg-mode-tab.active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  border: 1px solid #fbbf24 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.45) !important;
}

.bdg-mode-tab.active i {
  color: #ffffff !important;
}

.bdg-mode-tab.active .mode-title,
.bdg-mode-tab.active .mode-duration {
  color: #ffffff !important;
}

/* Balance Hero Card Dark */
.bdg-balance-card {
  background: linear-gradient(135deg, #252c38 0%, #1c222c 100%);
  border: 1px solid #323b4b;
  border-radius: 16px;
  padding: 16px;
  margin: 0 14px 14px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.bdg-balance-card .bal-label {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
}

.bdg-balance-card .bal-amount {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 4px;
}

.bdg-balance-card .bal-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.bdg-balance-card .btn-recharge {
  flex: 1;
  background: linear-gradient(135deg, #e5b858 0%, #d4af37 100%);
  color: #1a1d24;
  font-weight: 700;
  font-size: 13px;
  padding: 9px;
  border-radius: 20px;
  text-align: center;
  text-decoration: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.bdg-balance-card .btn-rule {
  flex: 1;
  background: #333c4d;
  color: #f1f5f9;
  font-weight: 600;
  font-size: 13px;
  padding: 9px;
  border-radius: 20px;
  text-align: center;
  text-decoration: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Period & Countdown Box */
.bdg-countdown-box {
  background: #222834;
  border: 1px solid #2f3847;
  border-radius: 16px;
  padding: 14px 16px;
  margin: 0 14px 14px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bdg-countdown-box .period-title {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.bdg-countdown-box .period-val {
  font-size: 15px;
  font-weight: 800;
  color: #e5b858;
  letter-spacing: 0.05em;
  font-family: monospace;
}

.bdg-countdown-box .timer-box {
  text-align: right;
}

.bdg-countdown-box .timer-title {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.bdg-countdown-box .timer-digits {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  align-items: center;
}

.bdg-countdown-box .timer-digit {
  background: #151921;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid #2f3847;
  min-width: 26px;
  text-align: center;
}

.bdg-countdown-box .timer-colon {
  color: #e5b858;
  font-weight: 800;
  font-size: 16px;
  margin: 0 1px;
}

/* Betting Main Panel */
.bdg-bet-panel {
  background: #222834;
  border: 1px solid #2f3847;
  border-radius: 16px;
  padding: 14px;
  margin: 0 14px 14px 14px;
}

/* Colors row */
.bdg-color-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.bdg-btn-color {
  height: 42px;
  border-radius: 8px;
  border: none;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.bdg-btn-color:active { transform: scale(0.97); }
.bdg-btn-color:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.bdg-color-green { background: #00b977; box-shadow: 0 4px 14px rgba(0, 185, 119, 0.4); }
.bdg-color-violet { background: #9c27b0; box-shadow: 0 4px 14px rgba(156, 39, 176, 0.4); }
.bdg-color-red { background: #f84b4b; box-shadow: 0 4px 14px rgba(248, 75, 75, 0.4); }

/* Numbers Box with 3D Spherical Lottery Balls */
.bdg-numbers-box {
  background: #171b23;
  border: 1px solid #2b3342;
  border-radius: 12px;
  padding: 12px 6px;
  margin-bottom: 12px;
}

.bdg-ball-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  justify-items: center;
}

.bdg-ball-row:not(:last-child) {
  margin-bottom: 10px;
}

.bdg-ball {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 5px 12px rgba(0,0,0,0.4), inset 0 -4px 6px rgba(0,0,0,0.35), inset 0 4px 6px rgba(255,255,255,0.4);
}

.bdg-ball:active { transform: scale(0.92); }
.bdg-ball:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.bdg-ball span {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  box-shadow: inset 0 2px 3px rgba(0,0,0,0.25);
}

/* Green Balls: 1, 3, 7, 9 */
.ball-green {
  background: radial-gradient(circle at 35% 30%, #34d399 0%, #00b977 45%, #047857 100%);
}
.ball-green span { color: #047857; }

/* Red Balls: 2, 4, 6, 8 */
.ball-red {
  background: radial-gradient(circle at 35% 30%, #f87171 0%, #f84b4b 45%, #b91c1c 100%);
}
.ball-red span { color: #b91c1c; }

/* Split Ball 0: Red & Violet */
.ball-split-0 {
  background: linear-gradient(135deg, #9c27b0 50%, #f84b4b 50%);
}
.ball-split-0 span { color: #7e22ce; }

/* Split Ball 5: Green & Violet */
.ball-split-5 {
  background: linear-gradient(135deg, #9c27b0 50%, #00b977 50%);
}
.ball-split-5 span { color: #047857; }

/* Multipliers & Random Row */
.bdg-multiplier-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.bdg-btn-random {
  background: #171b23;
  border: 1px solid #f84b4b;
  color: #f84b4b;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.bdg-btn-random:active { transform: scale(0.95); }

.bdg-multipliers {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  flex: 1;
}

.bdg-mult-pill {
  background: #171b23;
  border: 1px solid #2f3847;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex: 1;
  text-align: center;
  white-space: nowrap;
}

.bdg-mult-pill.active {
  background: #00b977;
  border-color: #00b977;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 185, 119, 0.35);
}

/* Big / Small Row */
.bdg-size-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}

.bdg-btn-size {
  height: 44px;
  border: none;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bdg-btn-size:active { opacity: 0.9; }
.bdg-btn-size:disabled { opacity: 0.5; cursor: not-allowed; }

.bdg-size-big {
  background: #ea8d2a;
  border-top-left-radius: 24px;
  border-bottom-left-radius: 24px;
}

.bdg-size-small {
  background: #4185f2;
  border-top-right-radius: 24px;
  border-bottom-right-radius: 24px;
}

/* History Sub-tabs */
.bdg-history-tabs {
  display: flex;
  gap: 10px;
  margin: 16px 14px 12px 14px;
}

.bdg-tab-btn {
  flex: 1;
  background: #252b37;
  border: 1px solid #333c4d;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.bdg-tab-btn.active {
  background: linear-gradient(135deg, #e5b858 0%, #d4af37 100%);
  border-color: #e5b858;
  color: #1a1d24;
  box-shadow: 0 4px 12px rgba(229, 184, 88, 0.25);
}

/* Game History Table Dark (matches screenshot) */
.bdg-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: #e2e8f0;
  font-size: 13px;
}

.bdg-table thead tr th {
  background: #252c38;
  color: #94a3b8;
  font-weight: 700;
  font-size: 12px;
  padding: 12px 10px;
  border-bottom: 1px solid #323b4b;
  text-align: center;
}

.bdg-table thead tr th:first-child {
  text-align: left;
  padding-left: 14px;
}

.bdg-table thead tr th:last-child {
  text-align: right;
  padding-right: 14px;
}

.bdg-table tbody tr {
  border-bottom: 1px solid #222834;
  transition: background 0.1s ease;
}

.bdg-table tbody tr:nth-child(odd) {
  background: #1c212b;
}

.bdg-table tbody tr:nth-child(even) {
  background: #171b23;
}

.bdg-table tbody tr td {
  padding: 12px 10px;
  vertical-align: middle;
  text-align: center;
}

.bdg-table tbody tr td:first-child {
  text-align: left;
  padding-left: 14px;
  font-family: monospace;
  font-weight: 600;
  color: #cbd5e1;
}

.bdg-table tbody tr td:last-child {
  text-align: right;
  padding-right: 14px;
}

.bdg-num-display {
  font-size: 18px;
  font-weight: 800;
}

.bdg-num-green { color: #00b977; }
.bdg-num-red { color: #f84b4b; }
.bdg-num-split { color: #c084fc; }

.bdg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
}

.bdg-dot-green { background: #00b977; }
.bdg-dot-red { background: #f84b4b; }
.bdg-dot-violet { background: #9c27b0; }

/* Dark Theme Modal */
.bdg-modal .modal-content {
  background-color: #222834 !important;
  color: #f1f5f9;
  border: 1px solid #323b4b;
}
.bdg-modal .contract-pills label {
  background: #171b23;
  color: #94a3b8;
  border-color: #2f3847;
}
.bdg-modal .contract-pills label.active {
  background: #00b977;
  color: #ffffff;
  border-color: #00b977;
}
.bdg-modal .stepper-modern {
  background: #171b23;
  border-color: #2f3847;
}
.bdg-modal .stepper-modern input {
  color: #ffffff;
}
.bdg-modal .bet-total-box {
  background: #171b23;
  border-color: #2f3847;
  color: #94a3b8;
}
.bdg-modal .bet-total-box .total-value {
  color: #e5b858;
}

/* Dark Theme Footer Nav & Floating Widget */
.bdg-theme .appBottomMenu {
  background: #171b23 !important;
  border-top: 1px solid #28303e !important;
}
.bdg-theme .appBottomMenu .item a {
  color: #64748b !important;
}
.bdg-theme .appBottomMenu .item.active a {
  color: #e5b858 !important;
}
.bdg-theme .appBottomMenu .item.active i {
  color: #e5b858 !important;
}

/* Floating Customer Support Badge (Matches Reference Image) */
.bdg-floating-support {
  position: fixed;
  bottom: 80px;
  right: 18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fde047 0%, #eab308 55%, #ca8a04 100%);
  box-shadow: 0 6px 20px rgba(234, 179, 8, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
  cursor: pointer;
  transition: transform 0.2s ease;
  border: 2px solid rgba(255,255,255,0.4);
  text-decoration: none !important;
}
.bdg-floating-support:active {
  transform: scale(0.92);
}
.bdg-floating-support i {
  color: #713f12;
  font-size: 22px;
}
/* Responsive bet modal actions */
.bet-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #2f3847;
}

@media (max-width: 380px) {
  .bet-modal-actions {
    gap: 6px !important;
  }
  #confirmBetSubmitBtn {
    font-size: 11px !important;
    padding: 0 4px !important;
    gap: 3px !important;
  }
  #confirmBetSubmitBtn #btnConfirmAmount {
    font-size: 11px !important;
  }
}
