:root {
  --passify-bg: #0d1117;
  --passify-panel: rgba(17, 24, 39, 0.82);
  --passify-panel-strong: #111827;
  --passify-line: rgba(148, 163, 184, 0.16);
  --passify-text: #e5e7eb;
  --passify-muted: #94a3b8;
  --passify-green: #22c55e;
  --passify-lime: #bef264;
  --passify-cyan: #38bdf8;
  --passify-amber: #f59e0b;
  --passify-red: #ef4444;
}

body.passify-arena,
.passify-arena-surface {
  background:
    radial-gradient(circle at 18% 0%, rgba(34, 197, 94, 0.13), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(56, 189, 248, 0.12), transparent 30%),
    linear-gradient(180deg, var(--passify-bg) 0%, #111827 48%, var(--passify-bg) 100%);
  color: var(--passify-text);
}

.passify-glass {
  background: var(--passify-panel);
  border: 1px solid var(--passify-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 20px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.passify-live-dot,
.live-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--passify-green);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.65);
  animation: passify-live-pulse 1.7s infinite;
}

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

.league-header-badge,
.passify-league-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.26);
  background: rgba(56, 189, 248, 0.1);
  color: #cffafe;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.match-row,
.passify-match-row {
  min-height: 72px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  background: rgba(0, 0, 0, 0.2);
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.match-row:hover,
.passify-match-row:hover {
  border-color: rgba(34, 197, 94, 0.38);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.team-crest,
.passify-team-crest {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 20px rgba(0, 0, 0, 0.25);
}

.crest-arsenal { background: #dc2626; }
.crest-real-madrid { background: #f8fafc; color: #020617; }
.crest-barcelona { background: linear-gradient(135deg, #1d4ed8 0%, #7f1d1d 100%); color: #fde68a; }
.crest-man-city { background: #38bdf8; color: #082f49; }
.crest-bayern { background: #b91c1c; }
.crest-liverpool { background: #991b1b; }
.crest-psg { background: #172554; }
.crest-inter-milan { background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%); color: #bae6fd; }
.crest-wydad-ac { background: #b91c1c; }
.crest-raja-ca { background: #15803d; }
.crest-default { background: #334155; }

.form-badge,
.passify-form-badge {
  display: inline-grid;
  width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  border-radius: 0.35rem;
  font-size: 0.75rem;
  font-weight: 900;
}

.form-badge--w,
.passify-form-w {
  background: rgba(34, 197, 94, 0.2);
  color: var(--passify-lime);
}

.form-badge--d,
.passify-form-d {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
}

.form-badge--l,
.passify-form-l {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
}

.accuracy-ring,
.passify-meter-ring {
  --meter-value: 0%;
  position: relative;
  width: 7.5rem;
  aspect-ratio: 1;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, #111827 0 58%, transparent 59%),
    conic-gradient(var(--passify-green) var(--meter-value), rgba(148, 163, 184, 0.18) 0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 35px rgba(0, 0, 0, 0.28);
}

.accuracy-ring::after,
.passify-meter-ring::after {
  content: attr(data-label);
  color: var(--passify-text);
  font-weight: 900;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

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

.toast,
.passify-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(34, 197, 94, 0.26);
  background: rgba(13, 17, 23, 0.94);
  color: var(--passify-text);
  padding: 0.85rem 1rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(0);
  opacity: 1;
  animation: passify-toast-in 180ms ease both;
}

.passify-toast[data-type="success"] { border-color: rgba(34, 197, 94, 0.38); }
.passify-toast[data-type="info"] { border-color: rgba(56, 189, 248, 0.38); }
.passify-toast[data-type="warning"] { border-color: rgba(245, 158, 11, 0.38); }

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

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

@keyframes passify-toast-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(0.7rem) scale(0.98); }
}

.match-filter.is-active,
.league-tab.is-active,
.passify-active {
  background: var(--passify-green);
  color: #052e16;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.18);
}

.passify-hidden {
  display: none !important;
}

.passify-modal-open {
  overflow: hidden;
}

.passify-mobile-nav {
  transition: max-height 220ms ease, opacity 180ms ease;
}

.passify-mobile-nav[hidden] {
  display: block;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

.passify-mobile-nav:not([hidden]) {
  max-height: 30rem;
  opacity: 1;
}

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