/* ── TV Mode v2 ── */
.tv-v2.tv-stage { flex-direction: column; }

.tv-header-wrap {
  position: relative; z-index: 10;
  transition: opacity .5s ease, transform .5s ease;
}
.tv-header-wrap.tv-idle {
  opacity: 0; transform: translateY(-110%); pointer-events: none;
}

/* Entrance animations */
@keyframes tv-rise {
  from { opacity: 0; transform: translateY(50px); }
  to   { opacity: 1; transform: none; }
}
@keyframes tv-crown-drop {
  from { opacity: 0; transform: translateX(-50%) translateY(-30px) scale(.5); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes tv-rev-pop {
  from { opacity: 0; transform: scale(.7); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes tv-ped-grow {
  from { transform: scaleY(0); transform-origin: bottom; }
  to   { transform: scaleY(1); transform-origin: bottom; }
}

.tv-v2 .podium-place { animation: tv-rise .9s cubic-bezier(.34,1.2,.64,1) both; animation-delay: var(--pd-delay, 0.1s); }
.tv-v2 .podium-place .podium-crown { animation: tv-crown-drop .7s 1.1s cubic-bezier(.34,1.2,.64,1) both; }
.tv-v2 .podium-place.p1 .podium-revenue { animation: tv-rev-pop .6s 1.0s ease both; }
.tv-v2 .pedestal { animation: tv-ped-grow .8s .6s ease both; }

/* Glow pulse on #1 avatar */
@keyframes glow-champion {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255,255,255,.15), 0 0 0 8px var(--gold-2), 0 0 50px rgba(245,158,11,.55); }
  50%       { box-shadow: 0 0 0 5px rgba(255,255,255,.2), 0 0 0 10px var(--gold-2), 0 0 90px rgba(245,158,11,.9); }
}
.tv-v2 .podium-av.gold { animation: glow-champion 2.8s ease-in-out infinite; }

/* Rank-change highlight */
@keyframes tv-rank-flash {
  0%, 100% { background: rgba(255,255,255,.05); }
  40%       { background: var(--tv-accent-soft, rgba(245,158,11,.28)); border-color: var(--tv-accent, rgba(245,158,11,.6)); }
}
.tv-rank-changed { animation: tv-rank-flash 1s ease 2; }

/* Theme-aware ticker */
.tv-v2.theme-stadium .tv-ticker { background: rgba(10,6,4,.96); }
.tv-v2.theme-aurora  .tv-ticker { background: rgba(8,6,28,.96); }

/* Subtle star field on midnight */
.tv-v2.theme-midnight::before {
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.55), transparent),
    radial-gradient(1px 1px at 35% 72%, rgba(255,255,255,.4), transparent),
    radial-gradient(1px 1px at 58% 42%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 78% 85%, rgba(255,255,255,.35), transparent),
    radial-gradient(1px 1px at 91% 25%, rgba(255,255,255,.6), transparent),
    radial-gradient(1.5px 1.5px at 24% 55%, rgba(255,255,255,.3), transparent),
    radial-gradient(1px 1px at 65% 10%, rgba(255,255,255,.5), transparent);
  opacity: .8;
}

/* No rank on podium pedestal - just number, bigger crown */
.tv-v2 .podium-place.p1 .podium-crown { font-size: clamp(26px, 4.4vh, 56px); top: clamp(-62px, -4.8vh, -36px); filter: drop-shadow(0 6px 20px rgba(245,158,11,.8)); }

/* ── Seller badges on podium ── */
.podium-badges {
  min-height: 1.2em;
  font-size: clamp(12px, 2vh, 24px);
  letter-spacing: .15em;
  line-height: 1.2;
}

/* ── New-sale / goal celebration overlay ── */
.tv-celebration {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .5);
  pointer-events: none;
  overflow: hidden;
  animation: tv-celebration-in .3s ease both;
}
.tv-celebration.tv-celebration-leaving { animation: tv-celebration-out .4s ease both; }
@keyframes tv-celebration-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes tv-celebration-out { from { opacity: 1; } to { opacity: 0; } }

.tv-celebration-card {
  position: relative; z-index: 2;
  text-align: center; color: #fff;
  animation: tv-celebration-pop .55s cubic-bezier(.34, 1.4, .64, 1) both;
}
@keyframes tv-celebration-pop {
  from { opacity: 0; transform: scale(.5); }
  to   { opacity: 1; transform: scale(1); }
}
.tv-celebration-title {
  font-size: clamp(20px, 3.6vh, 44px); font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  background: linear-gradient(180deg, #fff 30%, #fcd34d 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 14px rgba(245, 158, 11, .5));
}
.tv-celebration-name  { font-size: clamp(24px, 4.4vh, 56px); font-weight: 700; margin-top: .2em; }
.tv-celebration-value { font-size: clamp(16px, 2.6vh, 32px); font-weight: 600; color: rgba(255, 255, 255, .85); margin-top: .2em; }

.tv-celebration-confetti { position: absolute; inset: 0; z-index: 1; }
.tv-confetti-piece {
  position: absolute; top: -24px;
  width: 10px; height: 16px; border-radius: 2px;
  opacity: .95;
  animation: tv-confetti-fall 3s linear both;
}
@keyframes tv-confetti-fall {
  to { transform: translateY(110vh) rotate(720deg); }
}
