/* ============================================================
   ALTAR DE BUFFS — v3 rediseño completo (bff-* prefix)
   Tema: arcano violeta / dorado · Cinzel + Cormorant Garamond
   Match al lenguaje de Pet Event + Realm Cleanse
   ============================================================ */

.bff-screen {
  --bff-gold: #ffc857;
  --bff-gold-deep: #b8860b;
  --bff-violet: #c2a8ff;
  --bff-violet-deep: #6b3fb5;
  --bff-emerald: #5fd684;
  --bff-azure: #5fb4ff;
  --bff-crimson: #ff7a8a;
  --bff-bg-1: rgba(18, 8, 28, 0.92);
  --bff-bg-2: rgba(10, 4, 18, 0.96);
  --bff-border: rgba(194, 168, 255, 0.28);
  --bff-text: #f3e8d5;
  --bff-text-dim: rgba(243, 232, 213, 0.72);

  position: relative;
  width: 100%;
  padding: 0 0 60px;
  margin: 0;
  color: var(--bff-text);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

.bff-loading {
  display: flex; align-items: center; justify-content: center;
  min-height: 320px;
  color: var(--bff-violet);
}
.bff-loading i { font-size: 36px; animation: bff-spin 0.8s linear infinite; }
@keyframes bff-spin { to { transform: rotate(360deg); } }

/* ============================================================
   HERO — full bleed cinematográfico con gradientes arcanos
   y orbes mágicos flotantes (CSS-only)
   ============================================================ */
.bff-hero {
  --bff-hero-bg-url: url('../assets/img/events/buffs_hero.png?v=1');
  position: relative;
  width: 100%;
  min-height: 360px;
  margin: 0 0 36px;
  overflow: hidden;
  isolation: isolate;
  background:
    var(--bff-hero-bg-url) right center / cover no-repeat,
    #0c0418;
}
/* Gradient izquierdo full-opaco que fade hacia la imagen para legibilidad del texto */
.bff-hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg,
      rgba(10,4,18,0.96) 0%,
      rgba(10,4,18,0.88) 25%,
      rgba(10,4,18,0.55) 45%,
      rgba(10,4,18,0.15) 65%,
      transparent 78%),
    linear-gradient(180deg, rgba(0,0,0,0.10) 0%, transparent 25%, rgba(0,0,0,0.45) 100%);
  z-index: 1;
  pointer-events: none;
}
/* Sigilo decorativo a la derecha — desactivado ahora que tenemos imagen real */
.bff-hero-sigil { display: none; }

.bff-hero-content {
  position: relative;
  z-index: 3;
  padding: 70px 64px 56px;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}

.bff-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 20px;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.30em;
  color: var(--bff-violet);
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(194,168,255,0.55);
  border-radius: 999px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.85);
}
.bff-eyebrow i { font-size: 13px; }

.bff-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(34px, 5.4vw, 60px);
  font-weight: 900;
  background: linear-gradient(180deg, #fff0d2, #ffd07a 45%, #c8a04a 80%, #8e6020);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  margin: 0;
  letter-spacing: 0.02em;
  line-height: 1.0;
  text-shadow: 0 0 60px rgba(255,200,87,0.30);
}

.bff-sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(16px, 1.4vw, 20px);
  color: #e8dbc4;
  max-width: 560px;
  margin: 0;
  line-height: 1.55;
  text-shadow: 0 1px 8px rgba(0,0,0,0.85);
}

/* ============================================================
   STOCK BAR — banda dorada estilo decorativa con materiales
   ============================================================ */
.bff-stocks {
  margin: 0 36px 32px;
  padding: 20px 28px;
  background: linear-gradient(180deg, var(--bff-bg-1), var(--bff-bg-2));
  border: 1px solid var(--bff-border);
  border-radius: 14px;
  position: relative;
}
.bff-stocks::before {
  content: '';
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bff-gold) 50%, transparent);
  opacity: 0.45;
}
.bff-stocks-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.bff-stocks-head i {
  font-size: 18px;
  color: var(--bff-gold);
  filter: drop-shadow(0 0 8px rgba(255,200,87,0.5));
}
.bff-stocks-head h3 {
  margin: 0;
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--bff-gold);
  text-transform: uppercase;
}

