@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;900&family=DM+Sans:wght@400;500&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --wc-bg-deepest: #0D0F14;
  --wc-bg-surface: #141720;
  --wc-bg-elevated: #1C2030;
  --wc-border: #2A2F42;
  --wc-text: #E8EAF0;
  --wc-muted: #7A8099;
  --wc-green: #00D084;
  --wc-blue: #4E9CFF;
  --wc-gold: #FFD700;
  --wc-red: #FF4757;
  --wc-shell-header-height: 58px;
  --wc-shell-navbar-width: 220px;
  --wc-loader-delay: 0.2s;
  --wc-loader-size-page: clamp(72px, 8vw, 88px);
  --wc-loader-size-inline: 48px;
  --wc-loader-overlay: rgba(13, 15, 20, 0.82);
  --wc-loader-ball: url("/assets/football.svg");
}

html,
body,
#react-entry-point,
#_dash-app-content {
  min-height: 100%;
  background: var(--wc-bg-deepest) !important;
}

body {
  margin: 0;
  color: var(--wc-text);
  font-family: "DM Sans", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(78, 156, 255, 0.08), transparent 28%),
    radial-gradient(circle at top left, rgba(0, 208, 132, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    var(--wc-bg-deepest) !important;
}

._dash-loading,
._dash-loading-callback,
.dash-spinner-container {
  position: fixed !important;
  top: var(--wc-shell-header-height) !important;
  right: 0 !important;
  bottom: 0 !important;
  left: var(--wc-shell-navbar-width) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--wc-loader-overlay) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2200 !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  opacity: 0;
  animation: wc-loader-fade-in 120ms ease var(--wc-loader-delay) forwards;
}

._dash-loading::before,
._dash-loading-callback::before,
.dash-spinner-container::before {
  content: "";
  width: var(--wc-loader-size-page);
  height: var(--wc-loader-size-page);
  background: center / contain no-repeat var(--wc-loader-ball);
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.38));
  transform-origin: center bottom;
  opacity: 0;
  animation:
    wc-loader-fade-in 120ms ease var(--wc-loader-delay) forwards,
    wc-football-bounce 1.15s ease-in-out var(--wc-loader-delay) infinite;
}

.dash-spinner::before {
  content: "";
  width: var(--wc-loader-size-inline);
  height: var(--wc-loader-size-inline);
  background: center / contain no-repeat var(--wc-loader-ball);
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.38));
  transform-origin: center bottom;
  opacity: 0;
  animation:
    wc-loader-fade-in 120ms ease var(--wc-loader-delay) forwards,
    wc-football-bounce 1.15s ease-in-out var(--wc-loader-delay) infinite;
}

.dash-spinner-container > * {
  display: none !important;
}

.dash-spinner {
  width: var(--wc-loader-size-inline) !important;
  height: var(--wc-loader-size-inline) !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: transparent !important;
  font-size: 0 !important;
}

.dash-spinner > * {
  display: none !important;
}

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

.mantine-AppShell-root,
.mantine-AppShell-main {
  background: transparent !important;
}

.mantine-Paper-root {
  background-color: var(--wc-bg-surface) !important;
  border-color: var(--wc-border) !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.mantine-NavLink-root[data-active] {
  border-left: 2px solid var(--wc-green) !important;
  background: rgba(0, 208, 132, 0.08) !important;
}

.mantine-NavLink-label {
  font-weight: 500;
}

.mantine-Table-root tbody tr:nth-child(odd) {
  background: var(--wc-bg-elevated) !important;
}

.mantine-Table-root tbody tr:hover {
  background: rgba(42, 47, 66, 0.85) !important;
}

.tournament-hub-standings-table tbody tr,
.tournament-hub-standings-table tbody tr:nth-child(odd) {
  background: var(--wc-bg-surface) !important;
}

.tournament-hub-standings-table tbody tr:hover {
  background: rgba(42, 47, 66, 0.85) !important;
}

.app-header {
  border-bottom: 1px solid var(--wc-border);
  background: rgba(20, 23, 32, 0.96);
  backdrop-filter: blur(12px);
}

.app-header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}

