/* DemonGacha — Neon Arcade Geometry Dash Theme */
:root {
  --bg: #080a12;
  --bg-elevated: #111526;
  --bg-card: #151a2e;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Pack & Difficulty accents */
  --easy: #6366f1;
  --medium: #a855f7;
  --hard: #ff5740;
  --easyhard: #ff5740;
  --insane: #d946ef;
  --extreme: #e11d48;

  /* Rarities */
  --rare: #38bdf8;
  --epic: #c084fc;
  --legendary: #fbbf24;
  --mythic: #ff2e63;

  --orb: #06b6d4;
  --key: #fbbf24;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.58);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  position: relative;
}

.gd-icon-img {
  display: inline-block;
  object-fit: contain;
  vertical-align: middle;
  user-select: none;
  pointer-events: none;
}

.trio-faces {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 92px;
}

.trio-faces .trio-side {
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
  opacity: 0.94;
}

.trio-faces .trio-left {
  transform: translateX(12px) rotate(-10deg);
}

.trio-faces .trio-right {
  transform: translateX(-12px) rotate(10deg);
}

.trio-faces .trio-center {
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.65));
}

/* Subtle Geometric Background */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}

.bg-glow-1 {
  top: -180px;
  left: -120px;
  background: radial-gradient(circle, #e11d48, transparent 70%);
}

.bg-glow-2 {
  bottom: -200px;
  right: -120px;
  background: radial-gradient(circle, #9333ea, transparent 70%);
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 10, 18, 0.84);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 70px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  user-select: none;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 12px rgba(225, 29, 72, 0.55));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}

.brand-name span {
  color: #fb7185;
}

.brand-domain {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 5px;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.nav-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.nav-tab:hover {
  color: var(--text);
}

.nav-tab.active {
  background: linear-gradient(135deg, #e11d48, #9333ea);
  color: #fff;
  box-shadow: 0 4px 16px rgba(225, 29, 72, 0.35);
}

.nav-badge {
  background: rgba(0, 0, 0, 0.32);
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.76rem;
}

.currency-hud {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.currency-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.32);
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
}

.currency-pill.key-pill {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.34);
}

/* Buttons */
.btn {
  appearance: none;
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, background 0.22s ease, opacity 0.2s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-claim {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: #fff;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.3);
}

.btn-claim:hover {
  box-shadow: 0 6px 22px rgba(6, 182, 212, 0.5);
  transform: translateY(-1px);
}

.btn-audio {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 0.95rem;
  line-height: 1;
}

.btn-audio:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-audio.muted {
  opacity: 0.55;
}

.btn-account {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 8px 15px;
}

.btn-account:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-account.signed-in {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.45);
  color: #bbf7d0;
}

.btn-primary {
  background: linear-gradient(135deg, #e11d48, #c026d3);
  color: #fff;
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.35);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(225, 29, 72, 0.48);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: #fff;
  border-color: var(--border-strong);
}

.btn-danger-ghost {
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-danger-ghost:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #fff;
}

.btn-link {
  background: none;
  border: none;
  color: #fb7185;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-link:hover {
  text-decoration: underline;
}

/* Main Content */
.main-content {
  flex: 1;
  padding-top: 28px;
  padding-bottom: 52px;
}

.hero-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-title {
  margin: 0 0 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-title span {
  background: linear-gradient(90deg, #6366f1, #ff5740, #e11d48, #d946ef);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 0;
  color: var(--text-muted);
  max-width: 640px;
  font-size: 0.98rem;
  line-height: 1.5;
}

.source-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-pill {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.source-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.source-dot.fallback {
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

/* Booster Packs Grid */
.packs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 26px;
}

.pack-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(17, 21, 38, 0.92) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.45s ease, box-shadow 0.45s ease;
  overflow: hidden;
}

.pack-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.16;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.pack-card.pack-easyhard::before {
  background: radial-gradient(circle at 50% 0%, #f97316, transparent 65%);
}
.pack-card.pack-insane::before {
  background: radial-gradient(circle at 50% 0%, var(--insane), transparent 65%);
}
.pack-card.pack-extreme::before {
  background: radial-gradient(circle at 50% 0%, var(--extreme), transparent 65%);
}

.pack-card:hover {
  transform: translateY(-7px);
}

.pack-card.pack-easyhard:hover {
  border-color: rgba(255, 87, 64, 0.55);
  box-shadow: 0 22px 54px rgba(255, 87, 64, 0.18);
}
.pack-card.pack-insane:hover {
  border-color: rgba(217, 70, 239, 0.55);
  box-shadow: 0 22px 54px rgba(217, 70, 239, 0.2);
}
.pack-card.pack-extreme:hover {
  border-color: rgba(225, 29, 72, 0.65);
  box-shadow: 0 22px 58px rgba(225, 29, 72, 0.26);
}

/* Foil Booster Pack Graphic */
.booster-foil {
  position: relative;
  width: 196px;
  height: 252px;
  border-radius: 14px;
  margin: 6px 0 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.pack-card:hover .booster-foil {
  transform: scale(1.04) rotate(-1.2deg);
}

.booster-foil::before,
.booster-foil::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 14px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.18) 0 4px,
    rgba(0, 0, 0, 0.35) 4px 8px
  );
}

.booster-foil::before { top: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.25); }
.booster-foil::after { bottom: 0; border-top: 1px solid rgba(255, 255, 255, 0.25); }

.pack-easyhard .booster-foil {
  background: linear-gradient(155deg, #312e81 0%, #9333ea 45%, #dc2626 100%);
}
.pack-insane .booster-foil {
  background: linear-gradient(155deg, #4a044e 0%, #a21caf 50%, #581c87 100%);
}
.pack-extreme .booster-foil {
  background: linear-gradient(155deg, #2b040e 0%, #be123c 48%, #4c0519 100%);
  border-color: rgba(251, 191, 36, 0.45);
}

.booster-sheen {
  position: absolute;
  inset: -40%;
  background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, 0.22) 50%, transparent 65%);
  transform: translateX(-60%);
  transition: transform 1.3s ease;
  pointer-events: none;
}

.pack-card:hover .booster-sheen {
  transform: translateX(65%);
}

.booster-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 8px;
}

.booster-face {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
  margin: 2px 0 8px;
}

.booster-edition {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.booster-count {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 2px;
}

.pack-title {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 800;
}

.pack-subtitle {
  margin: 0 0 10px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.pack-rarity-guide {
  font-size: 0.75rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 10px;
  width: 100%;
  margin-bottom: 14px;
}

/* Per-Pack Pity Bar */
.pity-box {
  width: 100%;
  margin-bottom: 16px;
  text-align: left;
}

.pity-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.pity-row strong {
  color: #fde047;
}

.pity-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.pity-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #c084fc, #fbbf24);
  transition: width 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.pack-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  width: 100%;
  margin-top: auto;
}

.btn-open-orbs {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.28);
}

