/* ═══════════════════════════════════════════════════
   RAID SYSTEM — rozszerzenie stylu Komendy
   ═══════════════════════════════════════════════════ */

.lbn-raid {
  --raid-ember: #c45a2c;
  --raid-flame: #ff8a3d;
  --raid-blood: #a33a3a;
}

.raid-hero-banner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 12px auto 0;
  max-width: 420px;
}

.raid-hero-chip {
  display: inline-grid;
  grid-template-columns: 48px 1fr;
  gap: 8px;
  align-items: center;
  min-width: 150px;
  padding: 6px 10px 6px 6px;
  border: 1px solid rgba(196, 90, 44, 0.55);
  background: rgba(0, 0, 0, 0.4);
  animation: raid-chip-glow 2.4s ease-in-out infinite;
}

.raid-hero-chip:nth-child(2) {
  animation-delay: 0.4s;
}

.raid-hero-chip:nth-child(3) {
  animation-delay: 0.8s;
}

.raid-hero-chip__ring {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(138, 106, 26, 0.55);
  background: linear-gradient(180deg, #2a1a10, #100a08);
  overflow: hidden;
  position: relative;
}

.raid-hero-chip__ring::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 80%, rgba(255, 138, 61, 0.28), transparent 65%);
  animation: raid-ember 1.8s ease-in-out infinite;
}

.raid-hero-chip__ring img {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  position: relative;
  z-index: 1;
}

.raid-hero-chip__name {
  display: block;
  font-family: "Cinzel", serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f0e2b8;
}

.raid-hero-chip__hint {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  color: var(--ink-soft);
}

.raid-list {
  margin-top: 2px;
}

.raid-row {
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.raid-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--raid-flame), var(--raid-blood));
  opacity: 0.55;
}

.raid-row:hover {
  border-color: rgba(196, 90, 44, 0.7);
  box-shadow: 0 0 14px rgba(196, 90, 44, 0.18);
  transform: translateX(2px);
}

.raid-row--next {
  border-color: rgba(255, 138, 61, 0.65);
  box-shadow: 0 0 16px rgba(255, 138, 61, 0.22);
  animation: raid-next-pulse 1.8s ease-in-out infinite;
}

.raid-row--next::before {
  opacity: 1;
  box-shadow: 0 0 10px rgba(255, 138, 61, 0.7);
}

.raid-row--arena {
  border-color: rgba(180, 60, 70, 0.4);
}

.raid-row--boss {
  border-color: rgba(196, 90, 44, 0.45);
}

.raid-row--city {
  border-color: rgba(212, 175, 55, 0.4);
}

.raid-row--repeat {
  border-color: rgba(111, 191, 115, 0.35);
}

.raid-row--event {
  border-color: rgba(230, 122, 24, 0.5);
}

.raid-row--lantern {
  border-color: rgba(180, 150, 80, 0.45);
}

.raid-row--manual {
  border-color: rgba(150, 100, 180, 0.4);
}

.lbn-raid .cmd-tag--event {
  color: #ffb060;
  border-color: rgba(230, 122, 24, 0.55);
}

.lbn-raid .cmd-tag--lantern {
  color: #e8d48a;
  border-color: rgba(180, 150, 80, 0.5);
}

.raid-outfit {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 6px;
  border: 1px solid rgba(138, 106, 26, 0.5);
  background:
    radial-gradient(circle at 50% 70%, rgba(255, 138, 61, 0.22), transparent 60%),
    rgba(0, 0, 0, 0.45);
  overflow: hidden;
  position: relative;
}

.raid-outfit::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 138, 61, 0.18), transparent 40%);
  animation: raid-spin 4.5s linear infinite;
  opacity: 0.7;
}

.raid-outfit img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  object-position: center center;
  image-rendering: pixelated;
  position: relative;
  z-index: 1;
  animation: raid-bob 2.2s ease-in-out infinite;
}

/* Magic Ball — look 2180 niedostępny w outfitterze → animowana kula */
.raid-outfit--magic {
  border-color: rgba(140, 110, 255, 0.65) !important;
  background:
    radial-gradient(circle at 50% 50%, rgba(140, 100, 255, 0.35), transparent 62%),
    rgba(8, 4, 20, 0.7) !important;
  box-shadow: 0 0 14px rgba(120, 90, 255, 0.35), inset 0 0 10px rgba(90, 160, 255, 0.15);
  animation: raid-magic-aura 1.8s ease-in-out infinite;
}

.raid-outfit--magic::after {
  background: conic-gradient(from 0deg, transparent, rgba(160, 120, 255, 0.35), transparent 40%, rgba(100, 200, 255, 0.25), transparent 70%);
  animation: raid-spin 2.8s linear infinite;
  opacity: 0.9;
}

