/* ==========================================================================
   LIVE SCORE + CLOUDFLARE D1 COMMUNITY & SEO/AEO HUB STYLESHEET
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg-page: #0a0e17;
  --bg-surface: #111827;
  --bg-surface-elevated: #182133;
  --bg-hover: #1e293e;
  --bg-input: #0e1422;
  --bg-header: rgba(10, 14, 23, 0.9);

  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.24);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --accent-emerald: #10b981;
  --accent-emerald-hover: #059669;
  --accent-emerald-soft: rgba(16, 185, 129, 0.14);

  --accent-live: #ef4444;
  --accent-live-soft: rgba(239, 68, 68, 0.15);

  --accent-upcoming: #38bdf8;
  --accent-upcoming-soft: rgba(56, 189, 248, 0.13);

  --accent-gold: #f59e0b;
  --accent-gold-soft: rgba(245, 158, 11, 0.15);

  --accent-purple: #a855f7;
  --accent-purple-soft: rgba(168, 85, 247, 0.15);

  --accent-finished: #64748b;
  --accent-finished-soft: rgba(100, 116, 139, 0.18);

  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.25);
  --shadow-modal: 0 24px 64px rgba(0, 0, 0, 0.6);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  --font-sans: "Noto Sans Thai", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --transition: 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-theme="light"] {
  color-scheme: light;
  --bg-page: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f8fafc;
  --bg-hover: #f1f5f9;
  --bg-input: #f8fafc;
  --bg-header: rgba(255, 255, 255, 0.92);

  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.16);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --accent-emerald: #059669;
  --accent-emerald-hover: #047857;
  --accent-emerald-soft: rgba(5, 150, 105, 0.12);

  --accent-live: #dc2626;
  --accent-live-soft: rgba(220, 38, 38, 0.12);

  --accent-upcoming: #0284c7;
  --accent-upcoming-soft: rgba(2, 132, 199, 0.12);

  --accent-gold: #d97706;
  --accent-gold-soft: rgba(217, 119, 6, 0.14);

  --accent-purple: #7e22ce;
  --accent-purple-soft: rgba(126, 34, 206, 0.12);

  --accent-finished: #475569;
  --accent-finished-soft: rgba(71, 85, 105, 0.12);

  --shadow-card: 0 2px 12px rgba(15, 23, 42, 0.06);
  --shadow-modal: 0 24px 64px rgba(15, 23, 42, 0.22);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  color: inherit;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ==========================================================================
   Toast Notifications (Goal Sound & Action Feedback)
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 76px;
  right: 18px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
  pointer-events: none;
}

.goal-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #065f46, #047857);
  color: #fff;
  border: 1px solid rgba(16, 185, 129, 0.6);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  animation: toast-in 240ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.goal-toast-icon {
  font-size: 1.45rem;
  flex-shrink: 0;
}

.goal-toast-body strong {
  display: block;
  font-size: 0.88rem;
}

.goal-toast-body span {
  font-size: 0.78rem;
  opacity: 0.92;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(24px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* ==========================================================================
   Topbar & Main Navigation
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--bg-header);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 62px;
  padding-top: 6px;
  padding-bottom: 6px;
  flex-wrap: nowrap;
}

@media (max-width: 1080px) {
  .topbar-inner {
    flex-wrap: wrap;
  }
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-family: "Plus Jakarta Sans", var(--font-sans);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 5px;
}

.brand-title .accent {
  color: var(--accent-emerald);
}

.cf-badge {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.brand-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
}

.live-indicator.is-live {
  background: var(--accent-live-soft);
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--accent-live);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.live-indicator.is-live .pulse-dot {
  background: var(--accent-live);
  animation: pulse-ring 1.6s infinite;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.65);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* Main Navigation Pills */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 3px;
}

