/* SlotVault — Search-to-Reel Animation v2.0
   Inherits CSS custom properties from canvas.css */

/* ── Autocomplete ─────────────────────────────────────────── */
.sv-dock .sv-search { position: relative; }

#sv-ac {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: 380px;
  background: rgba(7,5,20,.97);
  border: 1px solid hsl(var(--brand-hue) 55% 55% / .28);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 32px 90px rgba(0,0,0,.8), 0 0 0 1px hsl(var(--brand-hue) 60% 55% / .06);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 200;
}
#sv-ac.sv-ac-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.sv-ac-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 16px;
  cursor: pointer;
  transition: background .1s;
}
.sv-ac-row + .sv-ac-row { border-top: 1px solid rgba(255,255,255,.05); }
.sv-ac-row:hover,
.sv-ac-row.sv-ac-hl { background: hsl(var(--brand-hue) 60% 55% / .15); }
.sv-ac-img {
  width: 58px;
  height: 36px;
  border-radius: 9px;
  flex-shrink: 0;
  background: #000 center/cover;
  box-shadow: 0 2px 12px rgba(0,0,0,.45);
}
.sv-ac-info { flex: 1; min-width: 0; }
.sv-ac-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #f3f0ff;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sv-ac-name mark { background: none; color: var(--accent); font-weight: 700; font-style: normal; }
.sv-ac-sub { font-size: 11px; color: rgba(243,240,255,.45); margin-top: 2px; }
.sv-ac-badge {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
  background: hsl(var(--brand-hue) 60% 55% / .18);
  border-radius: 999px;
  padding: 3px 9px;
  flex-shrink: 0;
  letter-spacing: .04em;
  white-space: nowrap;
}

/* ── Full-viewport overlay ────────────────────────────────── */
#sv-anim-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  background: var(--bg);
}

/* ── Animation canvas (snapshot of home page) ─────────────── */
#sv-anim-canvas { position: absolute; inset: 0; }

.sv-anim-tile {
  position: absolute;
  left: 0; top: 0;
  overflow: hidden;
  background: #0c0a18; /* placeholder colour so any decode lag is on-brand, not black */
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.07);
  /* Transform-driven snap-to-grid → GPU-composited motion, no layout per frame */
  will-change: transform;
}
/* Game art is now an <img> child for proper decode pipelining + cache reuse */
.sv-tile-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.sv-anim-tile-ov {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 38%, rgba(0,0,0,.72));
}
.sv-anim-tile-prov {
  position: absolute;
  top: 9px; left: 11px;
  font-size: 9px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.55);
  z-index: 1;
}
.sv-anim-tile-name {
  position: absolute;
  bottom: 9px; left: 11px; right: 10px;
  font-size: 12px; font-weight: 700;
  color: #fff; line-height: 1.2;
  z-index: 1;
}

/* ── Reel columns ─────────────────────────────────────────── */
#sv-reels {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  opacity: 0;
}
.sv-rcol {
  flex: 1;
  height: 100vh;
  overflow: hidden;
  position: relative;
}
.sv-rcol::before, .sv-rcol::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  z-index: 2;
  pointer-events: none;
  height: 28vh;
}
.sv-rcol::before { top: 0;    background: linear-gradient(to bottom, var(--bg), transparent); }
.sv-rcol::after  { bottom: 0; background: linear-gradient(to top,    var(--bg), transparent); }
.sv-rcol.sv-mid::before, .sv-rcol.sv-mid::after { display: none; }

.sv-rtrack { display: flex; flex-direction: column; will-change: transform; }

.sv-rtrack.sv-blurred {
  filter: blur(9px) brightness(1.12);
  transition: filter .25s ease;
}

.sv-ritem {
  flex-shrink: 0;
  background: #0c0a18; /* on-brand placeholder behind <img> */
  position: relative;
  overflow: hidden;
}
.sv-ritem-ov   { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 45%, rgba(0,0,0,.7)); }
.sv-ritem-prov { position: absolute; top: 8px; left: 10px; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.5); z-index: 1; }
.sv-ritem-name { position: absolute; bottom: 8px; left: 10px; right: 8px; font-size: 12px; font-weight: 700; color: #fff; line-height: 1.2; z-index: 1; }

/* ── Reel frame lines ─────────────────────────────────────── */
.sv-rl {
  position: fixed;
  left: 0; right: 0;
  height: 2.5px;
  z-index: 86;
  pointer-events: none;
  background: linear-gradient(90deg,
    transparent 0%,
    hsl(var(--brand-hue) 90% 75% / .18) 8%,
    hsl(var(--brand-hue) 90% 75% / .7) 50%,
    hsl(var(--brand-hue) 90% 75% / .18) 92%,
    transparent);
  opacity: 0;
  transition: opacity .4s ease;
}
#sv-rl-t { top: calc(50% - var(--sv-ih2, 0px)); }
#sv-rl-b { top: calc(50% + var(--sv-ih2, 0px)); }
.sv-rl.sv-rl-on { opacity: 1; }

/* ── Veil ─────────────────────────────────────────────────── */
#sv-veil {
  position: fixed;
  inset: 0;
  z-index: 88;
  pointer-events: none;
  opacity: 0;
}

/* ── Win flash ────────────────────────────────────────────── */
#sv-flash {
  position: fixed;
  inset: 0;
  z-index: 89;
  pointer-events: none;
  background: radial-gradient(ellipse 55% 45% at 50% 50%,
    hsl(var(--brand-hue) 90% 80% / .65), transparent 72%);
  opacity: 0;
  transition: opacity .07s ease;
}

