/* ================== FREEBETS PAGE ================== */
#page-freebets {
  position: relative;
  display: none;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  background: #0b0d10;
  min-height: 100vh;
}

#page-freebets.active {
  display: flex;
  animation: pageSlideIn 0.3s ease;
}

/* Push content up when live cashout panel is visible */
#page-freebets.panel-visible {
  padding-bottom: 80px;
}

@keyframes pageSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Checking State */
.freebets-checking {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 20px;
  background: #0b0d10;
}

.checking-spinner .spinner {
  width: 48px;
  height: 48px;
  border: 3px solid #1f2228;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.checking-text {
  font-size: 16px;
  color: #9aa0a6;
  font-weight: 500;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.icon-spin {
  animation: spin 0.8s linear infinite;
}

/* Empty State — Ready for Illustration */
.freebets-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  background: #0b0d10;
  flex: 1;
}

/* ⭐ 8. Illustration Space */
.freebets-empty .empty-illustration {
  width: 120px;
  height: 120px;
  margin-bottom: 24px;
  position: relative;
}

.freebets-empty .empty-icon {
  width: 64px;
  height: 64px;
  color: #1f2228;
  margin-bottom: 16px;
  /* Ready for animation */
  transition: transform, opacity, background-color, background, border-color, box-shadow 0.3s ease;
}

/* Ticket icon bounce animation (ready to use) */
.freebets-empty .empty-icon.animated {
  animation: ticketBounce 2s ease-in-out infinite;
}

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

.freebets-empty h3 {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
}

.freebets-empty p {
  font-size: 14px;
  color: #6b7280;
  max-width: 280px;
  margin-bottom: 24px;
}

/* Confetti container (for future win celebration) */
.freebets-empty .confetti-container,
.freebets-summary .confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 100;
}

.empty-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.empty-actions button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform, opacity, background-color, background, border-color, box-shadow 0.15s ease;
}

.empty-actions .btn-primary {
  background: var(--accent-primary);
  color: white;
  border: none;
}

.empty-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.empty-actions .btn-secondary {
  background: #1f2228;
  color: #ffffff;
  border: 1px solid #2a2d35;
}

.empty-actions .btn-secondary:hover {
  background: #2a2d35;
}

/* Freebets Summary — Dark Style */
.freebets-summary {
  padding: 0;
  overflow-y: auto;
  background: #0b0d10;
  flex: 1;
}

/* ⭐ 7. Page Header Power Feel */
.freebets-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 20px 20px 12px;
  border-bottom: 1px solid #1f2228;
}

.freebets-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.freebets-total {
  font-size: 13px;
  color: #9aa0a6;
  font-weight: 500;
}

.freebets-account-info {
  padding: 12px 20px 16px;
  border-bottom: 1px solid #1f2228;
  margin-bottom: 8px;
}

.freebets-account-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.freebets-account-label {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.freebets-account-username {
  font-size: 13px;
  font-weight: 400;
  color: #9aa0a6;
}

.freebets-tickets-count {
  font-size: 13px;
  color: #9aa0a6;
}

.freebets-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

/* Freebet Row (Grouped by Amount) — Dark Premium Style */
.freebet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  margin-bottom: 12px;
  background: #0f1115;
  border: 1px solid #1f2228;
  border-radius: 12px;
  /* ⭐ 1. Subtle Card Depth */
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: transform, opacity, background-color, background, border-color, box-shadow 0.25s ease;
  animation: rowEnter 0.3s ease backwards;
}

.freebet-row:nth-child(1) { animation-delay: 0ms; }
.freebet-row:nth-child(2) { animation-delay: 50ms; }
.freebet-row:nth-child(3) { animation-delay: 100ms; }
.freebet-row:nth-child(4) { animation-delay: 150ms; }
.freebet-row:nth-child(5) { animation-delay: 200ms; }

