/* ══════════════════════════════════════════════════════════════════════
   CYNEFLIX v216 — FIXES LAYER  (loaded last, wins over every legacy rule)
   ────────────────────────────────────────────────────────────────────
   1. TOP 10 RANK BADGE — kills the oversized red number, the red band /
      ribbon and the empty gap strip that used to sit to the left of every
      Top-10 poster. The number now lives INSIDE the poster (bottom-left),
      so the row stays perfectly even and nothing spills over a neighbour.

   No new colours are introduced — the badge keeps the existing brand red
   (--accent #e50914) and the existing orange accent for the #1 card.
   ══════════════════════════════════════════════════════════════════════ */

/* ── 1. Kill every legacy rank ribbon / band / corner shape ───────── */
.card-rank::before,
.card-rank::after,
.card-rank .card-poster-wrap::before {
  content: none !important;
  display: none !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* ── 2. No gap strip: the poster fills the card exactly like every
        other card in every other row. ──────────────────────────────── */
.card-rank {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  background: transparent !important;
}
.card-rank .card-poster-wrap {
  overflow: visible !important;
}

/* ── 3. The badge itself — clean red outline, inside the poster ──── */
.card-rank-num {
  position: absolute !important;
  bottom: 3px !important;
  left: 5px !important;
  right: auto !important;
  top: auto !important;
  z-index: 3 !important;
  display: block !important;
  font-family: 'Bebas Neue', Impact, 'Arial Black', sans-serif !important;
  font-size: clamp(46px, 6.2vw, 86px) !important;
  font-weight: 900 !important;
  line-height: .82 !important;
  letter-spacing: -3px !important;
  color: transparent !important;
  -webkit-text-stroke: 2.5px rgba(229, 9, 20, .92) !important;
  text-shadow: 0 3px 14px rgba(0, 0, 0, .95) !important;
  filter: drop-shadow(0 2px 7px rgba(0, 0, 0, .9)) !important;
  pointer-events: none !important;
  user-select: none !important;
  transform-origin: left bottom !important;
  animation: v216-rank-in .45s cubic-bezier(.22, 1, .36, 1) both !important;
}
/* #1 keeps its existing orange accent (brand rule, unchanged). */
.card-rank:first-child .card-rank-num {
  -webkit-text-stroke: 2.5px rgba(232,26,36, .95) !important;
}
.card-rank:hover .card-rank-num {
  -webkit-text-stroke: 3px rgba(255, 44, 58, 1) !important;
  filter: drop-shadow(0 2px 10px rgba(229, 9, 20, .45)) !important;
}
@keyframes v216-rank-in {
  from { opacity: 0; transform: translateY(8px) scale(.82) }
  to   { opacity: 1; transform: none }
}

/* ── 3b. Re-purpose the dead ::before as a soft legibility scrim in the
        bottom-left corner, exactly where the rank number sits. This is a
        black gradient (no new colour) — the legacy ribbon that used to
        live here is gone for good. ─────────────────────────────────── */
.card-rank .card-poster-wrap::before {
  content: '' !important;
  display: block !important;
  position: absolute !important;
  left: -8% !important;
  right: auto !important;
  top: auto !important;
  bottom: -6% !important;
  width: 66% !important;
  height: 54% !important;
  background: radial-gradient(ellipse at 20% 80%,
              rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .42) 44%, rgba(0, 0, 0, 0) 74%) !important;
  border: 0 !important;
  box-shadow: none !important;
  z-index: 2 !important;
  pointer-events: none !important;
}

/* ── 4. Restore the v215 shine sweep on Top-10 posters ─────────────
        (v215-modern.css defines it on .card-poster-wrap::after, which
        the ribbon-kill above would otherwise switch off). ─────────── */
.card-rank .card-poster-wrap::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  top: -60% !important;
  left: -70% !important;
  width: 55% !important;
  height: 220% !important;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .16), transparent) !important;
  transform: translateX(-40%) rotate(12deg) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity .2s linear !important;
  z-index: 3 !important;
}
@media (hover: hover) and (pointer: fine) {
  .card.v215-tilt:hover .card-rank .card-poster-wrap::after {
    opacity: 1 !important;
    animation: v215-shine .95s var(--v215-ease) forwards !important;
  }
}

/* ── 5. Phone / small-screen tuning: smaller badge, no overflow ─── */
@media (max-width: 1039px) {
  .card-rank-num { font-size: clamp(44px, 11vw, 64px) !important; }
}
@media (max-width: 640px) {
  .card-rank-num { font-size: clamp(38px, 10vw, 54px) !important; }
}
@media (max-width: 420px) {
  .card-rank-num { font-size: clamp(34px, 9.5vw, 46px) !important; }
}
