:root {
  --bg-primary: #0d0f18;
  --bg-secondary: #161926;
  --bg-card: rgba(26, 30, 48, 0.85);
  --bg-card-hover: rgba(35, 41, 66, 0.95);
  --accent-gold: #ffd700;
  --accent-gold-gradient: linear-gradient(135deg, #ffe066 0%, #f59e0b 50%, #d97706 100%);
  --accent-neon-green: #10b981;
  --accent-neon-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-red: #ef4444;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --border-glow: rgba(245, 158, 11, 0.25);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(245, 158, 11, 0.1) 0%, transparent 40%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Gatekeeper Blocked Screen for direct browser visits */
#gatekeeper-blocked {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  padding: 20px;
}

.blocked-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.blocked-icon {
  font-size: 54px;
  margin-bottom: 16px;
}

.blocked-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.blocked-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.blocked-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--accent-gold-gradient);
  color: #1a1200;
  font-weight: 800;
  font-size: 15px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
  transition: transform 0.15s;
}

.blocked-btn:active {
  transform: scale(0.98);
}

/* App Container */
.app-container {
  display: flex;
  flex-direction: column;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: 85px;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 15, 24, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

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

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  color: #1a1500;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 14px;
  font-weight: 700;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-status {
  font-size: 11px;
  color: var(--accent-gold);
  font-weight: 600;
}

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

.balance-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 6px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.balance-badge:active {
  transform: scale(0.96);
}

.balance-icon {
  font-size: 16px;
}

.balance-amount {
  font-size: 15px;
  font-weight: 800;
  color: #ffe066;
  letter-spacing: 0.3px;
}

.sound-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.2s;
}

.sound-btn:hover {
  background: var(--bg-card-hover);
}

.admin-nav-btn {
  background: linear-gradient(135deg, #ffd700 0%, #d97706 100%);
  border: 1px solid #f59e0b;
  color: #1a1200;
  padding: 6px 10px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
  animation: pulseGold 2s infinite alternate;
}

@keyframes pulseGold {
  from { box-shadow: 0 0 8px rgba(245, 158, 11, 0.3); }
  to { box-shadow: 0 0 18px rgba(255, 215, 0, 0.7); }
}

/* Casino Poker Chip Buttons */
.chip-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 12px;
}

.casino-chip {
  flex: 1;
  aspect-ratio: 1;
  max-width: 52px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), inset 0 0 6px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s, box-shadow 0.15s;
}

.casino-chip:active {
  transform: scale(0.92);
}

