/**
 * 更新日志弹窗样式 - Element Plus风格
 */

/* 遮罩层 */
.changelog-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.changelog-dialog-overlay.show {
  opacity: 1;
}

/* 弹窗容器 */
.changelog-dialog {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  width: 95%;
  max-width: 1200px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.changelog-dialog-overlay.show .changelog-dialog {
  transform: scale(1);
}

/* 弹窗头部 */
.changelog-dialog-header {
  padding: 20px 20px 10px;
  border-bottom: 1px solid #ebeef5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.changelog-dialog-title {
  font-size: 18px;
  font-weight: 500;
  color: #303133;
  display: flex;
  align-items: center;
  gap: 8px;
}

.changelog-dialog-title-icon {
  color: #409eff;
  font-size: 20px;
}

.changelog-dialog-close {
  background: transparent;
  border: none;
  font-size: 20px;
  color: #909399;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.3s;
}

.changelog-dialog-close:hover {
  color: #409eff;
  background-color: #ecf5ff;
}

/* 弹窗主体 */
.changelog-dialog-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

/* 版本信息 */
.changelog-version-info {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #ebeef5;
}

.changelog-version {
  font-size: 24px;
  font-weight: 600;
  color: #303133;
  margin-bottom: 8px;
}

.changelog-date {
  font-size: 14px;
  color: #909399;
  display: flex;
  align-items: center;
  gap: 6px;
}

.changelog-date-icon {
  font-size: 14px;
}

/* 重大更新 */
.changelog-major-update {
  margin-bottom: 20px;
  padding: 18px;
  background: linear-gradient(135deg, #fff7e6 0%, #fff4e6 100%);
  border-radius: 6px;
  border: 2px solid #ffd591;
  box-shadow: 0 2px 8px rgba(255, 213, 145, 0.2);
}

.changelog-major-update-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.changelog-major-update-icon {
  font-size: 22px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.changelog-major-update-title {
  font-size: 18px;
  font-weight: 600;
  color: #d46b08;
  letter-spacing: 0.5px;
}

.changelog-major-update-content {
  font-size: 15px;
  color: #303133;
  line-height: 1.8;
  font-weight: 500;
  padding-left: 30px;
  margin-bottom: 12px;
}

.changelog-major-update-contact {
  font-size: 14px;
  color: #606266;
  line-height: 1.8;
  text-align: right;
  padding-left: 30px;
  padding-top: 8px;
  border-top: 1px solid #f5f5f5;
  margin-top: 12px;
}

/* 总结说明 */
.changelog-summary {
  margin-bottom: 20px;
  padding: 18px 20px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e4e7ed;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
}

.changelog-summary:hover {
  border-color: #409eff;
  box-shadow: 0 4px 12px rgba(64, 158, 255, 0.15);
}

.changelog-summary-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #409eff 0%, #66b1ff 100%);
  border-radius: 10px;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3);
}

.changelog-summary-text {
  flex: 1;
  font-size: 15px;
  color: #303133;
  line-height: 1.8;
  font-weight: 500;
}

.changelog-summary-text strong {
  color: #409eff;
  font-weight: 600;
  font-size: 16px;
}

/* 更新内容列表 */
.changelog-changes {
  list-style: none;
  padding: 0;
  margin: 0;
}

.changelog-change-item {
  padding: 16px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid #f5f7fa;
}

.changelog-change-item:last-child {
  border-bottom: none;
}

/* 联系信息提示 */
.changelog-contact-info {
  margin-top: 0;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e4e7ed;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
}

.changelog-contact-info:hover {
  border-color: #409eff;
  box-shadow: 0 4px 12px rgba(64, 158, 255, 0.15);
  transform: translateY(-1px);
}

.changelog-contact-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #409eff 0%, #66b1ff 100%);
  border-radius: 8px;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(64, 158, 255, 0.3);
}

.changelog-contact-text {
  flex: 1;
  font-size: 15px;
  color: #303133;
  font-weight: 500;
  line-height: 1.5;
}

