/* ==========================================================================
   General Statistics & Wheel Probability Deviation Styles
   ========================================================================== */

.gen-stats-card {
  background: var(--card-bg, #111827);
  border: 1px solid var(--card-border, #1f2937);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.gen-stats-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.7), rgba(56, 189, 248, 0.7), transparent);
}

/* Toolbar & Sample Filter Header */
.gen-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 1.25rem;
}

.gen-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gen-title-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(88, 28, 135, 0.3));
  border: 1px solid rgba(168, 85, 247, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.gen-main-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  margin: 0;
}

.gen-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 2px;
}

/* Sample Filter Controls */
.gen-toolbar-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.sample-mode-pill-group {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.sample-mode-btn {
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.38rem 0.75rem;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sample-mode-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.sample-mode-btn.active {
  background: linear-gradient(135deg, #a855f7, #7e22ce);
  color: #fff;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.4);
}

.gen-select {
  background: #0f1523;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.gen-select:hover, .gen-select:focus {
  border-color: #a855f7;
}

/* Stat Cards Grid */
.gen-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.gen-stat-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s;
}

.gen-stat-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.gen-stat-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 0.35rem;
}

.gen-stat-val {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: #fff;
  line-height: 1.2;
}

.gen-stat-sub {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 3px;
}

/* Deviation Chart Area */
.deviation-chart-wrapper {
  background: #090e17;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 1.25rem;
  position: relative;
  margin-bottom: 1.5rem;
}

.deviation-legend-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-line-expected {
  width: 22px;
  height: 2px;
  background: #f43f5e;
}

.legend-line-deviation {
  width: 22px;
  height: 2.5px;
  background: #8b5cf6;
  border-radius: 2px;
}

.deviation-chart-canvas {
  width: 100%;
  height: 240px;
}

/* Hot to Cold Outcome Cards Grid directly below chart */
.outcome-cards-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.6rem;
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  .outcome-cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 500px) {
  .outcome-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.outcome-point-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.outcome-point-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.outcome-point-card.is-hot {
  border-top: 2px solid #10b981;
}

.outcome-point-card.is-cold {
  border-top: 2px solid #f43f5e;
}

.outcome-badge-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  margin-bottom: 0.45rem;
  white-space: nowrap;
}

.outcome-dev-badge {
  font-size: 0.82rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.outcome-dev-badge.hot {
  color: #10b981;
}

.outcome-dev-badge.cold {
  color: #f43f5e;
}

.outcome-lands-count {
  font-size: 0.72rem;
  color: #e2e8f0;
  font-weight: 700;
}

.outcome-spins-since {
  font-size: 0.68rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 2px;
}

/* Hot to Cold Ruler Bar */
.hot-cold-ruler-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.5rem 0.75rem;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ruler-icon-label {
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.ruler-icon-label.hot {
  color: #f59e0b;
}

.ruler-icon-label.cold {
  color: #38bdf8;
}

.ruler-ticks-track {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 12px;
  padding: 0 4px;
}

.ruler-tick {
  width: 1px;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
}

.ruler-tick.major {
  height: 10px;
  background: rgba(255, 255, 255, 0.35);
}

/* Probability Reference Table */
.prob-table-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 1.25rem;
}

.prob-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.prob-table-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}

/* ==========================================================================
   General Stats Extended Panels: Top Multipliers, Best Wins, Bonus Grid
   ========================================================================== */

.gen-dual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.gen-panel-card {
  background: var(--card-bg, #111827);
  border: 1px solid var(--card-border, #1f2937);
  border-radius: 16px;
  padding: 1.35rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}

.gen-panel-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.6), rgba(16, 185, 129, 0.6), transparent);
}

.gen-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.gen-panel-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  margin: 0;
}

.gen-panel-sub {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 3px;
  font-family: inherit;
}

/* General Stats Data Table */
.gen-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.gen-data-table th {
  padding: 0.65rem 0.75rem;
  color: var(--text-muted, #94a3b8);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gen-data-table td {
  padding: 0.75rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.gen-data-table tbody tr {
  transition: background 0.2s ease, transform 0.2s ease;
}

.gen-data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

@keyframes rowFadeIn {
  0% {
    opacity: 0.2;
    background-color: rgba(56, 189, 248, 0.16);
    transform: translateY(-2px);
  }
  100% {
    opacity: 1;
    background-color: transparent;
    transform: translateY(0);
  }
}

.gen-data-table tbody tr.new-row-fade {
  animation: rowFadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Finished Column Date/Time */
.time-col-date {
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}

.time-col-time {
  font-size: 0.75rem;
  color: var(--text-muted, #94a3b8);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2px;
}

/* Result Ticket Badge */
.result-ticket-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  border: 1px solid transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.result-ticket-badge.bonus-cashhunt {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.25), rgba(16, 185, 129, 0.15));
  border-color: rgba(52, 211, 153, 0.5);
  color: #34d399;
}

.result-ticket-badge.bonus-pachinko {
  background: linear-gradient(135deg, rgba(217, 70, 239, 0.25), rgba(168, 85, 247, 0.15));
  border-color: rgba(217, 70, 239, 0.5);
  color: #e879f9;
}

.result-ticket-badge.bonus-coinflip {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(2, 132, 199, 0.15));
  border-color: rgba(14, 165, 233, 0.5);
  color: #38bdf8;
}

.result-ticket-badge.bonus-crazytime {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.28), rgba(220, 38, 38, 0.15));
  border-color: rgba(239, 68, 68, 0.6);
  color: #f87171;
}