@keyframes rowEnter {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ⭐ 2. Improved Hover Focus (Trading Feel) */
.freebet-row:hover {
  border-color: #ffffff22;
  background: #13161c;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.45);
}

.freebet-row.spinning {
  border-color: #00ffae;
  box-shadow: 0 0 0 1px #00ffae44 inset,
              0 0 20px #00ffae33,
              0 0 40px #00ffae11;
  pointer-events: none;
  animation: rowGlow 1.5s ease-in-out infinite;
}

.freebet-row.highlighted {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px #3b82f6 inset,
              0 0 20px #3b82f644,
              0 8px 24px rgba(0,0,0,0.4);
  background: #131825;
  transform: translateY(-2px) scale(1.02);
  z-index: 10;
}

@keyframes rowGlow {
  0%, 100% {
    box-shadow: 0 0 0 1px #00ffae44 inset,
                0 0 20px #00ffae33,
                0 0 40px #00ffae11;
  }
  50% {
    box-shadow: 0 0 0 2px #00ffae66 inset,
                0 0 30px #00ffae55,
                0 0 60px #00ffae22;
  }
}

/* ⭐ 6. Smooth Count Change Animation */
.freebet-row.updating {
  opacity: 0.6;
}

.freebet-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.freebet-amount {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.3px;
  min-width: 100px;
}

.freebet-amount::after {
  content: " freebet";
  font-size: 12px;
  color: #6b7280;
  margin-left: 6px;
}

.freebet-quantity {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  /* ⭐ 3. Stronger Quantity Badge Hierarchy */
  color: #cfd3da;
  background: #181b21;
  padding: 4px 10px;
  border-radius: 20px;
  width: fit-content;
}

.freebet-quantity svg,
.freebet-quantity i {
  width: 14px;
  height: 14px;
  stroke: #6b7280;
  color: #6b7280;
}

.btn-spin {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform, opacity, background-color, background, border-color, box-shadow 0.15s ease;
  /* ⭐ 4. Spin Button Premium Motion - Soft Shadow */
  box-shadow: 0 3px 8px rgba(255,255,255,0.12);
}

.btn-spin:hover {
  background: #e6e6e6;
  transform: scale(1.03);
  /* ⭐ 4. Stronger Shadow on Hover */
  box-shadow: 0 6px 16px rgba(255,255,255,0.22);
}

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

.btn-spin:disabled {
  background: #1f2228;
  color: #6b7280;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ⭐ 5. Loading State (Critical UX) */
.btn-spin.loading {
  background: #2a2f36;
  color: #777;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-spin.spinning {
  background: #00ffae;
  color: #000;
  animation: pulseSpin 1.5s ease-in-out infinite;
}

@keyframes pulseSpin {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.icon-sm {
  width: 16px;
  height: 16px;
}

/* ================== PREMIUM LIVE CASHOUT PANEL ================== */

#live-cashout-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(10, 14, 20, 0.97);
  border: none;
  border-top: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 20px 20px 0 0;
  padding: 16px 20px 20px;
  z-index: var(--z-floating-widget);
  opacity: 0;
  transform: translateY(100%);
  transition: transform, opacity, background-color, background, border-color, box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(20px);
}

#live-cashout-panel.active {
  opacity: 1;
  transform: translateY(0);
}

#live-cashout-panel.breathing {
  animation: panelBreathe 3s ease-in-out infinite;
}

@keyframes panelBreathe {
  0%, 100% {
    border-top-color: rgba(249, 115, 22, 0.2);
    box-shadow: 0 -4px 30px rgba(249, 115, 22, 0.05);
  }
  50% {
    border-top-color: rgba(249, 115, 22, 0.5);
    box-shadow: 0 -4px 40px rgba(249, 115, 22, 0.18);
  }
}

/* Panel body layout */
.cashout-panel-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Header row: LIVE + stake | balance */
.cashout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cashout-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  animation: livePulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}

.cashout-label {
  font-size: 11px;
  font-weight: 700;
  color: #ef4444;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cashout-status .cashout-divider {
  color: rgba(255,255,255,0.2);
  font-size: 12px;
}

.cashout-stake {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}

.cashout-stake #cashout-stake-amount {
  color: rgba(255,255,255,0.8);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cashout-balance {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}

.cashout-balance #cashout-balance-amount {
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Metrics row */
.cashout-metrics {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 12px 16px;
}

.cashout-metric {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cashout-metric-right {
  text-align: right;
  align-items: flex-end;
}

.cashout-metric-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
}

.cashout-metric-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cashout-multi {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
  font-family: 'SF Mono', Monaco, monospace;
  line-height: 1;
  transition: color 0.2s ease;
}

.cashout-multi.rising {
  color: #4ade80;
}

.cashout-multi.peaked {
  color: #facc15;
}

.cashout-trend {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  transition: transform, opacity, background-color, background, border-color, box-shadow 0.2s ease;
}

.cashout-trend.up {
  color: #4ade80;
}

.cashout-trend.down {
  color: #f87171;
}

.cashout-divider-v {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.08);
  margin: 0 16px;
  flex-shrink: 0;
}

