/* =====================================================================
   INFINITE WAVE ARENA — UI premium (2026-05-11)
   Paleta: violeta+cyan+naranja con tonos eléctricos
   ===================================================================== */

#iw-content { position: relative; min-height: 60vh; }
.iw-loading { text-align: center; padding: 80px 0; color: rgba(255,255,255,0.55); font-size: 32px; }
.iw-error {
  text-align: center; padding: 60px 20px; color: #ff8d9a;
  background: rgba(225,80,90,0.10); border: 1px solid rgba(225,80,90,0.35);
  border-radius: 12px;
}
.iw-locked {
  text-align: center; padding: 80px 20px;
  background: linear-gradient(180deg, rgba(20,12,40,0.85), rgba(10,6,22,0.95));
  border: 1px dashed rgba(184,132,255,0.30);
  border-radius: 16px;
}
.iw-locked i { font-size: 56px; color: rgba(184,132,255,0.55); margin-bottom: 14px; }
.iw-locked h2 { font-family: 'Cinzel', serif; color: #fff; font-size: 22px; margin: 0 0 8px; }
.iw-locked p { color: rgba(255,255,255,0.55); font-size: 13px; }

/* ============== HERO ============== */
.iw-hero {
  position: relative;
  margin: -24px -28px 22px;
  padding: 50px 28px 36px;
  overflow: hidden;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.iw-hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(108,212,255,0.18), transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(255,141,99,0.16), transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(184,132,255,0.15), transparent 70%),
    linear-gradient(180deg, #0b1f3a 0%, #15082e 50%, #08041a 100%);
  pointer-events: none;
}
.iw-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 60%, rgba(8,4,26,0.55) 88%, #08041a 100%);
  pointer-events: none;
}
.iw-hero-particles {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(108,212,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 40% 70%, rgba(255,141,99,0.5), transparent),
    radial-gradient(1.5px 1.5px at 70% 20%, rgba(184,132,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 80% 60%, rgba(255,200,87,0.5), transparent),
    radial-gradient(1px 1px at 60% 50%, rgba(108,212,255,0.5), transparent);
  background-size: 200% 200%;
  animation: iw-particles 30s linear infinite;
  pointer-events: none;
  opacity: 0.55;
}
@keyframes iw-particles {
  from { background-position: 0% 0%; }
  to { background-position: 200% 200%; }
}
.iw-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  width: 100%;
}
.iw-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 99px;
  background: rgba(108,212,255,0.10);
  border: 1px solid rgba(108,212,255,0.55);
  color: #8fdeff;
  font-family: 'Cinzel', serif;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.22em;
  margin-bottom: 18px;
  backdrop-filter: blur(6px);
}
.iw-hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #6cd4ff;
  box-shadow: 0 0 12px currentColor;
  animation: iw-blink 1.5s ease-in-out infinite;
}
@keyframes iw-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.iw-hero-title {
  font-family: 'Cinzel', serif;
  font-size: 46px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-shadow: 0 4px 22px rgba(0,0,0,0.7);
}
.iw-hero-title i {
  color: #6cd4ff;
  filter: drop-shadow(0 0 18px rgba(108,212,255,0.70));
  font-size: 38px;
  animation: iw-pulse-glow 2.5s ease-in-out infinite;
}
@keyframes iw-pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(108,212,255,0.70)); }
  50% { filter: drop-shadow(0 0 32px rgba(108,212,255,1)); }
}
.iw-hero-sub {
  color: rgba(255,255,255,0.72);
  font-size: 15px;
  margin-bottom: 30px;
  font-style: italic;
  max-width: 600px;
  margin-left: auto; margin-right: auto;
  line-height: 1.5;
}

/* Stats grid */
.iw-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}
.iw-hero-stat {
  padding: 18px 14px;
  background: rgba(10,6,22,0.55);
  border: 1px solid rgba(184,132,255,0.25);
  border-radius: 14px;
  backdrop-filter: blur(8px);
}
.iw-hero-stat-icon {
  font-size: 26px;
  color: #c8a8ff;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 8px currentColor);
}
.iw-hero-stat-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.iw-hero-stat-total {
  font-size: 18px;
  color: rgba(255,255,255,0.45);
  font-weight: 600;
}
.iw-hero-stat-lbl {
  font-family: 'Cinzel', serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-top: 6px;
}