.bff-stocks-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.bff-mat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.32);
  border: 1px solid rgba(194,168,255,0.14);
  border-radius: 10px;
  transition: border-color 0.2s, background 0.2s;
}
.bff-mat:hover {
  border-color: rgba(194,168,255,0.32);
  background: rgba(20,10,32,0.5);
}
.bff-mat-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 30%, rgba(194,168,255,0.2), rgba(0,0,0,0.4));
  border-radius: 8px;
  flex-shrink: 0;
}
.bff-mat-icon img { width: 30px; height: 30px; object-fit: contain; }
.bff-mat-icon i { font-size: 18px; color: var(--bff-violet); }
.bff-mat-icon .bff-mat-svg {
  font-size: 26px;
  display: inline-block;
  filter: drop-shadow(0 0 6px currentColor) drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}
.bff-mat-info { min-width: 0; flex: 1; }
.bff-mat-name {
  font-family: 'Cinzel', serif;
  font-size: 10.5px;
  letter-spacing: 0.10em;
  color: var(--bff-text-dim);
  text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.2;
}
.bff-mat-qty {
  font-size: 18px;
  font-weight: 800;
  color: var(--bff-gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-top: 2px;
}

/* ============================================================
   BUFF CARDS GRID — 3 columnas PC, card cinematográfico
   ============================================================ */
.bff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding: 0 36px;
}

.bff-card {
  --bff-color: #c2a8ff;
  position: relative;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, color-mix(in srgb, var(--bff-color) 18%, transparent), transparent 65%),
    linear-gradient(180deg, var(--bff-bg-1), var(--bff-bg-2));
  border: 1px solid var(--bff-border);
  border-radius: 16px;
  padding: 28px 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.18s, box-shadow 0.2s;
}
/* Decoración top: línea de gradient color del buff */
.bff-card::before {
  content: '';
  position: absolute;
  top: 0; left: 28px; right: 28px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--bff-color) 50%, transparent);
  opacity: 0.75;
}
.bff-card:hover {
  border-color: color-mix(in srgb, var(--bff-color) 50%, var(--bff-border));
  transform: translateY(-2px);
  box-shadow:
    0 12px 32px rgba(0,0,0,0.4),
    0 0 28px color-mix(in srgb, var(--bff-color) 18%, transparent);
}
.bff-card.is-active {
  border-color: color-mix(in srgb, var(--bff-color) 65%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--bff-color) 35%, transparent),
    0 12px 30px rgba(0,0,0,0.4),
    0 0 36px color-mix(in srgb, var(--bff-color) 22%, transparent);
}

/* ===== ÍCONO GRANDE CIRCULAR + MAGNITUDE como protagonistas ===== */
.bff-card-crest {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-top: 6px;
}
.bff-card-icon {
  width: 88px; height: 88px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--bff-color) 55%, transparent), color-mix(in srgb, var(--bff-color) 15%, rgba(0,0,0,0.6)) 75%);
  border: 1px solid color-mix(in srgb, var(--bff-color) 55%, transparent);
  box-shadow:
    0 0 30px color-mix(in srgb, var(--bff-color) 35%, transparent),
    inset 0 0 18px rgba(255,255,255,0.06);
  position: relative;
}
.bff-card-icon::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--bff-color) 35%, transparent);
  opacity: 0.7;
}
.bff-card-icon i {
  font-size: 40px;
  color: #ffffff;
  filter:
    drop-shadow(0 0 14px var(--bff-color))
    drop-shadow(0 0 4px rgba(0,0,0,0.5));
}
.bff-card.is-active .bff-card-icon::after {
  animation: bff-icon-pulse 2.4s ease-in-out infinite;
}
@keyframes bff-icon-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.08); }
}

.bff-card-magnitude {
  font-family: 'Cinzel', serif;
  font-size: 30px;
  font-weight: 900;
  color: var(--bff-color);
  letter-spacing: 0.02em;
  text-shadow:
    0 0 18px color-mix(in srgb, var(--bff-color) 60%, transparent),
    0 1px 2px rgba(0,0,0,0.6);
}

/* ===== NOMBRE + DESC ===== */
.bff-card-title {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--bff-text);
  text-align: center;
  margin: 0;
  line-height: 1.2;
}
.bff-card-desc {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 15px;
  line-height: 1.5;
  color: var(--bff-text-dim);
  text-align: center;
  margin: 0;
  min-height: 44px;
}

/* ===== DIVIDER ornado ===== */
.bff-card-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: color-mix(in srgb, var(--bff-color) 70%, transparent);
  font-size: 10px;
}
.bff-card-divider::before,
.bff-card-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--bff-color) 50%, transparent), transparent);
}
.bff-card-divider i { font-size: 12px; }

