/* ==========================================================================
   Simulator Auto-Bet & Custom Repeat Styles
   Matching authentic Stake/Casino Auto-Betting UI
   ========================================================================== */

/* Quick Auto-Bet Presets in Toolbar */
.sim-autobet-group {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 2px 4px;
  gap: 3px;
}

.sim-autobet-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  padding: 0.35rem 0.6rem;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.sim-autobet-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sim-autobet-btn.active {
  background: #3b82f6 !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.6) !important;
}

.sim-autobet-btn.custom {
  color: #fbbf24;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: inherit;
  font-weight: 700;
}

.sim-autobet-btn.custom:hover {
  background: rgba(251, 191, 36, 0.15);
  color: #fef08a;
}

.sim-autobet-btn.custom.active {
  background: #f59e0b !important;
  color: #000 !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6) !important;
}

/* Crazy Time Cell Container & Outside Flapper Tag */
.sim-crazytime-cell {
  position: relative;
  width: 100%;
  height: 104px;
}
.sim-crazytime-cell .sim-bet-spot {
  width: 100%;
  height: 100%;
}
.sim-flapper-outside-tag {
  position: absolute;
  top: -12px;
  right: 6px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #111827;
  border: 1.5px solid #fbbf24;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7), 0 0 10px rgba(251, 191, 36, 0.4);
  border-radius: 14px;
  padding: 2.5px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fbbf24;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  user-select: none;
}
.sim-flapper-outside-tag:hover {
  background: #1e293b;
  border-color: #f59e0b;
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.8), 0 0 14px rgba(251, 191, 36, 0.6);
}

