/* 更新对话框 */
.update-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.update-dialog {
  background: var(--bg-card, #ffffff);
  border-radius: var(--radius-xl, 16px);
  border: 1px solid var(--border-light, #e5e7eb);
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 440px;
  animation: updateSlideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes updateSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 头部 */
.update-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 0;
}

.update-dialog-title {
  font-size: var(--font-lg, 18px);
  font-weight: 600;
  color: var(--text-primary, #1f2937);
  margin: 0;
}

.update-dialog-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-md, 8px);
  color: var(--text-tertiary, #9ca3af);
  cursor: pointer;
  transition: all 0.2s;
}

.update-dialog-close:hover {
  background: var(--bg-hover, #f3f4f6);
  color: var(--text-primary, #1f2937);
}

/* 内容 */
.update-dialog-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 版本对比 */
.update-dialog-version {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-input, #f9fafb);
  border-radius: var(--radius-md, 8px);
  font-size: var(--font-sm, 14px);
}

.update-dialog-current {
  color: var(--text-secondary, #6b7280);
}

.update-dialog-arrow {
  color: var(--primary, #10b981);
  font-weight: 600;
}

.update-dialog-new {
  color: var(--primary, #10b981);
  font-weight: 600;
}

/* 更新说明 */
.update-dialog-notes-title {
  font-size: var(--font-sm, 14px);
  font-weight: 500;
  color: var(--text-secondary, #6b7280);
  margin-bottom: 6px;
}

.update-dialog-notes-content {
  font-size: var(--font-sm, 14px);
  color: var(--text-primary, #1f2937);
  line-height: 1.7;
  white-space: pre-wrap;
  margin: 0;
  padding: 10px 12px;
  background: var(--bg-input, #f9fafb);
  border-radius: var(--radius-md, 8px);
  max-height: 160px;
  overflow-y: auto;
}

/* 强制更新提示 */
.update-dialog-mandatory {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-md, 8px);
  font-size: var(--font-sm, 14px);
  color: #92400e;
}

.update-dialog-mandatory svg {
  flex-shrink: 0;
  color: #f59e0b;
}

/* 加载中 */
.update-dialog-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  color: var(--text-secondary, #6b7280);
}

.update-dialog-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-light, #e5e7eb);
  border-top-color: var(--primary, #10b981);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* 进度条 */
.update-dialog-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.update-dialog-progress-bar {
  height: 6px;
  background: var(--border-light, #e5e7eb);
  border-radius: 3px;
  overflow: hidden;
}

.update-dialog-progress-fill {
  height: 100%;
  background: var(--primary, #10b981);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.update-dialog-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-xs, 12px);
  color: var(--text-tertiary, #9ca3af);
}

/* 成功状态 */
.update-dialog-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  color: var(--primary, #10b981);
}

.update-dialog-success p {
  margin: 0;
  font-size: var(--font-sm, 14px);
  color: var(--text-primary, #1f2937);
}

.update-dialog-hint {
  font-size: var(--font-xs, 12px) !important;
  color: var(--text-tertiary, #9ca3af) !important;
}

/* 错误 */
.update-dialog-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md, 8px);
  font-size: var(--font-sm, 14px);
  color: #dc2626;
}

/* 底部按钮 */
.update-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 20px 20px;
}

.update-dialog-btn {
  padding: 10px 20px;
  font-size: var(--font-sm, 14px);
  font-weight: 500;
  font-family: inherit;
  border-radius: var(--radius-lg, 10px);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.update-dialog-btn.primary {
  background: var(--primary, #10b981);
  color: white;
}

.update-dialog-btn.primary:hover {
  opacity: 0.9;
}

.update-dialog-btn.secondary {
  background: var(--bg-input, #f3f4f6);
  color: var(--text-secondary, #6b7280);
  border: 1px solid var(--border-light, #e5e7eb);
}

.update-dialog-btn.secondary:hover {
  background: var(--bg-hover, #e5e7eb);
}

.update-dialog-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