.app-header-ticker {
  flex: 1 1 auto;
  min-width: 0;
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-icon-badge {
  border: 1px solid rgba(245, 247, 250, 0.12);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.12), transparent 55%),
    linear-gradient(145deg, rgba(36, 41, 46, 0.98), rgba(15, 18, 24, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 20px rgba(0, 0, 0, 0.24);
}

.header-icon-badge-plain {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.header-profile-frame {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.header-profile-image {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  border: 0;
  display: block;
}

.app-navbar {
  background: rgba(11, 13, 20, 0.98);
  border-right: 1px solid var(--wc-border);
}

.page-shell-wrapper {
  min-height: calc(100vh - 58px);
  padding: 16px;
}

.page-shell {
  min-height: calc(100vh - 90px);
}

.notification-region {
  position: fixed;
  top: 74px;
  right: 18px;
  z-index: 2000;
  width: min(360px, calc(100vw - 36px));
}

.brand-badge {
  width: 20px;
  height: 20px;
  border: 2px solid var(--wc-green);
}

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

.brand-title,
.display-number,
.page-title,
.section-title,
.formation-label,
.score-pill-value {
  font-family: "Barlow Condensed", sans-serif;
}

.brand-title {
  font-size: 2rem;
  line-height: 1;
  color: var(--wc-green);
  letter-spacing: 0.05em;
}

.brand-subtitle,
.section-label,
.muted-text,
.meta-text {
  color: var(--wc-muted);
}

.brand-subtitle,
.section-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.page-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 0.95;
}

.section-title {
  font-size: 2rem;
  letter-spacing: 0.04em;
}

.display-number {
  font-size: 3.25rem;
  line-height: 0.9;
}

.score-pill-value {
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: 0.02em;
}

.mono-text,
.live-data,
.ticker-time,
.score-mono {
  font-family: "JetBrains Mono", monospace;
}

.shell-section-label {
  padding: 0 18px;
  font-size: 0.72rem;
  color: var(--wc-muted);
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.nav-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--wc-green);
  box-shadow: 0 0 0 rgba(0, 208, 132, 0.8);
  animation: wc-pulse 1.5s infinite;
}

.ticker-shell {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-scroll {
  width: 100%;
}

.ticker-track {
  flex-wrap: nowrap !important;
}

.ticker-segment {
  min-width: max-content;
  padding: 8px 2px;
}

.ticker-divider {
  color: rgba(122, 128, 153, 0.35);
}

.local-time {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  white-space: nowrap;
}

.local-time-zone {
  color: var(--wc-muted);
  font-size: 0.92em;
}

.elo-wheel-meta {
  width: 100%;
  align-items: flex-end;
}

.elo-wheel-meta-badges {
  width: 100%;
  justify-content: flex-end;
}

.elo-ratings-meta-stack {
  width: min(100%, 560px);
  align-items: flex-end;
}

.elo-ratings-meta-summary {
  width: 100%;
  justify-content: flex-end;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  scrollbar-width: none;
}

.elo-ratings-meta-summary::-webkit-scrollbar {
  display: none;
}

.elo-ratings-meta-summary > * {
  flex-shrink: 0;
}

.elo-ratings-date-filter {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(42, 47, 66, 0.72);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    rgba(13, 15, 20, 0.42);
}

.elo-ratings-date-controls {
  width: 100%;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap !important;
}

.elo-ratings-date-controls > * {
  flex-shrink: 0;
}

.elo-inline-date-label {
  color: var(--wc-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.elo-date-input {
  flex: 0 0 152px;
  width: 152px;
  min-width: 0;
}

.elo-date-input .mantine-Input-input {
  background: rgba(28, 32, 48, 0.88) !important;
  border: 1px solid rgba(42, 47, 66, 0.85) !important;
  color: var(--wc-text) !important;
}

.elo-date-input .mantine-Input-input::placeholder {
  color: var(--wc-muted);
}

.elo-date-input .mantine-Input-input:focus,
.elo-date-input .mantine-Input-input:focus-visible {
  border-color: rgba(0, 208, 132, 0.7) !important;
}

.elo-date-input .mantine-Input-section {
  color: var(--wc-muted);
}

.elo-wheel-ring-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  width: 100%;
  flex-wrap: wrap;
}

.elo-wheel-ring-legend-visual {
  position: relative;
  width: 84px;
  height: 84px;
  flex-shrink: 0;
}

.elo-wheel-ring {
  position: absolute;
  border-radius: 999px;
  border: 2px solid rgba(122, 128, 153, 0.42);
  background: rgba(20, 23, 32, 0.16);
}

.elo-wheel-ring-outer {
  inset: 0;
}

.elo-wheel-ring-middle {
  inset: 14px;
}

.elo-wheel-ring-inner {
  inset: 28px;
}

.elo-wheel-ring-legend-marker {
  border-radius: 999px;
  border: 2px solid rgba(122, 128, 153, 0.52);
  background: rgba(20, 23, 32, 0.22);
  flex-shrink: 0;
}

.elo-wheel-ring-legend-marker-outer {
  width: 18px;
  height: 18px;
}

.elo-wheel-ring-legend-marker-middle {
  width: 14px;
  height: 14px;
}

.elo-wheel-ring-legend-marker-inner {
  width: 10px;
  height: 10px;
}

.prediction-match-card {
  width: 100%;
  min-width: 0;
  max-width: none;
  background: #141720 !important;
  border-color: #2A2F42 !important;
}

.prediction-probability-bar {
  width: 100%;
  height: 12px;
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(42, 47, 66, 0.55);
}

.prediction-probability-segment {
  height: 100%;
}

.prediction-probability-segment-home {
  background: #4E9CFF;
}

.prediction-probability-segment-away {
  background: #FF6B2B;
}

.prediction-probability-bar-muted {
  opacity: 0.5;
}

.prediction-probability-segment-muted {
  background: #2A2F42;
}

.prediction-tbd-flag {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #2A2F42;
  flex-shrink: 0;
}

.prediction-live-badge {
  animation: wc-pulse 1.5s infinite;
}

.prediction-live-score {
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(2.5rem, 6vw, 3.6rem);
  line-height: 1;
  letter-spacing: 0.02em;
}

.prediction-complete-banner {
  width: 100%;
}

.match-row {
  background: rgba(28, 32, 48, 0.8);
  border: 1px solid transparent;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.match-row:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 208, 132, 0.25);
  background: rgba(32, 36, 54, 0.95);
}

.status-live {
  background: rgba(0, 208, 132, 0.14);
  color: var(--wc-green);
}

.status-finished {
  background: rgba(122, 128, 153, 0.16);
  color: #C4C8D6;
}

.status-upcoming {
  background: rgba(78, 156, 255, 0.12);
  color: var(--wc-blue);
}

.score-box {
  border: 1px solid rgba(0, 208, 132, 0.35);
  background: rgba(13, 15, 20, 0.86);
  border-radius: 12px;
}

.stats-mini-cell {
  background: rgba(28, 32, 48, 0.8);
  border: 1px solid rgba(42, 47, 66, 0.7);
  border-radius: 12px;
  min-height: 86px;
}

.podium-card {
  position: relative;
  overflow: hidden;
}

.podium-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: currentColor;
}

.player-avatar-fallback {
  background: linear-gradient(160deg, rgba(78, 156, 255, 0.32), rgba(0, 208, 132, 0.18));
}

.pitch-panel {
  border-radius: 18px;
  overflow: hidden;
}

.empty-state {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--wc-muted);
}

