/* หน้าแมตช์ — โทนเย็นทันสมัย (slate / ขาว / เหลืองคม) ไม่ใช้ครีม-น้ำตาล */

:root {
  --md-bg: var(--sian-bg, #0b1118);
  --md-bg-elev: var(--sian-surface, #121a24);
  --md-bg-soft: var(--sian-surface-2, #182232);
  --md-line: var(--sian-line, rgba(148, 163, 184, 0.18));
  --md-text: var(--sian-text, #e2e8f0);
  --md-muted: var(--sian-muted, #94a3b8);
  --md-faint: #64748b;
  --md-accent: var(--sian-accent, #f5e84a);
  --md-accent-ink: var(--sian-accent-ink, #0b1118);
  --md-pick: var(--sian-pick, #34d399);
  --md-info: var(--sian-info, #38bdf8);
}

.match-ai-section {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--md-line);
  background:
    radial-gradient(900px 220px at 0% 0%, rgba(56, 189, 248, 0.08), transparent 55%),
    radial-gradient(700px 200px at 100% 0%, rgba(245, 232, 74, 0.06), transparent 50%),
    linear-gradient(165deg, var(--md-bg-elev) 0%, var(--md-bg) 100%);
  margin-bottom: 1rem;
}

.match-ai-section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--md-info) 20%, var(--md-accent) 50%, var(--md-info) 80%, transparent);
}

.match-ai-section__inner {
  position: relative;
  padding: 1.25rem 1.25rem 1.5rem;
}

@media (min-width: 640px) {
  .match-ai-section__inner {
    padding: 1.5rem 1.75rem 1.75rem;
  }
}

.match-ai-head {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--md-line);
}

@media (min-width: 640px) {
  .match-ai-head {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.match-ai-head__title {
  font-size: 1.125rem;
  line-height: 1.35;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.015em;
}

.match-ai-head__title--sm {
  font-size: 1.05rem;
}

@media (min-width: 640px) {
  .match-ai-head__title {
    font-size: 1.35rem;
  }

  .match-ai-head__title--sm {
    font-size: 1.1rem;
  }
}

.match-ai-head__meta {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--md-muted);
}

.match-ai-head__meta strong,
.match-ai-head__meta .text-sian-yellow {
  color: var(--md-accent) !important;
}

.match-ai-head--compact {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0.85rem;
}

.match-ai-pick--tight {
  margin-bottom: 0.75rem;
}

.match-ai-pick__value--muted {
  font-size: 1rem;
  color: var(--md-muted);
}

.match-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-start;
  background: var(--md-accent);
  color: var(--md-accent-ink);
  font-size: 0.8125rem;
  font-weight: 800;
  padding: 0.4rem 0.85rem;
  border-radius: 0.5rem;
  white-space: nowrap;
}

.match-ai-note {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--md-text);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.match-ai-note .text-sian-yellow {
  color: var(--md-accent) !important;
}

.match-ai-pick {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(56, 189, 248, 0.22);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(15, 23, 42, 0.4) 55%, transparent);
}

@media (min-width: 768px) {
  .match-ai-pick {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

.match-ai-pick__label {
  font-size: 0.75rem;
  color: var(--md-muted);
  margin-bottom: 0.35rem;
}

.match-ai-pick__value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.25;
}

.match-ai-pick__sub {
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  color: var(--md-muted);
}

.match-ai-pick__chip {
  display: inline-block;
  background: var(--md-bg-soft);
  color: var(--md-text);
  padding: 0.15rem 0.55rem;
  border-radius: 0.35rem;
  font-size: 0.75rem;
  border: 1px solid var(--md-line);
}

.match-ai-score {
  text-align: center;
  min-width: 7.5rem;
  padding: 0.85rem 1.1rem;
  border-radius: 0.75rem;
  background: var(--md-bg);
  border: 1px solid var(--md-line);
}

.match-ai-score__label {
  font-size: 0.7rem;
  color: var(--md-muted);
  margin-bottom: 0.25rem;
}

.match-ai-score__value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
}

.match-ai-market {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--md-line);
}

.match-ai-market__label {
  font-size: 0.7rem;
  color: var(--md-faint);
  margin-bottom: 0.5rem;
}

.match-ai-market__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  text-align: center;
}

.match-ai-market__cell {
  padding: 0.55rem 0.4rem;
  border-radius: 0.65rem;
  background: var(--md-bg);
  border: 1px solid var(--md-line);
}

.match-ai-market__cell.is-fav {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.08);
}

.match-ai-market__cell span {
  display: block;
  font-size: 0.65rem;
  color: var(--md-muted);
  margin-bottom: 0.15rem;
}

.match-ai-market__cell strong {
  font-size: 0.9rem;
  color: #fff;
}

.match-ai-brief {
  border-radius: 1rem;
  border: 1px solid var(--md-line);
  background: var(--md-bg-elev);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}

.match-ai-disclaimer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--md-line);
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--md-faint);
}

/* เนื้อหาบทวิเคราะห์ */
.analysis-content {
  color: var(--md-text);
  line-height: 1.8;
  font-size: 0.95rem;
}

.analysis-content > :first-child {
  margin-top: 0;
}