.result-ticket-badge.num-badge {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #f8fafc;
}

/* Green Multiplier Pill Badge */
.mult-pill-badge {
  display: inline-block;
  background: #10b981;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 9999px;
  letter-spacing: 0.3px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
  font-family: 'JetBrains Mono', monospace;
}

@media (max-width: 768px) {
  .gen-dual-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Bonus Multiplier Numbers Section (Uniform Neutral Color + Hover Tooltip)
   ========================================================================== */

.bonus-mult-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.bonus-quick-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.bonus-tab-pill-group {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}

.bonus-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.38rem 0.75rem;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.3px;
}

.bonus-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.bonus-tab-btn.active {
  background: #6366f1;
  color: #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

/* Multiplier Tiles Grid */
.bonus-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 0.65rem;
  padding-top: 0.75rem;
}

/* Uniform Single Normal Color for All Tiles */
.bonus-tile {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 0.85rem 0.4rem;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 800;
  color: #f1f5f9;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.bonus-tile:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

/* Bonus Specific Color Themes */
.bonus-tile.tile-crazytime {
  background: rgba(239, 68, 68, 0.13);
  border-color: rgba(239, 68, 68, 0.38);
  color: #f87171;
}
.bonus-tile.tile-crazytime:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.65);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.32);
}

.bonus-tile.tile-pachinko {
  background: rgba(217, 70, 239, 0.13);
  border-color: rgba(217, 70, 239, 0.38);
  color: #e879f9;
}
.bonus-tile.tile-pachinko:hover {
  background: rgba(217, 70, 239, 0.25);
  border-color: rgba(217, 70, 239, 0.65);
  box-shadow: 0 6px 18px rgba(217, 70, 239, 0.32);
}

.bonus-tile.tile-cashhunt {
  background: rgba(52, 211, 153, 0.13);
  border-color: rgba(52, 211, 153, 0.38);
  color: #34d399;
}
.bonus-tile.tile-cashhunt:hover {
  background: rgba(52, 211, 153, 0.25);
  border-color: rgba(52, 211, 153, 0.65);
  box-shadow: 0 6px 18px rgba(52, 211, 153, 0.32);
}

.bonus-tile.tile-coinflip {
  background: rgba(14, 165, 233, 0.13);
  border-color: rgba(14, 165, 233, 0.38);
  color: #38bdf8;
}
.bonus-tile.tile-coinflip:hover {
  background: rgba(14, 165, 233, 0.25);
  border-color: rgba(14, 165, 233, 0.65);
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.32);
}

/* Floating Hover Tooltip: Exact Time & Dealer */
.tile-hover-tooltip {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.75), 0 0 15px rgba(99, 102, 241, 0.25);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-size: 0.78rem;
  color: #cbd5e1;
  white-space: nowrap;
  backdrop-filter: blur(12px);
  animation: tooltipFadeIn 0.12s ease-out;
  display: none;
}

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

.tile-hover-tooltip .tip-header {
  font-weight: 800;
  color: #fff;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tile-hover-tooltip .tip-header span {
  color: #38bdf8;
  font-family: 'JetBrains Mono', monospace;
}

.tile-hover-tooltip .tip-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.tile-hover-tooltip .tip-lbl {
  color: var(--text-muted, #94a3b8);
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
}

.tile-hover-tooltip .tip-val {
  font-family: 'JetBrains Mono', monospace;
  color: #f1f5f9;
  font-weight: 600;
}

.tile-hover-tooltip .tip-val.dealer-highlight {
  color: #34d399;
  font-weight: 700;
  font-family: inherit;
}

/* ==========================================================================
   General Stats Tables Pagination & Controls
   ========================================================================== */

.gen-table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(15, 23, 42, 0.45);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.gen-table-pagination .gen-page-info {
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace;
  color: #cbd5e1;
  font-weight: 600;
}

.gen-table-pagination .btn-gen-pag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gen-table-pagination .btn-gen-pag:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.gen-table-pagination .btn-gen-pag:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}