.cashout-value {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transition: transform, opacity, background-color, background, border-color, box-shadow 0.15s ease;
}

.cashout-value.pop {
  animation: valuePop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes valuePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); color: #4ade80; }
  100% { transform: scale(1); }
}

.cashout-profit {
  font-size: 11px;
  font-weight: 600;
  color: #4ade80;
  font-variant-numeric: tabular-nums;
  min-height: 14px;
}

/* Premium orange cashout button */
.btn-cashout-premium {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 52px;
  padding: 0 20px;
  background: #ffffff;
  color: #0a0a0a;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.03em;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform, opacity, background-color, background, border-color, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(255, 255, 255, 0.15);
}

.btn-cashout-premium::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.06) 0%, transparent 100%);
  pointer-events: none;
}

.btn-cashout-premium:not(:disabled) {
  animation: cashoutBtnPulse 2s ease-in-out infinite;
}

@keyframes cashoutBtnPulse {
  0%, 100% { box-shadow: 0 2px 12px rgba(255, 255, 255, 0.15); }
  50%       { box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3); }
}

.btn-cashout-premium:hover:not(:disabled) {
  background: #f0f0f0;
  transform: translateY(-1px);
  animation: none;
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.25);
}

.btn-cashout-premium:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
  transition: transform, opacity, background-color, background, border-color, box-shadow 0.1s ease;
  animation: none;
}

.btn-cashout-premium.medium-multiplier,
.btn-cashout-premium.high-multiplier {
  background: #ffffff;
  color: #0a0a0a;
}

.btn-cashout-premium:disabled,
.btn-cashout-premium.disabled {
  background: #1c1c22;
  color: #4b5563;
  border: 1px solid #2a2a32;
  cursor: not-allowed;
  box-shadow: none;
  animation: none;
  transform: none;
}

.cashout-btn-text {
  position: relative;
  z-index: 1;
}

.cashout-btn-amount {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 14px;
  font-weight: 700;
  color: inherit;
  opacity: 0.7;
  position: relative;
  z-index: 1;
  font-variant-numeric: tabular-nums;
}

.btn-cashout-premium:disabled .cashout-btn-amount,
.btn-cashout-premium.disabled .cashout-btn-amount {
  opacity: 0.3;
}

/* ================== BOTTOM BAR ================== */
/* ================== BOTTOM ACTION BAR (Selection) ================== */
.bottom-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  background: rgba(30, 30, 35, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  z-index: var(--z-bottom-bar);
  /* ⭐ 5. Floating Bottom Bar */
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
  animation: bottomBarEnter 0.3s ease;
}

@keyframes bottomBarEnter {
  from {
    transform: translateY(120%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.bottom-bar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.selection-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-exit-selection {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform, opacity, background-color, background, border-color, box-shadow 0.2s;
  flex-shrink: 0;
}

.btn-exit-selection:hover {
  background: var(--accent-danger);
  color: white;
  transform: scale(1.1);
}

.selected-text {
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.selected-text b {
  color: var(--text-primary);
  font-size: 16px;
}

.bottom-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1;
}

.bottom-actions .icon-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* ⭐ 5. Tactile Buttons - Gradient */
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg-tertiary));
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform, opacity, background-color, background, border-color, box-shadow 0.15s ease;
}

.bottom-actions .icon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.bottom-actions .icon-btn:active {
  transform: scale(0.92);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.2);
}

.bottom-amount {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

.bottom-amount label {
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.bottom-amount input {
  flex: 1;
  height: 44px;
  padding: 0 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 16px;
}

/* Mobile: Stack layout */
@media (max-width: 639px) {
  .bottom-bar-content {
    flex-direction: column;
    align-items: stretch;
  }
  
  .selection-info {
    justify-content: space-between;
  }
  
  .bottom-actions {
    justify-content: center;
    order: -1; /* Move actions above count on mobile */
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
  }
}

/* Desktop with sidebar */
@media (min-width: 1024px) {
  .bottom-bar {
    left: 260px;
    padding: 16px 24px calc(16px + var(--safe-bottom));
  }
}

/* ================== TOASTS ================== */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + 12px + var(--safe-top));
  left: 16px;
  right: 16px;
  z-index: var(--z-toast);
  pointer-events: none;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
  pointer-events: auto;
}

.toast.success { border-left: 3px solid var(--accent-success); }
.toast.error { border-left: 3px solid var(--accent-danger); }
.toast.warning { border-left: 3px solid var(--accent-warning); }
.toast.info { border-left: 3px solid var(--accent-primary); }

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