/* CTA */
.iw-hero-cta-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.iw-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 42px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.16), transparent 40%),
    linear-gradient(180deg, #c63240 0%, #8d1e2a 60%, #6e1521 100%);
  border: 1.5px solid rgba(255,90,100,0.55);
  border-radius: 14px;
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.20),
    0 6px 22px rgba(216,58,78,0.50),
    0 0 30px rgba(255,90,100,0.20);
}
.iw-cta-btn:not(:disabled):hover {
  transform: translateY(-2px);
  filter: brightness(1.10);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 10px 30px rgba(216,58,78,0.70),
    0 0 40px rgba(255,90,100,0.35);
}
.iw-cta-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.iw-cta-btn i { font-size: 22px; }
.iw-cta-hint { font-size: 12px; color: rgba(255,141,99,0.85); }

/* ============== TABS ============== */
.iw-tabs {
  display: flex;
  gap: 4px;
  padding: 5px;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(184,132,255,0.20);
  border-radius: 14px;
  margin-bottom: 18px;
}
.iw-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(255,255,255,0.55);
  font-family: 'Cinzel', serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
}
.iw-tab i { font-size: 15px; }
.iw-tab:hover { color: #fff; background: rgba(255,255,255,0.04); }
.iw-tab.active {
  background: linear-gradient(180deg, rgba(108,212,255,0.18), rgba(108,212,255,0.06));
  border-color: rgba(108,212,255,0.55);
  color: #8fdeff;
}
.iw-tab.active i { filter: drop-shadow(0 0 6px currentColor); }

/* ============== INTRO CARDS ============== */
.iw-intro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.iw-intro-card {
  padding: 20px 18px;
  background: linear-gradient(180deg, rgba(20,12,40,0.85), rgba(10,6,22,0.95));
  border: 1px solid rgba(184,132,255,0.22);
  border-radius: 14px;
}
.iw-intro-icon {
  font-size: 32px;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 10px currentColor);
}
.iw-intro-title {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}
.iw-intro-desc {
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255,255,255,0.72);
}