.sim-card-flapper-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(0, 0, 0, 0.65); border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 12px; padding: 2px 7px; margin: 2px 0 4px;
  font-size: 0.72rem; font-weight: 700; color: #fbbf24;
  cursor: pointer; z-index: 6; backdrop-filter: blur(4px); transition: all 0.2s ease;
}
.sim-card-flapper-tag:hover {
  background: rgba(251, 191, 36, 0.2); border-color: #fbbf24;
  transform: scale(1.05); box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* Flapper Selection Popup Modal */
.sim-flapper-modal-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center;
  z-index: 9999; opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease; padding: 1rem;
}
.sim-flapper-modal-overlay.active { opacity: 1; visibility: visible; }
.sim-flapper-modal-card {
  background: linear-gradient(135deg, #1a162b 0%, #110d1f 100%);
  border: 1px solid rgba(251, 191, 36, 0.35); border-radius: 16px;
  width: 100%; max-width: 480px; position: relative; padding: 1.5rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 25px rgba(251, 191, 36, 0.15);
  animation: flapperModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes flapperModalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.sim-flapper-modal-close {
  position: absolute; top: 1rem; right: 1rem; background: none; border: none;
  color: #94a3b8; font-size: 1.5rem; line-height: 1; cursor: pointer;
  padding: 2px 6px; border-radius: 6px; transition: all 0.2s;
}
.sim-flapper-modal-close:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.sim-flapper-modal-header { text-align: center; margin-bottom: 1.25rem; }
.sim-flapper-modal-icon { font-size: 2.2rem; margin-bottom: 0.25rem; }
.sim-flapper-modal-title { margin: 0; font-size: 1.3rem; font-weight: 800; color: #fff; letter-spacing: -0.3px; }
.sim-flapper-modal-subtitle { margin: 0.35rem 0 0; font-size: 0.82rem; color: #94a3b8; line-height: 1.45; }
.sim-flapper-modal-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.25rem; }
.sim-flapper-opt-btn {
  background: rgba(255, 255, 255, 0.04); border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px; padding: 0.85rem 0.75rem; display: flex; align-items: center;
  gap: 0.75rem; cursor: pointer; text-align: left; transition: all 0.2s ease;
}
.sim-flapper-opt-btn:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.25); transform: translateY(-2px); }
.sim-flapper-opt-btn.active { border-color: #fbbf24; background: rgba(251, 191, 36, 0.12); box-shadow: 0 0 16px rgba(251, 191, 36, 0.25); }
.sim-flapper-opt-btn.opt-green.active { border-color: #10b981; background: rgba(16, 185, 129, 0.12); box-shadow: 0 0 16px rgba(16, 185, 129, 0.25); }
.sim-flapper-opt-btn.opt-blue.active { border-color: #3b82f6; background: rgba(59, 130, 246, 0.12); box-shadow: 0 0 16px rgba(59, 130, 246, 0.25); }
.sim-flapper-opt-btn.opt-yellow.active { border-color: #f59e0b; background: rgba(245, 158, 11, 0.12); box-shadow: 0 0 16px rgba(245, 158, 11, 0.25); }
.opt-emoji { font-size: 1.6rem; line-height: 1; flex-shrink: 0; }
.opt-details { flex: 1; min-width: 0; }
.opt-name { font-size: 0.88rem; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 0.35rem; }
.opt-badge { font-size: 0.62rem; font-weight: 800; text-transform: uppercase; background: rgba(251, 191, 36, 0.2); color: #fbbf24; border-radius: 4px; padding: 1px 4px; }
.opt-desc { font-size: 0.7rem; color: #94a3b8; margin-top: 2px; line-height: 1.25; }
.sim-flapper-modal-footer { text-align: center; }
.sim-flapper-modal-close-btn {
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px; color: #cbd5e1; font-size: 0.82rem; font-weight: 600;
  padding: 0.6rem 1.2rem; cursor: pointer; transition: all 0.2s; width: 100%;
}
.sim-flapper-modal-close-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* Reset History Button next to CSV Export */
.sim-btn-export.sim-btn-reset { background: rgba(244, 63, 94, 0.12); border-color: rgba(244, 63, 94, 0.35); color: #fb7185; }
.sim-btn-export.sim-btn-reset:hover { background: rgba(244, 63, 94, 0.22); border-color: #f43f5e; color: #fff; }

/* Simulated Plays History: Your Bet Badges */
.sim-history-bets-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 240px;
}

.sim-history-bet-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

.sim-history-bet-badge.hit {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.55);
  color: #34d399;
  font-weight: 700;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.35);
}

/* Active Auto-Bet Status Pill on Stage */
.sim-autobet-active-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 820px;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.25), rgba(15, 23, 42, 0.95));
  border: 1px solid #f87171;
  border-radius: 12px;
  padding: 0.65rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.35);
  animation: autoPulse 1.6s infinite alternate;
}

@keyframes autoPulse {
  0% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.25); }
  100% { box-shadow: 0 0 24px rgba(239, 68, 68, 0.6); }
}

.sim-autobet-active-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
}

.sim-autobet-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  animation: dotBlink 1s infinite;
}

.btn-stop-autobet {
  background: #dc2626;
  border: 1px solid #ef4444;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-stop-autobet:hover {
  background: #b91c1c;
  transform: scale(1.04);
}

/* ==========================================================================
   Custom Auto-Bet Modal (Matching User's Uploaded Photo)
   ========================================================================== */
.autobet-modal-card {
  background: #182234;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
  color: #fff;
  overflow: hidden;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.autobet-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.autobet-modal-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.autobet-modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.autobet-modal-close:hover {
  color: #fff;
}

.autobet-modal-body {
  padding: 1.25rem 1.25rem 1rem;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1.1rem 1.4rem;
}

/* Horizontal Form Groups with Prioritized Wrapping */
.autobet-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1 1 200px;
  min-width: 170px;
}

.autobet-form-group.short {
  flex: 1 1 150px;
  min-width: 140px;
  max-width: 220px;
}

.autobet-form-group.action {
  flex: 1 1 180px;
  min-width: 170px;
}

.autobet-form-group.action .btn-launch-autobet {
  height: 42px;
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.autobet-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
}

.autobet-hint-text {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 3px;
  letter-spacing: 0.2px;
  line-height: 1.25;
}