.nav-pill {
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-pill:hover {
  color: var(--text-primary);
}

.nav-pill.active {
  background: var(--accent-emerald);
  color: #fff;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.sound-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 2px 8px 2px 3px;
}

.sound-btn {
  width: 28px !important;
  height: 28px !important;
  border: none !important;
  background: transparent !important;
}

.sound-btn.active {
  color: var(--accent-gold);
}

.btn-test-goal {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 4px;
  white-space: nowrap;
}

.btn-test-goal:hover {
  color: var(--accent-emerald);
}

.refresh-control {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px 2px 3px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
}

.refresh-text {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 30px;
  text-align: center;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.refresh-control .icon-btn {
  border: none;
  background: transparent;
  width: 28px;
  height: 28px;
}

.icon-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-hover);
}

.refresh-control .icon-btn.spinning .refresh-icon {
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

[data-theme="dark"] .icon-moon {
  display: none;
}
[data-theme="light"] .icon-sun {
  display: none;
}

.btn-sth-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent-emerald);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-sth-link:hover {
  background: var(--accent-emerald-hover);
}

.btn-member-auth {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-member-auth:hover {
  border-color: var(--accent-emerald);
  background: var(--bg-hover);
}

.btn-member-auth.is-member {
  border-color: rgba(16, 185, 129, 0.45);
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
}

.pdpa-shield-box {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), var(--bg-surface-elevated));
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.pdpa-shield-box strong {
  color: var(--accent-emerald);
  display: block;
  margin-bottom: 2px;
}

.avatar-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.avatar-choice-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  font-size: 1.15rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.avatar-choice-btn.active {
  border-color: var(--accent-emerald);
  background: var(--accent-emerald-soft);
  transform: scale(1.06);
}

.recovery-code-box {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px dashed var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.recovery-code-val {
  font-family: "Plus Jakarta Sans", monospace;
  font-weight: 800;
  font-size: 0.96rem;
  color: var(--accent-gold);
  letter-spacing: 0.04em;
}

.pdpa-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.77rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.45;
  margin: 10px 0 14px;
}

.pdpa-consent-label input {
  margin-top: 3px;
  accent-color: var(--accent-emerald);
}

/* ==========================================================================
   My Club Pinned Banner (Daily Habit Loop)
   ========================================================================== */
.main-content {
  flex: 1;
  padding-top: 16px;
  padding-bottom: 48px;
}

.my-club-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.12), var(--bg-surface) 55%);
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.my-club-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.my-club-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-emerald);
  white-space: nowrap;
}

.fav-club-select {
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface-elevated);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.my-club-center {
  flex: 1;
  font-size: 0.84rem;
  color: var(--text-secondary);
  min-width: 220px;
}

.my-club-center strong {
  color: var(--text-primary);
}

.my-club-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   Multi-Match Second Screen Pinned Dock
   ========================================================================== */
.pinned-dock {
  background: var(--bg-surface);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}

.pinned-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.pinned-dock-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.btn-text-xs {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.74rem;
  cursor: pointer;
}

.btn-text-xs:hover {
  color: var(--accent-live);
}

.pinned-dock-list {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.pin-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.pin-chip:hover {
  border-color: var(--accent-emerald);
}

.pin-chip-score {
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Date Bar & Controls Panel
   ========================================================================== */
.date-bar-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.date-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}

.date-strip::-webkit-scrollbar {
  display: none;
}

.date-pill {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  cursor: pointer;
  transition: var(--transition);
}

.date-pill:hover {
  border-color: var(--border-strong);
  background: var(--bg-hover);
}

.date-pill.active {
  background: var(--accent-emerald-soft);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

.date-pill-day {
  font-size: 0.8rem;
  font-weight: 700;
}

.date-pill-num {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.date-pill.active .date-pill-num {
  color: var(--accent-emerald);
}

.date-input {
  height: 52px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.controls-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
}

.filter-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.filter-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.filter-tab.active {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: #fff;
}

.filter-tab.tab-live.active {
  background: var(--accent-live);
  border-color: var(--accent-live);
}

.filter-tab.tab-fav.active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
}

.dot-live-sm {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-live);
}

.filter-tab.tab-live.active .dot-live-sm {
  background: #fff;
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.16);
  color: var(--text-secondary);
}

.filter-tab.active .tab-badge {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1 1 250px;
}

.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 40px;
  padding: 0 34px 0 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
}

.search-input:focus {
  border-color: var(--accent-emerald);
}