.pack-easyhard .btn-open-orbs {
  background: linear-gradient(135deg, #6366f1, #ea580c);
  box-shadow: 0 4px 16px rgba(234, 88, 12, 0.3);
}
.pack-insane .btn-open-orbs {
  background: linear-gradient(135deg, #c026d3, #7e22ce);
  box-shadow: 0 4px 16px rgba(192, 38, 211, 0.3);
}
.pack-extreme .btn-open-orbs {
  background: linear-gradient(135deg, #e11d48, #9f1239);
  box-shadow: 0 4px 18px rgba(225, 29, 72, 0.38);
}

.btn-open-key {
  background: rgba(251, 191, 36, 0.12);
  color: #fde047;
  border: 1px solid rgba(251, 191, 36, 0.35);
  padding: 10px 12px;
}

.btn-open-key:hover:not(:disabled) {
  background: rgba(251, 191, 36, 0.22);
}

/* Info Strip */
.info-strip {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  background: rgba(17, 21, 38, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 28px;
}

.info-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.info-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.rate-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rarity-chip {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.rarity-mythic { color: #ff6b8b; background: rgba(255, 46, 99, 0.14); border-color: rgba(255, 46, 99, 0.4); }
.rarity-legendary { color: #fde047; background: rgba(251, 191, 36, 0.14); border-color: rgba(251, 191, 36, 0.4); }
.rarity-epic { color: #d8b4fe; background: rgba(192, 132, 252, 0.14); border-color: rgba(192, 132, 252, 0.4); }
.rarity-rare { color: #7dd3fc; background: rgba(56, 189, 248, 0.14); border-color: rgba(56, 189, 248, 0.4); }
.rarity-holo {
  color: #fff;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.22), rgba(217, 70, 239, 0.25), rgba(251, 191, 36, 0.22));
  border-color: rgba(255, 255, 255, 0.35);
}

/* Recent Pulls */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.12rem;
}

.recent-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.recent-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.recent-chip:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

/* Overlays */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  animation: overlayFade 0.28s ease;
}

@keyframes overlayFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.overlay[hidden] {
  display: none;
}

.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 12, 0.88);
  backdrop-filter: blur(12px);
}

.pack-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1120px;
  max-height: 92vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #12172b 0%, #0b0e1a 100%);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.stage-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.stage-header h2 {
  margin: 2px 0 0;
  font-size: 1.4rem;
}

.stage-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pity-pill {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fde047;
}

.icon-close {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.icon-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Interactive Mouse Drag-to-Rip Phase */
.rip-phase {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 24px;
  gap: 18px;
  user-select: none;
}

.rip-instruction {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fde047;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 8px 16px;
  border-radius: 999px;
}

.rip-pack-wrap {
  position: relative;
  width: 268px;
  touch-action: none;
  user-select: none;
}

.rip-foil-top {
  position: relative;
  height: 54px;
  border-radius: 16px 16px 4px 4px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-bottom: 3px dashed rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  overflow: hidden;
  transform-origin: right bottom;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  z-index: 3;
}

.rip-foil-top.dragging {
  cursor: grabbing;
  transition: none;
}

.rip-tear-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.55), rgba(255, 255, 255, 0.45));
  pointer-events: none;
}

.rip-handle {
  position: absolute;
  left: 8px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(8, 10, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fde047;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.rip-tear-hint {
  position: relative;
  z-index: 2;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  padding-left: 26px;
}

.rip-sparks {
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  height: 10px;
  pointer-events: none;
  z-index: 5;
}

.rip-spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fde047;
  box-shadow: 0 0 10px #fbbf24, 0 0 16px #fff;
  animation: sparkFly 0.65s ease-out forwards;
}

@keyframes sparkFly {
  0% { opacity: 1; transform: translate(0, 0) scale(1.1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.1); }
}

.rip-foil-body {
  height: 285px;
  border-radius: 4px 4px 18px 18px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.68);
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.1s ease;
}

.rip-pack-wrap.pack-easyhard .rip-foil-body,
.rip-pack-wrap.pack-easyhard .rip-foil-top {
  background: linear-gradient(155deg, #312e81 0%, #9333ea 45%, #dc2626 100%);
}
.rip-pack-wrap.pack-insane .rip-foil-body,
.rip-pack-wrap.pack-insane .rip-foil-top {
  background: linear-gradient(155deg, #4a044e 0%, #a21caf 55%, #581c87 100%);
}
.rip-pack-wrap.pack-extreme .rip-foil-body,
.rip-pack-wrap.pack-extreme .rip-foil-top {
  background: linear-gradient(155deg, #2b040e 0%, #be123c 55%, #4c0519 100%);
}

.rip-pack-title {
  margin-top: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1.18rem;
}

.rip-pack-sub {
  margin-top: 4px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.84);
}

.rip-flash {
  position: absolute;
  inset: -32px;
  border-radius: 32px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.96), rgba(251, 191, 36, 0.48), transparent 70%);
  opacity: 0;
  pointer-events: none;
  z-index: 6;
}

.rip-pack-wrap.ripping .rip-foil-top {
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.05s ease;
  transform: translate(115px, -78px) rotate(32deg) !important;
  opacity: 0;
}

.rip-pack-wrap.ripping .rip-foil-body {
  transform: translateY(36px) scale(0.9);
  opacity: 0;
}

.rip-pack-wrap.ripping .rip-flash {
  animation: flashBurst 1.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes flashBurst {
  0% { opacity: 0; transform: scale(0.45); }
  35% { opacity: 0.95; transform: scale(1.16); }
  100% { opacity: 0; transform: scale(1.55); }
}

.rip-meter-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 268px;
}

.rip-meter-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.rip-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #fbbf24, #ff2e63);
  transition: width 0.08s linear;
}

.rip-meter-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 64px;
  text-align: right;
}

/* Reveal Phase */
.pity-banner {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.18), rgba(225, 29, 72, 0.22));
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fef08a;
  font-weight: 700;
  text-align: center;
  padding: 9px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.reveal-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.reveal-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Silky 3D Flip Trading Card with Real Extruded 10px Slab Thickness */
