/* =========================================================
   stat-card-fx.css — การ์ดสถิติหน้าแรก (Red Crystal)
   โหลดต่อจาก style.css (เขียนทับสไตล์ .stat-card เดิมเฉพาะในหน้าแรก)
   - (เอาแอนิเมชันและเอฟเฟกต์เคลื่อนไหวออกทั้งหมดแล้ว เพื่อไม่ให้เครื่องค้าง)
   - ไอคอนกรอบคริสตัล + ตัวเลขไล่สีขาว→แดง
   พื้นหลังคริสตัลวาดโดย stat-card-fx.js (canvas.scfx-bg)
   ========================================================= */



/* ---------- ตัวการ์ด ---------- */
.stats .stat-card {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 86px; padding: 14px 12px; gap: 11px;
  border-radius: 16px; border: 1px solid rgba(255,0,1,.4);
  background: #000;
  box-shadow: 0 0 18px -8px rgba(255,0,1,.5), inset 0 0 18px -12px rgba(255,60,40,.5);
}

/* พื้นหลังคริสตัล (canvas) อยู่ล่างสุด เนื้อหาอยู่เหนือมัน */
.stats .stat-card > canvas.scfx-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; pointer-events: none; }
.stats .stat-card > :not(canvas) { position: relative; z-index: 1; min-width: 0; }

/* ---------- ไอคอน ---------- */
.stats .stat-icon {
  position: relative; width: 42px; height: 42px; border: none; border-radius: 13px; overflow: hidden;
  color: #ff5444;
  background: radial-gradient(circle at 30% 20%, rgba(255,70,50,.38), transparent 55%), linear-gradient(150deg, #3a0000 0%, #120000 70%);
  box-shadow: 0 0 16px -2px rgba(255,0,1,.6), 0 6px 14px -6px #000, inset 0 1px 0 rgba(255,170,150,.35), inset 0 -8px 14px -8px rgba(255,0,0,.45);
}
.stats .stat-icon svg {
  width: 21px; height: 21px; stroke-width: 2; position: relative; z-index: 1;
}

/* ---------- ข้อความ + ตัวเลข ---------- */
.stats .stat-label {
  font-size: 12px; font-weight: 600; letter-spacing: .02em; color: #d4c4c2;
  text-shadow: 0 1px 6px #000; margin-bottom: 2px;
}
.stats .stat-value {
  font-size: clamp(20px, 6.4vw, 25px); font-weight: 800; letter-spacing: .01em; line-height: 1.15;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  background: linear-gradient(180deg, #fff 0%, #ffd2c8 22%, #ff4636 62%, #ff0001 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.stats .stat-value .unit {
  -webkit-text-fill-color: rgba(255,225,220,.78); color: rgba(255,225,220,.78);
  font-size: 12px; font-weight: 600; margin-left: 4px;
}

/* จอแคบมาก (≤340px): ย่อไอคอน/ช่องไฟ/ตัวเลขเล็กน้อยไม่ให้ล้นการ์ด */
@media (max-width: 340px) {
  .stats .stat-card { padding: 12px 10px; gap: 8px; }
  .stats .stat-icon { width: 36px; height: 36px; border-radius: 11px; }
  .stats .stat-icon svg { width: 18px; height: 18px; }
  .stats .stat-value { font-size: 19px; }
  .stats .stat-value .unit { font-size: 11px; margin-left: 3px; }
}

/* ===== การ์ดสถิติ 4 ใบ: พื้นหลังสีดำล้วน (ซ่อนลายคริสตัลแดง) ===== */
.stats .stat-card > canvas.scfx-bg{ display: none; }
.stats .stat-card{
  background: #000;
  border-color: rgba(255,255,255,.1);
  box-shadow: none;
}
