/* Modal del changelog
   (archivo: css/components/modal-changelog.css) */
/* ============================================================
   CHANGELOG MODAL
   ============================================================ */

/* ── FAB button (fixed bottom-right) ── */
#changelog-fab {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #111;
  border: 1px solid #2e2e2e;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s, opacity .2s, border-color .2s;
  font-family: 'Fredoka One', cursive;
  animation: fabAppear .35s cubic-bezier(.34,1.56,.64,1) both;
  opacity: 0.45;
}
#changelog-fab:hover {
  opacity: 1;
  transform: scale(1.12);
  border-color: #444;
  box-shadow: 0 0 14px rgba(255,215,0,0.2), 0 4px 12px rgba(0,0,0,0.6);
}
#changelog-fab:active { transform: scale(0.93); }
#changelog-fab.hidden { opacity: 0; pointer-events: none; transform: scale(0.8); }

.fab-icon {
  font-size: 1rem;
  line-height: 1;
}
.fab-label { display: none; }
.fab-ver   { display: none; }

.fab-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red-close);
  box-shadow: 0 0 6px var(--red-close);
  border: 1.5px solid #111;
  display: none;
}
#changelog-fab.has-new .fab-dot { display: block; }
#changelog-fab.has-new {
  opacity: 0.75;
  border-color: #3a1010;
}

@keyframes fabAppear {
  0%   { opacity: 0; transform: scale(0.7) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Overlay backdrop ── */
#changelog-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.88);
  align-items: center;
  justify-content: center;
  animation: fadeInDetail .2s ease;
}
#changelog-overlay.open { display: flex; }

/* ── Modal card ── */
#changelog-modal {
  position: relative;
  background: #0d0d0d;
  border: 2px solid #2a2400;
  border-top: 3px solid var(--yellow-bright);
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(255,215,0,0.12), 0 16px 50px rgba(0,0,0,0.85);
  max-width: 540px;
  width: 92%;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: cardIn .28s ease both;
}

/* ── Header ── */
#changelog-header {
  background: linear-gradient(90deg, #111000 0%, #1a1800 100%);
  border-bottom: 1px solid #2a2400;
  padding: 16px 56px 16px 20px;
  position: relative;
  flex-shrink: 0;
}
#changelog-header h2 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.2rem;
  color: var(--yellow-bright);
  text-shadow: 0 0 20px rgba(255,215,0,0.4);
  letter-spacing: 2px;
  line-height: 1.2;
  margin: 0;
}
#changelog-header .changelog-date { display: none; }

#btn-close-changelog {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  background: #1a0404;
  color: var(--red-close);
  border: 2px solid #3d0a0a;
  border-radius: 10px;
  width: 34px; height: 34px;
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  cursor: pointer;
  transition: filter .15s, transform .1s, background .15s;
  display: flex; align-items: center; justify-content: center;
}
#btn-close-changelog:hover  { background: #2a0606; filter: brightness(1.2); }
#btn-close-changelog:active { transform: translateY(-50%) scale(0.91); }

/* ── Scrollable body ── */
#changelog-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #3a2e00 transparent;
}
#changelog-body::-webkit-scrollbar { width: 5px; }
#changelog-body::-webkit-scrollbar-track { background: transparent; }
#changelog-body::-webkit-scrollbar-thumb { background: #3a2e00; border-radius: 3px; }

/* ── Version header ── */
.cl-version-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 2px 10px;
}
.cl-ver-badge {
  font-family: 'Fredoka One', cursive;
  font-size: 0.95rem;
  color: #000;
  background: var(--yellow-bright);
  border-radius: 6px;
  padding: 2px 10px;
  letter-spacing: 1px;
  text-shadow: none;
  box-shadow: 0 2px 0 #5a4500;
}
.cl-ver-date {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* ── Version separator ── */
.cl-separator {
  height: 1px;
  background: linear-gradient(90deg, transparent, #2a2400 20%, #2a2400 80%, transparent);
  margin: 10px 0 14px;
}

/* ── Changelog entry ── */
.changelog-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.45;
  border-left: 2px solid var(--cl-color, var(--yellow-bright));
  background: linear-gradient(90deg, color-mix(in srgb, var(--cl-color, #FFD700) 6%, transparent) 0%, transparent 60%);
  margin-bottom: 5px;
  animation: missionSlide .3s ease both;
  transition: background .15s;
}
.changelog-item:hover {
  background: linear-gradient(90deg, color-mix(in srgb, var(--cl-color, #FFD700) 12%, transparent) 0%, #141414 60%);
}
.changelog-bullet {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
  line-height: 1;
}

/* ── Badge link button ── */
.btn-badge-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #1a0a2e;
  color: #c084fc;
  border: 2px solid #7c3aed;
  border-radius: 6px;
  font-family: 'Fredoka One', cursive;
  font-size: 0.75rem;
  padding: 3px 8px;
  cursor: pointer;
  text-decoration: none;
  margin-left: 6px;
  transition: background .15s, border-color .15s, filter .15s;
  white-space: nowrap;
  vertical-align: middle;
}
.btn-badge-link:hover {
  background: #2d1052;
  border-color: #a855f7;
  filter: brightness(1.15);
}
.btn-badge-link:active { transform: scale(0.94); }