.flip-slot {
  perspective: 1400px;
  height: 315px;
  cursor: pointer;
  animation: dealIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

@keyframes dealIn {
  0% { opacity: 0; transform: translateY(42px) scale(0.86) rotateZ(-3deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotateZ(0deg); }
}

.flip-inner {
  --edge-color: #38bdf8;
  --edge-dark: #0c4a6e;
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 1.25s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.flip-inner.edge-rare { --edge-color: #38bdf8; --edge-dark: #075985; }
.flip-inner.edge-epic { --edge-color: #c084fc; --edge-dark: #581c87; }
.flip-inner.edge-legendary { --edge-color: #fbbf24; --edge-dark: #92400e; }
.flip-inner.edge-mythic { --edge-color: #ff2e63; --edge-dark: #881337; }

.flip-slot.flipped .flip-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 16px;
  overflow: hidden;
}

/* 3D Physical Card Thickness Edges (10px deep metallic slab) */
.card-edge {
  position: absolute;
  pointer-events: none;
  backface-visibility: visible;
  background: linear-gradient(180deg, var(--edge-color), var(--edge-dark), var(--edge-color));
  box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.35);
}

.card-edge-right {
  width: 10px;
  top: 10px;
  bottom: 10px;
  right: -5px;
  transform: rotateY(90deg);
}

.card-edge-left {
  width: 10px;
  top: 10px;
  bottom: 10px;
  left: -5px;
  transform: rotateY(-90deg);
}

.card-edge-top {
  height: 10px;
  left: 10px;
  right: 10px;
  top: -5px;
  transform: rotateX(90deg);
  background: linear-gradient(90deg, var(--edge-dark), var(--edge-color), var(--edge-dark));
}

.card-edge-bottom {
  height: 10px;
  left: 10px;
  right: 10px;
  bottom: -5px;
  transform: rotateX(-90deg);
  background: linear-gradient(90deg, var(--edge-dark), var(--edge-color), var(--edge-dark));
}

.card-back {
  transform: translateZ(5px);
  background: linear-gradient(155deg, #1a203b 0%, #0d1020 100%);
  border: 2px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.flip-slot:not(.flipped):hover .card-back {
  transform: translateZ(5px) translateY(-6px) scale(1.02);
}

.card-back.glow-mythic { border-color: var(--mythic); box-shadow: 0 0 28px rgba(255, 46, 99, 0.5); }
.card-back.glow-legendary { border-color: var(--legendary); box-shadow: 0 0 24px rgba(251, 191, 36, 0.42); }
.card-back.glow-epic { border-color: var(--epic); box-shadow: 0 0 20px rgba(192, 132, 252, 0.35); }
.card-back.glow-rare { border-color: var(--rare); box-shadow: 0 0 14px rgba(56, 189, 248, 0.24); }

.card-back-hint {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.card-front {
  transform: rotateY(180deg) translateZ(5px);
}

/* Shared Demon Trading Card Styling + Interactive 3D Tilt & Slab Edge Shadow */
.demon-card {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: 16px;
  border: 2px solid var(--border-strong);
  overflow: hidden;
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  box-shadow:
    calc(var(--ry, 0deg) * -0.45px) calc(var(--rx, 0deg) * 0.45px + 4px) 0 0 rgba(15, 23, 42, 0.92),
    calc(var(--ry, 0deg) * -0.8px) calc(var(--rx, 0deg) * 0.8px + 8px) 0 0 rgba(255, 255, 255, 0.12),
    0 14px 28px rgba(0, 0, 0, 0.48);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
  will-change: transform;
}

.demon-card.tilting {
  transition: transform 0.08s linear;
}

.demon-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.18), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 3;
}

.demon-card.tilting::before {
  opacity: 1;
}

.demon-card.r-rare { border-color: rgba(56, 189, 248, 0.55); }
.demon-card.r-epic { border-color: rgba(192, 132, 252, 0.65); box-shadow: 0 8px 24px rgba(192, 132, 252, 0.18); }
.demon-card.r-legendary { border-color: rgba(251, 191, 36, 0.82); box-shadow: 0 10px 28px rgba(251, 191, 36, 0.26); }
.demon-card.r-mythic {
  border-color: #ff2e63;
  box-shadow: 0 12px 34px rgba(255, 46, 99, 0.4);
}

/* Holo Shimmer Overlay */
.demon-card.is-holo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    rgba(255, 0, 128, 0.16) 0%,
    rgba(56, 189, 248, 0.22) 28%,
    rgba(251, 191, 36, 0.2) 55%,
    rgba(192, 132, 252, 0.22) 80%,
    rgba(255, 0, 128, 0.16) 100%
  );
  background-size: 220% 220%;
  animation: holoShift 8s linear infinite;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 2;
}

@keyframes holoShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0b0e1a;
  overflow: hidden;
  flex-shrink: 0;
}

.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-badges-top {
  position: absolute;
  top: 7px;
  left: 7px;
  right: 7px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4px;
  pointer-events: none;
}

.badge-pill {
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(8, 10, 18, 0.82);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-new { background: #16a34a; color: #fff; border-color: #4ade80; }
.badge-holo { background: linear-gradient(90deg, #06b6d4, #d946ef, #f59e0b); color: #fff; border: none; }
.badge-dup { background: rgba(15, 23, 42, 0.9); color: #fde047; border-color: rgba(251, 191, 36, 0.5); }

.card-body {
  padding: 11px 12px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 5px;
}

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.card-rarity-tag {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.r-mythic .card-rarity-tag { color: #ff6b8b; }
.r-legendary .card-rarity-tag { color: #fde047; }
.r-epic .card-rarity-tag { color: #d8b4fe; }
.r-rare .card-rarity-tag { color: #7dd3fc; }

.card-rank-pill {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.07);
  padding: 2px 7px;
  border-radius: 6px;
}

.card-name {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-footer-row {
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.diff-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 4px;
}

.diff-dot.extreme { background: var(--extreme); }
.diff-dot.insane { background: var(--insane); }
.diff-dot.hard { background: var(--hard); }
.diff-dot.medium { background: var(--medium); }
.diff-dot.easy { background: var(--easy); }

/* Demon Dex View */
.dex-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px 18px;
}

.stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
}

.dex-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  background: rgba(17, 21, 38, 0.75);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-tab {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 7px 13px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-tab:hover { color: #fff; }
.filter-tab.active { background: #fff; color: #0b0d17; border-color: #fff; }
.filter-tab.diff-extreme.active { background: var(--extreme); color: #fff; border-color: var(--extreme); }
.filter-tab.diff-insane.active { background: var(--insane); color: #fff; border-color: var(--insane); }
.filter-tab.diff-hard.active { background: var(--hard); color: #fff; border-color: var(--hard); }
.filter-tab.diff-medium.active { background: var(--medium); color: #fff; border-color: var(--medium); }
.filter-tab.diff-easy.active { background: var(--easy); color: #fff; border-color: var(--easy); }

.filter-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dex-input,
.dex-select {
  background: #0b0e1a;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.86rem;
}

.dex-input { min-width: 200px; }

.holo-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.dex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 16px;
}

.dex-card-wrap {
  cursor: pointer;
}

.empty-state {
  text-align: center;
  padding: 56px 20px;
  background: rgba(17, 21, 38, 0.55);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

.empty-state h3 { margin: 12px 0 6px; }
.empty-state p { margin: 0 0 18px; color: var(--text-muted); }

/* Card Inspector Modal */
.inspector-modal,
.auth-modal {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 680px;
  background: linear-gradient(180deg, #151a30 0%, #0b0e1a 100%);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.auth-modal {
  max-width: 480px;
}

.inspector-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.inspector-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 22px;
  align-items: start;
}

.inspector-thumb-card {
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--border-strong);
  background: #080a12;
}

.inspector-thumb-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.inspector-yt-link {
  display: block;
  text-align: center;
  padding: 10px;
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

.inspector-yt-link:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fff;
}

.inspector-info h2 {
  margin: 8px 0 4px;
  font-size: 1.55rem;
  line-height: 1.15;
}

.inspector-section {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.inspector-kv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.kv-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 11px;
}

.kv-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.kv-val {
  font-weight: 700;
  font-size: 0.92rem;
  word-break: break-word;
}

/* Auth Modal */
.auth-title {
  margin: 0 0 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.45rem;
}

.auth-sub {
  margin: 0 0 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  padding: 5px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.auth-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 700;
  padding: 9px;
  border-radius: 9px;
  cursor: pointer;
}

.auth-tab.active {
  background: linear-gradient(135deg, #e11d48, #9333ea);
  color: #fff;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
}

.auth-field input {
  background: #080a12;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 10px 12px;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
}

.auth-error {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
}

.auth-submit {
  width: 100%;
  padding: 12px;
  margin-top: 4px;
}

.profile-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 14px;
  padding: 14px;
}

.profile-avatar {
  flex-shrink: 0;
}

.profile-name {
  font-weight: 800;
  font-size: 1.08rem;
}

.profile-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.profile-banner .btn {
  margin-left: auto;
}

.sync-box {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sync-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sync-head span {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.sync-import-row {
  display: flex;
  gap: 8px;
}

.sync-import-row .dex-input {
  flex: 1;
  min-width: 0;
}

/* ============================================================
   CINEMATIC PULL ANIMATIONS (Extended / Main / Top 20 / Top 10)
   ============================================================ */
.cinematic-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 20px;
}

.cinematic-overlay[hidden] {
  display: none;
}

.cinematic-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, #11152b 0%, #03040a 78%);
  transition: background 0.8s ease;
}

.cinematic-overlay.tier-extended .cinematic-bg {
  background: radial-gradient(circle at center, #3b0764 0%, #090616 74%);
}

.cinematic-overlay.tier-main .cinematic-bg {
  background: radial-gradient(circle at center, #78350f 0%, #0b0812 72%);
}

.cinematic-overlay.tier-top20 .cinematic-bg {
  background: radial-gradient(circle at center, #881337 0%, #050208 70%);
  animation: suspensePulse 1.1s ease-in-out infinite;
}

.cinematic-overlay.tier-top10 .cinematic-bg {
  background: radial-gradient(circle at center, #9f1239 0%, #2a040e 38%, #020105 78%);
  animation: supernovaPulse 0.85s ease-in-out infinite;
}

@keyframes suspensePulse {
  0%, 100% { filter: brightness(0.85); }
  50% { filter: brightness(1.3); }
}

@keyframes supernovaPulse {
  0%, 100% { filter: brightness(0.85) saturate(1.1); }
  50% { filter: brightness(1.5) saturate(1.6); }
}

.cinematic-rays {
  position: absolute;
  width: 150vmax;
  height: 150vmax;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 255, 255, 0.08) 0deg 10deg,
    transparent 10deg 26deg
  );
  opacity: 0;
  transition: opacity 0.9s ease;
  animation: raysSpin 18s linear infinite;
  pointer-events: none;
}

.cinematic-overlay.revealed .cinematic-rays {
  opacity: 0.7;
}

/* Dramatic 2D Reveal Transformations when the Card Drops In */
.cinematic-overlay.revealed .cinematic-theme-fx {
  filter: brightness(1.38) saturate(1.35);
  transition: filter 0.65s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.cinematic-overlay.revealed .flame-pillar {
  animation-duration: 0.45s;
  height: 92%;
}

.cinematic-overlay.revealed .ocean-wave {
  animation-duration: 1.5s;
}

.cinematic-overlay.revealed .bullet-streak {
  animation-duration: 0.38s;
}

.cinematic-overlay.revealed .liminal-ring {
  animation-duration: 1.7s;
  border-width: 3px;
}

.cinematic-overlay.revealed .fx-aurora-curtain {
  animation-duration: 1.8s;
}

.cinematic-overlay.revealed .crystal {
  transform: scale(1.22);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.cine-shockwave-2d {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 6px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 40px rgba(251, 191, 36, 0.85);
  transform: translate(-50%, -50%) scale(0.2);
  pointer-events: none;
  z-index: 7;
  animation: shockwave2D 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes shockwave2D {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.2); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(22); border-width: 1px; }
}

.cinematic-overlay.tier-top10.revealed .cinematic-rays {
  background: repeating-conic-gradient(
    from 0deg,
    rgba(251, 191, 36, 0.22) 0deg 8deg,
    rgba(255, 46, 99, 0.16) 8deg 14deg,
    transparent 14deg 28deg
  );
  opacity: 1;
  animation: raysSpin 11s linear infinite;
}

@keyframes raysSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cinematic-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.cine-ember {
  position: absolute;
  bottom: -14px;
  width: var(--sz, 7px);
  height: var(--sz, 7px);
  border-radius: 50%;
  background: var(--col, #fbbf24);
  box-shadow: 0 0 14px var(--col, #fbbf24);
  animation: emberRise var(--dur, 2.8s) ease-out forwards;
}

@keyframes emberRise {
  0% { opacity: 0; transform: translateY(0) translateX(0) scale(0.5); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-95vh) translateX(var(--drift, 40px)) scale(1.2); }
}

.cinematic-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 8;
}

.cinematic-flash.boom {
  animation: cineBoom 1.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cineBoom {
  0% { opacity: 0; }
  18% { opacity: 0.95; }
  100% { opacity: 0; }
}

.cinematic-overlay.shake {
  animation: cameraShake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.cinematic-overlay.mega-shake {
  animation: megaShake 0.9s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes cameraShake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-8px, 6px); }
  40% { transform: translate(8px, -6px); }
  60% { transform: translate(-5px, -4px); }
  80% { transform: translate(5px, 4px); }
}

@keyframes megaShake {
  0%, 100% { transform: translate(0, 0) scale(1); }
  12% { transform: translate(-15px, 10px) scale(1.02); }
  24% { transform: translate(15px, -12px) scale(1.03); }
  36% { transform: translate(-12px, -10px) scale(1.02); }
  48% { transform: translate(12px, 12px) scale(1.01); }
  64% { transform: translate(-8px, 6px); }
  80% { transform: translate(6px, -4px); }
}

.cinematic-skip {
  position: absolute;
  top: 22px;
  right: 24px;
  z-index: 12;
  background: rgba(8, 10, 18, 0.65);
}

.cinematic-content {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  max-width: 560px;
  width: 100%;
}

.cinematic-kicker {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #fde047;
  opacity: 0.9;
}

.cinematic-headline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 4.8vw, 3.2rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 0 32px rgba(255, 255, 255, 0.35);
  animation: textPop 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.cinematic-overlay.tier-extended .cinematic-headline { color: #d8b4fe; text-shadow: 0 0 32px rgba(192, 132, 252, 0.7); }
.cinematic-overlay.tier-main .cinematic-headline { color: #fde047; text-shadow: 0 0 36px rgba(251, 191, 36, 0.8); }
.cinematic-overlay.tier-top20 .cinematic-headline { color: #fb7185; text-shadow: 0 0 42px rgba(255, 46, 99, 0.9); }
.cinematic-overlay.tier-top10 .cinematic-headline {
  background: linear-gradient(90deg, #fef08a, #fbbf24, #ff2e63, #fde047);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 28px rgba(251, 191, 36, 0.85));
}

@keyframes textPop {
  from { opacity: 0; transform: scale(0.75); letter-spacing: 0.16em; }
  to { opacity: 1; transform: scale(1); letter-spacing: 0.04em; }
}

.cinematic-subline {
  font-size: 1rem;
  color: var(--text-muted);
  min-height: 24px;
}

.cinematic-card-slot {
  width: 260px;
  height: 360px;
  margin: 10px auto 6px;
  perspective: 1400px;
  animation: cineCardEnter 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cineCardEnter {
  0% { opacity: 0; transform: scale(0.45) rotateY(-180deg) translateY(50px); }
  100% { opacity: 1; transform: scale(1) rotateY(0deg) translateY(0); }
}

.cinematic-continue {
  padding: 12px 32px;
  font-size: 1rem;
  margin-top: 6px;
}

.cinematic-music-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(8, 10, 18, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #e2e8f0;
  backdrop-filter: blur(8px);
}

.cinematic-music-pill[hidden] {
  display: none;
}

.music-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 13px;
}

.music-eq span {
  width: 3px;
  height: 100%;
  background: #38bdf8;
  border-radius: 2px;
  animation: eqBounce 0.75s ease-in-out infinite alternate;
}

.music-eq span:nth-child(2) { animation-delay: 0.2s; background: #d946ef; }
.music-eq span:nth-child(3) { animation-delay: 0.4s; background: #fbbf24; }

@keyframes eqBounce {
  from { height: 25%; }
  to { height: 100%; }
}

.music-stop-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
}

.music-stop-btn:hover {
  background: rgba(239, 68, 68, 0.35);
}

.inspector-music-btn {
  width: 100%;
  border-radius: 0;
  border-top: 1px solid var(--border);
  background: rgba(6, 182, 212, 0.14);
  color: #67e8f9;
  font-size: 0.84rem;
  padding: 9px 10px;
}

.inspector-music-btn:hover {
  background: rgba(6, 182, 212, 0.26);
  color: #fff;
}

/* ============================================================
   BESPOKE TOP 10 LEVEL-THEMED CINEMATIC BACKDROPS & FX
   ============================================================ */
.cinematic-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.cinematic-canvas[hidden] {
  display: none;
}

.cinematic-theme-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

/* #1 GRIEF — Blood Hellscape + Blinding White Climax */
.cinematic-overlay.theme-grief .cinematic-bg {
  background: radial-gradient(circle at center, #7f1d1d 0%, #1c0306 55%, #000000 100%);
  animation: suspensePulse 0.9s ease-in-out infinite;
}
.cinematic-overlay.theme-grief .cinematic-headline {
  background: linear-gradient(90deg, #ff2e63, #ffffff, #dc2626);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 30px rgba(220, 38, 38, 0.9));
}
.fx-grief-vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 180px rgba(220, 38, 38, 0.7);
  animation: suspensePulse 0.7s ease-in-out infinite;
}
.fx-grief-spikes {
  position: absolute;
  left: 0;
  right: 0;
  height: 44px;
  background: repeating-linear-gradient(135deg, #000 0 18px, #dc2626 18px 22px, transparent 22px 44px);
  opacity: 0.65;
}
.fx-grief-spikes-top { top: 0; }
.fx-grief-spikes-bot { bottom: 0; transform: rotate(180deg); }
.fx-grief-whiteout {
  position: absolute;
  inset: 0;
  background: #ffffff;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.cinematic-overlay.theme-grief.whiteout-active .fx-grief-whiteout {
  opacity: 0.92;
}
.cinematic-overlay.theme-grief.whiteout-active .cinematic-kicker,
.cinematic-overlay.theme-grief.whiteout-active .cinematic-subline {
  color: #09090b;
}

/* #2 ARTEMIS 13 — Monochrome Noir + Glowing Clubstep Monster Eyes */
.cinematic-overlay.theme-artemis13 .cinematic-bg {
  background: radial-gradient(circle at center, #27272a 0%, #09090b 65%, #000 100%);
  animation: none;
}
.cinematic-overlay.theme-artemis13 .cinematic-headline {
  background: none;
  color: #ffffff;
  filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.75));
}
.fx-artemis-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 6px);
}
.fx-artemis-monsters {
  position: absolute;
  inset: 0;
}
.clubstep-eyes {
  position: absolute;
  display: flex;
  gap: 28px;
  opacity: 0;
  animation: monsterBlink 3.2s ease-in-out infinite;
}
.clubstep-eyes span {
  width: 34px;
  height: 16px;
  background: #ffffff;
  border-radius: 2px 18px 2px 18px;
  box-shadow: 0 0 26px #ffffff, 0 0 50px rgba(255, 255, 255, 0.65);
}
.clubstep-eyes span:last-child { transform: scaleX(-1); }
.eyes-left { top: 24%; left: 12%; animation-delay: 0.4s; }
.eyes-center { top: 15%; left: 50%; transform: translateX(-50%) scale(1.25); animation-delay: 1.2s; }
.eyes-right { top: 28%; right: 12%; animation-delay: 0.8s; }
@keyframes monsterBlink {
  0%, 100% { opacity: 0.12; transform: scaleY(0.15); }
  25%, 75% { opacity: 0.9; transform: scaleY(1); }
}

/* #3 SOCIETY — Dreamcore / Weirdcore Liminal Glitch */
.cinematic-overlay.theme-society .cinematic-bg {
  background: radial-gradient(circle at 30% 30%, #3b0764 0%, #0f172a 48%, #042f2e 100%);
  animation: societyHue 5s ease-in-out infinite;
}
@keyframes societyHue {
  0%, 100% { filter: hue-rotate(0deg) contrast(1.1); }
  50% { filter: hue-rotate(38deg) contrast(1.25); }
}
.cinematic-overlay.theme-society .cinematic-headline {
  background: none;
  color: #f8fafc;
  text-shadow: -4px 0 #f43f5e, 4px 0 #38bdf8, 0 0 28px rgba(192, 132, 252, 0.85);
}
.fx-society-rings .liminal-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 2px solid rgba(244, 114, 182, 0.32);
  transform: translate(-50%, -50%);
  animation: liminalExpand 4.2s ease-out infinite;
}
.liminal-ring.r1 { width: 240px; height: 240px; animation-delay: 0s; }
.liminal-ring.r2 { width: 420px; height: 420px; border-color: rgba(56, 189, 248, 0.32); animation-delay: 1.4s; }
.liminal-ring.r3 { width: 640px; height: 640px; border-color: rgba(192, 132, 252, 0.28); animation-delay: 2.8s; }
@keyframes liminalExpand {
  0% { transform: translate(-50%, -50%) scale(0.45); opacity: 0; }
  40% { opacity: 0.85; }
  100% { transform: translate(-50%, -50%) scale(1.65); opacity: 0; }
}

/* #4 THINKING SPACE II — Dystopian Cosmic Minimalism & Purple Lightning */
.cinematic-overlay.theme-ts2 .cinematic-bg {
  background: radial-gradient(circle at 50% 60%, #2e1065 0%, #090910 55%, #000 100%);
}
.cinematic-overlay.theme-ts2 .cinematic-headline {
  background: linear-gradient(90deg, #ffffff, #c4b5fd, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.85));
}
.fx-ts2-horizon {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffffff, #a855f7, #ffffff, transparent);
  box-shadow: 0 0 40px 8px rgba(168, 85, 247, 0.55);
  animation: suspensePulse 1.4s ease-in-out infinite;
}
.fx-ts2-bolt {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, transparent, #fff, #c084fc, transparent);
  opacity: 0;
  animation: ts2Lightning 2.4s ease-in-out infinite;
}
.fx-ts2-bolt.bolt-1 { left: 26%; transform: skewX(-18deg); animation-delay: 0.6s; }
.fx-ts2-bolt.bolt-2 { right: 24%; transform: skewX(14deg); animation-delay: 1.5s; }
@keyframes ts2Lightning {
  0%, 88%, 100% { opacity: 0; }
  91%, 95% { opacity: 0.95; box-shadow: 0 0 35px #fff; }
}

/* #5 AMETHYST — Purple & Pink Crystal Cavern Geodes */
.cinematic-overlay.theme-amethyst .cinematic-bg {
  background: radial-gradient(circle at center, #6b21a8 0%, #2e054e 48%, #070312 100%);
}
.cinematic-overlay.theme-amethyst .cinematic-headline {
  background: linear-gradient(90deg, #f9a8d4, #d946ef, #c084fc, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 32px rgba(217, 70, 239, 0.9));
}
.fx-amethyst-crystals .crystal {
  position: absolute;
  width: 66px;
  height: 170px;
  clip-path: polygon(50% 0%, 100% 30%, 82% 100%, 18% 100%, 0% 30%);
  background: linear-gradient(160deg, rgba(244, 114, 182, 0.7), rgba(147, 51, 234, 0.4), rgba(59, 7, 100, 0.85));
  box-shadow: 0 0 40px rgba(217, 70, 239, 0.45);
  animation: crystalFloat 4s ease-in-out infinite;
}
.crystal.c1 { bottom: -25px; left: 8%; transform: rotate(-16deg); }
.crystal.c2 { bottom: -15px; left: 20%; height: 125px; transform: rotate(10deg); animation-delay: 0.7s; }
.crystal.c3 { bottom: -25px; right: 10%; transform: rotate(18deg); animation-delay: 0.3s; }
.crystal.c4 { bottom: -18px; right: 22%; height: 135px; transform: rotate(-12deg); animation-delay: 1.1s; }
.crystal.c5 { top: -35px; left: 50%; transform: translateX(-50%) rotate(180deg); opacity: 0.5; }
@keyframes crystalFloat {
  0%, 100% { filter: brightness(0.95); }
  50% { filter: brightness(1.45); }
}

/* #6 FLAMEWALL — Rising Molten Fire Columns */
.cinematic-overlay.theme-flamewall .cinematic-bg {
  background: radial-gradient(circle at 50% 85%, #ea580c 0%, #7c2d12 42%, #090404 100%);
}
.cinematic-overlay.theme-flamewall .cinematic-headline {
  background: linear-gradient(90deg, #ffffff, #fde047, #f97316, #ef4444);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 34px rgba(249, 115, 22, 0.95));
}
.fx-flame-wall {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
}
.flame-pillar {
  width: 18%;
  height: 55%;
  background: linear-gradient(0deg, #ffedd5 0%, #fbbf24 25%, #f97316 58%, transparent 100%);
  filter: blur(22px);
  opacity: 0.65;
  animation: flameSurge 1.15s ease-in-out infinite alternate;
}
.flame-pillar.p2 { height: 72%; animation-delay: 0.25s; }
.flame-pillar.p3 { height: 85%; animation-delay: 0.5s; }
.flame-pillar.p4 { height: 70%; animation-delay: 0.15s; }
.flame-pillar.p5 { height: 58%; animation-delay: 0.4s; }
@keyframes flameSurge {
  from { transform: scaleY(0.85) translateY(15px); opacity: 0.5; }
  to { transform: scaleY(1.22) translateY(-12px); opacity: 0.88; }
}

/* #7 TIDAL WAVE — Turquoise Ocean Waves & Golden Beach Sun */
.cinematic-overlay.theme-tidalwave .cinematic-bg {
  background: linear-gradient(180deg, #0c4a6e 0%, #0369a1 45%, #083344 100%);
  animation: none;
}
.cinematic-overlay.theme-tidalwave .cinematic-headline {
  background: linear-gradient(90deg, #fef08a, #38bdf8, #2dd4bf, #fde047);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 30px rgba(56, 189, 248, 0.9));
}
.fx-tidal-sun {
  position: absolute;
  top: 10%;
  left: 50%;
  width: 280px;
  height: 280px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 240, 138, 0.85) 0%, rgba(251, 191, 36, 0.28) 55%, transparent 75%);
  filter: blur(8px);
}
.fx-tidal-waves .ocean-wave {
  position: absolute;
  left: -15%;
  width: 130%;
  height: 210px;
  border-radius: 45% 55% 0 0;
  animation: waveSwell 3.6s ease-in-out infinite alternate;
}
.ocean-wave.w1 { bottom: -75px; background: rgba(6, 182, 212, 0.45); }
.ocean-wave.w2 { bottom: -95px; background: rgba(45, 212, 191, 0.42); animation-delay: 0.8s; animation-direction: alternate-reverse; }
.ocean-wave.w3 { bottom: -115px; background: rgba(14, 165, 233, 0.55); animation-delay: 1.5s; }
@keyframes waveSwell {
  from { transform: translateX(-4%) translateY(12px); }
  to { transform: translateX(4%) translateY(-22px); }
}

/* #8 GREEN BULLET — High-Velocity Neon-Green Laser Tracers */
.cinematic-overlay.theme-greenbullet .cinematic-bg {
  background: radial-gradient(circle at center, #14532d 0%, #052e16 50%, #020a05 100%);
}
.cinematic-overlay.theme-greenbullet .cinematic-headline {
  background: linear-gradient(90deg, #bbf7d0, #4ade80, #a3e635);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 32px rgba(74, 222, 128, 0.95));
}
.fx-bullet-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(74, 222, 128, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 222, 128, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
}
.bullet-streak {
  position: absolute;
  left: -30%;
  width: 32%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #22c55e, #ffffff);
  box-shadow: 0 0 22px #4ade80;
  animation: bulletZip 0.9s linear infinite;
}
.bullet-streak.b1 { top: 18%; animation-delay: 0s; }
.bullet-streak.b2 { top: 36%; animation-delay: 0.25s; height: 6px; }
.bullet-streak.b3 { top: 58%; animation-delay: 0.5s; }
.bullet-streak.b4 { top: 76%; animation-delay: 0.15s; height: 5px; }
.bullet-streak.b5 { top: 88%; animation-delay: 0.65s; }
@keyframes bulletZip {
  from { transform: translateX(0); opacity: 0.2; }
  30% { opacity: 1; }
  to { transform: translateX(460%); opacity: 0; }
}

/* #9 ORBIT — Black Hole Singularity, Orbital Accretion Rings & Jump Orbs */
.cinematic-overlay.theme-orbit .cinematic-bg {
  background: radial-gradient(circle at center, #1e1b4b 0%, #09061a 55%, #020108 100%);
}
.cinematic-overlay.theme-orbit .cinematic-headline {
  background: linear-gradient(90deg, #fde047, #ffffff, #818cf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 32px rgba(129, 140, 248, 0.9));
}
.fx-orbit-system {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.orbit-singularity {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #000;
  box-shadow: 0 0 35px 8px rgba(251, 191, 36, 0.65), 0 0 90px 24px rgba(99, 102, 241, 0.45);
}
.orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 2px solid rgba(251, 191, 36, 0.35);
  transform: translate(-50%, -50%);
  animation: orbitSpin 6s linear infinite;
}
.orbit-ring.or1 { width: 250px; height: 250px; animation-duration: 4.5s; }
.orbit-ring.or2 { width: 410px; height: 410px; border-color: rgba(129, 140, 248, 0.38); animation-duration: 7.5s; animation-direction: reverse; }
.orbit-ring.or3 { width: 580px; height: 580px; border-color: rgba(56, 189, 248, 0.25); animation-duration: 11s; }
.orbit-orb {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fde047;
  box-shadow: 0 0 18px #fbbf24;
}
.orbit-orb.oo2 { background: #38bdf8; box-shadow: 0 0 18px #38bdf8; }
.orbit-orb.oo3 { background: #f472b6; box-shadow: 0 0 18px #f472b6; }
@keyframes orbitSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* #10 ANTARCTIC LIGHTS — Polar Aurora Borealis + Nine Circles Strobe */
.cinematic-overlay.theme-antarctic .cinematic-bg {
  background: linear-gradient(180deg, #020617 0%, #083344 55%, #0c4a6e 100%);
  animation: none;
}
.cinematic-overlay.theme-antarctic .cinematic-headline {
  background: linear-gradient(90deg, #e0f2fe, #67e8f9, #34d399, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 32px rgba(103, 232, 249, 0.95));
}
.fx-aurora-curtain {
  position: absolute;
  top: -10%;
  left: -15%;
  width: 130%;
  height: 60%;
  background: linear-gradient(90deg, transparent, rgba(52, 211, 153, 0.45), rgba(56, 189, 248, 0.55), rgba(167, 243, 208, 0.38), transparent);
  filter: blur(42px);
  animation: auroraWave 4.5s ease-in-out infinite alternate;
}
.fx-aurora-curtain.a2 {
  top: 10%;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.4), rgba(129, 140, 248, 0.35), rgba(52, 211, 153, 0.45), transparent);
  animation-delay: 1.4s;
  animation-direction: alternate-reverse;
}
@keyframes auroraWave {
  from { transform: skewY(-6deg) translateX(-5%); opacity: 0.55; }
  to { transform: skewY(5deg) translateX(6%); opacity: 0.95; }
}
.fx-nc-strobe {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, rgba(103, 232, 249, 0.08) 0 14px, transparent 14px 28px);
  animation: ncPulse 0.45s steps(2) infinite;
}
@keyframes ncPulse {
  0% { opacity: 0.25; }
  100% { opacity: 0.85; }
}

/* ============================================================
   12 ORIGINAL 2D ANIMATIONS FOR MAIN & EXTENDED LIST (#11-#150)
   Each transforms dynamically when .revealed triggers!
   ============================================================ */

/* 1. Nullscapes Minimalist Horizon */
.cinematic-overlay.l2d-nullscapes .cinematic-bg {
  background: linear-gradient(180deg, #090b10 0%, #1e293b 65%, #02040a 100%);
  animation: none;
}
.l2d-ns-sun {
  position: absolute; top: 22%; left: 50%; width: 170px; height: 170px;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, rgba(226, 232, 240, 0.25) 60%, transparent 75%);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.cinematic-overlay.revealed .l2d-ns-sun { transform: translateX(-50%) scale(1.65); }
.l2d-ns-mt {
  position: absolute; bottom: -10px; width: 70%; height: 42%;
  background: #05070c; clip-path: polygon(0 100%, 38% 18%, 70% 55%, 100% 100%);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.l2d-ns-mt1 { left: -8%; opacity: 0.85; }
.l2d-ns-mt2 { right: -8%; clip-path: polygon(0 100%, 30% 45%, 68% 12%, 100% 100%); opacity: 0.95; }
.cinematic-overlay.revealed .l2d-ns-mt1 { transform: translateX(-14%) translateY(12%); }
.cinematic-overlay.revealed .l2d-ns-mt2 { transform: translateX(14%) translateY(12%); }
.l2d-ns-mist {
  position: absolute; bottom: 0; left: 0; right: 0; height: 34%;
  background: linear-gradient(0deg, rgba(148, 163, 184, 0.28), transparent);
}

/* 2. LIMBO Spinning Keys */
.cinematic-overlay.l2d-limbo .cinematic-bg {
  background: radial-gradient(circle at center, #1e1b4b 0%, #05050a 75%);
}
.l2d-key-wheel {
  position: absolute; top: 50%; left: 50%; width: 380px; height: 380px;
  transform: translate(-50%, -50%);
  animation: orbitSpin 5.5s linear infinite;
}
.cinematic-overlay.revealed .l2d-key-wheel {
  animation-duration: 2s;
  transform: translate(-50%, -50%) scale(1.45);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.l2d-key {
  position: absolute; top: 50%; left: 50%; font-size: 2rem;
  filter: drop-shadow(0 0 14px currentColor);
}
.l2d-key.k1 { color: #ef4444; transform: rotate(0deg) translate(165px) rotate(0deg); }
.l2d-key.k2 { color: #fbbf24; transform: rotate(45deg) translate(165px) rotate(-45deg); }
.l2d-key.k3 { color: #22c55e; transform: rotate(90deg) translate(165px) rotate(-90deg); }
.l2d-key.k4 { color: #38bdf8; transform: rotate(135deg) translate(165px) rotate(-135deg); }
.l2d-key.k5 { color: #d946ef; transform: rotate(180deg) translate(165px) rotate(-180deg); }
.l2d-key.k6 { color: #f97316; transform: rotate(225deg) translate(165px) rotate(-225deg); }
.l2d-key.k7 { color: #a3e635; transform: rotate(270deg) translate(165px) rotate(-270deg); }
.l2d-key.k8 { color: #f472b6; transform: rotate(315deg) translate(165px) rotate(-315deg); }

/* 3. Midnight Fireworks */
.cinematic-overlay.l2d-firework .cinematic-bg {
  background: radial-gradient(circle at 50% 40%, #172554 0%, #030712 75%);
}
.l2d-fw-burst {
  position: absolute; width: 220px; height: 220px; border-radius: 50%;
  border: 4px dashed rgba(251, 191, 36, 0.75);
  box-shadow: 0 0 40px rgba(251, 113, 133, 0.6);
  animation: fwPop 2.4s ease-out infinite;
}
.l2d-fw-burst.fw1 { top: 20%; left: 18%; }
.l2d-fw-burst.fw2 { top: 16%; right: 16%; border-color: rgba(56, 189, 248, 0.8); animation-delay: 0.8s; }
.l2d-fw-burst.fw3 { bottom: 20%; left: 50%; border-color: rgba(244, 114, 182, 0.8); animation-delay: 1.5s; }
.cinematic-overlay.revealed .l2d-fw-burst { animation-duration: 1.1s; }
@keyframes fwPop {
  0% { transform: scale(0.15) rotate(0deg); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: scale(1.7) rotate(65deg); opacity: 0; }
}

/* 4. Emerald & Gold Temple Ruins */
.cinematic-overlay.l2d-golden .cinematic-bg {
  background: linear-gradient(180deg, #064e3b 0%, #052e16 55%, #090804 100%);
}
.l2d-gold-shaft {
  position: absolute; top: -10%; width: 120px; height: 120%;
  background: linear-gradient(180deg, rgba(254, 240, 138, 0.45), rgba(251, 191, 36, 0.08), transparent);
  transform: skewX(-18deg); filter: blur(10px);
  animation: shaftSway 3.5s ease-in-out infinite alternate;
}
.l2d-gold-shaft.s1 { left: 18%; }
.l2d-gold-shaft.s2 { left: 48%; width: 160px; animation-delay: 0.7s; }
.l2d-gold-shaft.s3 { right: 18%; animation-delay: 1.3s; }
.cinematic-overlay.revealed .l2d-gold-shaft { opacity: 1; filter: blur(4px) brightness(1.5); }
@keyframes shaftSway { from { transform: skewX(-22deg) translateX(-16px); } to { transform: skewX(-12deg) translateX(16px); } }

/* 5. Infernal Iron Chains */
.cinematic-overlay.l2d-chains .cinematic-bg {
  background: radial-gradient(circle at 50% 80%, #7f1d1d 0%, #1c0505 55%, #050101 100%);
}
.l2d-chain {
  position: absolute; left: -15%; width: 130%; height: 22px;
  background: repeating-linear-gradient(90deg, #52525b 0 18px, transparent 18px 26px, #a1a1aa 26px 44px, transparent 44px 52px);
  border-top: 3px solid #27272a; border-bottom: 3px solid #27272a;
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.55);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
}
.l2d-chain.ch1 { top: 28%; transform: rotate(-14deg); }
.l2d-chain.ch2 { bottom: 28%; transform: rotate(14deg); }
.cinematic-overlay.revealed .l2d-chain.ch1 { transform: rotate(-22deg) translateY(-90px); opacity: 0.3; }
.cinematic-overlay.revealed .l2d-chain.ch2 { transform: rotate(22deg) translateY(90px); opacity: 0.3; }
.l2d-magma-glow {
  position: absolute; bottom: 0; left: 0; right: 0; height: 26%;
  background: linear-gradient(0deg, rgba(249, 115, 22, 0.55), transparent);
}

/* 6. Nine Circles Vortex */
.cinematic-overlay.l2d-circles .cinematic-bg {
  background: radial-gradient(circle at center, #1e1b4b 0%, #020617 75%);
}
.l2d-nc-ring {
  position: absolute; top: 50%; left: 50%; border-radius: 50%;
  border: 6px dashed rgba(56, 189, 248, 0.65);
  transform: translate(-50%, -50%);
  animation: orbitSpin 4.5s linear infinite;
}
.l2d-nc-ring.nr1 { width: 220px; height: 220px; }
.l2d-nc-ring.nr2 { width: 390px; height: 390px; border-color: rgba(244, 63, 94, 0.6); animation-direction: reverse; }
.l2d-nc-ring.nr3 { width: 580px; height: 580px; border-color: rgba(255, 255, 255, 0.35); }
.cinematic-overlay.revealed .l2d-nc-ring { animation-duration: 1.5s; }
.l2d-nc-slash {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(-45deg, rgba(56, 189, 248, 0.08) 0 12px, transparent 12px 24px);
  animation: ncPulse 0.35s steps(2) infinite;
}

/* 7. High-Voltage Tesla Surge */
.cinematic-overlay.l2d-electric .cinematic-bg {
  background: radial-gradient(circle at center, #0c4a6e 0%, #030712 75%);
}
.l2d-tesla-arc {
  position: absolute; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, transparent, #fde047, #38bdf8, #ffffff, transparent);
  box-shadow: 0 0 28px #38bdf8;
  animation: ts2Lightning 1.5s ease-in-out infinite;
}
.l2d-tesla-arc.ta1 { left: 32%; transform: skewX(-20deg); }
.l2d-tesla-arc.ta2 { right: 32%; transform: skewX(20deg); animation-delay: 0.6s; }
.l2d-tesla-core {
  position: absolute; top: 50%; left: 50%; width: 160px; height: 160px;
  transform: translate(-50%, -50%); border-radius: 50%;
  border: 3px solid rgba(56, 189, 248, 0.65);
  box-shadow: 0 0 60px rgba(56, 189, 248, 0.6);
  animation: suspensePulse 0.7s ease-in-out infinite;
}

/* 8. Abyssal Sonar */
.cinematic-overlay.l2d-abyssal .cinematic-bg {
  background: radial-gradient(circle at center, #083344 0%, #020617 78%);
}
.l2d-sonar {
  position: absolute; top: 50%; left: 50%; width: 120px; height: 120px;
  border-radius: 50%; border: 3px solid rgba(6, 182, 212, 0.75);
  transform: translate(-50%, -50%);
  animation: liminalExpand 3s ease-out infinite;
}
.l2d-sonar.sn2 { animation-delay: 1s; }
.l2d-sonar.sn3 { animation-delay: 2s; }
.cinematic-overlay.revealed .l2d-sonar { animation-duration: 1.2s; border-color: #a5f3fc; }

/* 9. Deep Nebula Comets */
.cinematic-overlay.l2d-nebula .cinematic-bg {
  background: radial-gradient(circle at 40% 45%, #581c87 0%, #0f172a 55%, #020108 100%);
}
.l2d-nebula-cloud {
  position: absolute; width: 420px; height: 420px; border-radius: 50%; filter: blur(75px); opacity: 0.45;
  background: radial-gradient(circle, #d946ef, transparent 70%);
}
.l2d-nebula-cloud.nc1 { top: 8%; left: 10%; }
.l2d-nebula-cloud.nc2 { bottom: 8%; right: 10%; background: radial-gradient(circle, #38bdf8, transparent 70%); }
.l2d-comet {
  position: absolute; top: -10%; right: -10%; width: 240px; height: 4px;
  background: linear-gradient(90deg, #ffffff, #f472b6, transparent);
  transform: rotate(-32deg);
  animation: cometStreak 2.2s linear infinite;
}
.l2d-comet.cm2 { top: 20%; animation-delay: 1.1s; }
@keyframes cometStreak {
  from { transform: translate(0, 0) rotate(-32deg); opacity: 1; }
  to { transform: translate(-110vw, 70vh) rotate(-32deg); opacity: 0; }
}

/* 10. Silent Clubstep Vault */
.cinematic-overlay.l2d-vault .cinematic-bg {
  background: radial-gradient(circle at center, #3f0713 0%, #09090b 70%);
}
.l2d-vault-door {
  position: absolute; top: 0; bottom: 0; width: 50%;
  background: repeating-linear-gradient(0deg, #18181b 0 24px, #09090b 24px 28px);
  border: 3px solid rgba(239, 68, 68, 0.35);
  transition: transform 0.95s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.72;
}
.l2d-vault-door.vd-left { left: 0; }
.l2d-vault-door.vd-right { right: 0; }
.cinematic-overlay.revealed .l2d-vault-door.vd-left { transform: translateX(-85%); }
.cinematic-overlay.revealed .l2d-vault-door.vd-right { transform: translateX(85%); }

/* 11. Neon Metropolis EQ */
.cinematic-overlay.l2d-metro .cinematic-bg {
  background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 55%, #090d16 100%);
}
.l2d-eq-skyline {
  position: absolute; bottom: 0; left: 4%; right: 4%; height: 48%;
  display: flex; align-items: flex-end; gap: 10px;
}
.l2d-eq-skyline span {
  flex: 1; height: 40%; border-radius: 6px 6px 0 0;
  background: linear-gradient(0deg, rgba(34, 211, 238, 0.15), rgba(244, 114, 182, 0.65));
  animation: eqBar 1.1s ease-in-out infinite alternate;
}
.l2d-eq-skyline span:nth-child(even) { animation-delay: 0.35s; background: linear-gradient(0deg, rgba(163, 230, 53, 0.15), rgba(34, 211, 238, 0.65)); }
.cinematic-overlay.revealed .l2d-eq-skyline span { animation-duration: 0.4s; }
@keyframes eqBar { from { height: 18%; } to { height: 86%; } }

/* 12. Prism Shatter */
.cinematic-overlay.l2d-prism .cinematic-bg {
  background: radial-gradient(circle at center, #312e81 0%, #090616 75%);
}
.l2d-shard {
  position: absolute; width: 110px; height: 110px;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.55), rgba(56, 189, 248, 0.4));
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.l2d-shard.sh1 { top: 18%; left: 16%; transform: rotate(-18deg); }
.l2d-shard.sh2 { top: 20%; right: 16%; transform: rotate(24deg); }
.l2d-shard.sh3 { bottom: 18%; left: 20%; transform: rotate(145deg); }
.l2d-shard.sh4 { bottom: 18%; right: 20%; transform: rotate(-140deg); }
.cinematic-overlay.revealed .l2d-shard.sh1 { transform: translate(-70px, -60px) rotate(-55deg) scale(1.3); }
.cinematic-overlay.revealed .l2d-shard.sh2 { transform: translate(70px, -60px) rotate(65deg) scale(1.3); }
.cinematic-overlay.revealed .l2d-shard.sh3 { transform: translate(-70px, 60px) rotate(185deg) scale(1.3); }
.cinematic-overlay.revealed .l2d-shard.sh4 { transform: translate(70px, 60px) rotate(-180deg) scale(1.3); }

/* Toasts */
.toast-stack {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: rgba(17, 21, 38, 0.95);
  border: 1px solid var(--border-strong);
  color: #fff;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  animation: toastIn 0.25s ease;
}

.toast.toast-success { border-color: rgba(34, 197, 94, 0.55); }
.toast.toast-warn { border-color: rgba(251, 191, 36, 0.55); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(8, 10, 18, 0.75);
  padding: 22px 0;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-brand {
  font-size: 0.88rem;
  color: var(--text);
}

.footer-brand code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.82rem;
}

.footer-disclaimer {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-dim);
}

/* Responsive */
@media (max-width: 1024px) {
  .packs-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
  }
  .reveal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .info-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .reveal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .inspector-layout {
    grid-template-columns: 1fr;
  }
  .dex-input {
    min-width: 100%;
  }
}