/* ── Win ring ─────────────────────────────────────────────── */
#sv-wring {
  position: fixed;
  z-index: 89;
  pointer-events: none;
  border-radius: 8px;
  opacity: 0;
  transition: opacity .4s ease;
  box-shadow:
    0 0 0 2.5px var(--accent),
    0 0 50px hsl(var(--brand-hue) 90% 75% / .65),
    0 0 120px hsl(var(--brand-hue) 90% 75% / .25);
}
#sv-wring.sv-wr-on { opacity: 1; }

/* ── Morph overlay ────────────────────────────────────────── */
#sv-morph {
  position: fixed;
  z-index: 93;
  pointer-events: none;
  border-radius: 14px;
  overflow: hidden;
  opacity: 0;
}
#sv-morph.sv-morph-on {
  pointer-events: auto;
  opacity: 1;
}

/* Tile → Card cross-fade layers */
.sv-mt-bg {
  position: absolute;
  inset: 0;
  background: center/cover;
  transition: opacity .5s ease .25s;
}
.sv-mc {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  opacity: 0;
  transition: opacity .5s ease .3s;
  background: linear-gradient(180deg, rgba(13,8,32,.97), rgba(7,4,18,.99));
  display: flex;
  flex-direction: column;
}
#sv-morph.sv-revealed .sv-mt-bg { opacity: 0; }
#sv-morph.sv-revealed .sv-mc    { opacity: 1; }

/* Hero area */
.sv-mc-hero {
  flex-shrink: 0;
  height: 200px;
  background: #000 center/cover top;
  position: relative;
}
.sv-mc-hero-ov {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.04) 20%, rgba(7,4,18,.97));
}
.sv-mc-badge {
  position: absolute;
  top: 14px; left: 14px;
  background: hsl(var(--brand-hue) 70% 40% / .9);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 10px; font-weight: 800; letter-spacing: .1em;
  color: #fff; text-transform: uppercase;
}
.sv-mc-rating {
  position: absolute;
  top: 14px; right: 14px;
  background: rgba(0,0,0,.62);
  border: 1px solid hsl(var(--brand-hue) 90% 75% / .38);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px; font-weight: 700;
  color: var(--accent);
  display: flex; align-items: center; gap: 4px;
}

/* Body */
.sv-mc-body {
  flex: 1;
  padding: 18px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}
.sv-mc-eye    { font-size: 10px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.sv-mc-title  { font-size: 28px; font-weight: 900; color: #fff; line-height: 1.06; letter-spacing: -.03em; }
.sv-mc-sub    { font-size: 12.5px; color: rgba(243,240,255,.42); }
.sv-mc-excerpt{ font-size: 12.5px; line-height: 1.5; color: rgba(243,240,255,.58); margin: 0; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }

.sv-mc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.sv-mc-stat {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 8px 11px;
}
.sv-mc-sk { font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: rgba(243,240,255,.36); margin-bottom: 3px; }
.sv-mc-sv { font-size: 15px; font-weight: 800; color: #e8e0f7; }

/* CTAs */
.sv-mc-btns { display: flex; gap: 8px; margin-top: auto; }
.sv-mc-play {
  flex: 1;
  padding: 12px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 14px; font-weight: 800;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  box-shadow: 0 4px 28px hsl(var(--brand-hue) 80% 60% / .5);
  transition: transform .15s, box-shadow .15s;
  font-family: inherit;
  text-decoration: none;
}
.sv-mc-play:hover { transform: translateY(-2px); box-shadow: 0 8px 36px hsl(var(--brand-hue) 80% 60% / .7); }
.sv-mc-play svg   { width: 12px; height: 12px; }
.sv-mc-rev {
  padding: 12px 16px;
  border-radius: 11px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  color: #e8e0f7; font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
  text-decoration: none;
  display: flex; align-items: center;
  font-family: inherit;
}
.sv-mc-rev:hover { background: rgba(255,255,255,.13); }

/* Slotslaunch iframe panel (full-card overlay) */
.sv-mc-demo-panel {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.sv-mc-demo-panel.sv-dp-on { opacity: 1; pointer-events: auto; }
.sv-mc-demo-panel iframe { width: 100%; height: 100%; border: 0; }
.sv-mc-demo-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,.7);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 6;
  transition: background .15s;
}
.sv-mc-demo-close:hover { background: rgba(255,255,255,.15); }

/* Card close button (fixed, pinned to card corner) */
#sv-morph-close {
  position: fixed;
  z-index: 98;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(6,4,18,.96);
  border: 1.5px solid hsl(var(--brand-hue) 55% 55% / .42);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: rgba(243,240,255,.7);
  font-size: 14px;
  box-shadow: 0 2px 18px rgba(0,0,0,.65);
  transition: border-color .15s, background .15s, color .15s;
  pointer-events: auto;
  font-family: inherit;
  line-height: 1;
}
#sv-morph-close:hover {
  border-color: var(--accent);
  background: hsl(var(--brand-hue) 60% 55% / .2);
  color: #fff;
}

/* ── Replay button ────────────────────────────────────────── */
#sv-replay {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(18px);
  z-index: 98;
  padding: 11px 26px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  opacity: 0;
  transition: opacity .5s ease, transform .5s cubic-bezier(.34,1.2,.64,1), background .15s;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-family: inherit;
  pointer-events: none;
}
#sv-replay.sv-rp-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
#sv-replay:hover { background: rgba(255,255,255,.15); }

/* ── Reel spin keyframe ───────────────────────────────────── */
@keyframes sv-rspin {
  from { transform: translateY(calc(var(--lh) * -1)); }
  to   { transform: translateY(calc(var(--lh) * -2)); }
}
