/* ================================================
   JamSlots Casino — Charts & Data Visualisation
   ================================================ */

/* ============================================
   HORIZONTAL BAR CHART  (.hbar-chart)
   ============================================ */
.hbar-chart { display: flex; flex-direction: column; gap: 14px; }
.hbar-row { display: flex; flex-direction: column; gap: 5px; }
.hbar-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.82rem;
}
.hbar-name { color: var(--text-2); font-weight: 600; }
.hbar-value { color: var(--pink-light); font-weight: 700; }
.hbar-track {
  height: 10px; background: rgba(255,255,255,0.06);
  border-radius: 5px; overflow: hidden;
}
.hbar-fill {
  height: 100%; border-radius: 5px;
  background: var(--grad-pink);
  transform-origin: left; transform: scaleX(0);
  transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}
.hbar-fill.alt { background: linear-gradient(135deg, #8b5cf6 0%, #06d6e0 100%); }
.hbar-fill.gold { background: var(--grad-gold); }
.hbar-fill.green { background: linear-gradient(135deg, #10d98a 0%, #06b87a 100%); }
.hbar-fill.animated { transform: scaleX(1); }

/* ============================================
   COLUMN BAR CHART  (.col-chart)
   ============================================ */
.col-chart { display: flex; align-items: flex-end; gap: 12px; height: 200px; }
.col-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.col-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.col-bar {
  width: 100%; border-radius: 6px 6px 0 0;
  background: var(--grad-pink);
  transform-origin: bottom; transform: scaleY(0);
  transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
  min-height: 4px;
}
.col-bar.alt  { background: linear-gradient(0deg, #8b5cf6 0%, #a78bfa 100%); }
.col-bar.gold { background: linear-gradient(0deg, #ffd700 0%, #ffaa00 100%); }
.col-bar.animated { transform: scaleY(1); }
.col-label { font-size: 0.72rem; color: var(--text-3); text-align: center; white-space: nowrap; }
.col-val { font-size: 0.75rem; font-weight: 700; color: var(--pink-light); }

/* ============================================
   DONUT CHART  (.donut-chart)
   ============================================ */
.donut-wrap {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.donut-svg-wrap { position: relative; flex-shrink: 0; }
.donut-svg-wrap svg { display: block; }
.donut-center {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center; pointer-events: none;
}
.donut-center .dc-num {
  display: block; font-size: 1.6rem; font-weight: 900;
  background: var(--grad-pink); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text; line-height: 1;
}
.donut-center .dc-label { font-size: 0.7rem; color: var(--text-3); display: block; margin-top: 2px; }
.donut-legend { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 140px; }
.dl-item { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; }
.dl-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dl-name { color: var(--text-2); flex: 1; }
.dl-pct { font-weight: 700; color: var(--text-1); }

/* Donut segment animation */
.donut-segment {
  transition: stroke-dasharray 1.4s cubic-bezier(0.23, 1, 0.32, 1),
              stroke-dashoffset 1.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ============================================
   PROGRESS RING  (.prog-ring)
   ============================================ */
.prog-ring-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.prog-ring-wrap svg { display: block; }
.prog-ring-circle {
  transform-origin: center;
  transform: rotate(-90deg);
  transition: stroke-dashoffset 1.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.prog-ring-val { font-size: 0.88rem; font-weight: 700; color: var(--text-1); }
.prog-ring-lbl { font-size: 0.75rem; color: var(--text-3); text-align: center; }

/* ============================================
   STAT COUNTER  (.stat-pill)
   ============================================ */
.stat-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md); padding: 20px 24px;
  text-align: center;
}
.stat-pill .sp-num {
  display: block; font-size: 2rem; font-weight: 900; line-height: 1;
  background: var(--grad-pink); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-pill .sp-label { display: block; font-size: 0.8rem; color: var(--text-3); margin-top: 4px; }
.stat-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ============================================
   GAUGE CHART  (.gauge-chart)
   ============================================ */
.gauge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.gauge-item { text-align: center; }
.gauge-svg-wrap { position: relative; display: inline-block; }
.gauge-svg-wrap svg { display: block; }
.gauge-arc-bg { stroke: rgba(255,255,255,0.06); }
.gauge-arc {
  stroke: url(#gaugeGrad);
  stroke-dasharray: 220; stroke-dashoffset: 220;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.gauge-arc.animated { stroke-dashoffset: 0; /* set via JS */ }
.gauge-val {
  position: absolute; top: 52%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.4rem; font-weight: 900;
  background: var(--grad-pink); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.gauge-label { font-size: 0.78rem; color: var(--text-3); margin-top: 6px; }

/* ============================================
   RADAR / SPIDER CHART  (.radar-chart)
   ============================================ */
.radar-wrap { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.radar-svg-wrap { flex-shrink: 0; }
.radar-legend { display: flex; flex-direction: column; gap: 10px; }
.radar-line { stroke: rgba(255,61,167,0.2); }
.radar-bg { fill: rgba(255,255,255,0.02); stroke: rgba(255,255,255,0.04); }
.radar-web { fill: rgba(255,61,167,0.1); stroke: var(--pink); stroke-width: 1.5; }
.radar-web.alt { fill: rgba(139,92,246,0.1); stroke: var(--purple-light); }
.radar-dot { fill: var(--pink); }
.radar-axis-label { font-size: 10px; fill: var(--text-3); }

/* ============================================
   AREA / SPARKLINE CHART  (.area-chart)
   ============================================ */
.area-chart-wrap { position: relative; overflow: hidden; border-radius: var(--radius-sm); }
.area-chart-wrap canvas, .area-chart-wrap svg { display: block; width: 100% !important; }
.area-axis { display: flex; justify-content: space-between; margin-top: 6px; }
.area-axis span { font-size: 0.72rem; color: var(--text-muted); }
.sparkline { display: inline-flex; align-items: center; gap: 6px; }
.sparkline svg { display: inline-block; }

/* ============================================
   FUNNEL / STEPS VISUAL  (.funnel-chart)
   ============================================ */
.funnel-chart { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.funnel-step {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--border-card);
  position: relative; transition: all 0.3s;
}
.funnel-step:hover { border-color: var(--border-pink); }
.funnel-step::after {
  content: '▼'; position: absolute; bottom: -14px; left: 50%;
  transform: translateX(-50%); font-size: 0.7rem; color: var(--text-muted); z-index: 1;
}
.funnel-step:last-child::after { display: none; }
.fs-icon { font-size: 1.3rem; flex-shrink: 0; }
.fs-label { font-size: 0.88rem; font-weight: 600; flex: 1; color: var(--text-1); }
.fs-val { font-size: 0.82rem; color: var(--pink-light); font-weight: 700; }
.fs-bar { height: 3px; border-radius: 1.5px; background: var(--grad-pink); margin-top: 4px; }

/* ============================================
   DATA TABLE VARIANTS
   ============================================ */
/* Payments / methods table */
.table-payments td:first-child { font-weight: 700; color: var(--text-1); }
.table-payments .method-icon { font-size: 1.2rem; margin-right: 6px; }
.table-payments .speed-fast { color: var(--success); font-weight: 700; }
.table-payments .speed-mid  { color: var(--warning); }
.table-payments .speed-slow { color: var(--text-3); }
.table-payments .fee-free { color: var(--success); font-weight: 700; }
.table-payments .fee-low  { color: var(--warning); }

/* Games / slots table */
.table-games { min-width: 600px; }
.table-games .rtp-high { color: var(--success); font-weight: 700; }
.table-games .rtp-mid { color: var(--warning); }
.table-games .rtp-low { color: var(--danger); }
.table-games .vol-low { color: var(--success); }
.table-games .vol-mid { color: var(--warning); }
.table-games .vol-high { color: var(--danger); }
.table-games .rank-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,61,167,0.1); border: 1px solid var(--border-pink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 800; color: var(--pink-light);
}

/* Big comparison table */
.table-compare { min-width: 580px; }
.table-compare td { text-align: center; }
.table-compare td:first-child { text-align: left; font-weight: 600; color: var(--text-1); }
.table-compare .jam-col { background: rgba(255,61,167,0.06); }
.table-compare thead th { text-align: center; }
.table-compare thead th:first-child { text-align: left; }

/* ============================================
   PROVIDER BUBBLE  (.bubble-chart)
   ============================================ */
.bubble-chart { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.bubble-item {
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255,61,167,0.08);
  border: 1px solid rgba(255,61,167,0.2);
  transition: all 0.3s; font-weight: 700; text-align: center; flex-direction: column;
  padding: 6px;
}
.bubble-item:hover { background: rgba(255,61,167,0.16); transform: scale(1.06); }
.bubble-item .b-name { font-size: 0.72rem; color: var(--text-2); }
.bubble-item .b-count { font-size: 0.68rem; color: var(--pink-light); font-weight: 700; }

/* ============================================
   JACKPOT COUNTER  (.jackpot-counter)
   ============================================ */
.jackpot-counter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.jp-counter-card {
  background: linear-gradient(135deg, #0f0818, #150d25);
  border: 1px solid rgba(255,215,0,0.2);
  border-radius: var(--radius-lg); padding: 28px 24px; text-align: center;
  position: relative; overflow: hidden;
}
.jp-counter-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad-gold);
}
.jp-game-name { font-size: 0.8rem; color: rgba(255,215,0,0.7); font-weight: 700; letter-spacing: 0.04em; margin-bottom: 8px; }
.jp-amount {
  font-size: 1.8rem; font-weight: 900; color: var(--gold);
  text-shadow: 0 0 20px rgba(255,215,0,0.4);
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.jp-last-won { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; }
.jp-last-won strong { color: var(--gold); }

/* Winners table */
.table-winners .trophy { color: var(--gold); margin-right: 4px; }
.table-winners .big-win { color: var(--success); font-weight: 700; }

/* ============================================
   COMPARISON BARS (compact)
   ============================================ */
.cbar-group { display: flex; flex-direction: column; gap: 10px; }
.cbar-row { display: grid; grid-template-columns: 140px 1fr 60px; align-items: center; gap: 12px; }
.cbar-name { font-size: 0.82rem; color: var(--text-2); }
.cbar-track { height: 8px; background: rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden; }
.cbar-fill { height: 100%; border-radius: 4px; transition: width 1.2s cubic-bezier(0.23, 1, 0.32, 1); }
.cbar-score { font-size: 0.82rem; font-weight: 700; color: var(--pink-light); text-align: right; }

/* ============================================
   TIMELINE
   ============================================ */
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item { display: flex; gap: 20px; }
.tl-left { display: flex; flex-direction: column; align-items: center; }
.tl-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--grad-pink); flex-shrink: 0; margin-top: 4px;
}
.tl-line { flex: 1; width: 2px; background: var(--border-card); margin: 4px 0; min-height: 20px; }
.tl-item:last-child .tl-line { display: none; }
.tl-content { padding-bottom: 24px; }
.tl-date { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.tl-title { font-size: 0.9rem; font-weight: 700; color: var(--text-1); margin-bottom: 4px; }
.tl-desc { font-size: 0.83rem; color: var(--text-3); }

/* ============================================
   SCATTER / SPEED-FEE VISUAL
   ============================================ */
.scatter-wrap { position: relative; }
.scatter-chart {
  position: relative; width: 100%; aspect-ratio: 2/1;
  border: 1px solid var(--border-card); border-radius: var(--radius-sm);
  background: var(--bg-dark);
}
.scatter-axis-y {
  position: absolute; top: 0; left: 0; height: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 4px 0; transform: translateX(-28px);
}
.scatter-axis-x {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; justify-content: space-between;
  padding: 0 8px; transform: translateY(20px);
}
.scatter-axis-y span, .scatter-axis-x span { font-size: 0.68rem; color: var(--text-muted); }
.scatter-dot {
  position: absolute; transform: translate(-50%, -50%);
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--pink);
  transition: transform 0.2s;
}
.scatter-dot:hover { transform: translate(-50%, -50%) scale(1.8); }
.scatter-dot.jam { background: var(--pink); box-shadow: 0 0 8px var(--pink-glow); }
.scatter-dot.comp { background: var(--text-muted); }

/* ============================================
   RESPONSIVE CHARTS
   ============================================ */
@media (max-width: 768px) {
  .gauge-grid { grid-template-columns: 1fr 1fr; }
  .jackpot-counter-grid { grid-template-columns: 1fr; }
  .stat-grid-4 { grid-template-columns: 1fr 1fr; }
  .col-chart { height: 140px; gap: 6px; }
  .col-label { font-size: 0.65rem; }
  .radar-wrap { flex-direction: column; }
  .donut-wrap { flex-direction: column; }
  .cbar-row { grid-template-columns: 100px 1fr 48px; }
  .bubble-chart { justify-content: center; }
}
@media (max-width: 480px) {
  .gauge-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid-4 { grid-template-columns: 1fr 1fr; }
  .hbar-fill { min-width: 4px; }
}