.clear-search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: var(--bg-hover);
  color: var(--text-secondary);
  cursor: pointer;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.select-wrap {
  min-width: 190px;
}

.league-select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.84rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.view-toggle {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.view-btn {
  padding: 6px 11px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.view-btn.active {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

/* ==========================================================================
   Meta Bar, League Groups & Enhanced Match Cards (with 1-Click Poll)
   ========================================================================== */
.feed-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.82rem;
}

.feed-meta-left,
.feed-meta-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-date-title {
  font-weight: 700;
}

.meta-muted {
  color: var(--text-muted);
}

.tz-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.match-list-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* ==========================================================================
   Live Score + Live Fan Chat Two-Column Workspace
   ========================================================================== */
.livescore-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 18px;
  align-items: start;
}

.livescore-workspace.chat-collapsed {
  grid-template-columns: minmax(0, 1fr);
}

.livescore-workspace.chat-collapsed .live-chat-panel {
  display: none;
}

.live-chat-panel {
  position: sticky;
  top: 76px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  height: 640px;
  max-height: calc(100vh - 96px);
  overflow: hidden;
}

.chat-header {
  padding: 12px 14px;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-title-group {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.9rem;
}

.chat-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-emerald 1.8s infinite;
}

@keyframes pulse-emerald {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.65);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.chat-online-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
}

.chat-room-select {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}

.chat-room-select:focus {
  border-color: var(--accent-emerald);
}

.chat-match-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--accent-emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.76rem;
}

.chat-messages-box {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg-item {
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  line-height: 1.45;
  transition: var(--transition);
}

.chat-msg-item.is-mine {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), var(--bg-surface-elevated));
}

.chat-msg-item.is-cheer {
  border-color: rgba(245, 158, 11, 0.38);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), var(--bg-surface-elevated));
}

.chat-msg-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.chat-author-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex-wrap: wrap;
}

.chat-author-name {
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--text-primary);
}

.chat-club-tag {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--accent-emerald);
  white-space: nowrap;
}

.chat-time {
  font-size: 0.66rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.chat-msg-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.chat-msg-text {
  color: var(--text-secondary);
  word-break: break-word;
}

.chat-msg-item.is-cheer .chat-msg-text {
  color: var(--text-primary);
  font-weight: 700;
}

.btn-chat-like {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-chat-like:hover,
.btn-chat-like.liked {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: var(--accent-gold-soft);
}

.chat-quick-cheers {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 7px 10px;
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-subtle);
}

.chat-quick-cheers::-webkit-scrollbar {
  display: none;
}

.cheer-pill {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.cheer-pill:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: var(--accent-gold-soft);
}

.chat-form {
  padding: 10px 12px;
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.chat-user-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
}

.chat-user-label {
  color: var(--text-muted);
  white-space: nowrap;
}

.chat-nickname-input {
  flex: 1;
  height: 26px;
  padding: 0 8px;
  border-radius: 5px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.74rem;
  font-weight: 700;
  min-width: 0;
}

.chat-club-flair-preview {
  font-size: 0.68rem;
  color: var(--accent-emerald);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.chat-input-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.chat-message-input {
  flex: 1;
  height: 36px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.82rem;
  outline: none;
}

.chat-message-input:focus {
  border-color: var(--accent-emerald);
}

.btn-chat-send {
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent-emerald);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}

.btn-chat-send:hover {
  background: var(--accent-emerald-hover);
}

.btn-floating-chat {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 75;
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(16, 185, 129, 0.5);
  background: var(--accent-emerald);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

.btn-chat-match-chip {
  border: none;
  background: transparent;
  color: var(--accent-upcoming);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 7px;
  border-radius: 6px;
}

.btn-chat-match-chip:hover {
  background: var(--accent-upcoming-soft);
}

@media (max-width: 1060px) {
  .livescore-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .live-chat-panel {
    position: static;
    height: 500px;
  }
}

.league-group {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.league-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-surface-elevated);
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  text-align: left;
}

.league-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.league-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px;
}

.league-logo-fallback {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
}

.league-title-wrap {
  display: flex;
  flex-direction: column;
}

