/* =========================================================
   BLACK WINGS BMX - LLUVIA DE TOKENS GALÁCTICOS
   Módulo separado: NO toca routers, NO usa hash, NO usa history.
   Archivo: black_wings_meteor_event.css
   ========================================================= */

:root {
  --bw-meteor-bg: rgba(2, 4, 12, 0.94);
  --bw-meteor-panel: rgba(8, 12, 28, 0.82);
  --bw-meteor-border: rgba(255, 255, 255, 0.16);
  --bw-meteor-glow: rgba(101, 228, 255, 0.45);
  --bw-meteor-gold: #ffd36a;
  --bw-meteor-text: #f5f7ff;
  --bw-meteor-muted: #aeb6d8;
  --bw-meteor-danger: #ff6565;
}

html.bw-launch-locked,
html.bw-launch-locked body {
  overflow: hidden !important;
}

.bw-launch-gate {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(91, 214, 255, 0.18), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(255, 211, 106, 0.13), transparent 24%),
    radial-gradient(circle at 50% 80%, rgba(129, 71, 255, 0.18), transparent 32%),
    var(--bw-meteor-bg);
  color: var(--bw-meteor-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 22px;
  pointer-events: auto;
}

.bw-launch-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.65) 0 1px, transparent 1.2px),
    radial-gradient(circle, rgba(255,255,255,.35) 0 1px, transparent 1.2px);
  background-size: 42px 42px, 78px 78px;
  background-position: 0 0, 16px 24px;
  opacity: .23;
  animation: bwStarsDrift 22s linear infinite;
  pointer-events: none;
}

@keyframes bwStarsDrift {
  to { transform: translate3d(-80px, 120px, 0); }
}

.bw-launch-card {
  position: relative;
  width: min(720px, 94vw);
  border: 1px solid var(--bw-meteor-border);
  border-radius: 28px;
  padding: clamp(24px, 5vw, 46px);
  background: linear-gradient(180deg, rgba(15,22,45,.92), rgba(6,8,20,.88));
  box-shadow: 0 0 70px rgba(93, 224, 255, .18), inset 0 0 40px rgba(255,255,255,.035);
  text-align: center;
  overflow: hidden;
}

.bw-launch-card::after {
  content: "";
  position: absolute;
  left: -35%;
  top: -45%;
  width: 80%;
  height: 120%;
  transform: rotate(20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.07), transparent);
  animation: bwGateScan 4.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes bwGateScan {
  0%, 45% { transform: translateX(-25%) rotate(20deg); opacity: 0; }
  55% { opacity: .95; }
  100% { transform: translateX(180%) rotate(20deg); opacity: 0; }
}

.bw-launch-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255,255,255,.055);
  color: var(--bw-meteor-gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.bw-launch-title {
  margin: 18px 0 10px;
  font-size: clamp(28px, 6vw, 54px);
  line-height: .98;
  font-weight: 950;
  text-transform: uppercase;
  text-shadow: 0 0 24px rgba(101, 228, 255, .25);
}

.bw-launch-message {
  margin: 0 auto 24px;
  max-width: 560px;
  color: var(--bw-meteor-muted);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.55;
}

.bw-launch-countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 22px auto;
  max-width: 520px;
}

.bw-launch-timebox {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  background: rgba(255,255,255,.055);
  padding: 14px 8px;
  box-shadow: inset 0 0 22px rgba(101,228,255,.035);
}