/* Hide Browser Numeric Up/Down Spinners on All Inputs */
.sim-custom-autobet-panel input[type="number"],
.autobet-input,
.autobet-mini-input {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

.sim-custom-autobet-panel input[type="number"]::-webkit-outer-spin-button,
.sim-custom-autobet-panel input[type="number"]::-webkit-inner-spin-button,
.autobet-input::-webkit-outer-spin-button,
.autobet-input::-webkit-inner-spin-button,
.autobet-mini-input::-webkit-outer-spin-button,
.autobet-mini-input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  appearance: none !important;
  margin: 0 !important;
}

/* Input Icon & Badging */
.autobet-input-icon {
  position: absolute;
  left: 10px;
  font-size: 1rem;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.autobet-input.has-icon {
  padding-left: 2.35rem;
}

.autobet-input.has-badge {
  padding-right: 2.5rem;
}

/* Input Container with Clean Framing */
.autobet-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.autobet-input {
  width: 100%;
  background: #0d1524;
  border: 1.5px solid #2a384e;
  border-radius: 10px;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.65rem 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}

.autobet-input:focus {
  border-color: #3b82f6;
}

/* Percentage and Currency Badges Inside Input */
.autobet-currency-badge {
  position: absolute;
  right: 10px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
  pointer-events: none;
}

.autobet-currency-badge.percent {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.45);
  color: #60a5fa;
  font-size: 0.85rem;
}

.autobet-currency-badge.profit {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.autobet-currency-badge.loss {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.45);
  color: #f87171;
}

/* iOS Style Switch Toggle */
.autobet-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 42px;
  flex: 0 0 auto;
}

.autobet-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.autobet-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.autobet-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #334155;
  transition: 0.3s;
  border-radius: 24px;
}

.autobet-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .autobet-slider {
  background-color: #3b82f6;
}

input:checked + .autobet-slider:before {
  transform: translateX(20px);
}

/* Advanced Settings Section (Horizontal Row Flow) */
.autobet-advanced-pane {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1.1rem 1.4rem;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.1rem;
  margin-top: 0.25rem;
}

/* Segmented Control Buttons (Réinitialiser / Augmenter de:) */
.autobet-segmented-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr 0.8fr;
  gap: 6px;
  align-items: center;
}

.autobet-seg-btn {
  background: #0d1524;
  border: 1.5px solid #2a384e;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.6rem 0.5rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s;
  white-space: nowrap;
}

.autobet-seg-btn.active {
  background: #253349;
  border-color: #3b82f6;
  color: #fff;
}

.autobet-mini-input {
  width: 100%;
  background: #0d1524;
  border: 1.5px solid #2a384e;
  border-radius: 8px;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.55rem 0.6rem;
  text-align: center;
  outline: none;
}

.autobet-mini-input:focus {
  border-color: #3b82f6;
}

/* Launch Button (Blue matching photo) */
.btn-launch-autobet {
  width: 100%;
  background: #1d72f2;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
  box-shadow: 0 4px 14px rgba(29, 114, 242, 0.4);
}

.btn-launch-autobet:hover {
  background: #1a64d4;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(29, 114, 242, 0.55);
}

/* ==========================================================================
   History Table Pagination & CSV Export
   ========================================================================== */
.sim-history-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sim-btn-export {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s;
}

.sim-btn-export:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  transform: translateY(-1px);
}

.sim-history-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  color: #94a3b8;
}

.sim-page-btns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sim-page-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
}

.sim-page-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.sim-page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ==========================================================================
   CUSTOM BEAUTIFUL SIMULATOR ALERT MODAL & TOASTS
   ========================================================================== */