.league-name {
  font-size: 0.92rem;
  font-weight: 700;
}

.league-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.league-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.league-count-pill {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 2px 9px;
  border-radius: var(--radius-pill);
}

.league-group.collapsed .league-matches {
  display: none;
}

.match-card-wrap {
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition);
}

.match-card-wrap:last-child {
  border-bottom: none;
}

.match-card-wrap:hover {
  background: var(--bg-hover);
}

.match-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px 8px;
}

.match-card-wrap.score-flash {
  animation: score-glow 2.4s ease-out;
}

@keyframes score-glow {
  0% {
    background: rgba(16, 185, 129, 0.3);
  }
  100% {
    background: transparent;
  }
}

.match-meta-col {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fav-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.fav-btn:hover,
.fav-btn.active {
  color: var(--accent-gold);
}

.status-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.kickoff-time {
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge.live {
  background: var(--accent-live-soft);
  color: var(--accent-live);
}

.status-badge.scheduled {
  background: var(--accent-upcoming-soft);
  color: var(--accent-upcoming);
}

.status-badge.finished {
  background: var(--accent-finished-soft);
  color: var(--text-muted);
}

.match-teams-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.team-side {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.team-side.home {
  justify-content: flex-end;
  text-align: right;
}

.team-side.away {
  justify-content: flex-start;
  text-align: left;
}

.team-name-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.team-name {
  font-size: 0.94rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-side.winner .team-name {
  font-weight: 800;
  color: var(--accent-emerald);
}

.team-name-en {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
}

.team-logo-fallback {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
}

.score-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 4px 10px;
  border-radius: 10px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  font-variant-numeric: tabular-nums;
}

.score-pill.live {
  background: var(--accent-live-soft);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--accent-live);
}

.score-main {
  font-size: 1.02rem;
  font-weight: 800;
}

.score-phase {
  font-size: 0.66rem;
  font-weight: 700;
  opacity: 0.85;
}

.match-actions-col {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 33px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-action:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: var(--bg-hover);
}

.btn-action.btn-cta-watch {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: #fff;
}

.btn-action.btn-cta-watch:hover {
  background: var(--accent-emerald-hover);
}

.btn-action.btn-channels {
  border-color: rgba(16, 185, 129, 0.32);
  color: var(--accent-emerald);
  background: var(--accent-emerald-soft);
}

.btn-action.btn-article-link {
  border-color: rgba(168, 85, 247, 0.35);
  color: var(--accent-purple);
  background: var(--accent-purple-soft);
}

.channel-count-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--accent-emerald);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
}

/* Inline 1-Click Poll & Engagement Sub-Row inside Match Card */
.match-sub-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 16px 11px 54px;
  flex-wrap: wrap;
}

.inline-poll-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.poll-label-xs {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.poll-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.poll-chip-btn:hover {
  border-color: var(--accent-emerald);
  color: var(--text-primary);
}

.poll-chip-btn.voted {
  background: var(--accent-emerald-soft);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  font-weight: 800;
}

.poll-pct {
  font-variant-numeric: tabular-nums;
  opacity: 0.9;
}

.match-sub-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-predict-quick {
  border: none;
  background: transparent;
  color: var(--accent-gold);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}

.btn-predict-quick:hover {
  background: var(--accent-gold-soft);
}

/* ==========================================================================
   Standings & What-If Calculator View
   ========================================================================== */
.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.section-h1 {
  margin: 0 0 4px;
  font-size: 1.3rem;
  font-weight: 800;
}

.section-h2 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 800;
}

.section-sub {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.league-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.whatif-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), var(--bg-surface) 60%);
  border: 1px solid rgba(16, 185, 129, 0.32);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}

.whatif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.whatif-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--accent-emerald);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  margin-right: 8px;
}

