/* ═══════════════════════════════════════════
   update-log.css — Nhật ký cập nhật 💕
   ═══════════════════════════════════════════ */

.update-trigger {
  position: fixed;
  top: 1.1rem;
  left: 1.2rem;
  z-index: 999;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,192,203,0.5);
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(201,132,142,0.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, transform 0.2s, border-color 0.25s;
  color: var(--rose-gold);
}
.update-trigger:hover {
  background: rgba(255,192,203,0.28);
  transform: scale(1.08);
}
html.dark .update-trigger {
  background: rgba(20,10,15,0.5);
  border-color: rgba(242,167,187,0.3);
}

.update-icon-label {
  font-family: 'Cormorant Garamond', 'Lora', serif;
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1;
  color: var(--rose-gold);
  user-select: none;
}

.update-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #F2A7BB;
  border: 1.5px solid var(--bg-page, #FFFAF7);
  display: none;
  animation: updatePulse 2s ease-in-out infinite;
}
.update-badge.visible { display: block; }

@keyframes updatePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.3); opacity: 0.7; }
}

.update-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(58,35,40,0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.update-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.update-board {
  position: relative;
  width: min(520px, calc(100vw - 2.4rem));
  max-height: 85vh;
  background: var(--bg-letter-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  box-shadow:
    0 12px 60px rgba(201,132,142,0.22),
    0 2px 12px rgba(201,132,142,0.12),
    inset 0 0 0 1px rgba(255,255,255,0.55);
  padding: 1.8rem 1.8rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  overflow: hidden;

  opacity: 0;
  transform: translateY(20px) scale(0.96);
  transition: opacity 0.38s cubic-bezier(0.4,0,0.2,1),
              transform 0.38s cubic-bezier(0.34,1.3,0.64,1);
}
.update-overlay.open .update-board {
  opacity: 1;
  transform: translateY(0) scale(1);
}
html.dark .update-board {
  background: var(--bg-letter-card);
  border-color: rgba(242,167,187,0.14);
  box-shadow: 0 12px 60px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(242,167,187,0.06);
}
html.dusk .update-board {
  box-shadow: 0 12px 60px rgba(0,0,0,0.42), inset 0 0 0 1px rgba(232,149,106,0.1);
}

.update-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border-card);
  background: rgba(255,192,203,0.1);
  color: var(--rose-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s, background 0.2s, transform 0.2s;
}
.update-close:hover { opacity: 1; background: rgba(255,192,203,0.22); transform: scale(1.1); }

.update-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.1rem;
}
.update-deco-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--petal), transparent);
  opacity: 0.6;
}
.update-title {
  font-family: 'Cormorant Garamond', 'Lora', serif;
  font-size: 1.1rem;
  font-weight: 400;
  font-style: italic;
  color: var(--rose-gold);
  letter-spacing: 0.04em;
  white-space: nowrap;
  margin: 0;
}
.update-subtitle {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.72rem;
  font-weight: 300;
  color: var(--mauve);
  text-align: center;
  letter-spacing: 0.05em;
  margin: 0 0 0.4rem;
  opacity: 0.75;
}

.update-list {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--petal) transparent;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding-right: 0.3rem;
  max-height: calc(85vh - 180px);
}
.update-list::-webkit-scrollbar { width: 3px; }
.update-list::-webkit-scrollbar-thumb { background: var(--petal); border-radius: 2px; }

.update-entry {
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  background: rgba(255,192,203,0.03);
  transition: background 0.2s;
}
.update-entry:first-child {
  border-color: rgba(242,167,187,0.45);
  background: rgba(255,192,203,0.07);
}
.update-entry-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.update-entry-date {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--mauve);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0.75;
}
.update-entry-tag {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 50px;
  border: 1px solid rgba(242,167,187,0.4);
  color: var(--rose-gold);
  background: rgba(255,192,203,0.12);
}
.update-entry-tag.new-tag {
  background: rgba(242,167,187,0.2);
  border-color: rgba(242,167,187,0.6);
  color: var(--rose-gold);
}
.update-entry-title {
  font-family: 'Cormorant Garamond', 'Lora', serif;
  font-size: 0.97rem;
  font-weight: 400;
  font-style: italic;
  color: var(--ink);
  margin: 0 0 0.35rem;
  line-height: 1.4;
}
.update-entry-desc {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.82rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--soft-ink);
  margin: 0;
  opacity: 0.9;
}

.update-board::before {
  content: '✦';
  position: absolute;
  top: 0.65rem;
  left: 1rem;
  font-size: 0.55rem;
  color: var(--petal);
  opacity: 0.5;
  pointer-events: none;
}