.elo-nivo-chart {
  min-height: 1500px;
  display: flex;
  flex-direction: column;
  color: #0D0F14;
  border: 1px solid rgba(42, 47, 66, 0.65);
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0)),
    rgba(13, 15, 20, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.elo-nivo-chart > div {
  height: 1500px !important;
}

.elo-nivo-chart svg {
  overflow: visible;
}

.elo-nivo-chart svg text,
.elo-nivo-chart .tick text {
  fill: var(--wc-muted) !important;
  font-family: "DM Sans", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
}

.elo-nivo-chart strong,
.elo-nivo-chart span,
.elo-nivo-chart td,
.elo-nivo-chart div {
  color: #0D0F14;
}

.elo-nivo-chart .tick line,
.elo-nivo-chart .domain {
  stroke: var(--wc-border) !important;
}

.elo-nivo-chart line {
  stroke: var(--wc-border);
}

.elo-nivo-chart path {
  stroke-linejoin: round;
}

@keyframes wc-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 208, 132, 0.6);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(0, 208, 132, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 208, 132, 0);
  }
}

@keyframes wc-loader-fade-in {
  to {
    opacity: 1;
  }
}

@keyframes wc-football-bounce {
  0%,
  100% {
    transform: translateY(10px) scale(0.96, 1.04);
  }
  18%,
  82% {
    transform: translateY(0) scale(1.01, 0.99);
  }
  50% {
    transform: translateY(-10px) scale(1, 1);
  }
}

@media (prefers-reduced-motion: reduce) {
  ._dash-loading::before,
  ._dash-loading-callback::before,
  .dash-spinner-container::before,
  .dash-spinner::before {
    animation: wc-loader-fade-in 120ms ease var(--wc-loader-delay) forwards;
    transform: none;
  }
}

@media (max-width: 48em) {
  ._dash-loading,
  ._dash-loading-callback,
  .dash-spinner-container {
    left: 0 !important;
  }

  .app-header-inner {
    gap: 8px;
    padding: 0 12px;
  }

  .header-icon-badge {
    width: 34px;
    height: 34px;
  }

  .header-profile-frame {
    width: 30px;
    height: 30px;
  }

  .page-shell-wrapper {
    padding: 12px;
  }

  .notification-region {
    top: 66px;
    right: 12px;
    width: calc(100vw - 24px);
  }

  .chart-explainer-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .chart-explainer-copy,
  .chart-explainer-meta {
    width: 100%;
  }

  .chart-explainer-meta {
    margin-left: 0 !important;
  }

  .elo-ratings-meta-stack {
    width: 100%;
    align-items: stretch;
  }

  .elo-ratings-date-controls {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 8px;
    justify-content: stretch;
    align-items: center;
  }

  .elo-ratings-date-controls > * {
    min-width: 0;
  }

  .elo-date-input {
    width: 100%;
    flex: 1 1 auto;
  }

  .elo-date-input .mantine-Input-input {
    font-size: 0.95rem;
  }
}