.whatif-controls {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.whatif-team-box {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.whatif-team-box label {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
}

.whatif-score-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.whatif-score-input {
  width: 58px;
  height: 40px;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  font-size: 1.05rem;
  font-weight: 800;
}

.whatif-vs {
  font-weight: 800;
  color: var(--text-muted);
}

.table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-card);
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.standings-table th,
.standings-table td {
  padding: 12px 14px;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
  font-variant-numeric: tabular-nums;
}

.standings-table th {
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.standings-table th:nth-child(2),
.standings-table td:nth-child(2) {
  text-align: left;
}

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

.standings-table tr.sim-changed {
  background: rgba(16, 185, 129, 0.11);
}

.st-team-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.rank-delta {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.rank-delta.up {
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
}

.rank-delta.down {
  background: var(--accent-live-soft);
  color: var(--accent-live);
}

.form-pills {
  display: inline-flex;
  gap: 4px;
}

.form-dot {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.form-dot.W {
  background: #10b981;
}
.form-dot.D {
  background: #64748b;
}
.form-dot.L {
  background: #ef4444;
}

/* ==========================================================================
   Score Predictor Mini-Game & Weekly Leaderboard View
   ========================================================================== */
.predictor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  gap: 18px;
  align-items: start;
}

.profile-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.profile-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-emerald-soft);
  border: 1px solid var(--accent-emerald);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.profile-info {
  flex: 1;
}

.profile-name-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.profile-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.p-stat {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}

.p-stat-val {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-emerald);
}

.p-stat-lbl {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.sub-heading {
  margin: 0 0 10px;
  font-size: 0.98rem;
}

.predictor-matches-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pred-match-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pred-match-info {
  flex: 1 1 220px;
}

.pred-match-league {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.pred-match-title {
  font-weight: 700;
  font-size: 0.94rem;
  margin: 2px 0;
}

.pred-inputs-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pred-num-input {
  width: 52px;
  height: 38px;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  font-size: 1rem;
  font-weight: 800;
}

.sidebar-card-header {
  padding: 14px 16px;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-card-header h3 {
  margin: 0;
  font-size: 0.94rem;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
}

.lb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.85rem;
}

.lb-row:last-child {
  border-bottom: none;
}

.lb-row.is-me {
  background: var(--accent-emerald-soft);
}

.lb-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lb-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

.lb-rank.top-1 {
  background: #f59e0b;
  color: #fff;
}
.lb-rank.top-2 {
  background: #94a3b8;
  color: #fff;
}
.lb-rank.top-3 {
  background: #b45309;
  color: #fff;
}

.lb-name {
  font-weight: 700;
}

.lb-club {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.lb-pts {
  font-weight: 800;
  color: var(--accent-emerald);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Articles, Daily AI Newsroom Team & 16:9 Gen AI Cover Illustrations
   ========================================================================== */
.newsroom-team-panel {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.11), var(--bg-surface) 60%);
  border: 1px solid rgba(16, 185, 129, 0.32);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}

.newsroom-team-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.editorial-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.editor-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.editor-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.editor-name {
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.25;
}

.editor-role {
  font-size: 0.72rem;
  color: var(--accent-emerald);
  font-weight: 600;
}

.editor-bio {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.45;
}

.editor-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  padding-top: 6px;
  border-top: 1px dashed var(--border-subtle);
  margin-top: auto;
}

.home-articles-strip {
  margin-top: 28px;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 18px;
}

.article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.article-card:hover {
  border-color: var(--accent-emerald);
  transform: translateY(-3px);
}

.article-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-surface-elevated);
  overflow: hidden;
  cursor: pointer;
}

.article-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 320ms ease;
}

.article-card:hover .article-cover-img {
  transform: scale(1.04);
}

.article-cover-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}

.breaking-badge {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent-live);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.ai-gen-badge {
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(10, 14, 23, 0.82);
  backdrop-filter: blur(6px);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-size: 0.68rem;
  font-weight: 700;
}

.article-card-body {
  padding: 15px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.article-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.74rem;
}

.article-cat-badge {
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  font-weight: 700;
}

.article-league-badge {
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-weight: 600;
}

.article-card-title {
  margin: 2px 0;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.38;
  cursor: pointer;
}

.article-card-title:hover {
  color: var(--accent-emerald);
}

.article-card-excerpt {
  margin: 0;
  font-size: 0.83rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-author-line {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 4px;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.76rem;
}

.article-hero-cover-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  margin-bottom: 14px;
  background: var(--bg-surface-elevated);
}