/* ================== MODALS ================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: calc(var(--z-modal) - 10);
  opacity: 0;
  visibility: hidden;
  transition: transform, opacity, background-color, background, border-color, box-shadow 0.2s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  z-index: var(--z-modal);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal.active {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 600;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
}

.modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
}

.modal-footer .btn-primary,
.modal-footer .btn-secondary {
  flex: 1;
}

.amount-input-lg {
  width: 100%;
  height: 60px;
  padding: 0 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
}

.quick-amounts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.chip {
  height: 40px;
  padding: 0 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: transform, opacity, background-color, background, border-color, box-shadow 0.2s;
}

.chip:active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-item {
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  font-size: 13px;
}

.activity-action {
  font-weight: 500;
  margin-bottom: 4px;
}

.activity-meta {
  color: var(--text-secondary);
  font-size: 12px;
}

/* ================== UTILITIES ================== */
.hidden {
  display: none !important;
}

.win { color: var(--accent-success); }
.loss { color: var(--accent-danger); }
.warning { color: var(--accent-warning); }

/* ================== DESKTOP ADAPTATIONS ================== */
@media (min-width: 768px) {
  .app {
    padding-left: 260px;
    padding-top: calc(64px + var(--safe-top));
  }
  
  .app-header {
    left: 260px;
    height: calc(64px + var(--safe-top));
    padding-left: 24px;
    padding-right: 24px;
  }
  
  .header-left .icon-btn:first-child {
    display: none;
  }
  
  .sidebar {
    transform: translateX(0);
    width: 260px;
  }
  
  .main-content {
    padding: 24px;
    max-width: 1200px;
  }
  
  .stats-bar {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .action-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  
  .modal {
    left: 50%;
    right: auto;
    top: 50%;
    bottom: auto;
    width: 400px;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
  }
  
  .modal.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  
  .modal-large {
    width: 600px;
    max-height: 80vh;
  }
  
  .bottom-bar {
    left: 260px;
    padding: 16px 24px calc(16px + var(--safe-bottom));
  }
}

@media (min-width: 1024px) {
  .bottom-panels {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
  }
}

/* ================== FREEBET MODAL ================== */

.freebet-amount-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.freebet-amount-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  transition: transform, opacity, background-color, background, border-color, box-shadow 0.2s ease;
}

.freebet-amount-btn:hover {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.1);
}

.freebet-amount-btn .amount {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-success);
}

.freebet-amount-btn .count {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ================== BULK FREEBET SPIN PAGE ================== */

/* Bulk Summary Card */
.bulk-summary-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.bulk-summary-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .bulk-summary-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.bulk-summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
}

.bulk-summary-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.bulk-summary-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* Progress Bar */
.bulk-progress-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bulk-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
}

.bulk-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 4px;
  transition: width 300ms ease;
}

.bulk-progress-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 40px;
  text-align: right;
}

/* Bulk Accounts Section */
.bulk-accounts-section {
  margin-bottom: 20px;
}

.bulk-accounts-section .section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-left: 4px;
}

.bulk-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Bulk Account Row */
.bulk-account-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  transition: transform, opacity, background-color, background, border-color, box-shadow 200ms ease;
}

.bulk-account-row:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

.bulk-account-row.spinning {
  border-color: var(--accent-primary);
  background: linear-gradient(180deg, var(--bg-secondary), rgba(99, 102, 241, 0.05));
}

.bulk-account-row.completed {
  border-color: var(--success);
  background: linear-gradient(180deg, var(--bg-secondary), rgba(34, 197, 94, 0.05));
}

.bulk-account-row.crashed {
  border-color: var(--danger);
  background: linear-gradient(180deg, var(--bg-secondary), rgba(239, 68, 68, 0.05));
}

.bulk-account-row.failed {
  border-color: var(--warning);
  background: linear-gradient(180deg, var(--bg-secondary), rgba(245, 158, 11, 0.05));
  opacity: 0.7;
}

.bulk-account-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bulk-account-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.bulk-account-info {
  flex: 1;
  min-width: 0;
}

.bulk-account-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bulk-account-name .profile-name {
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 13px;
}