.bw-launch-timebox strong {
  display: block;
  color: #fff;
  font-size: clamp(26px, 5vw, 44px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.bw-launch-timebox span {
  display: block;
  margin-top: 6px;
  color: var(--bw-meteor-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.bw-launch-small {
  color: rgba(245,247,255,.72);
  font-size: 13px;
  line-height: 1.5;
}

.bw-meteor-layer {
  position: fixed;
  inset: 0;
  z-index: 2147482500;
  overflow: hidden;
  pointer-events: none;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.bw-meteor-hud {
  position: fixed;
  z-index: 2147482600;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: calc(100vw - 24px);
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  color: #fff;
  background: rgba(4, 8, 18, .82);
  box-shadow: 0 0 30px rgba(101, 228, 255, .16);
  backdrop-filter: blur(12px);
  pointer-events: none;
  font-weight: 800;
}

.bw-meteor-hud b {
  color: var(--bw-meteor-gold);
}

.bw-meteor-hud .bw-meteor-left {
  color: #9ff1ff;
  font-variant-numeric: tabular-nums;
}

.bw-meteor {
  position: absolute;
  top: -90px;
  left: var(--x, 50vw);
  width: var(--s, 44px);
  height: var(--s, 44px);
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  transform: translate3d(0, -100px, 0) rotate(var(--r, 0deg));
  animation: bwMeteorFall var(--d, 4.4s) linear forwards;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.bw-meteor:disabled {
  pointer-events: none;
}

.bw-meteor-core {
  position: absolute;
  inset: 0;
  border-radius: 44% 56% 48% 52%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.95) 0 8%, transparent 9%),
    radial-gradient(circle at 70% 75%, rgba(0,0,0,.18) 0 12%, transparent 13%),
    linear-gradient(135deg, #ffe1a3, #b66c35 42%, #4b2b21 100%);
  box-shadow: 0 0 18px rgba(255, 177, 74, .55), inset -8px -10px 16px rgba(0,0,0,.25);
}

/* Asteroide con imagen propia del Tío Black */
.bw-meteor--img .bw-meteor-core {
  border-radius: 0;
  background: center center / contain no-repeat var(--img);
  box-shadow: none;
  filter: drop-shadow(0 0 10px rgba(255, 177, 74, 0.5));
}

.bw-meteor-tail {
  position: absolute;
  right: 64%;
  top: 50%;
  width: calc(var(--s, 44px) * 1.7);
  height: calc(var(--s, 44px) * .28);
  transform: translateY(-50%) rotate(8deg);
  transform-origin: right center;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 174, 74, .22), rgba(255, 238, 160, .8));
  filter: blur(1px);
}

@keyframes bwMeteorFall {
  0% { transform: translate3d(0, -120px, 0) rotate(var(--r, 0deg)); opacity: .1; }
  8% { opacity: 1; }
  100% { transform: translate3d(var(--drift, 90px), calc(100vh + 150px), 0) rotate(calc(var(--r, 0deg) + 330deg)); opacity: .92; }
}

.bw-meteor-pop {
  position: fixed;
  z-index: 2147482700;
  left: var(--px, 50vw);
  top: var(--py, 50vh);
  transform: translate(-50%, -50%);
  color: #fff;
  font-weight: 950;
  font-size: 18px;
  text-shadow: 0 2px 16px rgba(0,0,0,.65);
  pointer-events: none;
  animation: bwMeteorPop 900ms ease-out forwards;
  white-space: nowrap;
}

.bw-meteor-pop.win {
  color: var(--bw-meteor-gold);
}

.bw-meteor-pop.jackpot {
  font-size: 28px;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 211, 106, .95), 0 0 34px rgba(101, 228, 255, .65);
}

@keyframes bwMeteorPop {
  0% { transform: translate(-50%, -20%) scale(.76); opacity: 0; }
  16% { opacity: 1; }
  100% { transform: translate(-50%, -140%) scale(1.06); opacity: 0; }
}

.bw-meteor-toast {
  position: fixed;
  z-index: 2147482800;
  right: 14px;
  bottom: 14px;
  max-width: min(380px, calc(100vw - 28px));
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  padding: 14px 16px;
  color: #fff;
  background: rgba(4,8,18,.9);
  box-shadow: 0 0 34px rgba(101, 228, 255, .16);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 800;
  line-height: 1.35;
  animation: bwMeteorToast 4200ms ease both;
}

.bw-meteor-toast small {
  display: block;
  margin-top: 4px;
  color: var(--bw-meteor-muted);
  font-weight: 650;
}

@keyframes bwMeteorToast {
  0% { transform: translateY(18px); opacity: 0; }
  10%, 86% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(18px); opacity: 0; }
}

@media (max-width: 560px) {
  .bw-launch-countdown { gap: 7px; }
  .bw-launch-timebox { border-radius: 14px; padding: 12px 4px; }
  .bw-launch-small { font-size: 12px; }
  .bw-meteor-hud { top: 8px; border-radius: 18px; font-size: 13px; }
}
