/* Versus page (v3.34.0): the arena with both sides face to face, the duel by category and the chart.
   Side 1 is blue, side 2 red, everywhere on the page (chart curves included). */

.vs-arena,
.vs-card {
  --vs-1: #717cf8;
  --vs-1-rgb: 113, 124, 248;
  --vs-2: #f43f5e;
  --vs-2-rgb: 244, 63, 94;
  --vs-gold: var(--ar-gold, #f5c542);
  --vs-panel: var(--ar-panel, #212329);
  --vs-panel-2: var(--ar-panel-2, #292c33);
  --vs-line: var(--ar-line, #2e3138);
  --vs-muted: var(--ar-muted, #a3a6b0);
  --vs-dim: var(--ar-dim, #72767d);
  --vs-display: var(--ar-display, "Segoe UI", system-ui, sans-serif);
}

/* ---------------------------------------------------------------- arena */
.vs-arena {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px) minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  margin: 0 0 22px;
}

.vs-side {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--vs-panel);
  clip-path: var(--cut-m, none);
}
/* Profile banner (or the avatar, blurred) behind each side, washed in its color */
.vs-side-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.34;
}
.vs-side-bg.is-avatar { filter: blur(26px) saturate(1.3); transform: scale(1.4); opacity: 0.3; }
.vs-side::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.vs-side-1::before { background: linear-gradient(110deg, rgba(var(--vs-1-rgb), 0.38), rgba(33, 35, 41, 0.72) 55%, rgba(33, 35, 41, 0.92)); }
.vs-side-2::before { background: linear-gradient(250deg, rgba(var(--vs-2-rgb), 0.38), rgba(33, 35, 41, 0.72) 55%, rgba(33, 35, 41, 0.92)); }
/* Colored edge on the outer side, gold on top for the winner */
.vs-side::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  width: 4px;
}
.vs-side-1::after { left: 0; background: var(--vs-1); }
.vs-side-2::after { right: 0; background: var(--vs-2); }
.vs-side.is-winner { box-shadow: inset 0 3px 0 var(--vs-gold); }
.vs-side.is-winner::before { box-shadow: inset 0 3px 0 var(--vs-gold); }
.vs-side.is-loser .vs-side-body { opacity: 0.78; }
.vs-side.is-loser .vs-avatar { filter: saturate(0.55); }

.vs-side-body {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 30px 20px 24px;
  min-width: 0;
  max-width: 100%;
  text-align: center;
}

.vs-avatar-wrap { position: relative; margin-bottom: 6px; }
.vs-avatar {
  display: block;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--vs-panel-2);
  border: 3px solid var(--vs-side, var(--vs-1));
  box-shadow: 0 0 0 5px rgba(var(--vs-side-rgb, var(--vs-1-rgb)), 0.18), 0 14px 32px rgba(0, 0, 0, 0.45);
}
.vs-avatar.is-server { border-radius: 22%; }
.vs-side-1 { --vs-side: var(--vs-1); --vs-side-rgb: var(--vs-1-rgb); }
.vs-side-2 { --vs-side: var(--vs-2); --vs-side-rgb: var(--vs-2-rgb); }
.vs-side.is-winner .vs-avatar { border-color: var(--vs-gold); box-shadow: 0 0 0 5px rgba(245, 197, 66, 0.2), 0 0 34px rgba(245, 197, 66, 0.28), 0 14px 32px rgba(0, 0, 0, 0.45); }
.vs-crown {
  position: absolute;
  left: 50%;
  top: -24px;
  transform: translateX(-50%) rotate(-8deg);
  color: var(--vs-gold);
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
  line-height: 0;
}
.vs-tag {
  position: absolute;
  right: -2px;
  bottom: 2px;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--vs-side);
  color: #fff;
  font: 800 0.82rem/1 var(--vs-display);
  clip-path: var(--cut-s, none);
  border-radius: 0;
}

