/* ============================================================================
   MIXXI RISING — Overlay leaderboard (reference design v2)  ·  1080×1920
   Framed panel · big LEADERBOARD title · editorial rows · podium top-3 ·
   highlighted "rising" row · sponsor footer.
   ========================================================================== */

.mx-stage {
  padding: 26px;
  display: flex;
  background: #000;                 /* black margin around the frame (transparent in OBS via ?transparent) */
  font-family: var(--font-ui);
}
html.mx-transparent .mx-stage { background: transparent; }

/* ---------------------------------------------------------- rounded frame */
.mx-frame {
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  padding: 46px 50px 40px;
  border-radius: 52px;
  overflow: hidden;
  background:
    radial-gradient(125% 58% at 50% 122%, rgba(190,22,44,.44), transparent 60%),
    radial-gradient(135% 92% at 50% -8%, #1c3959 0%, #12243c 30%, #0a1626 56%, #05090f 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255,255,255,.11),
    inset 0 3px 0 rgba(255,255,255,.05),
    0 40px 120px rgba(0,0,0,.6);
}
html.mx-transparent .mx-frame { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.11); }

/* ------------------------------------------------------------------ header */
.mx-head {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px;
}
.mx-head__live {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 800; font-style: italic;
  font-size: 30px; letter-spacing: .05em; text-transform: uppercase; color: var(--red);
}
.mx-head__live .dot {
  width: 13px; height: 13px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 0 rgba(254,9,39,.6); animation: mx-livepulse 1.8s var(--ease-quint) infinite;
}
@keyframes mx-livepulse {
  0% { box-shadow: 0 0 0 0 rgba(254,9,39,.6); }
  70% { box-shadow: 0 0 0 13px rgba(254,9,39,0); }
  100% { box-shadow: 0 0 0 0 rgba(254,9,39,0); }
}
.mx-title {
  margin: 0; justify-self: center;
  font-family: var(--font-display); font-weight: 900; font-style: italic; text-transform: uppercase;
  font-size: 84px; line-height: .8; letter-spacing: -.017em; color: #eef2f8; white-space: nowrap;
  text-shadow: 0 2px 0 rgba(255,255,255,.16), 0 8px 30px rgba(0,0,0,.5);
}
.mx-head__chev { justify-self: end; display: block; line-height: 0; padding-right: 4px; }
.mx-head__chev svg { width: 66px; height: auto; display: block; }
.mx-head__chev polygon { fill: #aab4c2; }

/* ---------------------------------------------------------------- subhead */
.mx-subhead {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: flex-end; gap: 18px;
  margin-top: 18px;
}
.mx-ep { justify-self: start; display: flex; flex-direction: column; gap: 1px; }
.mx-ep__lbl, .mx-total__lbl {
  font-family: var(--font-ui); font-weight: 600; font-size: 19px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-2);
}
.mx-ep__num {
  font-family: var(--font-display); font-weight: 900; font-style: italic;
  font-size: 60px; line-height: .82; color: var(--teal); letter-spacing: -.01em;
}
.mx-round {
  justify-self: center; padding-bottom: 5px;
  font-family: var(--font-display); font-weight: 900; font-style: italic; text-transform: uppercase;
  font-size: 44px; color: #d3dae4; letter-spacing: .005em; white-space: nowrap;
}
.mx-total { justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.mx-total__num {
  font-family: var(--font-display); font-weight: 900; font-size: 58px; line-height: .82;
  letter-spacing: .02em; font-variant-numeric: tabular-nums; white-space: nowrap;
  /* red→pink gradient number — per the reference direction */
  background: linear-gradient(96deg, #fe0927 0%, #ff2f6d 52%, #f91979 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

/* votes column header */
.mx-colhead {
  align-self: flex-end; margin: 20px 92px 4px 0;
  font-family: var(--font-ui); font-weight: 600; font-size: 19px; letter-spacing: .24em;
  text-transform: uppercase; color: var(--ink-2);
}

/* --------------------------------------------------------------- rows */
.mx-rows {
  list-style: none; margin: 6px 0 0; padding: 0;
  flex: 1 1 auto; display: flex; flex-direction: column;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
}
.mx-row {
  --accent: #ffffff;
  --ring: rgba(255,255,255,.28);
  position: relative;
  flex: 1 1 0;
  display: flex; align-items: center; gap: 22px;
  padding: 0 20px;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.08);
  will-change: transform;
}
.mx-row.is-moving { z-index: var(--z-row-moving); }

.mx-row__bar { display: none; }
.mx-row__sweep {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  background: linear-gradient(100deg, transparent 35%, rgba(255,255,255,.16) 50%, transparent 65%);
  mix-blend-mode: screen; border-radius: 18px;
}

.mx-rank {
  width: 70px; flex-shrink: 0; text-align: center;
}
.mx-rank__num {
  font-family: var(--font-display); font-weight: 900; font-style: italic;
  font-size: 60px; line-height: 1; color: var(--accent);
  display: inline-block;
}

.mx-avatar {
  width: 84px; height: 84px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 36%, #1a2942, #0a1322 78%);
  box-shadow: 0 0 0 3px var(--ring), 0 0 0 5px rgba(0,0,0,.5);
  overflow: hidden;
}
.mx-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.mx-avatar__ini {
  font-family: var(--font-display); font-weight: 700; font-size: 36px; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

.mx-id { flex: 1 1 0; min-width: 0; }
.mx-name {
  display: block;
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: 40px; line-height: .98; letter-spacing: .002em; color: var(--accent);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mx-handle {
  display: block; margin-top: 2px;
  font-family: var(--font-ui); font-weight: 400; font-size: 22px; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.mx-delta { order: 4; flex-shrink: 0; width: 46px; display: flex; align-items: center; justify-content: center; }
.mx-delta__chev { display: flex; line-height: 0; }
.mx-delta__chev svg { width: 34px; height: auto; }
.mx-delta__n { display: none; }
.mx-delta[data-dir="up"]   .mx-delta__chev svg { fill: var(--rise); filter: drop-shadow(0 0 8px rgba(79,224,138,.55)); }
.mx-delta[data-dir="down"] .mx-delta__chev { transform: rotate(180deg); }
.mx-delta[data-dir="down"] .mx-delta__chev svg { fill: var(--fall); }
.mx-delta[data-dir="same"] .mx-delta__chev, .mx-delta[data-dir="new"] .mx-delta__chev { opacity: 0; }

.mx-metric { order: 5; flex-shrink: 0; text-align: right; min-width: 210px; }
.mx-score {
  font-family: var(--font-display); font-weight: 800; font-size: 50px; line-height: 1;
  letter-spacing: .03em; font-variant-numeric: tabular-nums; color: #d6dde7;
}
.mx-metric__label { display: none; }

/* ---------------------------------------------------------- podium top-3 */
.mx-row.rank-1 { --accent: var(--yellow); --ring: var(--yellow); }
.mx-row.rank-1 .mx-score { color: var(--yellow); }
.mx-row.rank-2 { --accent: var(--silver); --ring: rgba(223,230,238,.7); }
.mx-row.rank-2 .mx-score { color: #eef2f8; }
.mx-row.rank-3 { --accent: var(--bronze); --ring: rgba(242,164,95,.7); }
.mx-row.rank-3 .mx-score { color: #f0d9c4; }
/* podium separator line under #3 */
.mx-row.rank-3 { box-shadow: inset 0 -2px 0 rgba(255,255,255,.18); }

/* ---------------------------------------------------- highlighted "rising" row */
.mx-row.is-highlight {
  background: linear-gradient(90deg, rgba(255,255,255,.10), rgba(255,255,255,.045));
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 12px 30px rgba(0,0,0,.28);
}

/* --------------------------------------------------------------- footer */
.mx-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin-top: 22px;
}
.mx-foot__logo {
  width: 224px; height: 46px; opacity: .82;
  background-image: url("../img/rising-logo-h-white.png");
  background-size: contain; background-repeat: no-repeat; background-position: left center;
}
.mx-foot__spon { display: flex; align-items: center; gap: 38px; }
.mx-spon { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mx-spon span {
  font-family: var(--font-ui); font-weight: 500; font-size: 15px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-3);
}
.mx-spon b {
  font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 27px; color: #fff;
  letter-spacing: .01em; white-space: nowrap;
}
.mx-spon--prize b { color: #c9a6ff; }

/* --------------------------------------------------------- compact (top25) */
.mx-stage[data-view="top25"] .mx-title { font-size: 88px; }
.mx-stage[data-view="top25"] .mx-rank__num { font-size: 40px; }
.mx-stage[data-view="top25"] .mx-avatar { width: 54px; height: 54px; }
.mx-stage[data-view="top25"] .mx-avatar__ini { font-size: 22px; }
.mx-stage[data-view="top25"] .mx-name { font-size: 28px; }
.mx-stage[data-view="top25"] .mx-handle { display: none; }
.mx-stage[data-view="top25"] .mx-score { font-size: 32px; }
.mx-stage[data-view="top25"] .mx-metric { min-width: 190px; }
.mx-stage[data-view="top25"] .mx-row { gap: 18px; }

/* ------------------------------------------------------------ ticker mode */
.mx-stage[data-mode="ticker"] { justify-content: flex-end; }
.mx-stage[data-mode="ticker"] .mx-head,
.mx-stage[data-mode="ticker"] .mx-subhead,
.mx-stage[data-mode="ticker"] .mx-colhead,
.mx-stage[data-mode="ticker"] .mx-foot { display: none; }
.mx-stage[data-mode="ticker"] .mx-frame { flex: 0 0 auto; }
.mx-stage[data-mode="ticker"] .mx-rows { box-shadow: none; }
