/* ==========================================================================
   Legendario Studio — Apple / Web3 Elegance Auto-Updater Modal
   Design cinematográfico, glassmorphism profundo e feedback fluido
   ========================================================================== */

.leg-updater-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(4, 6, 10, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.leg-updater-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.leg-updater-card {
  width: 480px;
  max-width: calc(100vw - 32px);
  background: linear-gradient(145deg, rgba(18, 23, 34, 0.92) 0%, rgba(10, 13, 20, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: 0 32px 80px -16px rgba(0, 0, 0, 0.75),
              0 0 0 1px rgba(255, 255, 255, 0.05),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transform: scale(0.94) translateY(12px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  color: #F0F3F8;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.leg-updater-overlay.is-active .leg-updater-card {
  transform: scale(1) translateY(0);
}

/* Ambient Glow Top Accent */
.leg-updater-card::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 120px;
  background: radial-gradient(ellipse at center, rgba(255, 94, 26, 0.35) 0%, rgba(255, 154, 60, 0) 70%);
  filter: blur(28px);
  pointer-events: none;
}

.leg-updater-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(255, 94, 26, 0.12);
  border: 1px solid rgba(255, 94, 26, 0.28);
  color: #FFA472;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.leg-updater-badge svg {
  width: 14px;
  height: 14px;
  animation: legUpdaterPulse 2s infinite ease-in-out;
}

@keyframes legUpdaterPulse {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

.leg-updater-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.leg-updater-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  margin: 0 0 6px 0;
  line-height: 1.25;
}

.leg-updater-versions {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #94A3B8;
  margin-bottom: 20px;
}

.leg-updater-vcur {
  color: #64748B;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.leg-updater-varrow {
  color: #FF7A30;
  display: flex;
  align-items: center;
}

.leg-updater-vnew {
  color: #38BDF8;
  background: rgba(56, 189, 248, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-weight: 700;
}

/* Changelog Container */
.leg-updater-changelog-wrap {
  margin-bottom: 24px;
}

.leg-updater-changelog-label {
  font-size: 12px;
  font-weight: 700;
  color: #CBD5E1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.leg-updater-changelog {
  background: rgba(7, 10, 16, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 14px 16px;
  max-height: 140px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.6;
  color: #CBD5E1;
  white-space: pre-wrap;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.leg-updater-changelog::-webkit-scrollbar {
  width: 5px;
}

.leg-updater-changelog::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

/* Progress Section */
.leg-updater-progress-wrap {
  display: none;
  margin-bottom: 24px;
}

.leg-updater-progress-wrap.is-visible {
  display: block;
}

.leg-updater-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: #94A3B8;
  margin-bottom: 8px;
}

.leg-updater-progress-pct {
  color: #38BDF8;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}

.leg-updater-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.leg-updater-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #FF5E1A 0%, #FF9A3C 50%, #38BDF8 100%);
  border-radius: 9999px;
  transition: width 0.2s ease-out;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.6);
}

/* Action Buttons */
.leg-updater-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.leg-updater-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  outline: none;
}

.leg-updater-btn--primary {
  background: linear-gradient(135deg, #FF5E1A 0%, #D93600 100%);
  color: #FFFFFF;
  box-shadow: 0 6px 20px -4px rgba(255, 94, 26, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.leg-updater-btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -4px rgba(255, 94, 26, 0.65),
              inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.leg-updater-btn--primary:active:not(:disabled) {
  transform: translateY(1px);
}

.leg-updater-btn--primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.leg-updater-btn--secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #CBD5E1;
}

.leg-updater-btn--secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.leg-updater-btn--secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.leg-updater-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: legSpin 0.8s linear infinite;
}

@keyframes legSpin {
  to { transform: rotate(360deg); }
}
