/* ═══════════════════════════════════════════════════════════
   SENTINEL AI · stats.css
   The massive analytics block, neon grid, 3D canvas, charts
   ═══════════════════════════════════════════════════════════ */

/* ─── NEON GRID BACKGROUND ───────────────────────────────── */
.neon-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.neon-grid::before {
  content: ''; position: absolute; inset: -50%;
  background-image:
    linear-gradient(rgba(99,102,241,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(500px) rotateX(60deg) translateY(-20%) scale(2);
  mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent);
  animation: grid-flow 20s linear infinite;
}
@keyframes grid-flow {
  from { background-position: 0 0; }
  to   { background-position: 0 48px; }
}
.neon-grid::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(99,102,241,0.12), transparent 70%);
}

/* Floating neon scanlines */
.neon-scanlines {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom, transparent, transparent 3px,
    rgba(99,102,241,0.012) 3px, rgba(99,102,241,0.012) 4px);
}

/* ─── 3D CANVAS ──────────────────────────────────────────── */
.radar3d-shell {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}
.radar3d-canvas { width: 100%; height: 100%; display: block; }
.radar3d-overlay {
  position: absolute; inset: 0; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.radar3d-hud {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--t-3);
  padding: 0 8px;
}
.radar3d-hud span { display: flex; align-items: center; gap: 4px; }
.radar3d-hud .hud-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--c-sky); box-shadow: 0 0 6px var(--c-sky); animation: live-pulse 2s infinite; }

/* corner brackets */
.radar3d-shell::before, .radar3d-shell::after {
  content: ''; position: absolute; width: 24px; height: 24px;
  border: 2px solid var(--b-mid); pointer-events: none;
}
.radar3d-shell::before { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.radar3d-shell::after { bottom: 28px; right: 8px; border-left: none; border-top: none; }

/* ─── STATS BLOCK CONTAINER ──────────────────────────────── */
.stats-block { margin-top: 64px; display: flex; flex-direction: column; gap: 24px; }
.stats-header { text-align: center; max-width: 640px; margin: 0 auto 16px; }
.stats-header .eyebrow { justify-content: center; }

.stats-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.stat-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.stat-card-head .label-upper { color: var(--t-3); }

/* ─── BIG NUMBER GRID ────────────────────────────────────── */
.bignum-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.bignum-card {
  background: var(--c-card); border: 1px solid var(--b-dim);
  border-radius: var(--r-lg); padding: 28px 24px;
  position: relative; overflow: hidden;
  transition: transform .3s var(--ease-out), border-color .3s, box-shadow .3s;
}
.bignum-card:hover { transform: translateY(-4px); border-color: var(--b-mid); box-shadow: var(--shadow-raised); }
.bignum-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(to right, transparent, var(--c-indigo), transparent);
  opacity: 0; transition: opacity .3s;
}
.bignum-card:hover::after { opacity: 1; }
.bignum-card.featured {
  background: linear-gradient(135deg, var(--c-card), rgba(99,102,241,0.06));
  border-color: var(--c-indigo-border);
}
.bignum-value {
  font-size: 52px; font-weight: 900; line-height: 1;
  font-family: 'JetBrains Mono', monospace; letter-spacing: -0.04em;
  margin-bottom: 8px;
}
.bignum-label { font-size: var(--text-sm); color: var(--t-3); font-weight: 500; }

