/* Kickwise card reveal (assets/reveal.js): sport, then country, then the rarity climbs, then the player.
   --g is the colour of the rarity currently shown; everything that glows reads it. */
.rv { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-rows: auto 1fr auto; justify-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  --g: #c9d2cc; color: #fff; font-family: var(--body); overflow: hidden; touch-action: manipulation;
  background: #050806; animation: rv-in .25s ease-out; }
.rv-bg { position: absolute; inset: -20%; z-index: -1; pointer-events: none;
  background: radial-gradient(42% 36% at 50% 48%, color-mix(in srgb, var(--g) 34%, transparent), transparent 70%),
              radial-gradient(80% 60% at 50% 110%, color-mix(in srgb, var(--g) 14%, transparent), transparent 70%);
  transition: background .35s; }
.rv-rays { position: absolute; left: 50%; top: 48%; width: 160vmax; height: 160vmax; margin: -80vmax 0 0 -80vmax; z-index: -1; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--g) 9%, transparent) 0 5deg, transparent 5deg 20deg);
  -webkit-mask: radial-gradient(closest-side, #000 4%, transparent 42%); mask: radial-gradient(closest-side, #000 4%, transparent 42%);
  opacity: 0; transition: opacity .5s; animation: rv-spin 30s linear infinite; }
.rv.hot .rv-rays { opacity: 1; }
@keyframes rv-spin { to { transform: rotate(360deg); } }
@keyframes rv-in { from { opacity: 0; } }

.rv-top { display: flex; align-items: center; gap: 12px; width: min(560px, 100%); min-height: 44px; }
.rv-title { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 22px; letter-spacing: .02em; }
.rv-count { margin-left: auto; font-size: 14px; color: rgba(255, 255, 255, .6); font-variant-numeric: tabular-nums; }
.rv-skip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); background: transparent; color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }

.rv-stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; width: 100%; }
/* Clues: sport and country stack above the card */
.rv-clues { display: flex; gap: 10px; min-height: 46px; align-items: center; }
.rv-clue { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px 0 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  font-family: var(--display); font-weight: 900; font-size: 22px; text-transform: uppercase; letter-spacing: .02em;
  opacity: 0; transform: translateY(14px) scale(.9); transition: opacity .3s, transform .45s cubic-bezier(.2, 1.4, .4, 1); }
.rv-clue.on { opacity: 1; transform: none; }
.rv-clue .kw-ico { width: 26px; height: 26px; color: var(--accent); }
.rv-clue img { width: 32px; height: 24px; border-radius: 4px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .3); }

/* The card: a back that climbs through the rarities, then flips to the player */
.rv-card { position: relative; width: min(280px, 64vw, 42vh); aspect-ratio: 5 / 7; perspective: 1200px; cursor: pointer; }
.rv-flip { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3, 1.3, .5, 1); }
.rv-card.flipped .rv-flip { transform: rotateY(180deg); }
.rv-back, .rv-front { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.rv-front { transform: rotateY(180deg); }
.rv-front .pcard { width: 100%; border-radius: 20px; }
.rv-front .pcard .pc-in { border-radius: calc(20px - 2.2cqw); }
.rv-back { border-radius: 20px; padding: 7px; background: linear-gradient(150deg, color-mix(in srgb, var(--g) 70%, #fff), var(--g) 45%, color-mix(in srgb, var(--g) 40%, #000));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 0 50px -8px var(--g), 0 30px 60px -30px #000; transition: background .3s, box-shadow .3s; }
.rv-back::before { content: ""; position: absolute; inset: 7px; border-radius: 14px;
  background: radial-gradient(70% 50% at 50% 40%, color-mix(in srgb, var(--g) 30%, #0c1510), #0a100d 75%); }
.rv-back::after { content: ""; position: absolute; inset: 30% 28%; background: color-mix(in srgb, var(--g) 80%, #fff);
  -webkit-mask: url("brand/kickwise-mark.svg") center / contain no-repeat; mask: url("brand/kickwise-mark.svg") center / contain no-repeat; opacity: .9; }
.rv-card.pulse .rv-back { animation: rv-pulse .32s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes rv-pulse { 40% { transform: scale(1.06); } }
.rv-card.shake .rv-back { animation: rv-shake .5s linear; }
@keyframes rv-shake { 20% { transform: translate(-3px, 1px) rotate(-1deg); } 40% { transform: translate(3px, -1px) rotate(1deg); }
  60% { transform: translate(-2px, -1px) rotate(-.6deg); } 80% { transform: translate(2px, 1px) rotate(.6deg); } }
.rv-card.land .rv-front { animation: rv-land .5s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes rv-land { 0% { filter: brightness(2.2); } 100% { filter: none; } }

.rv-rarity { margin: 0; min-height: 34px; font-family: var(--display); font-weight: 900; font-size: 30px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--g); text-shadow: 0 0 22px color-mix(in srgb, var(--g) 60%, transparent); transition: color .2s; }
.rv-rarity.bump { animation: rv-bump .3s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes rv-bump { 40% { transform: scale(1.18); } }
.rv-who { margin: -6px 0 0; min-height: 24px; font-size: 16px; color: rgba(255, 255, 255, .72); text-align: center; }
.rv-who b { color: #fff; }
.rv-new { color: var(--accent); font-weight: 700; }

/* Particles */
.rv-burst { position: absolute; left: 50%; top: 46%; width: 0; height: 0; pointer-events: none; }
.rv-burst i { position: absolute; width: var(--s, 8px); height: var(--s, 8px); margin: calc(var(--s, 8px) / -2); border-radius: 2px; background: var(--c, var(--g));
  animation: rv-fly var(--t, .9s) cubic-bezier(.15, .7, .3, 1) forwards; }
@keyframes rv-fly { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }

/* After the last card: everything you got */
.rv-sum { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 640px; }
.rv-sum .pcard { width: clamp(104px, 27vw, 150px); animation: rv-up .4s cubic-bezier(.2, 1.3, .4, 1) backwards; }
.rv-sum .pcard.lg { width: min(260px, 62vw, 40vh); border-radius: 20px; }
.rv-sum .pcard:nth-child(2) { animation-delay: .06s; } .rv-sum .pcard:nth-child(3) { animation-delay: .12s; }
@keyframes rv-up { from { opacity: 0; transform: translateY(20px) scale(.92); } }
.rv-note { margin: 4px 0 0; max-width: 46ch; text-align: center; color: rgba(255, 255, 255, .75); font-size: 15px; }

.rv-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; min-height: 44px; }
.rv-actions .btn { color: #fff; }
.rv-actions .btn-primary { color: var(--accent-ink); }
.rv-tap { font-size: 13px; color: rgba(255, 255, 255, .45); align-self: center; }

@media (max-height: 640px) { .rv-clue { height: 38px; font-size: 18px; } .rv-rarity { font-size: 24px; min-height: 28px; } .rv-stage { gap: 10px; } }
@media (prefers-reduced-motion: reduce) {
  .rv, .rv-rays, .rv-card.pulse .rv-back, .rv-card.shake .rv-back, .rv-card.land .rv-front, .rv-rarity.bump, .rv-sum .pcard { animation: none !important; }
  .rv-flip { transition: none; } .rv-clue { transition: opacity .2s; transform: none; }
}
