/* ============================================================
   Living Frame hero (v3)
   Interactive replica of the Titanray app inside the homepage
   glass frame: internally scrollable home screen (featured hero,
   category cards, two poster rows), clickable posters with an
   in-frame detail sheet, First Light entrance, idle sheen/tilt,
   live chips. All classes .tr-* (purged Tailwind bundle cannot
   supply new utilities).
   ============================================================ */

/* ---------- frame shell ---------- */
/* The Tailwind shell's decorative ::after border overlay (after:inset-0)
   covers the whole frame and paints above it — it must never eat events,
   or the entire replica is unclickable/unscrollable. */
#tr-hero-shell::after{pointer-events:none}
/* Make the whole frame pop: a bright violet ring, a broad ambient glow,
   and a deep drop shadow that lifts it off the page. */
#tr-hero-shell{
  position:relative;
  border-radius:1.1rem;
  box-shadow:
    0 0 0 1px rgba(167,139,250,.22),
    0 0 46px -8px rgba(139,92,246,.5),
    0 40px 90px -30px rgba(0,0,0,.85);
}
/* Living aurora: soft violet/indigo light pools drifting behind the frame,
   so the hero sits on a slow-moving cosmic glow rather than a static halo. */
.tr-hero-aura{
  position:absolute;inset:-3rem;z-index:0;pointer-events:none;border-radius:2.6rem;
  background:
    radial-gradient(38% 46% at 28% 30%,rgba(139,92,246,.55),transparent 72%),
    radial-gradient(40% 48% at 74% 40%,rgba(99,102,241,.42),transparent 72%),
    radial-gradient(52% 42% at 52% 92%,rgba(168,85,247,.4),transparent 72%);
  filter:blur(46px);
  opacity:.9;
  animation:tr-aura 14s ease-in-out infinite alternate;
}
@keyframes tr-aura{
  0%{transform:scale(1) rotate(-4deg);opacity:.65}
  50%{opacity:.95}
  100%{transform:scale(1.12) rotate(5deg);opacity:.8}
}
/* the frame must sit above the aura */
#tr-hero-shell > .tr-hero-frame{position:relative;z-index:1}
@media(max-width:640px){
  .tr-hero-aura{inset:-1.5rem;filter:blur(34px);opacity:.7}
}
.tr-hero-frame{
  position:relative;
  border-radius:0.7rem;
  overflow:hidden;
  background:#050508;
  /* NO 3D transform / will-change here: a preserve-3d context rasterizes
     every child at a fixed resolution and blurs text + the detail sheet. */
}
/* a crisp inner edge highlight so the screen edge reads as glass */
.tr-hero-frame::before{
  content:'';position:absolute;inset:0;z-index:20;pointer-events:none;
  border-radius:0.7rem;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);
}
/* On wide screens let the frame break out past the narrow text column so it
   reads as the centrepiece. Width must GROW (calc) — negative margins alone
   just shove a width:100% (w-full) box sideways and break centering. */
@media(min-width:1360px){
  #tr-hero-shell{width:calc(100% + 5rem);margin-left:-2.5rem;margin-right:-2.5rem}
}
@media(min-width:1560px){
  #tr-hero-shell{width:calc(100% + 9rem);margin-left:-4.5rem;margin-right:-4.5rem}
}
.tr-app{
  position:relative;
  aspect-ratio:16/9;
  background:#050508;
  user-select:none;
}
@media(max-width:640px){
  .tr-app{aspect-ratio:3/4}
}

/* ---------- inner scroller ---------- */
.tr-app-scroll{
  position:absolute;inset:0;
  overflow-y:auto;overflow-x:hidden;
  /* no overscroll-behavior here: page scroll must chain past the frame,
     otherwise the wheel gets trapped and the page feels stuck */
  scrollbar-width:thin;
  scrollbar-color:rgba(167,139,250,.35) transparent;
}
/* mobile: no inner scroller at all — the frame becomes a tall card and
   the page scrolls through it naturally */