.article-hero-cover {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  display: block;
}

.ai-prompt-caption {
  padding: 8px 12px;
  font-size: 0.74rem;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-subtle);
}

/* Standalone & Modal Article Reader Typography */
.standalone-article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.standalone-article-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 12px 0;
}

.standalone-article-excerpt {
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 12px 14px;
  border-left: 3px solid var(--accent-emerald);
  background: var(--bg-surface-elevated);
  border-radius: 0 8px 8px 0;
  margin-bottom: 18px;
}

.standalone-article-body {
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--text-primary);
}

.standalone-article-body h2 {
  font-size: 1.12rem;
  color: var(--accent-emerald);
  margin: 22px 0 8px;
}

.standalone-article-body p,
.standalone-article-body ul {
  margin: 0 0 14px;
}

.standalone-article-body a {
  color: var(--accent-emerald);
  text-decoration: underline;
  font-weight: 700;
}

.article-faq-box {
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
}

.article-faq-box h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.article-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.tag-chip {
  font-size: 0.74rem;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
}

/* ==========================================================================
   AEO Answer Box & Schema Inspector Section
   ========================================================================== */
.aeo-section {
  margin-top: 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.aeo-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.aeo-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--accent-upcoming-soft);
  color: var(--accent-upcoming);
}

.aeo-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.aeo-faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aeo-faq-item {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.aeo-faq-q {
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text-primary);
}

.aeo-faq-a {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.schema-inspector {
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  color: var(--accent-emerald);
  font-size: 0.76rem;
  max-height: 320px;
  overflow: auto;
}

/* ==========================================================================
   Modals, Empty States & Skeletons
   ========================================================================== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.btn-reset-filters {
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent-emerald);
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.skeleton-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.skeleton-header {
  height: 48px;
  background: var(--bg-surface-elevated);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.skeleton-row {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.shimmer {
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--bg-surface-elevated) 25%,
    var(--bg-hover) 50%,
    var(--bg-surface-elevated) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 6, 23, 0.74);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
}

.modal-card-wide {
  max-width: 780px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 2;
}

.modal-league-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 1.35rem;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
}

.modal-scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 18px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.modal-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.modal-team-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.modal-team-fallback {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.modal-score-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.modal-score-big {
  font-size: 1.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.modal-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.modal-meta-item {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.modal-meta-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.modal-meta-val {
  font-size: 0.85rem;
  font-weight: 600;
}

.modal-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 14px 0 10px;
}

.channel-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.channel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
}

.channel-item:hover {
  border-color: var(--accent-emerald);
}

.channel-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.channel-logo {
  width: 38px;
  height: 28px;
  border-radius: 5px;
  object-fit: cover;
}

.channel-badge {
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  font-size: 0.7rem;
  font-weight: 800;
}

.channel-empty {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
  font-size: 0.84rem;
  text-align: center;
  margin-bottom: 16px;
}

.modal-cta-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.modal-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 700;
}

.modal-cta-btn.primary {
  background: var(--accent-emerald);
  color: #fff;
}

.modal-cta-btn.secondary {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
}

.modal-disclaimer {
  margin: 14px 0 0;
  font-size: 0.74rem;
  color: var(--text-muted);
  text-align: center;
}

.form-field {
  margin-bottom: 12px;
}

.form-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-secondary);
}

.form-textarea {
  width: 100%;
  min-height: 150px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.88rem;
}

.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 24px 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-title {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 0.9rem;
}

.footer-desc {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 700px;
}

.footer-desc a {
  color: var(--accent-emerald);
  font-weight: 600;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8rem;
  font-weight: 600;
}

@media (max-width: 900px) {
  .predictor-grid {
    grid-template-columns: 1fr;
  }

  .match-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .match-sub-bar {
    padding-left: 16px;
  }

  .match-actions-col {
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .filter-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .main-nav {
    width: 100%;
    overflow-x: auto;
    justify-content: space-between;
  }

  .modal-meta-grid,
  .modal-cta-row {
    grid-template-columns: 1fr;
  }
}