.chip-red { background: radial-gradient(circle, #ff4757 40%, #b31e2d 100%); }
.chip-blue { background: radial-gradient(circle, #3742fa 40%, #1e25a8 100%); }
.chip-green { background: radial-gradient(circle, #2ed573 40%, #178a48 100%); }
.chip-black { background: radial-gradient(circle, #2f3542 40%, #14161b 100%); border-color: #ffd700; color: #ffd700; }
.chip-gold { background: radial-gradient(circle, #ffa502 40%, #c47c00 100%); border-color: #fff; color: #1a1200; font-size: 10px; }

/* Admin Dashboard View */
.admin-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(139, 92, 246, 0.06) 100%), var(--bg-card);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

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

.admin-card-title {
  font-size: 14px;
  font-weight: 800;
  color: #ffd700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-refresh-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.admin-refresh-btn:hover, .admin-refresh-btn:active {
  color: #ffd700;
  background: rgba(245, 158, 11, 0.2);
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-stat {
  background: rgba(10, 12, 18, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}

.admin-stat-num {
  font-size: 17px;
  font-weight: 900;
  color: #ffd700;
  margin-bottom: 2px;
}

.admin-stat-txt {
  font-size: 10px;
  color: var(--text-muted);
}

/* Admin Subtabs */
.admin-subtabs {
  display: flex;
  background: rgba(13, 15, 24, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
}

.admin-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 4px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.admin-tab.active {
  background: var(--bg-card-hover);
  color: #ffd700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
}

/* Admin Search Bar */
.admin-search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.admin-users-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 2px;
}

.admin-user-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s;
}

.admin-user-card:hover {
  border-color: rgba(245, 158, 11, 0.35);
}

.admin-user-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 6px;
}

.admin-user-info-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-user-id-badge {
  font-family: monospace;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
}

.admin-user-bal {
  font-size: 14px;
  font-weight: 900;
  color: #ffd700;
}

.admin-user-grid-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  font-size: 11px;
  color: var(--text-muted);
}

.admin-user-grid-details span b {
  color: #e5e7eb;
}

.admin-user-actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.admin-action-btn-sm {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #e5e7eb;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.admin-action-btn-sm:hover, .admin-action-btn-sm:active {
  background: rgba(245, 158, 11, 0.2);
  color: #ffd700;
}

.admin-action-btn-sm.btn-danger {
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.admin-action-btn-sm.btn-danger:hover, .admin-action-btn-sm.btn-danger:active {
  background: rgba(239, 68, 68, 0.25);
  color: #ff8888;
}

/* Admin Referrals List */
.admin-referrals-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 480px;
  overflow-y: auto;
}

.admin-ref-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.admin-ref-party {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-ref-name {
  font-weight: 700;
  color: #fff;
}

.admin-ref-id {
  font-size: 10px;
  color: var(--text-muted);
  font-family: monospace;
}

.admin-ref-arrow {
  color: #ffd700;
  font-size: 14px;
}

.admin-ref-meta {
  text-align: right;
  font-size: 10px;
  color: var(--text-muted);
}

.admin-ref-bonus {
  color: #10b981;
  font-weight: 800;
  font-size: 11px;
}

.admin-btn-action {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-glow);
  color: #fff;
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13px;
  width: 100%;
  cursor: pointer;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.admin-btn-action:hover, .admin-btn-action:active {
  background: rgba(245, 158, 11, 0.2);
  border-color: #ffd700;
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 16px;
}

.view-section {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.view-section.active {
  display: block;
}

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

/* Banner */
.welcome-banner {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(245, 158, 11, 0.2) 100%), var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.banner-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.banner-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

.disclaimer-badge {
  display: inline-block;
  font-size: 10px;
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* Quick Games Grid */
.section-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.games-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(245, 158, 11, 0.15);
}

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

.game-card.featured {
  grid-column: span 2;
  flex-direction: row;
  text-align: left;
  gap: 16px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(245, 158, 11, 0.12)), var(--bg-card);
  border-color: rgba(239, 68, 68, 0.4);
}

.game-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent-red);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.game-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 10px;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.03);
}

.game-card.featured .game-icon-wrap {
  width: 64px;
  height: 64px;
  font-size: 34px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.game-info {
  flex: 1;
}

.game-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: #fff;
}

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

/* Modal / Subview Header */
.game-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.back-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}

.back-btn:active {
  background: var(--bg-card-hover);
}

.current-game-title {
  font-size: 18px;
  font-weight: 800;
}

/* Bet Controls */
.bet-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 16px;
}

.bet-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.bet-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.bet-input {
  flex: 1;
  background: rgba(13, 15, 24, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  outline: none;
  font-family: inherit;
}

.bet-input:focus {
  border-color: var(--accent-gold);
}

.bet-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.preset-btn:hover, .preset-btn:active {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--accent-gold);
  color: #ffe066;
}

.btn-primary {
  width: 100%;
  background: var(--accent-gold-gradient);
  border: none;
  color: #181100;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
  transition: transform 0.15s, opacity 0.15s;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-cashout {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4) !important;
  animation: pulseGreen 1.2s infinite alternate;
}

@keyframes pulseGreen {
  from { box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
  to { box-shadow: 0 0 25px rgba(16, 185, 129, 0.8); }
}

/* ================= CRASH / ROCKET GAME ================= */
.crash-stage {
  background: radial-gradient(circle at 50% 50%, #1c223a 0%, #0e111d 100%);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  height: 240px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
}

#crash-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.crash-overlay {
  position: relative;
  z-index: 5;
  text-align: center;
  pointer-events: none;
}

.crash-multiplier {
  font-size: 46px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
  letter-spacing: 1px;
}

.crash-multiplier.crashed {
  color: var(--accent-red);
  text-shadow: 0 0 25px rgba(239, 68, 68, 0.8);
  animation: shake 0.4s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px) rotate(-2deg); }
  75% { transform: translateX(8px) rotate(2deg); }
}

.crash-status {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ================= SLOTS GAME ================= */
.slots-machine {
  background: linear-gradient(180deg, #2a1b4e 0%, #16192b 100%);
  border: 3px solid #f59e0b;
  border-radius: 24px;
  padding: 20px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(245, 158, 11, 0.2);
  margin-bottom: 16px;
}

.slots-reels-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  background: #090a10;
  border-radius: 16px;
  padding: 16px 10px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.9);
}

.slot-reel {
  flex: 1;
  height: 100px;
  background: linear-gradient(180deg, #181b2a 0%, #202438 50%, #181b2a 100%);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 4px 8px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.slot-reel.spinning {
  animation: reelBlur 0.15s infinite linear;
}

@keyframes reelBlur {
  0% { transform: translateY(-4px); filter: blur(2px); }
  50% { transform: translateY(4px); filter: blur(3px); }
  100% { transform: translateY(-4px); filter: blur(2px); }
}

.slots-result-banner {
  text-align: center;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 700;
  min-height: 24px;
  color: #ffe066;
}

/* Paytable pill list */
.paytable-strip {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding: 10px 0;
  scrollbar-width: none;
}
.paytable-strip::-webkit-scrollbar { display: none; }

.paytable-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ================= COIN FLIP ================= */
.coin-stage {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  margin-bottom: 16px;
}

.coin-3d {
  width: 120px;
  height: 120px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1.2s cubic-bezier(0.2, 0.85, 0.4, 1.15);
}

.coin-side {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.4), inset 0 0 15px rgba(0, 0, 0, 0.5);
  border: 4px solid #f59e0b;
}

.coin-front {
  background: radial-gradient(circle, #ffe066 30%, #d97706 100%);
  color: #451a03;
}

.coin-back {
  background: radial-gradient(circle, #fde68a 30%, #b45309 100%);
  color: #451a03;
  transform: rotateY(180deg);
}

.coin-symbol {
  font-size: 42px;
}

.coin-title {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.coin-choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.choice-btn {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.choice-btn.selected {
  border-color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.18);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
}

/* ================= MINES GAME ================= */
.mines-stats-bar {
  display: flex;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 13px;
}

.mines-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px;
  margin-bottom: 14px;
}

.mine-tile {
  aspect-ratio: 1;
  background: #20263c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  transition: transform 0.1s, background 0.2s;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.mine-tile:hover {
  background: #2a3250;
}

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

.mine-tile.revealed-gem {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, #13382c 100%);
  border-color: var(--accent-neon-green);
  animation: popGem 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mine-tile.revealed-bomb {
  background: radial-gradient(circle, rgba(239, 68, 68, 0.4) 0%, #451212 100%);
  border-color: var(--accent-red);
  animation: shake 0.4s;
}

@keyframes popGem {
  0% { transform: scale(0.5); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ================= WHEEL OF FORTUNE ================= */
.wheel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 16px;
  position: relative;
}

.wheel-pointer {
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 22px solid #ef4444;
  position: absolute;
  top: -8px;
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

#wheel-canvas {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.35);
}

/* ================= FAUCET / PRINTING PRESS ================= */
.press-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(245, 158, 11, 0.1) 100%), var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 24px 18px;
  text-align: center;
  margin-bottom: 20px;
}

.press-animation-box {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  animation: pressBounce 2s infinite ease-in-out;
}

@keyframes pressBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.press-meter {
  background: rgba(13, 15, 24, 0.7);
  border-radius: 20px;
  height: 14px;
  width: 100%;
  overflow: hidden;
  margin: 16px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.press-bar {
  background: var(--accent-gold-gradient);
  height: 100%;
  width: 0%;
  border-radius: 20px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.press-counter {
  font-size: 28px;
  font-weight: 900;
  color: #ffe066;
  margin-bottom: 4px;
}

/* ================= TASKS LIST ================= */
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-item.completed {
  opacity: 0.6;
}

.task-info {
  flex: 1;
}

.task-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 3px;
}

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

.task-reward {
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 12px;
  margin-top: 4px;
}

.task-btn {
  background: var(--accent-gold);
  border: none;
  color: #1a1200;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

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

/* ================= REFERRALS VIEW ================= */
.ref-stats-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.stat-val {
  font-size: 22px;
  font-weight: 900;
  color: #ffe066;
  margin-bottom: 4px;
}

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

.copy-link-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.copy-input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 12px;
  width: 100%;
  outline: none;
  font-family: inherit;
}

/* ================= LEADERBOARD ================= */
.leaders-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leader-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.leader-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.leader-rank {
  font-weight: 800;
  font-size: 15px;
  width: 24px;
  text-align: center;
}

.leader-name {
  font-size: 14px;
  font-weight: 600;
}

.leader-balance {
  font-weight: 800;
  color: #ffe066;
  font-size: 14px;
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 520px;
  width: 100%;
  background: rgba(13, 15, 24, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-around;
  padding: 8px 6px;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
  border: none;
}

.nav-item.active {
  color: #ffe066;
  transform: translateY(-2px);
}

.nav-icon {
  font-size: 20px;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: 90%;
  max-width: 400px;
}

.toast {
  background: rgba(26, 30, 48, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}
