:root {
  --bg-color: #080c14;
  --bg-secondary: #0d1322;
  --card-bg: rgba(18, 25, 41, 0.75);
  --card-bg-solid: #121929;
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(56, 189, 248, 0.35);
  
  --text-main: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #8492a6;
  
  --primary-color: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.4);
  --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  
  --success-color: #10b981;
  --success-glow: rgba(16, 185, 129, 0.35);
  --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  
  --gold-color: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.35);
  --gold-gradient: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  
  --danger-color: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.35);
  --danger-gradient: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bottom-bar-height: 72px;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--tg-theme-bg-color, var(--bg-color));
  background-image: 
    radial-gradient(circle at 10% 0%, rgba(59, 130, 246, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 20%, rgba(245, 158, 11, 0.08) 0%, transparent 35%),
    radial-gradient(circle at 50% 100%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--tg-theme-text-color, var(--text-main));
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}

* {
  box-sizing: border-box;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-bar-height) + 24px);
  overflow-x: clip;
}

/* STICKY TOP HEADER (GLASSMORPHIC LUXURY VIP) */
.header-card {
  background: rgba(13, 19, 34, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--card-border);
  padding: 14px 16px 12px 16px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-ring {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #f59e0b, #3b82f6);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.username {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.2px;
  color: #fff;
}

.user-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
}

.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  display: inline-block;
}

.btn-quick-withdraw {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-quick-withdraw:active {
  transform: scale(0.95);
  background: rgba(59, 130, 246, 0.25);
}

/* BALANCE CARD */
.balance-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.balance-ambient-glow {
  position: absolute;
  top: -40px;
  right: -30px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.balance-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.balance-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-weight: 700;
}

.live-tag {
  font-size: 10px;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 7px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: pulseLive 1.5s infinite;
}

@keyframes pulseLive {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.balance-amount-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 2px 0 10px 0;
}

.balance-num {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 60%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.15));
}

.currency-tag {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.balance-stats-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 8px;
}

.stat-pill {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.stat-pill b {
  color: #fff;
  font-weight: 700;
}

/* TAB AREA */
.tab-content-area {
  padding: 16px;
  flex: 1;
}

.tab-pane {
  display: none;
  animation: tabFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-pane.active {
  display: block;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* SECTION TITLES */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.title-emoji {
  font-size: 24px;
}

.section-title h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #fff;
}

.section-subtitle {
  margin: 2px 0 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.badge {
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 20px;
  letter-spacing: 0.2px;
}

.badge-hot {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.2);
}

.badge-gold {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

/* DAILY GOAL PROGRESS WIDGET */
.daily-goal-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.7) 100%);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.goal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}

.goal-percent {
  color: #38bdf8;
  font-weight: 900;
}

.goal-bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 6px;
}

.goal-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #06b6d4, #10b981);
  border-radius: 10px;
  transition: width 0.4s ease-out;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.goal-footer {
  font-size: 11px;
  color: var(--text-muted);
}

.goal-footer b {
  color: #fff;
}

/* HERO AD CARD */
.ad-hero-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 20px;
  padding: 22px 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  margin-bottom: 14px;
}

.ad-hero-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
  pointer-events: none;
}

.ad-badge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.ad-icon-hero {
  font-size: 40px;
}

.ad-network-tag {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.ad-details h4 {
  margin: 0 0 6px 0;
  font-size: 19px;
  font-weight: 800;
}

.ad-details p {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 0 14px 0;
  line-height: 1.45;
}

.reward-pill {
  display: inline-block;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-weight: 900;
  font-size: 18px;
  padding: 7px 20px;
  border-radius: 30px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
  margin-bottom: 18px;
}

/* BUTTONS & MICRO-INTERACTIONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 20px;
  border-radius: 16px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.3px;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

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

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

/* BUTTON SHINE EFFECT */
.btn-shine::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transform: rotate(30deg);
  animation: shineWave 4s infinite;
}

@keyframes shineWave {
  0% { transform: translateX(-100%) rotate(30deg); }
  25% { transform: translateX(100%) rotate(30deg); }
  100% { transform: translateX(100%) rotate(30deg); }
}

.info-alert {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.info-alert-icon {
  font-size: 18px;
  color: #f59e0b;
}

.info-alert b {
  color: var(--text-secondary);
}

/* ===================================================
   CASINO TABS & SUB-GAMES
=================================================== */
.casino-game-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 14px;
  scrollbar-width: none;
}
.casino-game-nav::-webkit-scrollbar {
  display: none;
}

.casino-nav-btn {
  background: rgba(18, 25, 41, 0.8);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 10px 16px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.casino-nav-btn.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.3) 100%);
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.35);
}