/* ===== COSTO en lista ordenada ===== */
.bff-cost {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bff-cost-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.32);
  border: 1px solid rgba(194,168,255,0.10);
  border-radius: 8px;
  transition: background 0.18s, border-color 0.18s;
}
.bff-cost-row.is-short {
  background: rgba(255,90,90,0.08);
  border-color: rgba(255,122,138,0.32);
}
.bff-cost-img { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.bff-cost-icon {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bff-cost-icon .bff-cost-svg {
  font-size: 22px;
  display: inline-block;
  filter: drop-shadow(0 0 4px currentColor);
}
.bff-cost-name {
  flex: 1;
  font-family: 'Cinzel', serif;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--bff-text-dim);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.bff-cost-qty {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.bff-cost-qty small {
  font-weight: 400;
  opacity: 0.5;
  font-size: 0.8em;
  margin-left: 2px;
}
.bff-cost-row.is-short .bff-cost-qty { color: var(--bff-crimson); }

/* ===== TIMER ===== */
.bff-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  background: color-mix(in srgb, var(--bff-color) 12%, rgba(0,0,0,0.4));
  border: 1px solid color-mix(in srgb, var(--bff-color) 40%, transparent);
  border-radius: 10px;
  font-family: 'Cinzel', serif;
  font-size: 13px;
  color: var(--bff-color);
  letter-spacing: 0.10em;
}
.bff-timer i { font-size: 14px; }
.bff-timer-val {
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 10px color-mix(in srgb, var(--bff-color) 60%, transparent);
  font-size: 15px;
}

/* ===== CTA BUTTON ===== */
.bff-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 18px;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--bff-color) 45%, rgba(0,0,0,0.3)),
      color-mix(in srgb, var(--bff-color) 22%, rgba(0,0,0,0.55)));
  border: 1px solid color-mix(in srgb, var(--bff-color) 65%, transparent);
  border-radius: 10px;
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.20em;
  color: #ffffff;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s, box-shadow 0.2s;
  margin-top: auto;
  position: relative;
  overflow: hidden;
}
.bff-cta::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transition: left 0.5s;
}
.bff-cta:hover:not(:disabled)::before { left: 100%; }
.bff-cta:hover:not(:disabled) {
  filter: brightness(1.18);
  box-shadow: 0 6px 22px color-mix(in srgb, var(--bff-color) 40%, transparent);
  transform: translateY(-1px);
}
.bff-cta:active:not(:disabled) { transform: translateY(0); }
.bff-cta:disabled {
  background: rgba(40,32,55,0.7);
  border-color: rgba(120,110,140,0.3);
  color: rgba(200,200,210,0.45);
  cursor: not-allowed;
}
.bff-cta i { font-size: 14px; }

/* ===== ACTIVE BADGE en esquina ===== */
.bff-active-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px;
  background: color-mix(in srgb, var(--bff-color) 30%, rgba(0,0,0,0.55));
  border: 1px solid var(--bff-color);
  border-radius: 999px;
  font-family: 'Cinzel', serif;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.20em;
  color: var(--bff-color);
  text-transform: uppercase;
  box-shadow: 0 0 14px color-mix(in srgb, var(--bff-color) 40%, transparent);
  z-index: 3;
}
.bff-active-badge i { font-size: 10px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .bff-grid { grid-template-columns: repeat(2, 1fr); padding: 0 24px; }
  .bff-stocks { margin: 0 24px 28px; }
  .bff-stocks-grid { grid-template-columns: repeat(3, 1fr); }
  .bff-hero-content { padding: 60px 36px 50px; }
  .bff-hero-sigil { width: 180px; height: 180px; right: 4%; }
  .bff-hero-sigil i { font-size: 72px; }
}

@media (max-width: 720px) {
  .bff-grid { grid-template-columns: 1fr; padding: 0 14px; gap: 16px; }
  .bff-stocks { margin: 0 14px 22px; padding: 16px 18px; }
  .bff-stocks-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .bff-hero { min-height: 280px; }
  .bff-hero-content { padding: 44px 22px 36px; max-width: 100%; }
  .bff-hero-sigil { display: none; }
  .bff-card { padding: 22px 20px 20px; }
  .bff-card-icon { width: 72px; height: 72px; }
  .bff-card-icon i { font-size: 32px; }
  .bff-card-magnitude { font-size: 26px; }
  .bff-card-title { font-size: 16px; }
  .bff-card-desc { font-size: 14px; min-height: 0; }
}