.raid-outfit--magic .raid-outfit-fx {
  image-rendering: auto;
  animation: raid-magic-float 2s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(170, 130, 255, 0.75));
}

.raid-hero-chip__ring.raid-outfit--magic {
  position: relative;
  overflow: visible;
  border-color: rgba(140, 110, 255, 0.65);
  background: radial-gradient(circle at 50% 50%, rgba(140, 100, 255, 0.3), #100a18 70%);
  box-shadow: 0 0 12px rgba(120, 90, 255, 0.4);
}

.raid-hero-chip__ring.raid-outfit--magic img {
  image-rendering: auto;
  animation: raid-magic-float 2s ease-in-out infinite;
  filter: drop-shadow(0 0 5px rgba(170, 130, 255, 0.7));
}

/* Mutated Pumpkin — look 2097 bez sprite'ów w outfitterze */
.raid-outfit--pumpkin {
  border-color: rgba(230, 122, 24, 0.7) !important;
  background:
    radial-gradient(circle at 50% 55%, rgba(255, 160, 40, 0.35), transparent 62%),
    rgba(20, 10, 4, 0.75) !important;
  box-shadow: 0 0 14px rgba(230, 122, 24, 0.35), inset 0 0 10px rgba(255, 140, 40, 0.12);
  animation: raid-pumpkin-aura 1.8s ease-in-out infinite;
}

.raid-outfit--pumpkin::after {
  background: conic-gradient(from 0deg, transparent, rgba(255, 170, 60, 0.3), transparent 40%);
  animation: raid-spin 3.2s linear infinite;
  opacity: 0.85;
}

.raid-outfit--pumpkin .raid-outfit-fx {
  image-rendering: auto;
  animation: raid-magic-float 2s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(255, 160, 50, 0.75));
}

.raid-hero-chip__ring.raid-outfit--pumpkin {
  border-color: rgba(230, 122, 24, 0.7);
  background: radial-gradient(circle at 50% 55%, rgba(255, 160, 40, 0.3), #180c06 70%);
  box-shadow: 0 0 12px rgba(230, 122, 24, 0.4);
}

.raid-hero-chip__ring.raid-outfit--pumpkin img {
  image-rendering: auto;
  animation: raid-magic-float 2s ease-in-out infinite;
  filter: drop-shadow(0 0 5px rgba(255, 160, 50, 0.7));
}

@keyframes raid-pumpkin-aura {
  0%, 100% { box-shadow: 0 0 10px rgba(230, 122, 24, 0.25), inset 0 0 8px rgba(255, 140, 40, 0.1); }
  50% { box-shadow: 0 0 20px rgba(255, 160, 50, 0.55), inset 0 0 14px rgba(255, 180, 60, 0.22); }
}

.raid-magic-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.raid-magic-sparks i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #e8d6ff;
  box-shadow: 0 0 4px #b388ff;
  animation: raid-spark 1.6s ease-out infinite;
}

.raid-magic-sparks i:nth-child(1) { top: 8%; left: 52%; background: #ffe9a8; animation-delay: 0s; }
.raid-magic-sparks i:nth-child(2) { top: 42%; right: 6%; background: #9fe7ff; animation-delay: 0.35s; }
.raid-magic-sparks i:nth-child(3) { bottom: 10%; left: 40%; background: #d7b3ff; animation-delay: 0.7s; }
.raid-magic-sparks i:nth-child(4) { top: 30%; left: 8%; background: #fff; animation-delay: 1.05s; }

@keyframes raid-magic-aura {
  0%, 100% { box-shadow: 0 0 10px rgba(120, 90, 255, 0.25), inset 0 0 8px rgba(90, 160, 255, 0.12); }
  50% { box-shadow: 0 0 20px rgba(150, 110, 255, 0.55), inset 0 0 14px rgba(120, 200, 255, 0.28); }
}

@keyframes raid-magic-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.06); }
}

@keyframes raid-spark {
  0% { opacity: 0; transform: translateY(0) scale(0.6); }
  35% { opacity: 1; transform: translateY(-4px) scale(1.2); }
  100% { opacity: 0; transform: translateY(-10px) scale(0.4); }
}

.raid-row--next .raid-outfit {
  border-color: rgba(255, 138, 61, 0.75);
  box-shadow: inset 0 0 12px rgba(255, 138, 61, 0.25);
}

.raid-time {
  display: inline-block;
  min-width: 52px;
  padding: 2px 7px;
  margin-bottom: 4px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: rgba(0, 0, 0, 0.45);
  font-family: "Cinzel", serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--gold-bright);
  text-align: center;
}