.casino-game-card {
  background: linear-gradient(135deg, rgba(26, 34, 53, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* 1. SLOTS */
.slot-machine-frame {
  background: radial-gradient(circle, #1e1b4b 0%, #0c0a24 100%);
  border: 2px solid #818cf8;
  border-radius: 18px;
  padding: 22px 14px;
  box-shadow: inset 0 0 30px rgba(99, 102, 241, 0.3), 0 0 25px rgba(99, 102, 241, 0.2);
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.slot-reels-container {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.slot-reel {
  width: 72px;
  height: 84px;
  background: #0f1422;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.8);
  transition: transform 0.1s ease;
}

.casino-result-badge {
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 12px;
  margin-bottom: 12px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* BET SELECTOR */
.bet-control-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.bet-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.bet-display {
  font-size: 15px;
  color: #fbbf24;
}

.bet-preset-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.btn-bet, .btn-bet-crash, .btn-bet-mines, .btn-bet-chicken, .btn-bet-util {
  background: #1e293b;
  border: 1px solid var(--card-border);
  color: #cbd5e1;
  padding: 9px 1px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  transition: all 0.2s;
}

.btn-bet.active, .btn-bet-crash.active, .btn-bet-mines.active, .btn-bet-chicken.active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: #f59e0b;
  color: #000;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.btn-bet-util {
  background: #334155;
  color: #38bdf8;
}

.btn-spin {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000;
  font-weight: 900;
  font-size: 16px;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
  margin-bottom: 12px;
}

.slot-payout-info {
  display: flex;
  justify-content: space-around;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
}

/* 2. CRASH / ROCKET */
.crash-history-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 10px;
  scrollbar-width: none;
}
.crash-history-bar::-webkit-scrollbar {
  display: none;
}

.hist-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 8px;
  white-space: nowrap;
}
.hist-badge.red { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.hist-badge.blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.hist-badge.gold { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.hist-badge.purple { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }

.crash-arena {
  height: 190px;
  background: radial-gradient(circle at bottom, #1e1b4b 0%, #060913 100%);
  border: 2px solid #4338ca;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.crash-radar-grid {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    linear-gradient(rgba(99, 102, 241, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
}

.crash-stars-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(#ffffff 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.15;
}

.rocket-wrapper {
  position: absolute;
  bottom: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.06s linear;
  z-index: 4;
}

.rocket-icon {
  font-size: 44px;
  transform: rotate(45deg);
  filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.6));
}

.rocket-fire {
  font-size: 22px;
  margin-top: -8px;
  animation: fireAnim 0.1s infinite alternate;
}

@keyframes fireAnim {
  from { transform: scale(0.85); opacity: 0.8; }
  to { transform: scale(1.15); opacity: 1; }
}

.crash-center-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
}

.crash-multiplier-text {
  font-size: 46px;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 0 25px rgba(251, 191, 36, 0.6);
  line-height: 1.1;
  transition: color 0.15s;
}

.crash-status-msg {
  font-size: 15px;
  font-weight: 800;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  padding: 3px 12px;
  border-radius: 20px;
  text-shadow: 0 0 15px rgba(239, 68, 68, 0.8);
  margin-top: 6px;
  letter-spacing: 0.5px;
}

.crash-countdown-badge {
  position: absolute;
  top: 14px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
  z-index: 6;
}

.auto-cashout-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.auto-cashout-row input {
  width: 70px;
  background: #0f172a;
  border: 1px solid var(--card-border);
  color: #fbbf24;
  font-weight: 800;
  font-size: 14px;
  text-align: center;
  padding: 4px 6px;
  border-radius: 8px;
}

.btn-cashout {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  font-weight: 900;
  font-size: 16px;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.spectator-msg {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 12px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 12px;
}

/* 3. MINES */
.mines-status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 12px;
}

.mines-live-mult {
  color: #fbbf24;
  font-size: 16px;
  font-weight: 900;
}

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

.mine-cell {
  aspect-ratio: 1;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.mine-cell:active {
  transform: scale(0.92);
}

.mine-cell.gem {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.mine-cell.bomb {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.btn-mines {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
}

/* 4. CHICKEN */
.chicken-stage {
  padding: 24px 10px;
  text-align: center;
  background: radial-gradient(circle, #1e293b 0%, #0b0f19 100%);
  border-radius: 16px;
  margin-bottom: 14px;
}

.chicken-dome-wrapper {
  display: flex;
  justify-content: space-around;
}

.dome-card {
  width: 68px;
  height: 68px;
  background: #1e293b;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.dome-card:active {
  transform: translateY(-8px) scale(1.05);
  border-color: #f59e0b;
}

.chicken-result-box {
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  padding: 8px;
  border-radius: 10px;
  margin-bottom: 12px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.chicken-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
}

/* 5. CASES */
.cases-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.case-card {
  background: #1e293b;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.case-card[data-case="bronze"] { border-color: rgba(205, 127, 50, 0.4); }
.case-card[data-case="silver"] { border-color: rgba(192, 192, 192, 0.4); }
.case-card[data-case="gold"] { border-color: rgba(245, 158, 11, 0.5); }

.case-icon {
  font-size: 46px;
  margin-bottom: 6px;
}

.case-card h4 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 800;
}

.case-card p {
  margin: 0 0 10px 0;
  font-size: 12px;
  color: var(--text-muted);
}

.case-price {
  font-size: 15px;
  font-weight: 900;
  color: #fbbf24;
  margin-bottom: 12px;
}

.btn-case {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  padding: 10px 24px;
  font-size: 13px;
  border-radius: 12px;
}

.case-drop-reveal {
  text-align: center;
  padding: 24px;
  background: #0f172a;
  border-radius: 16px;
  margin-top: 14px;
}

.drop-icon-anim {
  font-size: 56px;
  animation: bounceDrop 0.6s infinite alternate;
}

@keyframes bounceDrop {
  from { transform: scale(0.9); }
  to { transform: scale(1.15); }
}

.drop-amount-text {
  font-size: 26px;
  font-weight: 900;
  color: #10b981;
}

/* ===================================================
   REFERRAL / FRIENDS TAB
=================================================== */
.ref-hero-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 22px 18px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.ref-icon {
  font-size: 46px;
  margin-bottom: 8px;
}

.ref-hero-card h4 {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 800;
}

.ref-hero-card p {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 0 18px 0;
  line-height: 1.45;
}

.ref-stats-grid {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.stat-cell {
  flex: 1;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 10px;
}

.stat-num {
  font-size: 24px;
  font-weight: 900;
  color: #38bdf8;
  margin-bottom: 2px;
}

.stat-text {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
}

.ref-link-box {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.ref-link-box input {
  flex: 1;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 12px;
  outline: none;
}

.btn-copy {
  background: #334155;
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.btn-share {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
}

/* ===================================================
   WALLET / WITHDRAWAL TAB
=================================================== */
.withdraw-form-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 20px 16px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.method-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.method-btn {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  padding: 12px 10px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.method-btn.full-width {
  grid-column: span 2;
}

.method-btn.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.35) 100%);
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.35);
}

.form-group input {
  width: 100%;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 14px;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
}

.quick-amounts-grid {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.quick-amounts-grid::-webkit-scrollbar {
  display: none;
}

.btn-amount-chip {
  flex: 1;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  padding: 7px 6px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-amount-chip:active {
  transform: scale(0.95);
  background: #334155;
}

.btn-chip-max {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.history-section h4 {
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 12px 0;
}

.history-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
}

.empty-history {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 20px 0;
}

/* ===================================================
   FLOATING ISLAND BOTTOM NAVIGATION
=================================================== */
.bottom-nav {
  position: fixed;
  bottom: 12px;
  left: 14px;
  right: 14px;
  height: 64px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  padding: 0 4px;
}

.nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 16px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.nav-item .nav-icon {
  font-size: 20px;
  transition: transform 0.2s;
}

.nav-item .nav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.1px;
}

.nav-item .nav-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
  transition: all 0.2s;
}

.nav-item.active {
  color: #38bdf8;
}

.nav-item.active .nav-icon {
  transform: translateY(-2px);
}

.nav-item.active .nav-dot {
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
}

/* TOAST NOTIFICATION */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(14px);
  color: #fff;
  padding: 12px 20px;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  font-size: 13px;
  font-weight: 800;
  z-index: 99999;
  border: 1px solid var(--card-border);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  max-width: 90%;
}

/* FULLSCREEN IN-APP AD OVERLAY */
.in-app-ad-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #000;
  z-index: 99999;
  display: flex;
  flex-direction: column;
}

.ad-top-header {
  height: 56px;
  background: #111827;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.ad-timer-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.pulse-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulseDot 1.2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.btn-claim-now {
  background: var(--success-gradient);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.6);
}

.ad-progress-bar-container {
  height: 4px;
  background: #1f2937;
  width: 100%;
}

.ad-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: #3b82f6;
  transition: width 1s linear;
}

.ad-frame-wrapper {
  flex: 1;
  position: relative;
  background: #0b0f19;
}

.ad-frame-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

/* ANTI-ADBLOCK OVERLAY */
.adblock-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(8, 12, 20, 0.95);
  backdrop-filter: blur(16px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.adblock-card {
  background: #1e293b;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 20px;
  padding: 26px 20px;
  text-align: center;
  max-width: 360px;
}

.adblock-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.adblock-card h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: 800;
  color: #f87171;
}

.adblock-card p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 18px 0;
}

/* TASKS SECTION */
.tasks-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s;
}

.task-card.completed {
  opacity: 0.55;
  background: rgba(15, 23, 42, 0.4);
}

.task-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.task-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.task-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.task-title {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.task-reward {
  font-size: 12px;
  font-weight: 800;
  color: #fbbf24;
  margin-top: 2px;
}

.btn-task {
  padding: 8px 16px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  background: var(--primary-gradient);
  color: #fff;
}

.btn-task.done {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  cursor: default;
}

.hidden {
  display: none !important;
}