.analysis-content h2 {
  color: #f8fafc;
  font-size: 1.28rem;
  font-weight: 800;
  margin: 0.25rem 0 0.85rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.analysis-content h3 {
  position: relative;
  color: #f1f5f9;
  font-size: 1.02rem;
  font-weight: 700;
  margin: 1.65rem 0 0.7rem;
  padding: 0.55rem 0.85rem 0.55rem 0.95rem;
  border-radius: 0.55rem;
  background: rgba(148, 163, 184, 0.08);
  border-left: 3px solid var(--md-info);
}

.analysis-content h4 {
  color: #cbd5e1;
  font-size: 0.98rem;
  font-weight: 650;
  margin: 1.15rem 0 0.5rem;
}

.analysis-content p {
  margin: 0 0 0.95rem;
  line-height: 1.8;
}

.analysis-content strong {
  color: #f8fafc;
  font-weight: 700;
}

.analysis-content .analysis-accent {
  color: var(--md-accent);
  font-weight: 800;
}

.analysis-content .analysis-pick {
  color: var(--md-pick);
  font-weight: 800;
}

.analysis-content .analysis-league {
  color: var(--md-info);
  font-weight: 650;
}

.analysis-content em {
  color: #cbd5e1;
  font-style: italic;
}

.analysis-content hr {
  border: 0;
  border-top: 1px solid var(--md-line);
  margin: 1.5rem 0;
}

.analysis-content .analysis-quote,
.analysis-content blockquote {
  border-left: 3px solid var(--md-info);
  background: rgba(56, 189, 248, 0.08);
  padding: 0.9rem 1.05rem;
  margin: 1.1rem 0;
  border-radius: 0 0.75rem 0.75rem 0;
  color: var(--md-text);
}

.analysis-content .analysis-list {
  margin: 0.65rem 0 1.1rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.analysis-content .analysis-list li {
  position: relative;
  padding: 0.55rem 0.75rem 0.55rem 1.7rem;
  border-radius: 0.55rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--md-line);
  line-height: 1.65;
}

.analysis-content .analysis-list li::before {
  content: "";
  position: absolute;
  left: 0.7rem;
  top: 0.95rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--md-info);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.analysis-content .analysis-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--md-line);
  background: rgba(15, 23, 42, 0.65);
}

.analysis-content table {
  width: 100%;
  border-collapse: collapse;
  min-width: 280px;
}

.analysis-content table th {
  background: rgba(56, 189, 248, 0.12);
  color: #e0f2fe;
  font-weight: 700;
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid rgba(56, 189, 248, 0.25);
  font-size: 0.8rem;
  white-space: nowrap;
}

.analysis-content table td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  font-size: 0.875rem;
  vertical-align: top;
  color: var(--md-text);
}

.analysis-content table tr:last-child td {
  border-bottom: none;
}

.analysis-content table tr:hover td {
  background: rgba(148, 163, 184, 0.05);
}

/* โครงหน้าแมตช์ — โทนเย็นทั้งหน้า */
.match-page {
  --tw-prose-body: var(--md-text);
}

.match-page__hero {
  position: relative;
  background: var(--md-bg);
  border: 1px solid var(--md-line);
  border-radius: 0.9rem;
  padding: 1.5rem;
}

.match-page__panel {
  background: var(--md-bg-elev);
  border: 1px solid var(--md-line);
  border-radius: 0.9rem;
  padding: 1rem 1.1rem;
}

.match-page__panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 0.85rem;
}

.match-page__panel-title--sm {
  font-size: 0.875rem;
}

.match-page__panel-title--mb {
  margin-bottom: 1rem;
}

.match-page__panel--compact {
  padding: 0.75rem;
}

.match-page__panel--compact .match-page__panel-title {
  margin-bottom: 0.5rem;
}

.match-page__odds {
  background: var(--md-bg-elev);
  border: 1px solid var(--md-line);
  border-radius: 0.9rem;
  overflow: hidden;
}

.match-page__odds-head {
  background: rgba(24, 34, 50, 0.85);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--md-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.match-page__warn {
  font-size: 0.6875rem;
  color: #bae6fd;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 0.375rem;
  padding: 0.375rem 0.5rem;
  margin-bottom: 0.75rem;
}

.match-panel {
  background: var(--md-bg-elev);
  border: 1px solid var(--md-line);
  border-radius: 0.85rem;
  padding: 1rem 1.1rem;
}

.match-panel__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 0.85rem;
}

.match-empty {
  text-align: center;
  padding: 2rem 1rem;
}

.match-empty__icon {
  font-size: 2.75rem;
  line-height: 1;
  opacity: 0.4;
  margin-bottom: 0.65rem;
}

.match-empty__title {
  color: var(--md-muted);
  font-size: 0.875rem;
  font-weight: 650;
  margin-bottom: 0.35rem;
}

.match-empty__desc {
  color: var(--md-faint);
  font-size: 0.75rem;
  line-height: 1.5;
}

.match-stat-label {
  color: var(--md-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

/* หน้าแมตช์ — ลดโทนอุ่นในส่วนอื่นด้วย */
.match-page .text-amber-200\/90,
.match-page .text-amber-200 {
  color: #bae6fd !important;
}

.match-page .bg-amber-900\/20 {
  background: rgba(56, 189, 248, 0.1) !important;
}

.match-page .border-amber-700\/40 {
  border-color: rgba(56, 189, 248, 0.28) !important;
}
