/* ============================================================
   css/raids.css — Incursiones Multijugador Cooperativas
   Estilo retro/Tibia con marco dorado, consistente con win-bosses.
   Se renderiza dentro de la pestaña "Incursiones" de win-bosses
   (#raids-body) — reglas heredadas de la ventana contenedora.
   ============================================================ */

#raids-body { display: flex; flex-direction: column; overflow: hidden; }
#win-bosses .raid-battle-stage { position: relative; }

.raid-loading { flex: 1; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: .9rem; gap: 8px; }

/* ── Portada ── */
.raid-cover { flex: 1; display: flex; flex-direction: column; padding: 16px; gap: 12px; overflow-y: auto; }
.raid-cover::-webkit-scrollbar { width: 8px; }
.raid-cover::-webkit-scrollbar-thumb { background: rgba(217,119,6,.4); border-radius: 4px; }

.raid-boss-card {
  display: flex; gap: 16px; align-items: center;
  background: linear-gradient(135deg, rgba(30,27,75,.65), rgba(15,23,42,.9));
  border: 1.5px solid rgba(168,85,247,.45);
  border-radius: 14px; padding: 14px;
  box-shadow: 0 0 20px rgba(168,85,247,.15), inset 0 1px 0 rgba(255,255,255,.1);
}
.raid-boss-card.grand {
  border-color: rgba(250,204,21,.6);
  box-shadow: 0 0 26px rgba(250,204,21,.25), inset 0 1px 0 rgba(255,255,255,.1);
  background: linear-gradient(135deg, rgba(120,53,15,.5), rgba(15,23,42,.92));
}
.raid-boss-sprite-wrap {
  width: 120px; height: 120px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, rgba(168,85,247,.18), rgba(15,23,42,.8));
  border: 1.5px solid rgba(168,85,247,.4); border-radius: 14px;
}
.raid-boss-card.grand .raid-boss-sprite-wrap { background: radial-gradient(circle, rgba(250,204,21,.2), rgba(15,23,42,.85)); border-color: rgba(250,204,21,.5); }
.raid-boss-sprite { width: 100px; height: 100px; object-fit: contain; image-rendering: auto; filter: drop-shadow(0 0 10px rgba(168,85,247,.4)); }
.raid-boss-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.raid-boss-name { font-family: 'Cinzel', serif; font-weight: 900; font-size: 1.3rem; color: #f5d76e; letter-spacing: 1px; text-shadow: 0 0 12px rgba(245,215,110,.4); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.raid-boss-day { font-family: 'Barlow'; font-size: .68rem; font-weight: 800; color: #a5b4fc; background: rgba(99,102,241,.15); border: 1px solid rgba(99,102,241,.4); border-radius: 999px; padding: 2px 9px; letter-spacing: .5px; }
.raid-boss-types, .raid-boss-weak { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.raid-boss-weak { font-size: .68rem; color: #94a3b8; gap: 5px; }
.raid-type { font-size: .62rem; font-weight: 800; color: #fff; border-radius: 999px; padding: 2px 10px; text-transform: uppercase; letter-spacing: .5px; box-shadow: 0 0 8px rgba(0,0,0,.4); }
.raid-boss-rewards { display: flex; gap: 12px; flex-wrap: wrap; font-size: .8rem; font-weight: 700; color: #e2e8f0; }
.raid-boss-rewards .fa-coins { color: #facc15; }
.raid-boss-rewards .fa-gem { color: #38bdf8; }
.raid-boss-rewards .fa-puzzle-piece { color: #f472b6; }
.raid-boss-rewards .fa-bolt { color: #a78bfa; }
.raid-boss-hp { font-size: .7rem; color: #94a3b8; }
.raid-boss-hp b { color: #f87171; }

.raid-status-row { display: flex; gap: 10px; flex-wrap: wrap; }
.raid-done-badge, .raid-open-badge, .raid-reset-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700; border-radius: 8px; padding: 6px 12px;
}
.raid-done-badge { color: #4ade80; background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.4); }
.raid-open-badge { color: #86efac; background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3); }
.raid-reset-badge { color: #93c5fd; background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.35); }

.raid-join-btn {
  align-self: center;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Barlow'; font-size: .95rem; font-weight: 800; letter-spacing: .5px;
  color: #fff; background: linear-gradient(135deg, #b45309, #d97706, #f59e0b);
  border: 2px solid #fbbf24; border-radius: 12px; padding: 12px 28px; cursor: pointer;
  box-shadow: 0 0 20px rgba(245,158,11,.35), inset 0 1px 0 rgba(255,255,255,.25);
  transition: all .15s;
}
.raid-join-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 0 30px rgba(245,158,11,.55); }
.raid-join-btn.disabled { opacity: .45; cursor: not-allowed; }
.raid-cover-hint { text-align: center; font-size: .7rem; color: #64748b; }

/* ── Lobby ── */
.raid-lobby { flex: 1; display: flex; flex-direction: column; padding: 14px; gap: 12px; }
.raid-lobby-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.raid-lobby-title { font-family: 'Cinzel', serif; font-weight: 900; font-size: 1rem; color: #f5d76e; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; }
.raid-lobby-boss { font-size: .75rem; color: #94a3b8; }
.raid-lobby-boss b { color: #e9d5ff; }
.raid-countdown { text-align: center; font-size: .9rem; font-weight: 700; color: #fca5a5; background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.3); border-radius: 10px; padding: 8px; }
.raid-countdown b { font-size: 1.1rem; color: #f87171; }
.raid-countdown.idle { color: #94a3b8; background: rgba(148,163,184,.06); border-color: rgba(148,163,184,.25); }
.raid-countdown.idle b { color: #cbd5e1; }
/* Mínimo de entrenadores para iniciar (6): aviso claro en la sala de espera */
.raid-lobby-requirement {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: .78rem; font-weight: 700; border-radius: 10px; padding: 7px 10px; text-align: center;
}
.raid-lobby-requirement.wait { color: #fbbf24; background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.3); }
.raid-lobby-requirement.ok { color: #4ade80; background: rgba(34,197,94,.08); border: 1px solid rgba(74,222,128,.35); }
.raid-lobby-requirement b { color: #fff; }
.raid-btn.disabled, .raid-btn[disabled] { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
.raid-boss-hp .raid-hp-hint { color: #64748b; font-size: .62rem; }
/* Jefe invencible: sala incompleta (< 6) — aviso fijo durante la batalla */
.raid-invul-banner {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: .78rem; font-weight: 700; color: #fbbf24; text-align: center;
  background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.4);
  border-radius: 10px; padding: 7px 10px;
}
.raid-invul-banner b { color: #fff; }
.raid-players-grid { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; overflow-y: auto; padding-right: 4px; }
.raid-player {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: rgba(15,23,42,.6); border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px; padding: 8px 4px; min-height: 64px; justify-content: center;
}
.raid-player.ready { border-color: rgba(74,222,128,.55); background: rgba(34,197,94,.08); box-shadow: 0 0 10px rgba(34,197,94,.15); }
.raid-player.empty { opacity: .4; }
.raid-player-ava { width: 30px; height: 30px; border-radius: 50%; background: rgba(148,163,184,.12); display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.raid-player-name { font-size: .6rem; font-weight: 700; color: #cbd5e1; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.raid-ready-mark { position: absolute; top: 3px; right: 5px; color: #4ade80; font-size: .7rem; font-weight: 900; }
.raid-lobby-actions { display: flex; gap: 10px; justify-content: center; }

.raid-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Barlow'; font-weight: 800; font-size: .82rem;
  border-radius: 10px; padding: 10px 20px; cursor: pointer; transition: all .15s;
}
.raid-btn.primary { color: #fff; background: linear-gradient(135deg, #16a34a, #22c55e); border: 1.5px solid #4ade80; box-shadow: 0 0 14px rgba(34,197,94,.3); }
.raid-btn.secondary { color: #f87171; background: rgba(239,68,68,.1); border: 1.5px solid rgba(239,68,68,.4); }
.raid-btn.attack { color: #fff; background: linear-gradient(135deg, #b91c1c, #ef4444); border: 1.5px solid #f87171; box-shadow: 0 0 14px rgba(239,68,68,.35); font-size: .95rem; padding: 12px 24px; }
.raid-btn.capture { color: #1f2937; background: linear-gradient(135deg, #fbbf24, #fde047); border: 2px solid #fde68a; box-shadow: 0 0 18px rgba(253,224,71,.4); font-size: .95rem; padding: 12px 26px; }
.raid-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Batalla ── */
.raid-battle { flex: 1; display: flex; flex-direction: column; padding: 12px; gap: 8px; min-height: 0; }
.raid-battle-head { display: flex; align-items: center; justify-content: space-between; }
.raid-battle-boss-name { font-family: 'Cinzel', serif; font-weight: 900; font-size: 1.15rem; color: #f5d76e; letter-spacing: 1px; text-shadow: 0 0 12px rgba(245,215,110,.4); }
.raid-timer { font-family: monospace; font-weight: 800; font-size: 1rem; color: #93c5fd; background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.35); border-radius: 8px; padding: 3px 12px; }
.raid-timer.urgent { color: #f87171; border-color: rgba(239,68,68,.5); background: rgba(239,68,68,.12); animation: raidPulse .8s infinite; }
@keyframes raidPulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

.raid-hpbar-wrap { position: relative; height: 22px; background: rgba(0,0,0,.5); border: 1.5px solid rgba(255,255,255,.15); border-radius: 999px; overflow: hidden; }
.raid-hpbar {
  height: 100%; width: 100%;
  background: linear-gradient(180deg, #4ade80, #16a34a);
  border-radius: 999px; transition: width .4s ease;
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.3);
}
.raid-hpbar.low { background: linear-gradient(180deg, #f87171, #dc2626); }
.raid-hptext {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 900; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.9); letter-spacing: .5px;
}

.raid-battle-stage {
  position: relative; flex: 1; min-height: 180px;
  background: radial-gradient(60% 80% at 50% 30%, rgba(120,53,15,.35), rgba(11,17,32,.95));
  border: 1px solid rgba(217,119,6,.3); border-radius: 14px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.raid-battle-boss { width: 180px; height: 180px; object-fit: contain; filter: drop-shadow(0 0 22px rgba(239,68,68,.45)); animation: raidBreathe 2.4s ease-in-out infinite; }
@keyframes raidBreathe { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-8px) scale(1.03); } }
.raid-battle-boss.hit { animation: raidHit .25s ease; }
@keyframes raidHit { 0% { transform: translateX(0); filter: brightness(2.2) drop-shadow(0 0 22px rgba(255,255,255,.8)); } 25% { transform: translateX(-8px); } 60% { transform: translateX(6px); } 100% { transform: translateX(0); } }

.raid-float-layer { position: absolute; inset: 0; pointer-events: none; }
.raid-float { position: absolute; font-weight: 900; font-size: .95rem; color: #fbbf24; text-shadow: 0 2px 4px rgba(0,0,0,.9); animation: raidFloatUp 1.2s ease-out forwards; }
.raid-float.mine { color: #fff; font-size: 1.1rem; }
@keyframes raidFloatUp { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(-55px); opacity: 0; } }

.raid-battle-bottom { display: flex; gap: 12px; min-height: 150px; }
.raid-dps { flex: 1; background: rgba(15,23,42,.6); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 8px 10px; overflow-y: auto; }
.raid-dps-title { font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; color: #f5d76e; margin-bottom: 5px; }
.raid-dps-row { display: flex; align-items: center; gap: 6px; font-size: .68rem; padding: 2px 4px; border-radius: 5px; }
.raid-dps-row.top { background: rgba(250,204,21,.12); border: 1px solid rgba(250,204,21,.35); }
.raid-dps-pos { width: 18px; color: #64748b; font-weight: 800; }
.raid-dps-row.top .raid-dps-pos { color: #fbbf24; }
.raid-dps-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #e2e8f0; font-weight: 700; }
.raid-dps-dmg { color: #fbbf24; font-weight: 800; font-family: monospace; }
.raid-battle-side { width: 210px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; }
.raid-mydmg { font-size: .75rem; font-weight: 800; color: #e2e8f0; background: rgba(15,23,42,.6); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; padding: 6px 12px; }
.raid-faint { font-size: .72rem; font-weight: 800; color: #f87171; background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.4); border-radius: 8px; padding: 6px 10px; text-align: center; }
.raid-faint.hidden { display: none; }

/* ── Captura ── */
.raid-capture { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 14px; gap: 10px; overflow-y: auto; }
.raid-victory-banner {
  font-family: 'Cinzel', serif; font-weight: 900; font-size: 1.5rem; letter-spacing: 2px;
  color: #fde047; text-shadow: 0 0 18px rgba(253,224,71,.55), 0 2px 4px rgba(0,0,0,.8);
  animation: raidBannerIn .5s cubic-bezier(.2,.9,.3,1.3);
}
@keyframes raidBannerIn { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.raid-rewards-box { width: 100%; background: linear-gradient(135deg, rgba(34,197,94,.12), rgba(15,23,42,.8)); border: 1.5px solid rgba(74,222,128,.45); border-radius: 12px; padding: 10px 14px; }
.raid-rewards-box.muted { border-color: rgba(148,163,184,.3); background: rgba(15,23,42,.6); }
.raid-rewards-title { font-size: .75rem; font-weight: 900; color: #86efac; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.raid-rewards-grid { display: flex; gap: 16px; flex-wrap: wrap; font-size: .82rem; font-weight: 800; color: #e2e8f0; }
.raid-rewards-grid .fa-coins { color: #facc15; }
.raid-rewards-grid .fa-gem { color: #38bdf8; }
.raid-rewards-grid .fa-puzzle-piece { color: #f472b6; }
.raid-rewards-grid .fa-bolt { color: #a78bfa; }

.raid-capture-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.raid-capture-boss { width: 150px; height: 150px; object-fit: contain; filter: grayscale(.55) drop-shadow(0 0 14px rgba(148,163,184,.4)); transition: filter .6s, opacity .6s; }
.raid-capture-boss.faded { opacity: .25; filter: grayscale(1); }
.raid-capture-caption { font-size: .8rem; font-weight: 700; color: #cbd5e1; }
.raid-ball-zone { position: relative; width: 220px; height: 70px; display: flex; align-items: center; justify-content: center; }
.raid-ball { font-size: 1.6rem; transition: all .8s cubic-bezier(.2,.9,.3,1.2); }
.raid-ball.hidden { display: none; }
.raid-ball.thrown { transform: translateY(-26px) scale(.8); }
.raid-ball.shake { animation: raidBallShake .6s ease; }
@keyframes raidBallShake { 0%,100% { transform: translateY(-26px) rotate(0); } 25% { transform: translateY(-26px) rotate(-22deg); } 75% { transform: translateY(-26px) rotate(22deg); } }
.raid-ball.caught { animation: none; transform: translateY(-26px) scale(.8); filter: brightness(1.4) drop-shadow(0 0 14px rgba(74,222,128,.8)); }
.raid-ball.escaped { animation: none; transform: none; opacity: 0; }
.raid-caught-text { position: absolute; bottom: 0; font-family: 'Cinzel', serif; font-weight: 900; color: #4ade80; font-size: 1.05rem; text-shadow: 0 0 12px rgba(74,222,128,.6); animation: raidBannerIn .5s; }
.raid-escaped-text { position: absolute; bottom: 0; font-weight: 900; color: #f87171; font-size: .95rem; text-shadow: 0 0 10px rgba(239,68,68,.5); animation: raidBannerIn .5s; }
.raid-final-ranking { width: 100%; max-width: 420px; background: rgba(15,23,42,.6); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 8px 12px; }
.raid-empty { color: #64748b; font-size: .72rem; text-align: center; padding: 6px; }
.raid-capture-done { font-size: .78rem; font-weight: 700; color: #94a3b8; padding: 8px; }

/* ══════════════════════════════════════════════════
   MOBILE (.device-mobile)
   ══════════════════════════════════════════════════ */
.device-mobile #raids-body { height: calc(100% - 42px) !important; }
.device-mobile .raid-players-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 4px !important; }
.device-mobile .raid-battle-bottom { flex-direction: column !important; }
.device-mobile .raid-battle-side { width: 100% !important; flex-direction: row !important; justify-content: space-between !important; }
.device-mobile .raid-btn, .device-mobile .raid-join-btn { min-height: 44px !important; }
.device-mobile .raid-boss-card { flex-direction: column !important; text-align: center; }
.device-mobile .raid-boss-rewards { justify-content: center; }
.device-mobile .raid-dps { max-height: 140px !important; }
.device-mobile .raid-battle-boss { width: 130px !important; height: 130px !important; }

/* ═══ BOSS CON SHEET LOCAL ANIMADO (arte del juego, no PokeAPI) ═══
   El boss usa assets/pokemon/overworld/<id>.png (128x128, grid 4x4 de 32px).
   Tecnica: ventana overflow:hidden + imagen escalada grande que se panea con
   translateX + steps(4) => se ve un frame de 32px por vez, animado.
   El fallback onerror a PokeAPI muestra el PNG oficial estatico (sin recorte
   se ve entero reducido; solo ocurre si faltara el asset local). */
.raid-sheet-frame {
  position: relative; overflow: hidden; flex-shrink: 0; border-radius: 10px;
}
.raid-sheet-frame img {
  position: absolute; top: 0; left: 0; max-width: none;
  /* OJO: el pan total es 4 x frame (como overworldWalkFrames136: -544 = 4x136) */
  image-rendering: pixelated;
  --pan: -400px;  /* 4 x frame(100px): steps(4) pega exacto en 0,-100,-200,-300 */
  animation: raidSheetPan 0.8s steps(4) infinite;
}
@keyframes raidSheetPan {
  from { transform: translateX(0); }
  to   { transform: translateX(var(--pan)); }
}
/* Portada: ventana 100x100 (sheet escalado a 400x400 => frame 100x100) */
.raid-boss-sprite-wrap .raid-sheet-frame { width: 100px; height: 100px; }
.raid-boss-sprite-wrap .raid-sheet-frame img { width: 400px; height: 400px; }
/* Captura: ventana 150x150 (sheet 600x600 => pan -450px) */
.raid-capture-frame { width: 150px; height: 150px; }
.raid-capture-frame img { width: 600px; height: 600px; --pan: -600px; } /* 4 x 150 */
.raid-boss-card.grand .raid-sheet-frame { filter: drop-shadow(0 0 10px rgba(250,204,21,.45)); }
/* Fallback: si el sheet local no existe (onerror) mostramos el PNG oficial
   ENTERO (sin recorte de frames) dentro de la misma ventana. */
.raid-sheet-frame.sheet-fallback img {
  animation: none; width: 100%; height: 100%; max-width: 100%; max-height: 100%;
  object-fit: contain; position: static;
}

/* ── 🌋 BANNER GLOBAL DE INCURSIÓN (bajo el widget del equipo) ─────────── */
.raid-banner {
  position: relative; margin: 8px 4px 4px 4px; width: auto;
  min-width: 232px; max-width: 260px;
  display: flex; align-items: center; gap: 8px; padding: 7px 9px;
  background: linear-gradient(160deg, rgba(23, 10, 36, 0.96), rgba(30, 12, 44, 0.94));
  border: 1px solid color-mix(in srgb, var(--rb-accent, #a78bfa) 55%, transparent);
  border-radius: 12px; cursor: pointer; z-index: 60;
  box-shadow: 0 4px 18px rgba(0,0,0,0.5), 0 0 10px color-mix(in srgb, var(--rb-accent, #a78bfa) 25%, transparent);
  transition: transform .15s ease, box-shadow .15s ease;
  animation: raidBannerPulse 2.6s ease-in-out infinite;
}
.raid-banner:hover { transform: translateY(-1px) scale(1.015); box-shadow: 0 6px 22px rgba(0,0,0,0.55), 0 0 14px color-mix(in srgb, var(--rb-accent, #a78bfa) 40%, transparent); }
@keyframes raidBannerPulse { 0%,100% { border-color: color-mix(in srgb, var(--rb-accent, #a78bfa) 40%, transparent); } 50% { border-color: color-mix(in srgb, var(--rb-accent, #a78bfa) 85%, transparent); } }
.raid-banner-float { position: fixed !important; top: 15px; left: 15px; }
.raid-banner-sprite { flex-shrink: 0; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--rb-accent, #a78bfa) 55%, transparent)); }
.raid-banner-frame { width: 46px; height: 46px; display: block; }
.raid-banner-frame img { width: 184px; height: 184px; --pan: -184px; }
.raid-banner-info { flex: 1 1 auto; min-width: 0; }
.raid-banner-title { font-size: .78rem; font-weight: bold; color: #f1f5f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.raid-banner-sub { font-size: .62rem; color: #94a3b8; }
.raid-banner-done { font-size: .62rem; color: #4ade80; font-weight: bold; }
.raid-banner-timer { font-size: .72rem; font-weight: bold; color: var(--rb-accent, #a78bfa); font-variant-numeric: tabular-nums; text-shadow: 0 0 8px color-mix(in srgb, var(--rb-accent, #a78bfa) 45%, transparent); }
.raid-banner-tip {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; width: max-content; max-width: 250px;
  background: rgba(12, 8, 22, 0.97); border: 1px solid color-mix(in srgb, var(--rb-accent, #a78bfa) 60%, transparent);
  border-radius: 10px; padding: 9px 11px; z-index: 1000;
  box-shadow: 0 8px 26px rgba(0,0,0,0.6); pointer-events: none;
}
.raid-banner:hover .raid-banner-tip { display: block; }
.rbt-title { font-size: .8rem; font-weight: bold; color: #f8fafc; margin-bottom: 5px; }
.rbt-sub { font-weight: normal; color: #94a3b8; font-size: .68rem; }
.rbt-row { display: flex; justify-content: space-between; gap: 14px; font-size: .72rem; color: #cbd5e1; padding: 2px 0; }
.rbt-row b { color: #fbbf24; }
.rbt-foot { margin-top: 6px; font-size: .62rem; color: #94a3b8; border-top: 1px solid rgba(255,255,255,.08); padding-top: 5px; }

/* ⚡ Reserva: entrada automática al rotar el ciclo */
.raid-reserved-badge {
  display: flex; align-items: center; gap: 7px; justify-content: center;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(59, 130, 246, 0.16));
  border: 1px solid rgba(167, 139, 250, 0.55);
  border-radius: 10px; padding: 9px 14px;
  color: #e9d5ff; font-weight: bold; font-size: .8rem;
  animation: raidReserveGlow 2.4s ease-in-out infinite;
}
@keyframes raidReserveGlow { 0%,100% { box-shadow: 0 0 6px rgba(167,139,250,.25); } 50% { box-shadow: 0 0 16px rgba(167,139,250,.55); } }
.raid-banner-res { font-size: .62rem; color: #c4b5fd; font-weight: bold; }
.raid-lobby-auto { display: inline-block; margin-left: 6px; font-size: .62rem; color: #c4b5fd; font-weight: bold; background: rgba(124,58,237,.18); border: 1px solid rgba(167,139,250,.4); border-radius: 8px; padding: 2px 7px; }

/* 👥 Reservados para la próxima incursión (portada de la pestaña Incursiones) */
.raid-reserved-section {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 12px;
  padding: 10px 12px;
  animation: raidReserveGlow 2.4s ease-in-out infinite;
}
.raid-reserved-title {
  font-size: .75rem; font-weight: 800; color: #c4b5fd;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.raid-reserved-hint { font-size: .62rem; font-weight: 600; color: #8b7bb8; }
.raid-reserved-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 6px;
}
.raid-reserved-chip {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.14), rgba(59, 130, 246, 0.08));
  border: 1px solid rgba(167, 139, 250, 0.4);
  border-radius: 10px; padding: 7px 4px 6px; min-height: 58px; justify-content: center;
}
.raid-reserved-chip .raid-player-ava {
  background: rgba(167, 139, 250, 0.18);
  border: 1px solid rgba(167, 139, 250, 0.35);
}
.raid-reserved-name { font-size: .58rem; font-weight: 700; color: #e2e8f0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.raid-reserved-mark { position: absolute; top: 3px; right: 5px; color: #c4b5fd; font-size: .62rem; font-weight: 900; }

/* 👥 Popover de apuntados a la incursión (clic en el banner del timer) */
#raid-reserved-popover {
  z-index: 130000;
  width: 250px; max-height: 320px;
  background: linear-gradient(160deg, rgba(20, 16, 40, 0.97), rgba(10, 12, 24, 0.97));
  border: 1.5px solid rgba(167, 139, 250, 0.55);
  border-radius: 12px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.65), 0 0 18px rgba(124, 58, 237, 0.25);
  overflow: hidden;
  display: flex; flex-direction: column;
  font-family: 'Barlow', sans-serif;
  animation: rrpIn 0.16s ease-out;
}
@keyframes rrpIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.rrp-title {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 12px 8px;
  font-size: .78rem; font-weight: 800; color: #e9d5ff;
  border-bottom: 1px solid rgba(167, 139, 250, 0.25);
}
.rrp-count {
  margin-left: auto; background: rgba(124, 58, 237, 0.3);
  border: 1px solid rgba(167, 139, 250, 0.5); border-radius: 999px;
  padding: 1px 8px; font-size: .68rem; color: #c4b5fd;
}
.rrp-list { overflow-y: auto; padding: 4px 6px; flex: 1; }
.rrp-row {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 6px; border-radius: 7px;
}
.rrp-row.alt { background: rgba(255, 255, 255, 0.03); }
.rrp-ava {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(167, 139, 250, 0.18);
  border: 1px solid rgba(167, 139, 250, 0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; flex-shrink: 0;
}
.rrp-name {
  flex: 1; font-size: .72rem; font-weight: 700; color: #e2e8f0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rrp-mark { color: #c4b5fd; font-size: .7rem; font-weight: 900; }
.rrp-empty {
  padding: 18px 10px; text-align: center;
  font-size: .72rem; color: #8b7bb8; line-height: 1.5;
}
.rrp-btn {
  margin: 8px; padding: 9px 10px;
  border-radius: 9px; border: 1.5px solid;
  font-family: 'Barlow'; font-weight: 800; font-size: .74rem;
  cursor: pointer; transition: all .15s;
}
.rrp-btn.join {
  color: #fff; background: linear-gradient(135deg, #7c3aed, #6d28d9);
  border-color: #a78bfa; box-shadow: 0 0 12px rgba(124, 58, 237, 0.35);
}
.rrp-btn.join:hover { filter: brightness(1.15); }
.rrp-btn.cancel {
  color: #fca5a5; background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.45);
}
.rrp-btn.cancel:hover { background: rgba(239, 68, 68, 0.2); }