.raid-row--next .raid-time {
  border-color: rgba(255, 138, 61, 0.75);
  color: #ffc078;
  animation: raid-time-flash 1.4s ease-in-out infinite;
}

.raid-loc {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-soft);
}

.raid-loc strong {
  color: #f0e2b8;
  font-weight: 700;
}

.raid-note {
  margin: 12px 4px 4px;
  padding: 10px 12px;
  border: 1px solid rgba(138, 106, 26, 0.45);
  background: rgba(0, 0, 0, 0.3);
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
}

.raid-note strong {
  color: var(--gold-bright);
}

.raid-guide {
  margin: 14px 0 6px;
  padding: 12px 14px;
  border: 1px solid var(--gold-dark);
  background: rgba(0, 0, 0, 0.28);
  text-align: left;
}

.raid-guide__title {
  margin: 0 0 8px;
  font-family: "Cinzel", serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #f0e2b8;
}

.raid-guide__p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.raid-guide__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.raid-guide__card {
  padding: 10px 12px;
  border: 1px solid rgba(138, 106, 26, 0.4);
  background: rgba(0, 0, 0, 0.25);
}

.raid-guide__card--time {
  border-color: rgba(196, 90, 44, 0.5);
}

.raid-guide__card--lantern {
  border-color: rgba(212, 175, 55, 0.5);
}

.raid-guide__card--arena {
  border-color: rgba(180, 60, 70, 0.45);
}

.raid-guide__card--next {
  border-color: rgba(255, 138, 61, 0.55);
}

.raid-guide__card-title {
  margin: 0 0 6px;
  font-family: "Cinzel", serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-bright);
}

.raid-guide__list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.raid-guide__list li {
  margin-bottom: 4px;
}

.raid-howto {
  margin: 12px 0 4px;
  padding: 10px 12px;
  border: 1px solid rgba(138, 106, 26, 0.4);
  background: rgba(0, 0, 0, 0.3);
  text-align: left;
}

.raid-howto__title {
  margin: 0 0 6px;
  font-family: "Cinzel", serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--gold);
}

.raid-howto ol {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.raid-howto li + li {
  margin-top: 4px;
}

.raid-howto em {
  color: var(--gold-bright);
  font-style: normal;
  font-weight: 700;
}

.lbn-raid .raid-guide em,
.lbn-raid .cmd-lead em {
  color: var(--gold-bright);
  font-style: normal;
  font-weight: 700;
}

.lbn-raid code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-bright);
  background: #000;
  padding: 1px 5px;
  border: 1px solid rgba(138, 106, 26, 0.45);
}

.raid-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 2px;
}

.raid-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid rgba(138, 106, 26, 0.4);
  background: rgba(0, 0, 0, 0.28);
  font-size: 11px;
  color: var(--muted);
  font-family: "Cinzel", serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.raid-dot {
  width: 8px;
  height: 8px;
  border-radius: 1px;
  display: inline-block;
}

.raid-dot--next { background: var(--raid-flame); box-shadow: 0 0 6px var(--raid-flame); }
.raid-dot--boss { background: var(--raid-ember); }
.raid-dot--arena { background: #a33a3a; }
.raid-dot--city { background: var(--gold); }
.raid-dot--lantern { background: #e8d48a; }
.raid-dot--event { background: #e67a18; }
.raid-dot--repeat { background: #6fbf73; }

@keyframes raid-chip-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 138, 61, 0); }
  50% { box-shadow: 0 0 12px rgba(255, 138, 61, 0.2); }
}

@keyframes raid-ember {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.85; }
}

@keyframes raid-next-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 138, 61, 0.15); }
  50% { box-shadow: 0 0 20px rgba(255, 138, 61, 0.35); }
}

@keyframes raid-time-flash {
  0%, 100% { background: rgba(0, 0, 0, 0.45); }
  50% { background: rgba(80, 35, 10, 0.65); }
}

@keyframes raid-spin {
  to { transform: rotate(360deg); }
}

@keyframes raid-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@media (max-width: 620px) {
  .raid-hero-chip {
    min-width: 100%;
  }

  .raid-row .cmd-row__cmd {
    text-align: center;
  }

  .raid-guide__grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .raid-hero-chip,
  .raid-hero-chip__ring::after,
  .raid-row--next,
  .raid-row--next .raid-time,
  .raid-outfit::after,
  .raid-outfit img,
  .raid-outfit--magic,
  .raid-outfit--pumpkin,
  .raid-magic-sparks i {
    animation: none !important;
  }
}