@media(max-width:640px){
  .tr-app{aspect-ratio:auto}
  .tr-app-scroll{position:static;overflow:visible}
  .tr-app-hero{height:auto;aspect-ratio:3/3.4;min-height:0}
}
.tr-app-scroll::-webkit-scrollbar{width:7px}
.tr-app-scroll::-webkit-scrollbar-thumb{
  background:rgba(167,139,250,.3);border-radius:4px;
}
.tr-app-scroll::-webkit-scrollbar-thumb:hover{background:rgba(167,139,250,.55)}
.tr-app-scroll::-webkit-scrollbar-track{background:transparent}

/* ---------- faux app top nav (fixed over the scroller) ---------- */
.tr-app-nav{
  position:absolute;top:0;left:0;right:0;z-index:7;
  display:flex;align-items:center;gap:0.9rem;
  padding:0.6rem 1.1rem;pointer-events:none;
  background:linear-gradient(180deg,rgba(0,0,0,.78),rgba(0,0,0,0));
}
.tr-app-nav img{height:1.6rem;width:auto;display:block}
.tr-app-pill{
  font-size:0.7rem;font-weight:600;color:#0b0b10;background:#fff;
  padding:0.24rem 0.9rem;border-radius:999px;line-height:1.4;
}
.tr-app-pill.tr-off{background:none;color:#d4d4d8;font-weight:500}
.tr-app-navspacer{flex:1}
.tr-app-ico{width:1.1rem;height:1.1rem;color:#d4d4d8;flex:none;opacity:.85}
.tr-app-avatar{
  width:1.4rem;height:1.4rem;border-radius:50%;flex:none;
  background:radial-gradient(circle at 35% 30%,#c4b5fd,#7c3aed 65%,#4c1d95);
  box-shadow:0 0 8px rgba(139,92,246,.7);
}
@media(max-width:640px){
  .tr-app-nav{padding:0.5rem 0.8rem;gap:0.6rem}
  .tr-app-nav img{height:1.15rem}
  .tr-app-pill{font-size:0.62rem;padding:0.2rem 0.7rem}
}

/* ---------- featured hero section (matches the real app: centered) ---------- */
.tr-app-hero{
  position:relative;
  height:92%;               /* a sliver of the next section peeks: scroll affordance */
  min-height:230px;
  overflow:hidden;
}
/* scenes bleed vertically past the hero so scroll parallax (translateY set
   via --tr-par) never exposes an edge; the hero clips the overflow */
.tr-app-scene{
  position:absolute;inset:-9% 0;opacity:0;transition:opacity 1s ease;
  transform:translate3d(0,var(--tr-par,0px),0);will-change:transform;
}
.tr-app-scene img{
  width:100%;height:100%;object-fit:cover;object-position:center 25%;display:block;
}
.tr-app-scene.tr-on{opacity:1}
.tr-kb .tr-app-scene.tr-on img{animation:tr-kenburns 12s ease-in-out infinite alternate}
@keyframes tr-kenburns{
  from{transform:scale(1.04)}
  to{transform:scale(1.11) translate(-1.2%,1.2%)}
}
.tr-app-shade{
  position:absolute;inset:0;pointer-events:none;
  background:
    radial-gradient(90% 90% at 50% 45%,rgba(0,0,0,0) 35%,rgba(5,5,8,.55) 100%),
    linear-gradient(180deg,rgba(0,0,0,.3) 0%,rgba(0,0,0,0) 26%,rgba(5,5,8,.88) 88%,#050508 100%);
}

/* centered featured meta, like the real home screen */
.tr-app-meta{
  position:absolute;left:10%;right:10%;bottom:9%;z-index:5;
  display:flex;flex-direction:column;align-items:center;text-align:center;gap:0.45rem;
}
.tr-app-title{
  font-size:clamp(1.3rem,3.4vw,2.6rem);
  font-weight:800;color:#fff;line-height:1.04;
  letter-spacing:0.06em;text-transform:uppercase;
  text-shadow:0 2px 22px rgba(0,0,0,.85);
  transition:opacity .45s ease,transform .45s ease;
}
.tr-app-genres{
  font-size:clamp(0.62rem,1vw,0.78rem);color:#e4e4e7;letter-spacing:0.02em;
  transition:opacity .45s ease;
}
.tr-app-genres .tr-sep{opacity:.5;margin:0 0.3rem}
.tr-app-facts{
  display:flex;align-items:center;gap:1.1rem;
  font-size:clamp(0.62rem,1vw,0.76rem);color:#d4d4d8;
  transition:opacity .45s ease;
}
.tr-app-star{color:#fbbf24}
.tr-swap{opacity:0!important;transform:translateY(8px)}
.tr-app-btns{display:flex;gap:0.6rem;margin-top:clamp(0.3rem,0.9vw,0.6rem)}
.tr-app-play,.tr-app-trailer{
  display:inline-flex;align-items:center;gap:0.45rem;
  font-size:clamp(0.66rem,1vw,0.8rem);font-weight:650;
  padding:0.5rem 1.15rem;border-radius:8px;border:0;cursor:pointer;
  font-family:inherit;line-height:1.4;
}
.tr-app-play{position:relative;color:#0b0b10;background:#ede9fe;transition:transform .2s ease}
.tr-app-play:hover{transform:scale(1.05)}
.tr-app-trailer{color:#e4e4e7;background:rgba(255,255,255,.16);transition:background .2s ease}
.tr-app-trailer:hover{background:rgba(255,255,255,.25)}
.tr-app-play svg,.tr-app-trailer svg{width:0.85em;height:0.85em;flex:none}

/* carousel arrows, like the real app */
.tr-app-arrow{
  position:absolute;top:50%;transform:translateY(-50%);z-index:6;
  width:2.2rem;height:2.2rem;border-radius:50%;border:0;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  color:#e4e4e7;background:rgba(0,0,0,.35);
  opacity:0;transition:opacity .3s ease,background .2s ease;
}
.tr-app-arrow svg{width:1.1rem;height:1.1rem}
.tr-app-arrow:hover{background:rgba(0,0,0,.6);color:#fff}
.tr-app-hero:hover .tr-app-arrow{opacity:1}
.tr-arrow-l{left:1rem}
.tr-arrow-r{right:1rem}

/* small dots, bottom-center of the hero */
.tr-app-dots{
  position:absolute;bottom:3.5%;left:50%;transform:translateX(-50%);z-index:6;
  display:flex;gap:0.45rem;
}
.tr-app-dot{
  width:6px;height:6px;border-radius:50%;padding:0;border:0;cursor:pointer;
  background:rgba(255,255,255,.3);transition:transform .3s ease,background .3s ease;
}
.tr-app-dot.tr-on{background:#ede9fe;transform:scale(1.3);box-shadow:0 0 8px rgba(237,233,254,.8)}

/* ---------- content sections under the hero ---------- */
.tr-app-body{
  position:relative;z-index:2;
  padding:0.4rem 4% 1.6rem;
  display:flex;flex-direction:column;gap:1.1rem;
  background:#050508;
}
.tr-app-h2{
  font-size:clamp(0.8rem,1.5vw,1.05rem);font-weight:700;color:#f4f4f5;
  text-align:center;letter-spacing:0.01em;margin:0.4rem 0 0.1rem;
}
.tr-app-rowlabel{
  font-size:clamp(0.58rem,0.9vw,0.7rem);font-weight:650;letter-spacing:.13em;
  text-transform:uppercase;color:rgba(237,233,254,.68);margin-bottom:0.5rem;
}

/* category cards */
.tr-app-cats{display:grid;grid-template-columns:repeat(4,1fr);gap:0.7rem}
.tr-app-cat{
  position:relative;border-radius:8px;overflow:hidden;cursor:pointer;
  aspect-ratio:300/170;padding:0;border:0;background:#0a0a0f;
  box-shadow:0 6px 18px rgba(0,0,0,.5);
  transition:transform .25s ease,box-shadow .25s ease;
}
.tr-app-cat img{width:100%;height:100%;object-fit:cover;display:block;transition:filter .3s ease}
@media(hover:hover){
  /* lift + glow + a slight brightness only — never scale the image: the card
     labels (ANIME/TV/…) are baked into the art, so zooming clips them and
     upscaling blurs the text */
  .tr-app-cat:hover{transform:translateY(-4px);box-shadow:0 14px 30px rgba(0,0,0,.65),0 0 22px rgba(139,92,246,.35)}
  .tr-app-cat:hover img{filter:brightness(1.1)}
}
@media(max-width:640px){
  .tr-app-cats{grid-template-columns:repeat(2,1fr);gap:0.55rem}
}

/* poster rows */
.tr-app-rows{display:flex;flex-direction:column;gap:1.1rem}
.tr-app-rowzone2{position:relative}
.tr-row-arrow{
  position:absolute;top:calc(50% + 0.5rem);transform:translateY(-50%);z-index:4;
  width:2rem;height:2rem;border-radius:50%;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  color:#e4e4e7;background:rgba(10,10,16,.78);
  border:1px solid rgba(167,139,250,.28);
  box-shadow:0 4px 14px rgba(0,0,0,.5);
  opacity:0;transition:opacity .25s ease,background .2s ease;
}
.tr-row-arrow svg{width:1rem;height:1rem}
.tr-row-arrow:hover{background:rgba(32,32,44,.92);color:#fff}
.tr-app-rowzone2:hover .tr-row-arrow{opacity:1}
.tr-row-arrow.tr-hide{opacity:0!important;pointer-events:none}
.tr-ra-l{left:-0.55rem}
.tr-ra-r{right:-0.55rem}
@media(hover:none){.tr-row-arrow{display:none}}
@media(max-width:640px){.tr-row-arrow{display:none}}
.tr-app-rowclip{
  -webkit-mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 2.2rem),transparent);
  mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 2.2rem),transparent);
  overflow-x:auto;overflow-y:hidden;
  margin:-0.9rem -0.5rem 0;padding:0.9rem 0.5rem 0.3rem;
  scrollbar-width:none;-webkit-overflow-scrolling:touch;
}
.tr-app-rowclip::-webkit-scrollbar{display:none}
.tr-app-row{display:flex;gap:0.6rem;cursor:grab;width:max-content}
.tr-app-row.tr-dragging{cursor:grabbing}
.tr-app-poster{
  flex:none;width:clamp(88px,9.6vw,132px);aspect-ratio:2/3;
  border-radius:7px;position:relative;overflow:hidden;
  padding:0;border:0;cursor:pointer;background:#0a0a0f;
  box-shadow:0 5px 16px rgba(0,0,0,.55);
  transition:transform .28s cubic-bezier(.2,.9,.3,1.35),box-shadow .28s ease;
}
.tr-app-poster img{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}
@media(hover:hover){
  .tr-app-poster:hover{
    transform:translateY(-8px) scale(1.07);z-index:3;
    box-shadow:0 12px 28px rgba(0,0,0,.7),0 0 22px rgba(139,92,246,.35);
  }
}
@media(max-width:640px){
  .tr-app-poster{width:clamp(64px,21vw,92px)}
}

/* ---------- detail sheet (in-frame, slides up) ---------- */
/* ---------- Popular This Week: ranked row (mirrors the plugin) ---------- */
@font-face{
  font-family:'Rajdhani';
  src:url(../fonts/rajdhani-700-latin.woff2) format('woff2');
  font-weight:700;font-style:normal;font-display:swap;
}
/* label matches every other row label (no special colour) */
.tr-pop-zone .tr-app-rowlabel{margin-bottom:1.8rem}
/* Vertical headroom so the hover (lift + glow) is never clipped by the
   scroller (overflow-x:auto forces overflow-y to clip). The card only LIFTS
   and glows — the zoom happens INSIDE the poster (overflow:hidden), so growth
   stays within the clipped box and only the small lift+glow need room. */
.tr-pop-zone .tr-app-rowclip{
  margin-top:-2rem;padding-top:2rem;
  padding-bottom:1.5rem;margin-bottom:-1.1rem;
}
.tr-pop-card{
  width:clamp(116px,13vw,158px)!important;
  overflow:visible!important;background:transparent!important;box-shadow:none!important;
}
.tr-pop-poster{
  display:block;width:100%;aspect-ratio:2/3;border-radius:10px;overflow:hidden;
  box-shadow:0 6px 18px rgba(0,0,0,.55);
  transition:transform .28s cubic-bezier(.2,.9,.3,1.35),box-shadow .28s ease;
}
.tr-pop-poster img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .34s cubic-bezier(.2,.7,.3,1)}
.tr-pop-card{transition:transform .28s cubic-bezier(.2,.9,.3,1.2)}
@media(hover:hover){
  .tr-pop-card:hover{transform:translateY(-7px)}          /* whole card lifts */
  .tr-pop-card:hover .tr-pop-poster{
    box-shadow:0 16px 34px rgba(0,0,0,.7),0 0 26px rgba(139,92,246,.5);
  }
  .tr-pop-card:hover .tr-pop-poster img{transform:scale(1.08)} /* zoom stays inside */
}
/* the numeral sits just inside the poster's top-left corner (over the art),
   left-aligned so 1..15 share the same anchor */
.tr-rank{
  position:absolute;left:0.14em;top:0.02em;z-index:5;pointer-events:none;
  font-family:'Rajdhani','Segoe UI',sans-serif;font-weight:700;line-height:1;
  font-size:clamp(2.2rem,4.6vw,3.3rem);letter-spacing:.01em;display:inline-block;
}
.tr-rank-text{
  position:relative;z-index:2;color:transparent;
  -webkit-text-stroke:2.2px rgba(167,139,250,.8);
  text-shadow:0 0 10px rgba(139,92,246,.5),0 0 22px rgba(139,92,246,.28),0 2px 6px rgba(0,0,0,.55);
  transition:all .3s ease;
}
.tr-rank-haze{
  position:absolute;inset:-0.12em -0.2em;z-index:0;border-radius:8px;
  background:rgba(139,92,246,.24);filter:blur(11px);transition:all .3s ease;
}
.tr-rank-stars{position:absolute;inset:-0.2em;z-index:1;pointer-events:none}
.tr-rank-stars i{
  position:absolute;width:3px;height:3px;border-radius:50%;
  background:#c4b5fd;box-shadow:0 0 5px rgba(196,181,253,.9);
  opacity:.3;animation:tr-rank-twinkle ease-in-out infinite;
}
@keyframes tr-rank-twinkle{0%,100%{opacity:.3;transform:scale(1)}50%{opacity:1;transform:scale(1.5)}}
@media(hover:hover){
  .tr-pop-card:hover .tr-rank-text{-webkit-text-stroke-color:rgba(196,181,253,.95);
    text-shadow:0 0 14px rgba(139,92,246,.7),0 0 26px rgba(139,92,246,.4),0 2px 6px rgba(0,0,0,.55)}
  .tr-pop-card:hover .tr-rank-haze{background:rgba(139,92,246,.34)}
}
@media(max-width:640px){
  .tr-pop-card{width:clamp(104px,30vw,140px)!important}
  .tr-rank{font-size:clamp(2rem,11vw,2.8rem)}
}
@media (prefers-reduced-motion: reduce){ .tr-rank-stars i{animation:none} }

.tr-sheet-dim{
  position:absolute;inset:0;z-index:12;background:rgba(3,3,6,.6);
  backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);
  opacity:0;pointer-events:none;transition:opacity .3s ease;
}
.tr-sheet-dim.tr-in{opacity:1;pointer-events:auto}
.tr-sheet{
  position:absolute;left:0;right:0;bottom:0;z-index:13;
  background:linear-gradient(180deg,#15151d 0%,#0b0b12 100%);
  border-top:1px solid rgba(167,139,250,.35);
  border-radius:18px 18px 0 0;
  padding:1.5rem 6% 1.6rem;
  transform:translateY(105%);transition:transform .4s cubic-bezier(.22,.9,.28,1);
  box-shadow:0 -24px 60px rgba(0,0,0,.7);
  max-height:90%;overflow-y:auto;overscroll-behavior:contain;
}
.tr-sheet.tr-in{transform:translateY(0)}
.tr-sheet-grid{display:flex;gap:1.5rem;align-items:flex-start}
.tr-sheet-poster{
  flex:none;width:clamp(104px,13vw,168px);aspect-ratio:2/3;border-radius:11px;overflow:hidden;
  box-shadow:0 12px 34px rgba(0,0,0,.65),0 0 0 1px rgba(255,255,255,.05);
}
.tr-sheet-poster img{width:100%;height:100%;object-fit:cover;display:block}
.tr-sheet-info{flex:1;min-width:0}
.tr-sheet-title{
  font-size:clamp(1.25rem,2.6vw,1.85rem);font-weight:800;color:#fff;line-height:1.1;
  letter-spacing:-.01em;
}
.tr-sheet-meta{
  display:flex;flex-wrap:wrap;align-items:center;gap:0.35rem 0.9rem;
  margin-top:0.5rem;font-size:clamp(0.72rem,1.1vw,0.85rem);color:#b4b4bd;font-weight:500;
}
.tr-sheet-overview{
  margin-top:0.75rem;font-size:clamp(0.82rem,1.2vw,0.95rem);line-height:1.6;color:#d4d4dc;
  display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;
}
.tr-sheet-foot{
  display:flex;flex-wrap:wrap;align-items:center;gap:0.8rem 1.3rem;margin-top:1.2rem;
}
.tr-sheet-avail{
  display:inline-flex;align-items:center;gap:0.45rem;
  font-size:clamp(0.72rem,1.1vw,0.82rem);font-weight:650;color:#6ee7b7;
}
.tr-sheet-avail svg{width:1em;height:1em;flex:none}
.tr-sheet-cta{
  display:inline-flex;align-items:center;gap:0.45rem;text-decoration:none;
  font-size:clamp(0.8rem,1.15vw,0.92rem);font-weight:700;color:#fff;
  background:linear-gradient(180deg,#8b5cf6,#7c3aed);
  padding:0.6rem 1.4rem;border-radius:10px;
  box-shadow:0 8px 24px rgba(124,58,237,.45);
  transition:filter .2s ease,transform .2s ease;
}
.tr-sheet-cta:hover{filter:brightness(1.12);transform:translateY(-1px)}
.tr-sheet-close{
  position:absolute;top:1rem;right:1.1rem;
  width:2.1rem;height:2.1rem;border-radius:50%;border:0;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  color:#d4d4d8;background:rgba(255,255,255,.12);transition:background .2s ease;
}
.tr-sheet-close:hover{background:rgba(255,255,255,.22);color:#fff}
.tr-sheet-close svg{width:1.05rem;height:1.05rem}
@media(max-width:640px){
  .tr-sheet{padding:0.9rem 4% 1rem;max-height:70vh}
  .tr-sheet-overview{-webkit-line-clamp:5}
}

/* ---------- asleep veil + beam ---------- */
.tr-hero-veil{
  --tr-reveal:-12%;
  position:absolute;inset:0;z-index:8;pointer-events:none;
  background:rgba(5,5,10,.9);
  -webkit-mask-image:linear-gradient(105deg,transparent calc(var(--tr-reveal,0%) - 1%),#000 calc(var(--tr-reveal,0%) + 11%));
  mask-image:linear-gradient(105deg,transparent calc(var(--tr-reveal,0%) - 1%),#000 calc(var(--tr-reveal,0%) + 11%));
}
.tr-hero-veil.tr-done{display:none}
.tr-hero-beam{
  position:absolute;top:-8%;bottom:-8%;width:4.5%;z-index:9;pointer-events:none;
  left:calc(var(--tr-reveal,0%) * .96);
  background:linear-gradient(90deg,rgba(196,181,253,0),rgba(196,181,253,.95),rgba(139,92,246,.55),rgba(139,92,246,0));
  filter:blur(5px);transform:skewX(-11deg);
  opacity:0;
}
.tr-hero-beam.tr-firing{opacity:1}
.tr-impact{
  position:absolute;z-index:10;width:90px;height:90px;margin:-45px 0 0 -45px;
  border-radius:50%;pointer-events:none;opacity:0;
  background:radial-gradient(circle,rgba(237,233,254,.9),rgba(167,139,250,.45) 35%,rgba(139,92,246,0) 70%);
}
.tr-impact.tr-flash{animation:tr-impact .45s ease-out forwards}
@keyframes tr-impact{
  0%{opacity:0;transform:scale(.35)}
  25%{opacity:.9}
  100%{opacity:0;transform:scale(1.5)}
}
.tr-ignite{animation:tr-ignite .55s ease-out}
@keyframes tr-ignite{
  0%{filter:brightness(1)}
  30%{filter:brightness(1.5) saturate(1.15)}
  100%{filter:brightness(1)}
}
.tr-shimmer{animation:tr-shimmer .6s ease-out}
@keyframes tr-shimmer{
  0%{filter:drop-shadow(0 0 0 rgba(196,181,253,0))}
  40%{filter:drop-shadow(0 0 12px rgba(196,181,253,.55))}
  100%{filter:drop-shadow(0 0 0 rgba(196,181,253,0))}
}
.tr-stats-ignite dd{animation:tr-statglow 1.2s ease-out}
@keyframes tr-statglow{
  0%{text-shadow:0 0 0 rgba(167,139,250,0)}
  35%{text-shadow:0 0 26px rgba(167,139,250,.95)}
  100%{text-shadow:0 0 0 rgba(167,139,250,0)}
}

/* First Light streak: a clean light line, not a comet.
   The element is a thin gradient rod with a bright head; JS moves it
   along the fall path with a motion-blur stretch. */
.tr-streak2{
  position:absolute;z-index:30;pointer-events:none;
  width:150px;height:2px;border-radius:2px;
  background:linear-gradient(90deg,rgba(196,181,253,0),rgba(224,214,254,.85) 55%,#fff 96%);
  filter:blur(0.5px) drop-shadow(0 0 6px rgba(167,139,250,.9));
  opacity:0;will-change:transform,opacity;
}
.tr-streak2::after{
  content:'';position:absolute;right:-5px;top:50%;
  width:10px;height:10px;margin-top:-5px;border-radius:50%;
  background:radial-gradient(circle,#fff 0%,rgba(196,181,253,.85) 40%,rgba(139,92,246,0) 75%);
}

/* ---------- idle sheen ---------- */
.tr-hero-sheen{
  position:absolute;inset:0;z-index:7;pointer-events:none;opacity:0;
  background:radial-gradient(340px circle at var(--tr-lx,50%) var(--tr-ly,30%),rgba(196,181,253,.12),rgba(196,181,253,0) 62%);
  transition:opacity .5s ease;
}
.tr-hero-sheen.tr-on{opacity:1}

/* ---------- live chips ---------- */
.tr-chip{
  position:absolute;z-index:11;
  display:inline-flex;align-items:center;gap:0.45rem;
  font-size:0.72rem;font-weight:600;color:#ede9fe;white-space:nowrap;
  background:rgba(22,22,28,.82);
  border:1px solid rgba(167,139,250,.32);
  border-radius:999px;padding:0.4rem 0.85rem;
  backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);
  box-shadow:0 8px 26px rgba(0,0,0,.5);
  opacity:0;transform:translateY(6px);
  transition:opacity .6s ease,transform .6s ease;
}
.tr-chip.tr-in{opacity:1;transform:translateY(0)}
.tr-chip-live{top:-0.95rem;right:4%}
.tr-chip-dot{
  width:7px;height:7px;border-radius:50%;flex:none;
  background:#34d399;box-shadow:0 0 8px #34d399;
  animation:tr-chippulse 2.1s ease-in-out infinite;
}
@keyframes tr-chippulse{50%{opacity:.35}}
.tr-chip b{font-weight:700;color:#fff;font-variant-numeric:tabular-nums}
@media(max-width:640px){
  .tr-chip{font-size:0.6rem;padding:0.28rem 0.6rem;gap:0.35rem}
  .tr-chip-live{top:auto;bottom:-0.85rem;right:4%}
}

/* ---------- join tooltip ---------- */
.tr-join-tip{
  position:absolute;z-index:14;max-width:240px;
  background:rgba(24,24,30,.92);
  border:1px solid rgba(167,139,250,.4);
  border-radius:12px;padding:0.65rem 0.9rem;
  backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
  box-shadow:0 12px 34px rgba(0,0,0,.6),0 0 22px rgba(139,92,246,.25);
  font-size:0.78rem;line-height:1.45;color:#d4d4d8;
  opacity:0;transform:translateY(6px) scale(.97);
  transition:opacity .25s ease,transform .25s ease;
  pointer-events:none;
}
.tr-join-tip.tr-in{opacity:1;transform:none;pointer-events:auto}
.tr-join-tip a{display:inline-block;margin-top:0.2rem;font-weight:650;color:#c4b5fd;text-decoration:none}
.tr-join-tip a:hover{color:#ddd6fe}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce){
  .tr-kb .tr-app-scene.tr-on img,.tr-chip-dot{animation:none}
  .tr-hero-veil,.tr-hero-beam,.tr-streak2{display:none}
  .tr-app-scene,.tr-app-poster,.tr-app-title,.tr-app-genres,.tr-app-facts,.tr-sheet{transition:none}
  .tr-hero-aura{animation:none}
}
