/* ranking.css — Ranking público del canal (reusa patrones de infiltrado.css) */

.rk-page {
  position: relative; z-index: 1;
  max-width: 860px; margin: 0 auto;
  padding: 96px 20px 80px;
}

.rk-hero { text-align: center; margin-bottom: 44px; }
.rk-eyebrow {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 600;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 10px;
}
.rk-title {
  font-family: var(--font-accent);
  font-size: clamp(44px, 8vw, 76px);
  letter-spacing: .08em; line-height: .95;
  color: var(--text);
}
.rk-title span { color: var(--gold); }
.rk-sub {
  max-width: 580px; margin: 14px auto 0;
  font-size: 15px; color: var(--text-dim); line-height: 1.6;
}
.rk-sub code {
  font-family: var(--font-body); font-weight: 700;
  color: var(--gold-light);
  background: rgba(200,155,60,.1);
  padding: 1px 6px;
}
.rk-hero .inf-freshness { margin-top: 18px; }

/* ── Podio ── */
.rk-podium {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 16px; margin-bottom: 48px;
}
.rk-podium-slot {
  flex: 1; max-width: 220px;
  text-align: center;
  padding: 20px 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  clip-path: polygon(14px 0%, 100% 0%, 100% 100%, 0% 100%, 0% 14px);
}
.rk-p1 { order: 2; padding-top: 34px; border-color: var(--gold);      background: linear-gradient(180deg, rgba(200,155,60,.12), transparent 60%), var(--bg-card); }
.rk-p2 { order: 1; border-color: #8b95a5; }
.rk-p3 { order: 3; border-color: var(--gold-dark); }

.rk-podium-rank {
  width: 42px; height: 42px; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-accent); font-size: 22px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.rk-p1 .rk-podium-rank { background: var(--gold);      color: #060810; width: 52px; height: 52px; font-size: 28px; }
.rk-p2 .rk-podium-rank { background: #B8C4D4;          color: #060810; }
.rk-p3 .rk-podium-rank { background: var(--gold-dark); color: #060810; }

.rk-podium-name {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700;
  color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rk-p1 .rk-podium-name { font-size: 19px; color: var(--gold-light); }
.rk-podium-pts {
  margin-top: 4px;
  font-family: var(--font-body);
  font-size: 13px; font-weight: 700;
  color: var(--electric);
}

.rk-section { margin-bottom: 48px; }
.rk-board { max-height: 560px; overflow-y: auto; }
.rk-net-pos { color: #4ADE80 !important; }
.rk-net-neg { color: #F87171 !important; }

@media (max-width: 560px) {
  .rk-page { padding-top: 80px; }
  .rk-podium { gap: 8px; }
  .rk-podium-slot { padding: 14px 8px 12px; }
  .rk-podium-name { font-size: 13px; }
  .rk-p1 .rk-podium-name { font-size: 15px; }
}

.rk-title-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px; font-style: italic; font-weight: 600;
  color: var(--gold);
  opacity: .9;
}
.rk-podium .rk-title-tag { display: block; margin-top: 2px; font-size: 12px; }

/* ── Casino: subtítulos de los dos rankings (beneficio / volumen) ── */
.rk-sub-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: .08em;
  color: var(--gold);
  margin: 0 0 4px;
}

/* Ranking por volumen: la cifra apostada manda, el nº de apuestas apoya */
.inf-pts.rk-vol {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.25;
  color: var(--electric);
}
.rk-vol .rk-bets {
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
}

/* ── Estado vacío: mejor decirlo con gracia que desaparecer ── */
.rk-empty {
  display: block; padding: 22px 18px; text-align: center;
  font-size: 13px; font-style: italic; color: var(--text-dim);
  border: 1px dashed rgba(255,255,255,.1); border-radius: 3px;
  list-style: none;
}

/* ── Hall of Fame ── */
.rk-hall-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px;
}
.rk-hall-card {
  padding: 18px 16px; text-align: center;
  background: linear-gradient(165deg, rgba(200,155,60,.05), rgba(13,17,23,.4));
  border: 1px solid rgba(200,155,60,.18);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.rk-hall-icon { font-size: 26px; margin-bottom: 4px; }
.rk-hall-title {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-dim); font-weight: 700; margin-bottom: 6px;
}
.rk-hall-who { font-size: 15px; font-weight: 700; color: var(--text); }
.rk-hall-amount {
  font-family: 'Bebas Neue', sans-serif; font-size: 24px; margin-top: 2px;
  color: var(--gold);
}
.rk-hall-card.win .rk-hall-amount { color: #4ADE80; }
.rk-hall-card.loss .rk-hall-amount { color: #F87171; }
.rk-hall-card.jackpot .rk-hall-amount { color: #F0D88A; text-shadow: 0 0 16px rgba(240,216,138,.4); }

/* ── Nemesis ── */
.inf-pts.rk-nem { color: var(--text); font-weight: 700; }
.rk-nem-wr {
  margin-left: 6px; font-size: 11px; color: #F87171; font-weight: 800;
}

/* ══════════════════════════════════════════════════════════════
   LAS DOS CASAS DE APUESTAS — pestañas
   --------------------------------------------------------------
   Dos economías con el mismo protagonismo: el casino del bot y las
   predicciones de Twitch. Un conmutador grande, no dos tabs tímidas:
   la elección de casa ES parte de la identidad de la sección.
   ══════════════════════════════════════════════════════════════ */
.rk-house-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin: 18px 0 20px;
}
.rk-house-tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 14px 10px 12px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.09);
  color: var(--text-dim);
  cursor: pointer;
  font-family: inherit;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: border-color var(--dur-fast, .18s) ease, background var(--dur-fast, .18s) ease, color var(--dur-fast, .18s) ease;
}
.rk-house-tab:hover { border-color: rgba(200,155,60,.35); color: var(--text); }
.rk-house-tab.active {
  background: linear-gradient(165deg, rgba(200,155,60,.12), rgba(13,17,23,.5));
  border-color: rgba(200,155,60,.55);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(240,216,138,.15), 0 6px 22px rgba(0,0,0,.35);
}
.rk-house-icon { font-size: 22px; line-height: 1; }
.rk-house-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 19px; letter-spacing: .06em;
}
.rk-house-tab.active .rk-house-name { color: var(--gold-hi, #F0D88A); }
.rk-house-desc {
  font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-dim);
}

.rk-house-panel { display: none; }
.rk-house-panel.active { display: block; animation: syk-reveal .3s var(--ease-out, ease) both; }

/* ── Franja global de predicciones ── */
.rk-pred-global {
  display: flex; justify-content: center; gap: 34px;
  padding: 14px 12px; margin-bottom: 18px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.07);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.rk-pred-stat { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.rk-pred-num {
  font-family: 'Bebas Neue', sans-serif; font-size: 26px; line-height: 1;
  color: var(--gold-hi, #F0D88A);
}
.rk-pred-lbl {
  font-size: 9px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim);
}

/* ── Grid de los 3 rankings de predicciones ── */
.rk-pred-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
@media (max-width: 900px) { .rk-pred-grid { grid-template-columns: 1fr; gap: 14px; } }

.rk-acc { color: var(--electric); font-weight: 800; }

.rk-pred-empty {
  padding: 26px 18px; text-align: center;
  font-size: 13px; font-style: italic; color: var(--text-dim);
  border: 1px dashed rgba(255,255,255,.1);
}

@media (max-width: 560px) {
  .rk-house-tabs { grid-template-columns: 1fr; }
  .rk-pred-global { gap: 20px; }
}

/* ══════════════════════════════════════════════════════════════
   DOSSIER PÚBLICO — una capa, no una página nueva
   ══════════════════════════════════════════════════════════════ */
[data-profile] {
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease,
              box-shadow .18s ease, filter .18s ease;
}
[data-profile]:hover {
  border-color: rgba(200,155,60,.5);
  background-color: rgba(200,155,60,.045);
  box-shadow: inset 3px 0 0 rgba(200,155,60,.62);
}
.rk-podium-slot[data-profile]:hover,
.rk-hall-card[data-profile]:hover {
  filter: brightness(1.1);
  box-shadow: inset 0 0 0 1px rgba(240,216,138,.22), 0 12px 32px rgba(0,0,0,.26);
}
[data-profile]:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 3px;
}

body.rk-dossier-open { overflow: hidden; }
.rk-dossier[hidden] { display: none; }
.rk-dossier {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  justify-content: flex-end;
  font-family: var(--font-body);
}
.rk-dossier-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(3,6,13,.76);
  backdrop-filter: blur(6px);
  cursor: default;
  animation: rk-dossier-fade .2s ease both;
}
.rk-dossier-panel {
  position: relative;
  isolation: isolate;
  width: min(470px, 94vw);
  height: 100%;
  overflow-y: auto;
  padding: 84px 42px 40px;
  color: var(--text);
  background:
    radial-gradient(circle at 84% 12%, rgba(15,128,168,.16), transparent 31%),
    radial-gradient(circle at 12% 84%, rgba(120,55,190,.14), transparent 34%),
    linear-gradient(155deg, rgba(15,21,33,.985), rgba(5,8,16,.995));
  border-left: 1px solid rgba(200,155,60,.48);
  box-shadow: -28px 0 70px rgba(0,0,0,.58), inset 1px 0 rgba(240,216,138,.08);
  animation: rk-dossier-in .34s cubic-bezier(.2,.82,.2,1) both;
}
.rk-dossier-panel::before,
.rk-dossier-panel::after {
  content: '';
  position: absolute;
  z-index: 2;
  pointer-events: none;
}
.rk-dossier-panel::before {
  inset: 14px;
  border: 1px solid rgba(200,155,60,.14);
  clip-path: polygon(0 0, 88px 0, 98px 10px, calc(100% - 36px) 10px, calc(100% - 26px) 0, 100% 0, 100% 100%, 0 100%);
}
.rk-dossier-panel::after {
  top: 0;
  left: 0;
  width: 150px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--electric), transparent);
  box-shadow: 0 0 16px rgba(15,128,168,.45);
}
.rk-dossier-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .16;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}
.rk-dossier-close {
  position: absolute;
  top: 25px;
  right: 26px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(200,155,60,.28);
  background: rgba(5,8,16,.68);
  color: var(--text-dim);
  font: 300 27px/1 sans-serif;
  cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.rk-dossier-close:hover { color: var(--gold-light); border-color: var(--gold); }
.rk-dossier-close:focus-visible { outline: 2px solid var(--electric); outline-offset: 2px; }

.rk-dossier-head {
  display: grid;
  grid-template-columns: 96px minmax(0,1fr);
  align-items: center;
  gap: 20px;
  padding-bottom: 30px;
}
.rk-dossier-sigil {
  position: relative;
  display: grid;
  place-items: center;
  width: 90px;
  aspect-ratio: 1;
  color: #071018;
  background: linear-gradient(145deg, var(--gold-light), var(--gold-dark));
  clip-path: polygon(50% 0, 90% 18%, 100% 65%, 74% 100%, 26% 100%, 0 65%, 10% 18%);
  filter: drop-shadow(0 8px 22px rgba(200,155,60,.22));
}
.rk-dossier-sigil::before {
  content: '';
  position: absolute;
  inset: 5px;
  background: linear-gradient(155deg, #111827, #050810);
  clip-path: inherit;
}
.rk-dossier-sigil span {
  position: relative;
  z-index: 1;
  font-family: var(--font-accent);
  font-size: 30px;
  letter-spacing: .04em;
  color: var(--gold-light);
}
.rk-dossier-sigil i {
  position: absolute;
  z-index: 2;
  right: 7px;
  bottom: 8px;
  width: 12px;
  height: 12px;
  border: 2px solid #071018;
  border-radius: 50%;
  background: #2ee6a6;
  box-shadow: 0 0 12px rgba(46,230,166,.75);
}
.rk-dossier-identity { min-width: 0; }
.rk-dossier-kicker,
.rk-dossier-rankline span,
.rk-dossier-stats span,
.rk-dossier-badges > span {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--gold);
}
.rk-dossier-identity h2 {
  margin: 5px 0 1px;
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-accent);
  font-size: clamp(34px, 8vw, 48px);
  line-height: .96;
  letter-spacing: .035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rk-dossier-identity p {
  margin: 7px 0 0;
  color: var(--electric);
  font-family: var(--font-display);
  font-size: 13px;
  font-style: italic;
}
.rk-dossier-rankline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(200,155,60,.2);
  border-bottom: 1px solid rgba(200,155,60,.2);
  background: linear-gradient(90deg, rgba(200,155,60,.07), transparent);
}
.rk-dossier-rankline > div { padding: 20px 16px; }
.rk-dossier-rankline > div + div { border-left: 1px solid rgba(200,155,60,.16); }
.rk-dossier-rankline strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-accent);
  font-size: 25px;
  font-weight: 400;
  color: var(--gold-light);
}
.rk-dossier-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 24px;
}
.rk-dossier-stats article {
  min-width: 0;
  padding: 16px 11px 15px;
  border: 1px solid rgba(255,255,255,.085);
  background: rgba(255,255,255,.025);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.rk-dossier-stats article:nth-child(1) { border-top-color: rgba(200,155,60,.6); }
.rk-dossier-stats article:nth-child(2) { border-top-color: rgba(15,128,168,.7); }
.rk-dossier-stats article:nth-child(3) { border-top-color: rgba(160,80,225,.7); }
.rk-dossier-stats strong {
  display: block;
  margin-top: 8px;
  font-family: var(--font-accent);
  font-size: 27px;
  font-weight: 400;
  color: var(--text);
}
.rk-dossier-badges {
  margin-top: 27px;
  padding: 19px;
  border: 1px solid rgba(200,155,60,.16);
  background: rgba(200,155,60,.035);
}
.rk-dossier-badges > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.rk-dossier-badges em {
  padding: 7px 10px;
  border: 1px solid rgba(200,155,60,.28);
  background: linear-gradient(145deg, rgba(200,155,60,.12), rgba(15,128,168,.05));
  color: var(--gold-light);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .06em;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.rk-dossier-note {
  margin: 28px 0 0;
  padding-left: 17px;
  border-left: 2px solid var(--electric);
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.6;
}

@keyframes rk-dossier-in {
  from { opacity: 0; transform: translateX(45px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes rk-dossier-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 620px) {
  .rk-dossier { align-items: flex-end; }
  .rk-dossier-panel {
    width: 100%;
    height: auto;
    max-height: 89vh;
    padding: 62px 22px 28px;
    border-top: 1px solid rgba(200,155,60,.55);
    border-left: 0;
    box-shadow: 0 -28px 70px rgba(0,0,0,.65);
    animation-name: rk-dossier-up;
  }
  .rk-dossier-close { top: 17px; right: 18px; }
  .rk-dossier-head { grid-template-columns: 74px minmax(0,1fr); gap: 15px; padding-bottom: 22px; }
  .rk-dossier-sigil { width: 70px; }
  .rk-dossier-sigil span { font-size: 24px; }
  .rk-dossier-rankline > div { padding: 17px 10px; }
  .rk-dossier-rankline strong { font-size: 21px; }
  .rk-dossier-stats { grid-template-columns: 1fr; gap: 7px; margin-top: 18px; }
  .rk-dossier-stats article { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; }
  .rk-dossier-stats strong { margin-top: 0; font-size: 23px; }
}
@keyframes rk-dossier-up {
  from { opacity: 0; transform: translateY(35px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .rk-dossier-panel,
  .rk-dossier-backdrop { animation: none; }
}