.vs-name {
  max-width: 100%;
  font: 800 1.45rem/1.15 var(--vs-display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #fff;
}
.vs-name a { color: inherit; text-decoration: none; }
.vs-name a:hover { color: var(--vs-side); }
.vs-subtitle { font-size: 0.88rem; color: var(--vs-muted); }
.vs-title-name { color: #e3e5e8; font-weight: 700; }

.vs-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 4px; }
.vs-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: rgba(10, 11, 14, 0.55);
  color: var(--vs-muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  clip-path: var(--slant, none);
}
.vs-chip svg { color: var(--vs-side); }
.vs-chip b { color: #fff; font-weight: 700; }
.vs-chip small { color: var(--vs-dim); font-size: 0.78rem; }

/* Center: VS emblem, score, verdict and the share of categories won */
.vs-core {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 0;
  text-align: center;
}
.vs-emblem {
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--vs-1) 0%, var(--vs-1) 46%, var(--vs-2) 54%, var(--vs-2) 100%);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.vs-emblem span {
  font: 900 1.65rem/1 var(--vs-display);
  font-style: italic;
  color: #fff;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}
.vs-score {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font: 800 3.4rem/1 var(--vs-display);
  font-variant-numeric: tabular-nums;
}
.vs-score-1 { color: rgba(var(--vs-1-rgb), 0.55); }
.vs-score-2 { color: rgba(var(--vs-2-rgb), 0.55); }
.vs-score-1.is-win { color: var(--vs-1); text-shadow: 0 0 22px rgba(var(--vs-1-rgb), 0.45); }
.vs-score-2.is-win { color: var(--vs-2); text-shadow: 0 0 22px rgba(var(--vs-2-rgb), 0.45); }
.vs-arena[data-winner="tie"] .vs-score-1 { color: var(--vs-1); }
.vs-arena[data-winner="tie"] .vs-score-2 { color: var(--vs-2); }
.vs-score-sep { color: var(--vs-dim); font-size: 2.2rem; transform: translateY(-4px); }

.vs-verdict {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 6px 14px;
  font: 700 0.78rem/1.25 var(--vs-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  clip-path: var(--slant, none);
}
.vs-verdict span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-verdict svg { flex-shrink: 0; }
.vs-verdict-1 { background: rgba(var(--vs-1-rgb), 0.18); color: #c3c8ff; }
.vs-verdict-2 { background: rgba(var(--vs-2-rgb), 0.18); color: #ffc2cd; }
.vs-verdict-1 svg,
.vs-verdict-2 svg { color: var(--vs-gold); }
.vs-verdict-tie { background: rgba(255, 255, 255, 0.08); color: #e3e5e8; }

.vs-tug {
  position: relative;
  width: 100%;
  max-width: 220px;
  height: 8px;
  background: var(--vs-2);
  clip-path: var(--slant, none);
}
.vs-tug span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--share, 50%);
  background: var(--vs-1);
  box-shadow: 2px 0 0 #fff;
}
.vs-tug-caption { font-size: 0.78rem; color: var(--vs-dim); }

/* --------------------------------------------------------------- cards */
.vs-card {
  background: var(--vs-panel);
  padding: 22px 24px 24px;
  margin: 0 0 22px;
  clip-path: var(--cut-m, none);
}
.vs-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 18px;
}
.vs-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font: 800 1.12rem/1.2 var(--vs-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
}
.vs-card-title svg { color: var(--ar-accent, #717cf8); flex-shrink: 0; }
.vs-card-desc { margin: 6px 0 0; font-size: 0.86rem; color: var(--vs-muted); }

.vs-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.85rem; color: #e3e5e8; min-width: 0; }
.vs-legend > span { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 220px; }
.vs-legend i { width: 12px; height: 12px; flex-shrink: 0; clip-path: var(--cut-s, none); }
.vs-legend-1 i { background: var(--vs-1); }
.vs-legend-2 i { background: var(--vs-2); }

/* One row per category: value 1 | category | value 2, then the shared bar */
.vs-rows { display: flex; flex-direction: column; }
.vs-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 14px;
  padding: 14px 4px;
  border-top: 1px solid var(--vs-line);
}
.vs-row:first-child { border-top: 0; padding-top: 4px; }
.vs-val { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vs-val-1 { justify-content: flex-start; }
.vs-val-2 { justify-content: flex-end; }
.vs-val-num {
  font: 700 1.12rem/1.2 var(--vs-display);
  font-variant-numeric: tabular-nums;
  color: var(--vs-dim);
  white-space: nowrap;
}
.vs-row[data-winner="1"] .vs-val-1 .vs-val-num { color: #fff; }
.vs-row[data-winner="2"] .vs-val-2 .vs-val-num { color: #fff; }
.vs-row[data-winner="tie"] .vs-val-num { color: #e3e5e8; }
.vs-lead {
  padding: 2px 8px;
  font-size: 0.74rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  clip-path: var(--slant, none);
}
.vs-val-1 .vs-lead { background: rgba(var(--vs-1-rgb), 0.2); color: #c3c8ff; }
.vs-val-2 .vs-lead { background: rgba(var(--vs-2-rgb), 0.2); color: #ffc2cd; }
.vs-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: 700 0.76rem/1.2 var(--vs-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--vs-muted);
  text-align: center;
}
.vs-label svg { color: var(--vs-muted); flex-shrink: 0; }

.vs-bar {
  grid-column: 1 / -1;
  position: relative;
  display: flex;
  height: 10px;
  gap: 3px;
}
.vs-bar span { height: 100%; transition: opacity 0.2s; }
.vs-bar-1 { width: var(--p1, 50%); background: var(--vs-1); clip-path: polygon(0 0, 100% 0, calc(100% - 5px) 100%, 0 100%); }
.vs-bar-2 { flex: 1; background: var(--vs-2); clip-path: polygon(5px 0, 100% 0, 100% 100%, 0 100%); }
.vs-row[data-winner="1"] .vs-bar-2,
.vs-row[data-winner="2"] .vs-bar-1 { opacity: 0.28; }
/* The middle of the bar, so a lead reads at a glance */
.vs-bar::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  bottom: -4px;
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, 0.35);
}

/* -------------------------------------------------------------- mobile */
@media (max-width: 820px) {
  .vs-arena {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "core core" "s1 s2";
    gap: 10px;
  }
  .vs-side-1 { grid-area: s1; }
  .vs-side-2 { grid-area: s2; }
  .vs-core { grid-area: core; flex-direction: row; flex-wrap: wrap; gap: 10px 16px; padding: 4px 0 6px; }
  .vs-emblem { width: 54px; height: 54px; }
  .vs-emblem span { font-size: 1.15rem; }
  .vs-score { font-size: 2.6rem; }
  .vs-verdict, .vs-tug, .vs-tug-caption, .vs-radar { flex-basis: 100%; }
  .vs-core > .vs-radar { order: 2; height: 280px; }
  .vs-verdict { flex-basis: auto; }
  .vs-tug { max-width: 260px; }
  .vs-core > .vs-verdict { order: 3; }
  .vs-core > .vs-tug { order: 4; }
  .vs-core > .vs-tug-caption { order: 5; }
  .vs-side { min-height: 0; }
  .vs-side-body { padding: 26px 10px 16px; gap: 6px; }
  .vs-avatar { width: 76px; height: 76px; }
  .vs-name { font-size: 1.05rem; }
  .vs-subtitle { font-size: 0.78rem; }
  .vs-chip { padding: 4px 8px; font-size: 0.74rem; }
}

@media (max-width: 560px) {
  .vs-card { padding: 18px 14px 18px; }
  .vs-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "label label" "v1 v2" "bar bar"; gap: 6px 10px; padding: 12px 0; }
  .vs-label { grid-area: label; justify-content: flex-start; }
  .vs-val-1 { grid-area: v1; }
  .vs-val-2 { grid-area: v2; }
  .vs-bar { grid-area: bar; height: 8px; }
  .vs-val-num { font-size: 1rem; }
  .vs-lead { font-size: 0.7rem; padding: 2px 6px; }
  .vs-val { flex-wrap: wrap; row-gap: 4px; }
  .vs-val-2 { flex-wrap: wrap-reverse; }
}

/* Radar between the two sides: each branch is a category, the bigger shape dominates */
.vs-radar { position: relative; width: 100%; height: 300px; margin: -6px 0; }
@media (max-width: 1050px) and (min-width: 821px) { .vs-radar { height: 260px; } }

/* ---------------------------------------------------------------- the member's own customization
   The banner shown plainly over the whole card (only a dark fade at the bottom keeps the name readable), the
   page background color under it, and the profile color on the avatar ring and the title. The side color (1 blue,
   2 red) stays on the edge, the number, the score and the charts. */
.vs-side.has-bg { background: var(--fighter-bg); }
.vs-side-1.has-theme::before { background: linear-gradient(110deg, rgba(var(--fighter-rgb), 0.34), rgba(22, 23, 28, 0.62) 55%, rgba(22, 23, 28, 0.88)); }
.vs-side-2.has-theme::before { background: linear-gradient(250deg, rgba(var(--fighter-rgb), 0.34), rgba(22, 23, 28, 0.62) 55%, rgba(22, 23, 28, 0.88)); }
.vs-side.has-theme:not(.is-winner) .vs-avatar {
  border-color: var(--fighter);
  box-shadow: 0 0 0 5px rgba(var(--fighter-rgb), 0.22), 0 0 30px rgba(var(--fighter-rgb), 0.35), 0 14px 32px rgba(0, 0, 0, 0.45);
}
.vs-side.has-theme .vs-title-name { color: var(--fighter); }
.vs-side.has-theme .vs-chip svg { color: var(--fighter); }
.vs-side.has-theme .vs-name a:hover { color: var(--fighter); }
.vs-side.has-banner .vs-side-bg { opacity: 0.9; filter: none; transform: none; }
.vs-side-1.has-banner::before,
.vs-side-2.has-banner::before {
  background: linear-gradient(180deg, rgba(14, 15, 19, 0.12) 0%, rgba(14, 15, 19, 0.35) 38%, rgba(14, 15, 19, 0.82) 72%, rgba(14, 15, 19, 0.94) 100%);
}
.vs-side.has-banner .vs-name { text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); }
/* Background color without a banner: the card itself takes it, lightly washed */
.vs-side.has-bg:not(.has-banner)::before { background: linear-gradient(180deg, rgba(var(--fighter-rgb), 0.16), rgba(0, 0, 0, 0.35)); }

/* Tooltip of the radar branch under the pointer (same look as the chart tooltips) */
.vs-radar-tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  min-width: 170px;
  padding: 10px 12px;
  background: rgba(20, 21, 26, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  color: #e3e5e8;
  font-size: 12.5px;
  text-align: left;
}

/* Link to the Timeline with both members picked (curves month by month) */
.vs-timeline-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 6px 14px;
  background: rgba(113, 124, 248, 0.14);
  clip-path: var(--slant, none);
  color: #c5c9ff;
  font: 700 0.74rem/1 var(--vs-display, sans-serif);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.vs-timeline-link:hover { background: rgba(113, 124, 248, 0.26); color: #fff; }
