/* ============================================================
   reviews.css — JL69 (jl6911.online)
   สไตล์กล่อง "รีวิวผู้เล่น" ตามคลาสจริงที่ jlkit.py สร้าง
   โหลดหลัง site.css และ theme.css เพื่อบังคับโทน neon ม่วง/ชมพู
   คลาสที่คุม: .rev-wrap .rev-head .rev .rev-top .rev-avatar .rev-id
   .rev-name .rev-when .rev-badge .rev-rate .rev-quote .rev-meta
   .rev-stars .rev-star .is-on .is-half  +  .rev-summary .rev-score
   .rev-of .rev-total .rev-bars .rev-bar .rev-bar-k .rev-bar-t
   .rev-bar-v .rev-note .grid.grid-3
   ============================================================ */

.rev-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 22px 0 6px;
}

.rev-head {
  margin: 4px 0 0;
  font-size: .95rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #C4B5FD;
}

/* ── การ์ดรีวิวแต่ละรายการ ───────────────────────────────── */
.rev {
  position: relative;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(168, 85, 247, .35);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(124, 58, 237, .18) 0%, rgba(15, 23, 42, 0) 60%),
    #0F172A;
  box-shadow: 0 10px 30px rgba(2, 6, 23, .55);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.rev:hover,
.rev:focus-within {
  transform: translateY(-3px);
  border-color: rgba(236, 72, 153, .55);
  box-shadow: 0 16px 40px rgba(124, 58, 237, .35);
}

.rev-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 10px;
}

.rev-avatar {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: .95rem;
  color: #F5F3FF;
  background: linear-gradient(140deg, #7C3AED 0%, #EC4899 100%);
  box-shadow: 0 6px 18px rgba(124, 58, 237, .45);
}

.rev-id {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rev-name {
  font-weight: 700;
  color: #F5F3FF;
  line-height: 1.25;
}

.rev-when {
  font-size: .82rem;
  color: #A5B4FC;
}

.rev-badge {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 600;
  white-space: nowrap;
  color: #FBCFE8;
  background: rgba(236, 72, 153, .16);
  border: 1px solid rgba(236, 72, 153, .38);
}

.rev-rate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #FBBF24;
}

.rev-quote {
  margin: 0 0 10px;
  padding: 0 0 0 14px;
  border-left: 3px solid rgba(168, 85, 247, .5);
  color: #E5E7EB;
  font-size: 1.02rem;
  line-height: 1.75;
}

.rev-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: .84rem;
  color: #94A3B8;
}

.rev-stars {
  display: inline-flex;
  gap: 2px;
  line-height: 1;
  font-size: 1rem;
}

.rev-star {
  color: rgba(255, 255, 255, .18);
}

.rev-star.is-on {
  color: #FBBF24;
  text-shadow: 0 0 10px rgba(251, 191, 36, .45);
}

.rev-star.is-half {
  color: #FBBF24;
  opacity: .55;
}

/* ── กล่องสรุปคะแนนรวม ──────────────────────────────────── */
.rev-summary {
  display: grid;
  grid-template-columns: minmax(150px, 200px) minmax(0, 1fr);
  gap: 18px 26px;
  align-items: center;
  padding: 20px 22px;
  margin: 20px 0 4px;
  border-radius: 20px;
  border: 1px solid rgba(168, 85, 247, .40);
  background:
    radial-gradient(130% 150% at 100% 0%, rgba(236, 72, 153, .20) 0%, rgba(15, 23, 42, 0) 62%),
    linear-gradient(150deg, #0B1020 0%, #171033 100%);
  box-shadow: 0 14px 40px rgba(2, 6, 23, .6);
}

.rev-score {
  text-align: center;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(140deg, #C4B5FD 0%, #EC4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rev-of {
  display: block;
  margin-top: 6px;
  font-size: .9rem;
  font-weight: 600;
  color: #A5B4FC;
}

.rev-total {
  display: block;
  margin-top: 2px;
  font-size: .84rem;
  color: #94A3B8;
}

.rev-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.rev-bar {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 10px;
  font-size: .86rem;
  color: #CBD5F5;
}

.rev-bar-k {
  white-space: nowrap;
  color: #E9D5FF;
  font-weight: 600;
}

.rev-bar-t {
  position: relative;
  height: 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .18);
  overflow: hidden;
}

.rev-bar-v {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #7C3AED 0%, #EC4899 100%);
  box-shadow: 0 0 12px rgba(236, 72, 153, .55);
}

.rev-note {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  font-size: .86rem;
  color: #94A3B8;
}

/* ── จอกว้าง: การ์ดรีวิวเรียง 3 คอลัมน์ (ถ้าใช้ .grid-3) ─── */
@media (min-width: 900px) {
  .grid.grid-3 > .rev {
    height: 100%;
  }
}

@media (max-width: 760px) {
  .rev-summary {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .rev-bar {
    grid-template-columns: 40px minmax(0, 1fr) 44px;
  }

  .rev {
    padding: 16px 15px;
  }

  .rev-badge {
    margin-left: 0;
  }

  .rev-quote {
    font-size: .98rem;
  }
}

/* ── หน้ารีวิว: การ์ดรีวิว 2 คอลัมน์บนจอใหญ่ (หน้า /reviews/ มี 30 รีวิว) ── */
@media (min-width: 1000px) {
  .p-reviews .rev-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
  }
}