.bulk-account-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.bulk-account-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.bulk-account-status.online {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.bulk-account-status.offline {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

.bulk-account-status.spinning {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  animation: pulse-status 2s infinite;
}

@keyframes pulse-status {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.bulk-account-freebets {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 60px;
  justify-content: flex-end;
}

.bulk-account-result {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  min-width: 80px;
  justify-content: flex-end;
}

.bulk-account-result.won {
  color: var(--success);
}

.bulk-account-result.crashed {
  color: var(--danger);
}

.bulk-account-result.failed {
  color: var(--warning);
}

/* Bulk Cashout Button */
.bulk-account-cashout {
  display: flex;
  align-items: center;
  min-width: 100px;
  justify-content: flex-end;
}

.btn-bulk-cashout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: none;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  transition: transform, opacity, background-color, background, border-color, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
  animation: cashout-pulse 1.5s infinite;
}

.btn-bulk-cashout:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

.btn-bulk-cashout:active {
  transform: translateY(0);
}

.btn-bulk-cashout:disabled,
.btn-bulk-cashout.processing {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  animation: none;
  cursor: not-allowed;
}

.btn-bulk-cashout.medium-multiplier {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-bulk-cashout.high-multiplier {
  background: linear-gradient(135deg, #a855f7, #9333ea);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.cashout-multi {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.cashout-amount {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.9;
  line-height: 1.2;
}

@keyframes cashout-pulse {
  0%, 100% { 
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.5);
    transform: scale(1.02);
  }
}

/* Bulk Action Bar */
.bulk-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(17, 24, 39, 0.98);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-default);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 100;
}

.sidebar-visible ~ #main-content .bulk-action-bar,
.sidebar-visible .bulk-action-bar {
  left: var(--sidebar-width);
}

@media (max-width: 768px) {
  .sidebar-visible ~ #main-content .bulk-action-bar {
    left: 0;
  }
}

.bulk-action-bar .btn {
  min-width: 120px;
}

.bulk-action-bar .btn-lg {
  padding: 12px 24px;
  font-size: 15px;
}

/* Status Indicator */
.bulk-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.bulk-status-indicator .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.bulk-status-indicator.active .status-dot {
  background: var(--success);
  animation: pulse-dot 2s infinite;
}

.bulk-status-indicator.spinning .status-dot {
  background: var(--accent-primary);
  animation: pulse-dot 1s infinite;
}

/* Results Card */
.bulk-results-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-top: 20px;
  animation: slide-up 300ms ease;
}

@keyframes slide-up {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.bulk-results-card.hidden {
  display: none;
}

.bulk-results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 640px) {
  .bulk-results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.bulk-result-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius-lg);
  text-align: center;
}

.bulk-result-item.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.bulk-result-item.danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.bulk-result-item.warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.bulk-result-item.info {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.bulk-result-value {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.bulk-result-item.success .bulk-result-value {
  color: var(--success);
}

.bulk-result-item.danger .bulk-result-value {
  color: var(--danger);
}

.bulk-result-item.warning .bulk-result-value {
  color: var(--warning);
}

.bulk-result-item.info .bulk-result-value {
  color: var(--accent-primary);
}

.bulk-result-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

/* ================== BULK FREEBET AMOUNT MODAL ================== */

.bulk-freebet-amounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.bulk-freebet-amount-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-default);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: transform, opacity, background-color, background, border-color, box-shadow 200ms ease;
}

.bulk-freebet-amount-btn:hover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.05);
}

.bulk-freebet-amount-btn:active {
  transform: scale(0.98);
}

.bulk-freebet-amount-btn .amount-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.bulk-freebet-amount-btn .account-count {
  font-size: 12px;
  color: var(--text-secondary);
}

.bulk-freebet-summary {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ================== PAGE BULK FREEBET SPECIFIC ================== */

#page-bulk-freebet {
  padding-bottom: 100px; /* Space for sticky action bar */
}

#page-bulk-freebet .page-content {
  max-width: 800px;
  margin: 0 auto;
}

/* Navigation Guard Warning */
.bulk-nav-warning {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 95; /* Below global modal layer */
  opacity: 0;
  visibility: hidden;
  transition: transform, opacity, background-color, background, border-color, box-shadow 200ms ease;
}

.bulk-nav-warning.active {
  opacity: 1;
  visibility: visible;
}

.bulk-nav-warning-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 24px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-xl);
}

.bulk-nav-warning-card h3 {
  margin-bottom: 12px;
  color: var(--warning);
}

.bulk-nav-warning-card p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.bulk-nav-warning-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}




/* ================== FREEBETS PAGE - SMALL MOBILE IMPROVEMENTS ================== */