/* ─── VECTOR ROWS ────────────────────────────────────────── */
.vectors-list { display: flex; flex-direction: column; gap: 18px; }
.vector-row { display: flex; gap: 14px; align-items: flex-start; }
.vector-icon {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px;
  background: var(--c-raised); border: 1px solid var(--b-dim);
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.vector-body { flex: 1; }
.vector-top { display: flex; justify-content: space-between; margin-bottom: 6px; }
.vector-name { font-size: var(--text-sm); font-weight: 600; }
.vector-val { font-size: var(--text-sm); font-weight: 700; }
.vector-track { height: 5px; background: rgba(255,255,255,0.05); border-radius: 100px; overflow: hidden; }
.vector-fill { height: 100%; width: 0; border-radius: 100px; transition: width 1.2s var(--ease-out); }
.vector-desc { font-size: var(--text-xs); color: var(--t-3); margin-top: 5px; }

/* ─── SPARKLINE ──────────────────────────────────────────── */
.sparkline { width: 100%; height: 120px; }
.spark-path { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: spark-draw 1.8s var(--ease-out) forwards; }
@keyframes spark-draw { to { stroke-dashoffset: 0; } }
.spark-pulse { animation: spark-ping 2s ease-out infinite; transform-origin: center; }
@keyframes spark-ping { 0%{ r:8; opacity:.4; } 100%{ r:16; opacity:0; } }
.timeline-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--b-subtle); }

/* ─── AI DETECTION SECTION ───────────────────────────────── */
.ai-detect-section { }
.ai-types-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.aitype-card {
  background: var(--c-raised); border: 1px solid var(--b-dim);
  border-radius: var(--r-md); padding: 18px 14px; text-align: center;
  transition: all .25s var(--ease-out);
}
.aitype-card:hover { transform: translateY(-3px); border-color: var(--b-mid); background: var(--c-overlay); }
.aitype-icon { font-size: 26px; margin-bottom: 10px; }
.aitype-name { font-size: var(--text-xs); color: var(--t-2); font-weight: 600; margin-bottom: 8px; min-height: 28px; }
.aitype-prob { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.aitype-track { height: 3px; background: rgba(255,255,255,0.06); border-radius: 100px; overflow: hidden; }
.aitype-fill { height: 100%; width: 0; border-radius: 100px; transition: width 1s var(--ease-out); }

/* ─── ACCOUNT MINI METRICS ───────────────────────────────── */
.metric-mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.metric-mini {
  background: var(--c-raised); border: 1px solid var(--b-subtle);
  border-radius: var(--r-md); padding: 18px 16px;
  transition: all .25s; text-align: center;
}
.metric-mini:hover { border-color: var(--b-dim); transform: translateY(-2px); }
.metric-mini-value { font-size: 24px; font-weight: 800; color: var(--t-1); letter-spacing: -0.03em; }
.metric-mini-label { font-size: var(--text-xs); color: var(--t-3); margin-top: 4px; }

/* ─── DONUT CHART ────────────────────────────────────────── */
.donut-wrap { display: flex; gap: 24px; align-items: center; }
.donut-svg { width: 140px; height: 140px; flex-shrink: 0; }
.donut-arc { transition: stroke-dasharray 1s var(--ease-out); }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.donut-legend-item { display: flex; align-items: center; gap: 10px; }
.donut-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.donut-leg-name { font-size: var(--text-sm); color: var(--t-2); flex: 1; }
.donut-leg-pct { font-size: var(--text-sm); font-weight: 700; color: var(--t-1); }

/* ─── KEYWORD CLOUD ──────────────────────────────────────── */
.keyword-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.kw-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--c-raised); border: 1px solid var(--b-dim);
  border-radius: 100px; padding: 8px 14px;
  transition: all .25s var(--ease-out); cursor: default;
}
.kw-chip:hover { transform: translateY(-2px) scale(1.03); }
.kw-chip.danger { border-color: var(--c-danger-border); background: var(--c-danger-dim); }
.kw-word { font-size: var(--text-sm); font-weight: 600; }
.kw-chip.danger .kw-word { color: #FB7185; }
.kw-count { font-size: var(--text-xs); font-family: 'JetBrains Mono', monospace; color: var(--t-3); font-weight: 700; }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .stats-2col { grid-template-columns: 1fr; }
  .bignum-grid { grid-template-columns: 1fr 1fr; }
  .ai-types-grid { grid-template-columns: 1fr 1fr; }
  .bignum-value { font-size: 40px; }
  .donut-wrap { flex-direction: column; }
}
@media (max-width: 520px) {
  .metric-mini-grid { grid-template-columns: 1fr 1fr; }
  .ai-types-grid { grid-template-columns: 1fr 1fr; }
}