.sim-alert-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(8, 14, 26, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.sim-alert-card {
  position: relative;
  background: linear-gradient(145deg, #182234 0%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  max-width: 440px;
  width: 100%;
  padding: 2rem 1.75rem 1.75rem;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 40px rgba(245, 158, 11, 0.15);
  transform: scale(0.92) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.sim-alert-overlay.active .sim-alert-card {
  transform: scale(1) translateY(0);
}

.sim-alert-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
}

.sim-alert-card.type-success::before { background: linear-gradient(90deg, #10b981, #34d399, #10b981); }
.sim-alert-card.type-warning::before { background: linear-gradient(90deg, #f59e0b, #fbbf24, #d97706); }
.sim-alert-card.type-error::before { background: linear-gradient(90deg, #ef4444, #f87171, #dc2626); }
.sim-alert-card.type-info::before { background: linear-gradient(90deg, #3b82f6, #60a5fa, #2563eb); }

.sim-alert-icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.04) 70%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}
.sim-alert-card.type-success .sim-alert-icon-wrap {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.04) 70%);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}
.sim-alert-card.type-error .sim-alert-icon-wrap {
  background: radial-gradient(circle, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.04) 70%);
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}
.sim-alert-card.type-info .sim-alert-icon-wrap {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.04) 70%);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.sim-alert-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}

.sim-alert-msg {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.sim-alert-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.sim-alert-btn {
  flex: 1;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0b1120;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.sim-alert-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
  filter: brightness(1.1);
}
.sim-alert-close-btn {
  position: absolute; top: 14px; right: 14px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer; transition: all 0.18s;
}
.sim-alert-close-btn:hover {
  background: rgba(255, 255, 255, 0.15); color: #fff; transform: rotate(90deg);
}

/* Toast Container & Notification Items */
.sim-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100001;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 400px;
  width: calc(100vw - 48px);
}

.sim-toast-item {
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  background: rgba(24, 34, 52, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 4px solid #f59e0b;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 16px rgba(245, 158, 11, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: simToastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.sim-toast-item.type-success { border-left-color: #10b981; box-shadow: 0 12px 30px rgba(0,0,0,0.55), 0 0 16px rgba(16,185,129,0.2); }
.sim-toast-item.type-error { border-left-color: #ef4444; box-shadow: 0 12px 30px rgba(0,0,0,0.55), 0 0 16px rgba(239,68,68,0.2); }
.sim-toast-item.type-info { border-left-color: #3b82f6; box-shadow: 0 12px 30px rgba(0,0,0,0.55), 0 0 16px rgba(59,130,246,0.2); }

@keyframes simToastSlideIn {
  from { transform: translateX(110%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes simToastSlideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(110%); opacity: 0; }
}

/* Floating Mini HUD for Background Simulation */
.sim-floating-mini-hud {
  position: fixed;
  left: 20px;
  top: 130px;
  z-index: 995;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  user-select: none;
}
.sim-floating-mini-hud.collapsed .hud-pill-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 9999px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 14px rgba(245, 158, 11, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.sim-floating-mini-hud.collapsed .hud-pill-mini:hover { transform: translateY(-2px); border-color: #fbbf24; }
.hud-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: hudPulse 1.5s infinite;
  display: inline-block;
}
@keyframes hudPulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.25); opacity: 1; box-shadow: 0 0 12px #10b981; }
  100% { transform: scale(0.9); opacity: 0.7; }
}
.hud-mini-title { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; color: #f1f5f9; }
.hud-mini-net { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; font-weight: 700; }
.hud-mini-net.win { color: #10b981; }
.hud-mini-net.loss { color: #f43f5e; }
.hud-mini-expand { font-size: 0.68rem; color: #fbbf24; margin-left: 2px; }
.sim-floating-mini-hud.expanded {
  width: 255px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 20px rgba(245, 158, 11, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 9px;
  animation: hudFadeIn 0.25s ease-out;
}
@keyframes hudFadeIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.hud-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding-bottom: 7px; cursor: grab; }
.hud-drag-grip { font-size: 0.8rem; color: #64748b; letter-spacing: -2px; margin-right: 2px; line-height: 1; user-select: none; }
.hud-header:hover .hud-drag-grip, .hud-pill-mini:hover .hud-drag-grip { color: #fbbf24; }
.sim-floating-mini-hud.dragging { cursor: grabbing !important; user-select: none; transition: none !important; opacity: 0.95; }
.sim-floating-mini-hud.dragging * { cursor: grabbing !important; }
.hud-title-wrap { display: flex; align-items: center; gap: 7px; cursor: grab; }
.hud-title { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; color: #fbbf24; text-transform: uppercase; }
.hud-btn-toggle {
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8; border-radius: 6px; width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.65rem; cursor: pointer; transition: all 0.15s ease;
}
.hud-btn-toggle:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.hud-body { display: flex; flex-direction: column; gap: 7px; }
.hud-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.76rem; }
.hud-label { color: #94a3b8; font-weight: 500; }
.hud-val { font-weight: 700; color: #f1f5f9; font-family: 'JetBrains Mono', monospace; }
.hud-val.highlight { color: #38bdf8; }
.hud-val.win { color: #10b981; }
.hud-val.loss { color: #f43f5e; }
.hud-outcome-wrap { background: rgba(0, 0, 0, 0.28); border-radius: 8px; padding: 6px 8px; border: 1px solid rgba(255, 255, 255, 0.05); }
.hud-outcome-waiting { font-size: 0.72rem; color: #94a3b8; text-align: center; font-style: italic; }
.hud-outcome { display: flex; align-items: center; gap: 6px; font-size: 0.74rem; flex-wrap: wrap; }
.hud-outcome-badge { font-size: 0.62rem; font-weight: 800; padding: 1px 5px; border-radius: 4px; letter-spacing: 0.04em; text-transform: uppercase; }
.hud-outcome-badge.win { background: rgba(16, 185, 129, 0.25); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.hud-outcome-badge.loss { background: rgba(244, 63, 94, 0.2); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.35); }
.hud-outcome-amount { font-weight: 800; font-family: 'JetBrains Mono', monospace; }
.hud-outcome.win .hud-outcome-amount { color: #10b981; }
.hud-outcome.loss .hud-outcome-amount { color: #f43f5e; }
.hud-outcome-detail { font-size: 0.68rem; color: #cbd5e1; margin-left: auto; }
.hud-net-row { border-top: 1px dashed rgba(255, 255, 255, 0.08); padding-top: 6px; }
.hud-targets { font-size: 0.67rem; color: #fbbf24; text-align: right; font-family: 'JetBrains Mono', monospace; opacity: 0.9; }
.hud-actions { display: flex; gap: 8px; margin-top: 2px; }
.hud-btn { flex: 1; padding: 6px 10px; border-radius: 8px; font-size: 0.72rem; font-weight: 700; cursor: pointer; transition: all 0.15s ease; border: 1px solid transparent; }
.hud-btn-view { background: rgba(59, 130, 246, 0.18); border-color: rgba(59, 130, 246, 0.35); color: #93c5fd; }
.hud-btn-view:hover { background: rgba(59, 130, 246, 0.3); color: #fff; border-color: #60a5fa; }
.hud-btn-stop { background: rgba(239, 68, 68, 0.2); border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; flex: 0 0 65px; }
.hud-btn-stop:hover { background: #dc2626; border-color: #ef4444; color: #fff; }
.hud-table-badge { font-size: 0.62rem; font-weight: 800; padding: 2px 6px; border-radius: 6px; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.hud-table-badge.table-ct { background: rgba(245, 158, 11, 0.2); border: 1px solid rgba(245, 158, 11, 0.45); color: #fbbf24; }
.hud-table-badge.table-a { background: rgba(168, 85, 247, 0.22); border: 1px solid rgba(168, 85, 247, 0.45); color: #c084fc; }
.hud-table-badge.mini { font-size: 0.58rem; padding: 1px 5px; }
.hud-table-val { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; }
.hud-table-val.text-table-ct { color: #fbbf24; }
.hud-table-val.text-table-a { color: #c084fc; }
.hud-table-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.hud-table-dot.dot-ct { background: #fbbf24; box-shadow: 0 0 6px #f59e0b; }
.hud-table-dot.dot-a { background: #c084fc; box-shadow: 0 0 6px #a855f7; }
@media (max-width: 768px) {
  .sim-floating-mini-hud { top: 70px; left: 10px; max-width: calc(100vw - 20px); }
}