/* Extra small mobile (<= 480px) */
@media (max-width: 480px) {
  /* Header responsive */
  .freebets-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
  }
  
  .freebets-header h2 {
    font-size: 18px;
  }
  
  .freebets-actions {
    width: 100%;
    justify-content: stretch;
  }
  
  .freebets-actions .btn {
    flex: 1;
    justify-content: center;
  }
  
  /* Stats row already handled in layout.css */
  
  /* Summary grid responsive */
  .freebets-summary-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
  }
  
  .freebets-summary-item {
    padding: 14px 12px;
  }
  
  .freebets-summary-value {
    font-size: 20px;
  }
  
  .freebets-summary-label {
    font-size: 10px;
  }
  
  /* Account list responsive */
  .freebets-accounts-list {
    gap: 10px;
  }
  
  .freebets-account-row {
    padding: 12px 14px;
    gap: 12px;
  }
  
  .freebets-account-avatar,
  .freebets-account-avatar-placeholder {
    width: 40px;
    height: 40px;
  }
  
  .freebets-account-name {
    font-size: 14px;
  }
  
  .freebets-account-id {
    font-size: 11px;
  }
  
  .freebets-account-status {
    padding: 4px 10px;
    font-size: 11px;
  }
  
  .freebets-account-action-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  /* Amount breakdown compact */
  .amount-breakdown {
    margin-top: 8px;
    padding-top: 8px;
  }
  
  .breakdown-item {
    font-size: 12px;
    padding: 6px 0;
  }
  
  /* Bulk summary row */
  .freebets-bulk-summary-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
  }
  
  .freebets-bulk-summary-item {
    padding: 12px;
  }
  
  .freebets-bulk-summary-value {
    font-size: 18px;
  }
  
  .freebets-bulk-summary-label {
    font-size: 10px;
  }
  
  /* Bulk results grid */
  .freebets-bulk-results-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .freebets-bulk-result-item {
    padding: 14px;
  }
  
  .freebets-bulk-result-value {
    font-size: 20px;
  }
  
  /* Bulk amounts grid in modal */
  .bulk-freebet-amounts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .bulk-freebet-amount-btn {
    padding: 14px 12px;
  }
  
  .bulk-freebet-amount-btn .amount {
    font-size: 18px;
  }
  
  .bulk-freebet-amount-btn .count {
    font-size: 11px;
  }
  
  /* Action bar */
  .freebets-action-bar {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .freebets-action-bar .btn {
    flex: 1;
    min-width: auto;
    padding: 12px 16px;
    font-size: 14px;
  }
  
  .freebets-status-indicator {
    font-size: 12px;
    padding: 4px 10px;
  }
}

/* Very small mobile (<= 360px) */
@media (max-width: 360px) {
  .freebets-header h2 {
    font-size: 16px;
  }
  
  .freebets-summary-grid {
    gap: 8px;
  }
  
  .freebets-summary-item {
    padding: 12px 10px;
  }
  
  .freebets-summary-value {
    font-size: 18px;
  }
  
  .freebets-summary-label {
    font-size: 9px;
  }
  
  .freebets-account-row {
    padding: 10px 12px;
    gap: 10px;
  }
  
  .freebets-account-avatar,
  .freebets-account-avatar-placeholder {
    width: 36px;
    height: 36px;
  }
  
  .freebets-account-name {
    font-size: 13px;
  }
  
  .freebets-account-id {
    font-size: 10px;
  }
  
  .freebets-account-status {
    padding: 3px 8px;
    font-size: 10px;
  }
  
  .freebets-account-action-btn {
    padding: 6px 10px;
    font-size: 11px;
  }
  
  .freebets-bulk-summary-row {
    gap: 8px;
  }
  
  .freebets-bulk-summary-item {
    padding: 10px;
  }
  
  .freebets-bulk-summary-value {
    font-size: 16px;
  }
  
  .bulk-freebet-amounts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .bulk-freebet-amount-btn {
    padding: 12px 10px;
  }
  
  .bulk-freebet-amount-btn .amount {
    font-size: 16px;
  }
  
  .freebets-action-bar {
    padding: 10px 12px;
  }
  
  .freebets-action-bar .btn {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* Landscape mobile adjustments */
@media (max-height: 500px) and (orientation: landscape) {
  .freebets-summary-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .freebets-accounts-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .freebets-account-row {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .freebets-account-info {
    width: 100%;
  }
  
  .freebets-account-controls {
    width: 100%;
    justify-content: flex-end;
  }
}

