/* ==========================================================================
   PWA AUTO-UPDATE SYSTEM UI
   Immersive Medieval / RPG Dark Theme
   ========================================================================== */

.pwa-update-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.pwa-update-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.pwa-update-card {
  width: min(420px, calc(100vw - 24px));
  border: 2px solid var(--ui-gold, #d8b46a);
  background: linear-gradient(180deg, rgba(43, 36, 29, 0.98) 0%, rgba(21, 17, 13, 0.99) 100%);
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(216, 180, 106, 0.15), 0 0 20px rgba(216, 180, 106, 0.2);
  padding: 28px 24px;
  text-align: center;
  transform: scale(0.92) translateY(10px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pwa-update-modal.show .pwa-update-card {
  transform: scale(1) translateY(0);
}

.pwa-update-icon {
  font-size: 3.8rem;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 10px rgba(216, 180, 106, 0.3));
  animation: pwa-float-icon 3s ease-in-out infinite;
}

@keyframes pwa-float-icon {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

.pwa-update-title {
  color: var(--ui-gold, #d8b46a);
  font-size: 1.6rem;
  margin: 0 0 10px 0;
  font-family: 'Outfit', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 12px rgba(216, 180, 106, 0.3);
  font-weight: 800;
}

.pwa-update-desc {
  color: var(--ui-text, #efe6d2);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 20px 0;
  opacity: 0.9;
  font-family: 'Inter', sans-serif;
}

.pwa-version-badge-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.pwa-version-badge {
  background: rgba(139, 107, 63, 0.12);
  border: 1px solid rgba(216, 180, 106, 0.25);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #efe6d2;
  font-family: 'Outfit', sans-serif;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.pwa-version-badge.new {
  background: rgba(97, 120, 76, 0.16);
  border-color: rgba(97, 120, 76, 0.45);
  color: #a3c285;
  font-weight: bold;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2), 0 0 8px rgba(97, 120, 76, 0.2);
}

.pwa-update-arrow {
  color: var(--ui-gold, #d8b46a);
  font-weight: bold;
  font-size: 1.1rem;
}

.pwa-update-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pwa-update-btn-install {
  width: 100%;
  min-height: 46px;
  background: linear-gradient(180deg, #d8b46a 0%, #a07a3c 100%) !important;
  border: 1px solid #ffe2aa !important;
  border-radius: 8px !important;
  color: #17110d !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.2) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.pwa-update-btn-install:hover {
  transform: translateY(-1px) !important;
  background: linear-gradient(180deg, #ffe2aa 0%, #c59b56 100%) !important;
  box-shadow: 0 6px 16px rgba(255, 215, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

.pwa-update-btn-install:active {
  transform: translateY(1px) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4) !important;
}

.pwa-update-btn-later {
  width: 100%;
  min-height: 38px;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #a7977c !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s !important;
}

.pwa-update-btn-later:hover {
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: var(--ui-text, #efe6d2) !important;
}
