/* ============================================================
   Event Announcement Modal — Plaga Misteriosa 2026-06-04
   Sprite + typewriter estilo Modo Historia, pero standalone.
   Prefix: .plague-*
   ============================================================ */

.plague-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: rgba(4, 2, 6, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: plagueOverlayIn 0.35s ease-out;
  backdrop-filter: blur(4px);
}
@keyframes plagueOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.plague-modal {
  position: relative;
  width: 100%;
  max-width: 740px;
  min-height: 420px;
  border-radius: 16px;
  overflow: hidden;
  background: #0a0408;
  border: 1px solid rgba(212, 175, 55, 0.45);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.75),
    0 0 36px rgba(180, 30, 50, 0.30),
    inset 0 0 60px rgba(0, 0, 0, 0.55);
  color: #f3e8d5;
  font-family: 'Inter', sans-serif;
  display: flex;
  flex-direction: column;
  animation: plagueModalIn 0.5s cubic-bezier(.2,.85,.3,1);
}
@keyframes plagueModalIn {
  from { opacity: 0; transform: translateY(24px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Fondo (plaza del reino) con vignette */
.plague-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
  opacity: 0.55;
  filter: blur(1px) saturate(0.85);
  animation: plagueBgKenBurns 22s ease-in-out infinite alternate;
}
@keyframes plagueBgKenBurns {
  0%   { transform: scale(1.05) translate(0,0); }
  100% { transform: scale(1.12) translate(-1.5%, -1%); }
}
.plague-bg-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 80% 70% at 50% 50%, transparent 0%, rgba(0,0,0,0.55) 70%, rgba(0,0,0,0.92) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.35) 0%, transparent 30%, rgba(0,0,0,0.78) 100%);
  pointer-events: none;
}

/* Eyebrow superior — "AVISO DEL REINO" */
.plague-eyebrow {
  position: relative;
  z-index: 3;
  align-self: center;
  margin: 18px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  font-family: 'Cinzel', serif;
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ff8898;
  background: rgba(180, 30, 50, 0.18);
  border: 1px solid rgba(180, 30, 50, 0.55);
  border-radius: 999px;
  text-shadow: 0 0 12px rgba(180, 30, 50, 0.45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.plague-eyebrow i { font-size: 14px; }

/* Cerrar */
.plague-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: #ffc857;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.plague-close:hover {
  background: rgba(180, 30, 50, 0.35);
  transform: scale(1.08);
}

/* Stage: portrait + caja de texto */
.plague-stage {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 18px 24px 22px;
  flex: 1;
}

/* Portrait con frame ornado */
.plague-portrait-wrap {
  position: relative;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 3/4;
  justify-self: end;
  padding: 5px;
  background:
    linear-gradient(135deg, rgba(255,200,87,0.20) 0%, rgba(180,30,50,0.14) 50%, rgba(255,200,87,0.20) 100%),
    rgba(0, 0, 0, 0.55);
  border: 2px solid #ffc857;
  border-radius: 12px;
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.7),
    0 0 28px rgba(255, 200, 87, 0.30),
    inset 0 0 22px rgba(0, 0, 0, 0.5);
  animation: plaguePortraitIn 0.6s cubic-bezier(.2,.85,.3,1);
}
@keyframes plaguePortraitIn {
  from { opacity: 0; transform: translateX(-24px) scale(0.92); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
/* Esquinas ornamentales */
.plague-portrait-wrap::before,
.plague-portrait-wrap::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid #ffc857;
  pointer-events: none;
}
.plague-portrait-wrap::before {
  top: -7px; left: -7px;
  border-right: none; border-bottom: none;
  border-top-left-radius: 12px;
}
.plague-portrait-wrap::after {
  bottom: -7px; right: -7px;
  border-left: none; border-top: none;
  border-bottom-right-radius: 12px;
}
.plague-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 8px;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.7));
}

/* Caja de texto */
.plague-body {
  position: relative;
  background: linear-gradient(180deg, rgba(8, 4, 8, 0.85), rgba(8, 4, 8, 0.95));
  border: 1px solid rgba(212, 175, 55, 0.40);
  border-radius: 14px;
  padding: 18px 22px 16px;
  align-self: center;
  justify-self: start;
  max-width: 460px;
  width: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  animation: plagueBodyIn 0.55s 0.15s both cubic-bezier(.2,.85,.3,1);
}
@keyframes plagueBodyIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.plague-name {
  font-family: 'Cinzel', serif;
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #ffeac0, #ffd24a, #b8860b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
  margin-bottom: 8px;
}
.plague-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(15px, 2.4vw, 18px);
  line-height: 1.55;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
  margin-bottom: 14px;
  min-height: 130px;
  user-select: none;
}
.plague-caret {
  display: inline-block;
  color: #ffc857;
  font-weight: normal;
  animation: plagueCaret 0.9s steps(2, end) infinite;
  margin-left: 2px;
}
@keyframes plagueCaret { 50% { opacity: 0; } }

.plague-foot {
  display: flex;
  justify-content: flex-end;
}
.plague-next {
  padding: 10px 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.08em;
}

/* Mobile: stack vertical, portrait arriba más chico */
@media (max-width: 720px) {
  .plague-overlay { padding: 10px; }
  .plague-modal { min-height: 460px; max-width: 100%; }
  .plague-stage {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    gap: 14px;
    padding: 14px 14px 18px;
  }
  .plague-portrait-wrap {
    width: 130px;
    max-width: 130px;
    justify-self: center;
  }
  .plague-body {
    padding: 14px 16px;
    max-width: 100%;
  }
  .plague-text { min-height: 150px; }
  .plague-eyebrow {
    font-size: 10px;
    padding: 5px 12px;
    margin-top: 14px;
  }
}
