/* ROAD TO FNCS — Portada (jugador del día + enfrentamientos), tarjeta para compartir y transiciones */

/* ============ Transiciones entre pantallas: desvanecido corto + leve desplazamiento ============ */
@keyframes rtScreenIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* "backwards": al terminar se quita el transform (no rompe elementos fixed/sticky dentro de la pantalla) */
.screen.active { animation: rtScreenIn .32s cubic-bezier(.22, .8, .3, 1) backwards; }
@media (prefers-reduced-motion: reduce) { .screen.active { animation: none !important; } }

/* ============ Contenedor de la portada ============ */
#rt-home-extras { display: grid; gap: 14px; margin: 0 auto 22px; width: 100%; max-width: 980px; }
#rt-home-extras.hidden { display: none; }

/* ---------- Jugador del día: estandarte ---------- */
.rth-potd {
  position: relative; display: flex; gap: 22px; align-items: stretch; overflow: hidden;
  padding: 22px 24px 22px 22px; border-radius: 18px; text-decoration: none; color: #fff;
  background: linear-gradient(120deg, #1b1233 0%, #101a3a 55%, #0c1226 100%);
  border: 1px solid rgba(255, 210, 63, .35);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .4), inset 0 0 60px rgba(255, 90, 31, .07);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
a.rth-potd { cursor: pointer; }
a.rth-potd:hover, a.rth-potd:focus-visible {
  transform: translateY(-3px); border-color: rgba(255, 210, 63, .8); outline: 0;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .5), 0 0 28px rgba(255, 210, 63, .18), inset 0 0 60px rgba(255, 90, 31, .1);
}
.rth-potd-ribbon {
  position: absolute; top: 0; left: 22px; width: 34px; height: 46px; z-index: 2;
  background: linear-gradient(180deg, #ffd23f, #ff5a1f);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .4);
}
.rth-potd-ribbon::after { content: "★"; position: absolute; top: 8px; left: 0; right: 0; text-align: center; color: #1a1030; font-size: 15px; font-weight: 900; }
.rth-potd-photo {
  flex: 0 0 168px; width: 168px; min-height: 168px; border-radius: 14px; overflow: hidden; margin-top: 30px;
  background: radial-gradient(circle at 50% 30%, rgba(255, 210, 63, .25), rgba(0, 0, 0, .45));
  border: 2px solid rgba(255, 210, 63, .55); display: flex; align-items: center; justify-content: center;
}
.rth-potd-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
a.rth-potd:hover .rth-potd-photo img { transform: scale(1.06); }
.rth-potd-ph { font-size: 64px; opacity: .6; }
.rth-potd-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.rth-kicker { font: 800 12px/1 Rajdhani, Inter, sans-serif; letter-spacing: .18em; color: #ffd23f; text-transform: uppercase; }
.rth-potd-name { margin: 0; font: italic 900 clamp(1.9rem, 4.4vw, 2.9rem)/1 "Barlow Condensed", Impact, sans-serif; letter-spacing: .01em; text-transform: uppercase; overflow-wrap: anywhere; }
.rth-potd-sub { font: 600 14px/1.2 Rajdhani, Inter, sans-serif; opacity: .8; letter-spacing: .04em; }
.rth-potd-fact { margin: 2px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .06); border-left: 3px solid #ff5a1f; font-size: 14px; line-height: 1.45; }
.rth-potd-fact b { display: block; margin-bottom: 3px; font: 800 11px/1 Rajdhani, Inter, sans-serif; letter-spacing: .16em; color: #ff9b6b; }
.rth-potd-extras { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rth-potd-extras li { display: flex; flex-direction: column; gap: 2px; padding: 6px 12px; border-radius: 10px; background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .1); }
.rth-potd-extras span { font: 700 10px/1 Rajdhani, Inter, sans-serif; letter-spacing: .14em; opacity: .65; text-transform: uppercase; }
.rth-potd-extras b { font: 800 16px/1.1 Rajdhani, Inter, sans-serif; }
.rth-cta { align-self: flex-start; margin-top: 2px; padding: 9px 16px; border-radius: 999px; background: linear-gradient(90deg, #ff5a1f, #ffb02e); color: #1a0d05; font: 800 13px/1 Rajdhani, Inter, sans-serif; letter-spacing: .1em; transition: transform .2s ease, filter .2s ease; }
a.rth-potd:hover .rth-cta { transform: translateX(4px); filter: brightness(1.08); }

/* ---------- Enfrentamientos ---------- */
.rth-duels { display: grid; gap: 12px; }
.rth-duel {
  display: block; width: 100%; text-align: left; cursor: pointer; color: #fff; font: inherit;
  padding: 14px 18px 16px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(135deg, rgba(20, 26, 52, .95), rgba(14, 16, 32, .95));
  box-shadow: 0 8px 26px rgba(0, 0, 0, .35);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.rth-duel:hover, .rth-duel:focus-visible { transform: translateY(-2px); border-color: rgba(255, 255, 255, .35); outline: 0; box-shadow: 0 12px 30px rgba(0, 0, 0, .45); }
.rth-duel.is-end { opacity: .92; }
.rth-duel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.rth-live { display: inline-flex; align-items: center; gap: 6px; font: 800 12px/1 Rajdhani, Inter, sans-serif; letter-spacing: .12em; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.rth-live i { width: 8px; height: 8px; border-radius: 50%; background: #ff3b4e; box-shadow: 0 0 0 0 rgba(255, 59, 78, .7); animation: rthPulse 1.4s infinite; }
@keyframes rthPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 59, 78, .7); } 70% { box-shadow: 0 0 0 8px rgba(255, 59, 78, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 78, 0); } }
.rth-duel-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.rth-team { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; }
.rth-team.b { flex-direction: row-reverse; text-align: right; }
.rth-team img { width: 44px; height: 30px; object-fit: cover; border-radius: 5px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25), 0 0 14px color-mix(in srgb, var(--ac) 55%, transparent); flex: 0 0 auto; }
.rth-team b { font: 800 clamp(.95rem, 2.4vw, 1.2rem)/1 Rajdhani, Inter, sans-serif; letter-spacing: .05em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rth-sc { margin-left: auto; font: italic 900 clamp(1.5rem, 4.6vw, 2.4rem)/1 "Barlow Condensed", Impact, sans-serif; color: var(--ac); font-variant-numeric: tabular-nums; }
.rth-team.b .rth-sc { margin-left: 0; margin-right: auto; }
.rth-team.win .rth-sc { text-shadow: 0 0 14px var(--ac); }
.rth-team em { position: absolute; top: -18px; font-style: normal; font-size: 18px; }
.rth-team.a em { left: 0; } .rth-team.b em { right: 0; }
.rth-vs { font: 900 15px/1 Orbitron, Rajdhani, sans-serif; color: #ffd23f; padding: 6px 10px; border-radius: 8px; background: rgba(255, 210, 63, .12); border: 1px solid rgba(255, 210, 63, .35); }
.rth-bar { display: flex; height: 8px; margin-top: 12px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.rth-bar i { display: block; height: 100%; transition: width .8s cubic-bezier(.22, .8, .3, 1); }

@media (max-width: 640px) {
  .rth-potd { flex-direction: column; align-items: center; text-align: center; padding: 18px 16px; gap: 14px; }
  .rth-potd-photo { flex-basis: auto; width: 150px; min-height: 150px; height: 150px; margin-top: 34px; }
  .rth-potd-body { align-items: center; }
  .rth-potd-fact { text-align: left; } .rth-potd-extras { justify-content: center; } .rth-cta { align-self: center; }
  .rth-potd-ribbon { left: 50%; margin-left: -17px; }
  .rth-duel-row { grid-template-columns: 1fr; gap: 8px; }
  .rth-vs { justify-self: center; }
  .rth-team, .rth-team.b { flex-direction: row; text-align: left; }
  .rth-team.b .rth-sc { margin-left: auto; margin-right: 0; }
}

/* ============ Botón "copiar imagen" en resultados ============ */
.rtr-share { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 14px 0 4px; }
.rtr-share-btn {
  padding: 12px 20px; border: 0; border-radius: 12px; cursor: pointer; color: #fff;
  font: 800 14px/1 Rajdhani, Inter, sans-serif; letter-spacing: .08em;
  background: linear-gradient(90deg, #5865f2, #7c4dff); box-shadow: 0 6px 18px rgba(88, 101, 242, .35);
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.rtr-share-btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.1); box-shadow: 0 10px 24px rgba(88, 101, 242, .45); }
.rtr-share-btn:disabled { opacity: .75; cursor: progress; }
.rtr-share small { font-size: 12px; opacity: .65; text-align: center; }

#rtsc-toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 12px); z-index: 100000; padding: 11px 18px; border-radius: 999px; background: #111827; color: #fff; border: 1px solid rgba(67, 224, 138, .7); font: 700 14px/1 Rajdhani, Inter, sans-serif; letter-spacing: .05em; box-shadow: 0 8px 26px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#rtsc-toast.on { opacity: 1; transform: translate(-50%, 0); }
#rtsc-toast.err { border-color: rgba(255, 107, 107, .8); }

.rtsc-ov { position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .75); }
.rtsc-modal { max-width: 560px; width: 100%; padding: 16px; border-radius: 16px; background: #131a30; color: #fff; text-align: center; border: 1px solid rgba(255, 255, 255, .15); }
.rtsc-modal p { margin: 0 0 12px; font-size: 14px; line-height: 1.45; }
.rtsc-modal img { width: 100%; height: auto; border-radius: 10px; display: block; }
.rtsc-modal .row { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.rtsc-modal .dl, .rtsc-modal .x { padding: 10px 16px; border-radius: 10px; border: 0; font: 800 13px/1 Rajdhani, Inter, sans-serif; letter-spacing: .06em; cursor: pointer; text-decoration: none; color: #fff; background: #3a4661; }
.rtsc-modal .dl { background: #5865f2; }

/* ============ Tarjeta (se dibuja fuera de pantalla y se convierte en PNG) ============ */
.rtsc { position: fixed; left: -10000px; top: 0; width: 600px; height: 315px; overflow: hidden; box-sizing: border-box; padding: 22px 26px; color: #fff; font-family: Rajdhani, Inter, sans-serif; border-radius: 18px; }
.rtsc-bg { position: absolute; inset: 0; background: linear-gradient(135deg, #150d2e 0%, #10193a 55%, #0a1022 100%); }
.rtsc-stripe { position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: linear-gradient(180deg, #ffd23f, #ff5a1f); }
.rtsc > *:not(.rtsc-bg):not(.rtsc-stripe) { position: relative; }
.rtsc-top { display: flex; justify-content: space-between; align-items: center; }
.rtsc-brand { font: italic 900 20px/1 "Barlow Condensed", Impact, sans-serif; letter-spacing: .08em; }
.rtsc-brand b { color: #ff7a3d; }
.rtsc-game { font: 800 13px/1 Rajdhani, sans-serif; letter-spacing: .14em; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); text-transform: uppercase; }
.rtsc-mid { display: flex; align-items: center; gap: 26px; margin-top: 22px; }
.rtsc-medal { flex: 0 0 auto; width: 104px; height: 104px; border-radius: 50%; border: 6px solid; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0, 0, 0, .3); }
.rtsc-medal .g { font: italic 900 52px/1 "Barlow Condensed", Impact, sans-serif; }
.rtsc-medal .l { font: 800 10px/1 Rajdhani, sans-serif; letter-spacing: .2em; opacity: .8; margin-top: 2px; }
.rtsc-score { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rtsc-score .n { font: italic 900 74px/.95 "Barlow Condensed", Impact, sans-serif; color: #ffd23f; font-variant-numeric: tabular-nums; }
.rtsc-score .u { font: 800 14px/1 Rajdhani, sans-serif; letter-spacing: .22em; opacity: .85; }
.rtsc-score .t { font: 700 15px/1.2 Rajdhani, sans-serif; opacity: .75; margin-top: 4px; }
.rtsc-chips { display: flex; gap: 10px; margin-top: 20px; }
.rtsc-chip { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); }
.rtsc-chip .k { display: block; font: 700 10px/1 Rajdhani, sans-serif; letter-spacing: .18em; opacity: .65; }
.rtsc-chip .v { display: block; margin-top: 5px; font: 800 17px/1.1 Rajdhani, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rtsc-foot { position: absolute !important; left: 26px; right: 26px; bottom: 16px; display: flex; justify-content: space-between; align-items: center; font: 700 14px/1 Rajdhani, sans-serif; }
.rtsc-foot .who { display: inline-flex; align-items: center; gap: 8px; }
.rtsc-foot .fl { width: 24px; height: 16px; object-fit: cover; border-radius: 3px; }
.rtsc-foot .url { opacity: .6; letter-spacing: .08em; }
