:root {
  color-scheme: dark;
  --arena-bg: #0b1120;
  --arena-panel: #111827;
  --arena-panel-soft: #0f172a;
  --arena-line: #233044;
  --arena-muted: #94a3b8;
  --arena-ink: #e5edf7;
  --arena-green: #22c55e;
  --arena-red: #ef4444;
  --arena-cyan: #22d3ee;
  --arena-amber: #f59e0b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  background:
    radial-gradient(circle at 50% -18%, rgba(34, 197, 94, 0.14), transparent 30rem),
    linear-gradient(180deg, #0b1120 0%, #0b1120 45%, #070b14 100%);
}

a,
button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button,
select,
input,
textarea {
  font: inherit;
}

.portal-header {
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.22);
}

.portal-nav-link,
.portal-mobile-link {
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: #cbd5e1;
  font-size: 0.875rem;
  font-weight: 800;
}

.portal-nav-link:hover,
.portal-mobile-link:hover {
  background: #1e293b;
  color: #fff;
}

.portal-card,
.portal-doc-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 0.75rem;
  background: rgba(17, 24, 39, 0.96);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.portal-doc-card {
  padding: 1.25rem;
}

.league-jump {
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: #111827;
  padding: 0.45rem 0.75rem;
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.league-jump.active,
.league-jump:hover {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
}

.portal-date-button {
  min-height: 2.5rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 0.6rem;
  background: #111827;
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 950;
  white-space: nowrap;
}

.date-active,
.portal-date-button:hover {
  border-color: rgba(34, 197, 94, 0.55) !important;
  background: rgba(34, 197, 94, 0.16) !important;
  color: #dcfce7 !important;
}

.filter-button {
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: #0f172a;
  padding: 0.45rem 0.75rem;
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 900;
}

.filter-button.filter-active,
.filter-button:hover {
  border-color: #22c55e;
  background: #22c55e;
  color: #052e16;
}

.ticker-track {
  display: inline-block;
  min-width: 200%;
  animation: unitify-ticker 26s linear infinite;
}

@keyframes unitify-ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.live-dot,
.status-live::before {
  content: "";
  display: inline-block;
  width: 0.48rem;
  height: 0.48rem;
  margin-right: 0.35rem;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.75);
  animation: live-pulse 1.45s infinite;
}

.status-live {
  display: inline-flex;
  align-items: center;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.75); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.competition-block {
  background: #111827;
}

.competition-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: #0f172a;
  padding: 0.65rem 0.75rem;
}

.league-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(34, 197, 94, 0.38);
  border-radius: 0.45rem;
  background: rgba(34, 197, 94, 0.1);
  padding: 0.32rem 0.55rem;
  color: #bbf7d0;
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.league-header-badge::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: #22c55e;
}

.match-row {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr) 4.75rem minmax(0, 1fr) minmax(7rem, 11rem);
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.match-row:last-child {
  border-bottom: 0;
}

.match-row:hover {
  background: rgba(15, 23, 42, 0.72);
}

.match-time {
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.match-time.live {
  color: #86efac;
}

.team-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.55rem;
}

.team-name {
  min-width: 0;
  overflow: hidden;
  color: #f8fafc;
  font-size: 0.875rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-crest {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: radial-gradient(circle, #fff, #dbeafe);
  padding: 0.18rem;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.team-crest img {
  max-width: 88%;
  max-height: 88%;
  object-fit: contain;
}

.score-pill {
  display: inline-flex;
  min-width: 4.25rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 0.55rem;
  background: #020617;
  padding: 0.38rem 0.45rem;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.broadcast-cell {
  min-width: 0;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 800;
}

.details-button {
  margin-top: 0.22rem;
  color: #67e8f9;
  font-size: 0.72rem;
  font-weight: 950;
}

.portal-input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.6rem;
  background: #0f172a;
  padding: 0.7rem 0.75rem;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 800;
  outline: none;
}

.portal-input:focus {
  border-color: rgba(34, 197, 94, 0.7);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.h2h-bar,
.metric-bar {
  height: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: #1e293b;
}

.h2h-bar-fill,
.metric-bar-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 520ms ease;
}

.form-badge {
  display: inline-flex;
  width: 1.35rem;
  height: 1.35rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 950;
}

.form-w { background: #22c55e; color: #052e16; }
.form-d { background: #64748b; color: #fff; }
.form-l { background: #f43f5e; color: #fff; }

.countdown-digit-card {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 0.6rem;
  background: #0f172a;
  padding: 0.6rem 0.35rem;
  text-align: center;
}

.countdown-value {
  font-variant-numeric: tabular-nums;
}

.faq-button {
  width: 100%;
  border-radius: 0.75rem;
}

.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  display: grid;
  gap: 0.75rem;
  width: min(24rem, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 0.8rem;
  background: rgba(15, 23, 42, 0.97);
  padding: 0.85rem 1rem;
  color: #e5edf7;
  font-weight: 900;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
  pointer-events: auto;
  animation: toast-in 220ms ease both;
}

.toast-icon {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: #22c55e;
}

.toast.is-leaving {
  animation: toast-out 180ms ease forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(10px) scale(0.98); }
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

@media (max-width: 760px) {
  .match-row {
    grid-template-columns: 3.5rem minmax(0, 1fr) 3.75rem minmax(0, 1fr);
    gap: 0.45rem;
    padding: 0.7rem 0.55rem;
  }

  .broadcast-cell {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    border-top: 1px dashed rgba(148, 163, 184, 0.12);
    padding-top: 0.45rem;
  }

  .team-crest {
    width: 1.75rem;
    height: 1.75rem;
  }

  .team-name {
    font-size: 0.78rem;
  }

  .score-pill {
    min-width: 3.5rem;
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