/* ============== LEADERBOARD ============== */
.iw-lb {
  background: linear-gradient(180deg, rgba(20,12,40,0.85), rgba(10,6,22,0.95));
  border: 1px solid rgba(184,132,255,0.22);
  border-radius: 14px;
  overflow: hidden;
}
.iw-lb-head {
  display: grid;
  grid-template-columns: 60px 1fr 80px 110px;
  padding: 12px 16px;
  background: rgba(0,0,0,0.40);
  border-bottom: 1px solid rgba(184,132,255,0.20);
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55);
}
.iw-lb-row {
  display: grid;
  grid-template-columns: 60px 1fr 80px 110px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  align-items: center;
}
.iw-lb-row:hover { background: rgba(184,132,255,0.06); }
.iw-lb-row.is-top-1 { background: linear-gradient(90deg, rgba(255,200,87,0.10), transparent 60%); }
.iw-lb-row.is-top-2 { background: linear-gradient(90deg, rgba(192,200,214,0.08), transparent 60%); }
.iw-lb-row.is-top-3 { background: linear-gradient(90deg, rgba(205,127,50,0.08), transparent 60%); }
.iw-lb-col-pos { font-size: 22px; }
.iw-lb-col-pos i { filter: drop-shadow(0 0 8px currentColor); }
.iw-lb-num { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: rgba(255,255,255,0.50); }
.iw-lb-name { font-family: 'Cinzel', serif; font-size: 14px; font-weight: 700; color: #fff; }
.iw-lb-lvl { font-family: 'JetBrains Mono', monospace; font-size: 10px; background: rgba(184,132,255,0.18); color: #c8a8ff; padding: 1px 6px; border-radius: 4px; }
.iw-lb-race { font-size: 11px; color: rgba(255,255,255,0.50); text-transform: capitalize; font-style: italic; }
.iw-lb-col-wave { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 800; color: #ffd54a; text-align: right; }
.iw-lb-col-dmg { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: rgba(255,255,255,0.85); text-align: right; }

/* ============== HISTORY ============== */
.iw-hist { display: flex; flex-direction: column; gap: 8px; }
.iw-hist-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(20,12,40,0.55);
  border: 1px solid rgba(184,132,255,0.18);
  border-radius: 10px;
  align-items: center;
}
.iw-hist-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(225,80,90,0.12);
  border: 1px solid rgba(225,80,90,0.40);
  border-radius: 10px;
  font-size: 20px;
  color: #ff8d9a;
}
.iw-hist-title { font-family: 'Cinzel', serif; font-size: 14px; color: #fff; }
.iw-hist-title b { color: #ffd54a; }
.iw-hist-sub { font-size: 11.5px; color: rgba(255,255,255,0.50); margin-top: 3px; }

/* ============== RULES ============== */
.iw-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.iw-rule {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(20,12,40,0.85), rgba(10,6,22,0.95));
  border: 1px solid rgba(184,132,255,0.22);
  border-radius: 12px;
  align-items: center;
}
.iw-rule-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 30%, rgba(108,212,255,0.20), rgba(8,4,16,0.95) 70%);
  border: 1.5px solid rgba(108,212,255,0.40);
  border-radius: 12px;
  font-size: 22px;
  color: #8fdeff;
}
.iw-rule-title { font-family: 'Cinzel', serif; font-size: 13.5px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.iw-rule-desc { font-size: 12px; line-height: 1.5; color: rgba(255,255,255,0.72); }

/* ============== EMPTY ============== */
.iw-empty {
  text-align: center;
  padding: 60px 30px;
  background: rgba(0,0,0,0.30);
  border: 1px dashed rgba(184,132,255,0.20);
  border-radius: 14px;
  color: rgba(255,255,255,0.55);
}
.iw-empty i { font-size: 40px; opacity: 0.5; margin-bottom: 12px; display: block; }
.iw-empty p { font-size: 13px; margin: 0; }

/* =====================================================================
   ARENA — pantalla de combate
   ===================================================================== */
.iw-arena {
  position: relative;
  margin: -24px -28px 0;
  min-height: calc(100vh - 100px);
  overflow: hidden;
}
.iw-arena-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(108,212,255,0.20), transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(216,58,78,0.18), transparent 60%),
    linear-gradient(180deg, #0b1f3a 0%, #15082e 50%, #08041a 100%);
}
.iw-arena.is-boss .iw-arena-bg {
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255,141,99,0.25), transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(216,58,78,0.20), transparent 60%),
    linear-gradient(180deg, #3a1f0a 0%, #210a14 50%, #08041a 100%);
}
.iw-arena.is-mega .iw-arena-bg {
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255,90,100,0.40), transparent 45%),
    radial-gradient(ellipse at 50% 80%, rgba(216,58,78,0.30), transparent 55%),
    linear-gradient(180deg, #3a0f1a 0%, #210a14 50%, #08041a 100%);
}
.iw-arena-particles {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,141,99,0.5), transparent),
    radial-gradient(1.5px 1.5px at 40% 70%, rgba(108,212,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 80% 50%, rgba(255,200,87,0.5), transparent);
  background-size: 200% 200%;
  animation: iw-particles 25s linear infinite;
  opacity: 0.50;
}
.iw-arena-inner {
  position: relative;
  z-index: 1;
  padding: 24px 28px 40px;
  max-width: 900px;
  margin: 0 auto;
}
.iw-arena-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}
.iw-wave-counter {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 28px;
  background: rgba(0,0,0,0.65);
  border: 1.5px solid rgba(108,212,255,0.55);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 24px rgba(108,212,255,0.25);
}
.iw-arena.is-boss .iw-wave-counter { border-color: rgba(255,200,87,0.55); box-shadow: 0 0 24px rgba(255,200,87,0.30); }
.iw-arena.is-mega .iw-wave-counter { border-color: rgba(255,90,100,0.65); box-shadow: 0 0 28px rgba(255,90,100,0.40); animation: iw-glow-pulse 1.4s ease-in-out infinite; }
@keyframes iw-glow-pulse {
  0%, 100% { box-shadow: 0 0 28px rgba(255,90,100,0.40); }
  50% { box-shadow: 0 0 50px rgba(255,90,100,0.75); }
}
.iw-wave-lbl {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.30em;
  color: rgba(255,255,255,0.65);
}
.iw-wave-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-top: 4px;
  text-shadow: 0 2px 12px rgba(108,212,255,0.7);
}
.iw-arena.is-boss .iw-wave-num { text-shadow: 0 2px 12px rgba(255,200,87,0.7); }
.iw-arena.is-mega .iw-wave-num { text-shadow: 0 2px 16px rgba(255,90,100,0.85); color: #ffe2e8; }
.iw-abandon-btn {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.65);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.65);
  border-radius: 12px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.15s;
}
.iw-abandon-btn:hover { background: rgba(225,80,90,0.18); border-color: rgba(225,80,90,0.45); color: #ff8d9a; }

/* Arena stage */
.iw-arena-stage {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}
.iw-fighter {
  background: linear-gradient(180deg, rgba(15,8,30,0.85), rgba(8,4,16,0.95));
  border: 1.5px solid rgba(184,132,255,0.30);
  border-radius: 16px;
  padding: 18px 18px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.iw-fighter-enemy { border-color: rgba(255,141,99,0.55); }
.iw-fighter-enemy.is-boss { border-color: rgba(255,200,87,0.65); box-shadow: 0 0 20px rgba(255,200,87,0.25); }
.iw-fighter-enemy.is-mega {
  border-color: rgba(255,90,100,0.70);
  border-width: 2px;
  box-shadow: 0 0 26px rgba(255,90,100,0.40);
  animation: iw-mega-glow 2s ease-in-out infinite;
}
@keyframes iw-mega-glow {
  0%, 100% { box-shadow: 0 0 26px rgba(255,90,100,0.40); }
  50% { box-shadow: 0 0 40px rgba(255,90,100,0.70); }
}
.iw-fighter-player { border-color: rgba(108,212,255,0.55); }
.iw-fighter-tag {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.20em;
  color: rgba(255,255,255,0.55);
  margin-bottom: 8px;
}
.iw-fighter-enemy .iw-fighter-tag { color: #ff8d63; }
.iw-fighter-enemy.is-boss .iw-fighter-tag { color: #ffd54a; }
.iw-fighter-enemy.is-mega .iw-fighter-tag { color: #ff5a5a; }
.iw-fighter-player .iw-fighter-tag { color: #8fdeff; }
.iw-fighter-avatar {
  width: 84px; height: 84px;
  margin: 0 auto 12px;
  background:
    radial-gradient(circle at 30% 30%, rgba(184,132,255,0.30), rgba(8,4,16,0.95) 70%);
  border: 2px solid rgba(184,132,255,0.50);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
  color: #c8a8ff;
}
.iw-fighter-enemy .iw-fighter-avatar {
  background: radial-gradient(circle at 30% 30%, rgba(255,141,99,0.30), rgba(8,4,16,0.95) 70%);
  border-color: rgba(255,141,99,0.55);
  color: #ff8d63;
}
.iw-fighter-enemy.is-boss .iw-fighter-avatar {
  background: radial-gradient(circle at 30% 30%, rgba(255,200,87,0.30), rgba(8,4,16,0.95) 70%);
  border-color: rgba(255,200,87,0.65);
  color: #ffd54a;
}
.iw-fighter-enemy.is-mega .iw-fighter-avatar {
  background: radial-gradient(circle at 30% 30%, rgba(255,90,100,0.40), rgba(8,4,16,0.95) 70%);
  border-color: rgba(255,90,100,0.70);
  color: #ff8d9a;
  animation: iw-shake 0.4s ease-in-out infinite;
}
@keyframes iw-shake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 1px); }
  75% { transform: translate(2px, -1px); }
}
.iw-fighter-player .iw-fighter-avatar {
  background: radial-gradient(circle at 30% 30%, rgba(108,212,255,0.30), rgba(8,4,16,0.95) 70%);
  border-color: rgba(108,212,255,0.55);
  color: #8fdeff;
}
.iw-fighter-name {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}
.iw-hp-bar, .iw-mp-bar {
  position: relative;
  height: 22px;
  background: rgba(0,0,0,0.65);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 11px;
  overflow: hidden;
  margin-bottom: 6px;
}
.iw-hp-fill {
  height: 100%;
  border-radius: 11px;
  transition: width 0.45s ease;
}
.iw-hp-mob { background: linear-gradient(90deg, #ff5a5a 0%, #c63240 100%); box-shadow: 0 0 10px rgba(255,90,90,0.40); }
.iw-hp-player { background: linear-gradient(90deg, #5fd684 0%, #2a9b4a 100%); box-shadow: 0 0 10px rgba(95,214,132,0.40); }
.iw-mp-bar { height: 14px; }
.iw-mp-fill { height: 100%; background: linear-gradient(90deg, #6cd4ff 0%, #3aa0e0 100%); border-radius: 11px; box-shadow: 0 0 10px rgba(108,212,255,0.40); transition: width 0.45s ease; }
.iw-hp-text, .iw-mp-text {
  position: absolute; left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  pointer-events: none;
}
.iw-mp-text { font-size: 10px; }
.iw-fighter-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
}
.iw-fighter-stats span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.iw-fighter-stats i { color: #ffc857; font-size: 12px; }

.iw-vs {
  font-family: 'Cinzel', serif;
  font-size: 32px;
  font-weight: 800;
  color: rgba(255,255,255,0.30);
  letter-spacing: 0.10em;
  text-shadow: 0 0 24px rgba(184,132,255,0.50);
  animation: iw-vs-glow 2.5s ease-in-out infinite;
}
@keyframes iw-vs-glow {
  0%, 100% { text-shadow: 0 0 24px rgba(184,132,255,0.50); }
  50% { text-shadow: 0 0 36px rgba(184,132,255,0.85); }
}

/* Action bar */
.iw-action-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}
.iw-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 38px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18), transparent 40%),
    linear-gradient(180deg, #c63240 0%, #8d1e2a 60%, #6e1521 100%);
  border: 1.5px solid rgba(255,90,100,0.55);
  border-radius: 14px;
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 6px 22px rgba(216,58,78,0.50), 0 0 30px rgba(255,90,100,0.20);
}
.iw-action-btn:not(:disabled):hover {
  transform: translateY(-2px);
  filter: brightness(1.10);
}
.iw-action-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.iw-action-btn i { font-size: 20px; }

/* Log */
.iw-log {
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(184,132,255,0.18);
  border-radius: 12px;
  padding: 12px 16px;
  max-height: 200px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.iw-log-row {
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.75);
}
.iw-log-row:last-child { border-bottom: none; }
.iw-log-row i { font-size: 14px; flex-shrink: 0; }
.iw-log-sys { color: rgba(255,255,255,0.55); font-style: italic; }
.iw-log-sys i { color: #b884ff; }
.iw-log-pl i { color: #5fd684; }
.iw-log-pl b { color: #5fd684; }
.iw-log-mob i { color: #ff8d63; }
.iw-log-mob b { color: #ff8d9a; }
.iw-log-clear { color: #ffd54a; font-weight: 700; }
.iw-log-clear i { color: #ffd54a; }
.iw-log-start { color: #6cd4ff; font-weight: 700; }
.iw-log-start i { color: #6cd4ff; }
.iw-crit {
  display: inline-block;
  background: linear-gradient(90deg, #ffd54a, #ff8d63);
  color: #2a1a00;
  padding: 1px 7px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.08em;
  margin-left: 4px;
}

/* =====================================================================
   RESULTS — pantalla post-run
   ===================================================================== */
.iw-results {
  position: relative;
  margin: -24px -28px 0;
  min-height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  overflow: hidden;
}
.iw-results-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(216,58,78,0.30), transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(184,132,255,0.15), transparent 60%),
    linear-gradient(180deg, #2a0a14 0%, #15082e 50%, #08041a 100%);
}
.iw-results-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 540px;
  width: 100%;
}
.iw-results-icon {
  width: 100px; height: 100px;
  margin: 0 auto 22px;
  background: radial-gradient(circle at 30% 30%, rgba(216,58,78,0.30), rgba(8,4,16,0.95) 70%);
  border: 2.5px solid rgba(216,58,78,0.60);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 50px;
  color: #ff8d9a;
  box-shadow: 0 0 36px rgba(216,58,78,0.40);
}
.iw-results-icon.is-abandon {
  background: radial-gradient(circle at 30% 30%, rgba(255,200,87,0.20), rgba(8,4,16,0.95) 70%);
  border-color: rgba(255,200,87,0.55);
  color: #ffd54a;
}
.iw-results-title {
  font-family: 'Cinzel', serif;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-shadow: 0 4px 18px rgba(0,0,0,0.7);
}
.iw-results-sub {
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  margin-bottom: 24px;
}
.iw-results-wave {
  padding: 24px;
  background: rgba(0,0,0,0.55);
  border: 1.5px solid rgba(255,200,87,0.55);
  border-radius: 18px;
  margin-bottom: 24px;
  box-shadow: 0 0 32px rgba(255,200,87,0.25);
}
.iw-results-wave-lbl {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.30em;
  color: rgba(255,255,255,0.55);
}
.iw-results-wave-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 72px;
  font-weight: 800;
  color: #ffd54a;
  margin-top: 6px;
  line-height: 1;
  text-shadow: 0 4px 22px rgba(255,200,87,0.55);
}
.iw-results-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.iw-results-stat {
  padding: 14px 10px;
  background: rgba(10,6,22,0.55);
  border: 1px solid rgba(184,132,255,0.22);
  border-radius: 12px;
}
.iw-results-stat i { font-size: 22px; color: #c8a8ff; margin-bottom: 6px; }
.iw-results-stat-val { font-family: 'JetBrains Mono', monospace; font-size: 20px; font-weight: 800; color: #fff; }
.iw-results-stat-lbl { font-size: 10px; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.10em; margin-top: 4px; }
.iw-results-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: rgba(0,0,0,0.55);
  border: 1.5px solid rgba(184,132,255,0.55);
  border-radius: 12px;
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: all 0.15s;
}
.iw-results-back:hover {
  background: rgba(184,132,255,0.12);
  border-color: rgba(184,132,255,0.80);
}

/* =====================================================================
   MOBILE
   ===================================================================== */
@media (max-width: 760px) {
  .iw-hero { margin: -16px -16px 16px; padding: 36px 16px 28px; min-height: 340px; }
  .iw-hero-title { font-size: 28px; gap: 10px; }
  .iw-hero-title i { font-size: 24px; }
  .iw-hero-sub { font-size: 13px; margin-bottom: 22px; }
  .iw-hero-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .iw-hero-stat { padding: 12px 8px; }
  .iw-hero-stat-icon { font-size: 20px; }
  .iw-hero-stat-val { font-size: 22px; }
  .iw-hero-stat-total { font-size: 14px; }
  .iw-hero-stat-lbl { font-size: 9px; letter-spacing: 0.08em; }
  .iw-cta-btn { padding: 14px 28px; font-size: 14px; letter-spacing: 0.12em; }

  .iw-tabs { padding: 4px; gap: 3px; }
  .iw-tab { padding: 10px 8px; font-size: 10.5px; letter-spacing: 0.04em; }
  .iw-tab span { display: none; }
  .iw-tab.active span { display: inline; }

  .iw-arena-stage {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .iw-vs { font-size: 22px; }
  .iw-fighter { padding: 14px; }
  .iw-fighter-avatar { width: 68px; height: 68px; font-size: 34px; }
  .iw-fighter-name { font-size: 14px; }
  .iw-wave-num { font-size: 32px; }
  .iw-action-btn { padding: 14px 26px; font-size: 13px; letter-spacing: 0.10em; }

  .iw-results-wave-num { font-size: 52px; }
  .iw-results-stats { grid-template-columns: 1fr; }

  .iw-lb-head, .iw-lb-row { grid-template-columns: 44px 1fr 60px 80px; padding: 10px 12px; font-size: 11px; }
  .iw-lb-col-wave { font-size: 18px; }
}