.changelog-change-content {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.changelog-change-text-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 更新类型标签 */
.changelog-type-tag {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 500;
  height: 20px;
  line-height: 16px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.changelog-type-feature {
  background-color: #ecf5ff;
  color: #409eff;
  border: 1px solid #b3d8ff;
}

.changelog-type-fix {
  background-color: #f0f9ff;
  color: #67c23a;
  border: 1px solid #c2e7b0;
}

.changelog-type-optimize {
  background-color: #fdf6ec;
  color: #e6a23c;
  border: 1px solid #f5dab1;
}

.changelog-type-security {
  background-color: #fef0f0;
  color: #f56c6c;
  border: 1px solid #fbc4c4;
}

.changelog-type-other {
  background-color: #f4f4f5;
  color: #909399;
  border: 1px solid #d3d4d6;
}

/* 更新内容文本 */
.changelog-change-text {
  font-size: 14px;
  color: #606266;
  line-height: 1.6;
  word-break: break-word;
}

/* 更新内容链接 */
.changelog-change-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #409eff 0%, #66b1ff 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
}

.changelog-change-link:hover {
  background: linear-gradient(135deg, #66b1ff 0%, #409eff 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3);
}

.changelog-change-link:active {
  transform: translateY(0);
}

.changelog-link-icon {
  font-size: 14px;
}

/* 更新内容图片 */
.changelog-change-image-wrapper {
  margin-top: 8px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #ebeef5;
  background: #f5f7fa;
}

.changelog-change-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.changelog-change-image:hover {
  transform: scale(1.02);
}

/* 图片预览模态框 */
.changelog-image-preview {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.changelog-image-preview.show {
  opacity: 1;
}

.changelog-image-preview img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.changelog-image-preview-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  color: #303133;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.changelog-image-preview-close:hover {
  background: #fff;
  transform: scale(1.1);
}

/* 弹窗底部 */
.changelog-dialog-footer {
  padding: 10px 20px 20px;
  border-top: 1px solid #ebeef5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.changelog-dont-show-again {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.changelog-checkbox {
  width: 16px;
  height: 16px;
  border: 1px solid #dcdfe6;
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s;
}

.changelog-checkbox.checked {
  background-color: #409eff;
  border-color: #409eff;
}

.changelog-checkbox.checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}

.changelog-dont-show-text {
  font-size: 14px;
  color: #606266;
}

.changelog-dialog-actions {
  display: flex;
  gap: 12px;
}

.changelog-btn {
  padding: 9px 20px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}

.changelog-btn-primary {
  background-color: #409eff;
  color: #fff;
}

.changelog-btn-primary:hover {
  background-color: #66b1ff;
}

.changelog-btn-primary:active {
  background-color: #3a8ee6;
}

.changelog-btn-default {
  background-color: #fff;
  color: #606266;
  border: 1px solid #dcdfe6;
}

.changelog-btn-default:hover {
  color: #409eff;
  border-color: #c6e2ff;
  background-color: #ecf5ff;
}

.changelog-btn-default:active {
  color: #3a8ee6;
  border-color: #3a8ee6;
}

/* 滚动条样式 */
.changelog-dialog-body::-webkit-scrollbar {
  width: 6px;
}

.changelog-dialog-body::-webkit-scrollbar-track {
  background: #f5f7fa;
  border-radius: 3px;
}

.changelog-dialog-body::-webkit-scrollbar-thumb {
  background: #c0c4cc;
  border-radius: 3px;
}

.changelog-dialog-body::-webkit-scrollbar-thumb:hover {
  background: #a0a4aa;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .changelog-dialog {
    width: 95%;
    max-width: 95%;
    max-height: 90vh;
  }

  .changelog-major-update {
    padding: 14px;
    margin-bottom: 16px;
  }

  .changelog-major-update-title {
    font-size: 16px;
  }

  .changelog-major-update-content {
    font-size: 14px;
    padding-left: 0;
    margin-top: 8px;
    margin-bottom: 10px;
  }

  .changelog-major-update-contact {
    font-size: 13px;
    padding-left: 0;
    margin-top: 10px;
    padding-top: 10px;
  }

  .changelog-major-update-icon {
    font-size: 20px;
  }

  .changelog-summary {
    padding: 14px 16px;
  }

  .changelog-summary-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .changelog-summary-text {
    font-size: 14px;
  }

  .changelog-summary-text strong {
    font-size: 15px;
  }

  .changelog-change-image-wrapper {
    margin-top: 8px;
  }

  .changelog-change-content {
    flex-wrap: wrap;
  }

  .changelog-change-link {
    margin-top: 8px;
    width: 100%;
    justify-content: center;
  }

  .changelog-contact-info {
    padding: 12px 16px;
  }

  .changelog-contact-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .changelog-contact-text {
    font-size: 14px;
  }

  .changelog-dialog-header {
    padding: 16px 16px 8px;
  }

  .changelog-dialog-body {
    padding: 16px;
  }

  .changelog-dialog-footer {
    padding: 8px 16px 16px;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .changelog-dialog-actions {
    width: 100%;
  }

  .changelog-btn {
    flex: 1;
  }

  .changelog-version {
    font-size: 20px;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.changelog-change-item {
  animation: fadeIn 0.3s ease;
}
