/* design.css - 乔布斯式极致体验样式 */
:root {
  --primary-color: #22d3ee; /* 赛博蓝 */
  --secondary-color: #94a3b8;
  --success-color: #a3e635; /* 霓虹酸绿 */
  --warning-color: #fbbf24;
  --error-color: #f43f5e;
  --baji-size: 200px;
  --magic-gradient: linear-gradient(135deg, #e879f9 0%, #22d3ee 100%);
  --success-gradient: linear-gradient(135deg, #a3e635 0%, #22d3ee 100%);
  --bg-deep: #030712;
  --glass-surface: rgba(17, 24, 39, 0.7);
}

/* 基础样式 - 乔布斯式极简设计 */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Smiley Sans', 'Exo 2', -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: #e2e8f0;
  background: var(--bg-deep);
  overflow-x: hidden;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
}

/* 响应式容器 - 支持带鱼屏等宽屏显示器 */
.responsive-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  /* 确保内容始终居中 */
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 小屏幕设备 */
@media (min-width: 640px) {
  .responsive-container {
    padding: 0 1.5rem;
  }
}

/* 中等屏幕设备 */
@media (min-width: 768px) {
  .responsive-container {
    padding: 0 2rem;
  }
}

/* 大屏幕设备 */
@media (min-width: 1024px) {
  .responsive-container {
    max-width: 80rem; /* 1280px */
    padding: 0 2rem;
  }
}

/* 超大屏幕设备 */
@media (min-width: 1280px) {
  .responsive-container {
    max-width: 90rem; /* 1440px */
    padding: 0 2rem;
  }
}

/* 带鱼屏等超宽屏设备 */
@media (min-width: 1536px) {
  .responsive-container {
    max-width: 100rem; /* 1600px */
    padding: 0 3rem;
  }
}

/* 4K等超宽屏设备 */
@media (min-width: 1920px) {
  .responsive-container {
    max-width: 120rem; /* 1920px */
    padding: 0 4rem;
  }
}

/* 超宽屏设备（带鱼屏等） */
@media (min-width: 2560px) {
  .responsive-container {
    max-width: 140rem; /* 2240px */
    padding: 0 5rem;
  }
}

.design-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  animation: fadeIn 0.8s ease-out;
  /* 确保在超宽屏上有合理的最大宽度 */
  width: 100%;
  max-width: 100%;
}

/* 桌面版本布局优化 */
@media (min-width: 1024px) {
  .design-container {
    grid-template-columns: 8fr 4fr;
    gap: 3rem;
    /* 桌面版限制最大宽度，确保内容不会过度拉伸 */
    max-width: 90rem; /* 1440px */
  }
  
  /* 桌面版工具面板中的操作按钮样式 */
  .desktop-tools-panel .tool-section button {
    transition: all 0.2s ease;
  }
  
  .desktop-tools-panel .tool-section button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
  .desktop-tools-panel .tool-section button:active {
    transform: translateY(0);
  }
}

@media (min-width: 1280px) {
  .design-container {
    grid-template-columns: 9fr 3fr;
    gap: 4rem;
    /* 大屏幕下保持合理的最大宽度 */
    max-width: 100rem; /* 1600px */
  }
}

/* 导航赛博风覆盖 */
.navbar {
  background: rgba(3, 7, 18, 0.85) !important;
  backdrop-filter: blur(14px) !important;
  border-bottom: 1px solid rgba(34, 211, 238, 0.12) !important;
}
.navbar a {
  color: #94a3b8 !important;
  transition: 0.3s;
}
.navbar a:hover {
  color: #22d3ee !important;
  text-shadow: 0 0 8px #22d3ee;
}

/* 专业吧唧预览区域 - 视觉焦点 */
.preview-section {
  display: flex;
  justify-content: center;
  align-items: center;
}

.baji-preview-professional {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.baji-frame-professional {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  background: white;
  border-radius: 2rem;
  /* box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1); */
  /* border: 1px solid rgba(59, 130, 246, 0.1); */
}

/* 外圈裁剪区域 68mm - 精确尺寸 */
.baji-outer-ring {
  position: relative;
  /* 精确计算：68mm在300 DPI下的像素尺寸 */
  width: calc(68mm * 300 / 25.4); /* 约803px */
  height: calc(68mm * 300 / 25.4); /* 约803px */
  border-radius: 50%;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  /* border: 3px dashed #3b82f6; */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    inset 0 0 20px rgba(59, 130, 246, 0.1),
    0 0 40px rgba(59, 130, 246, 0.2);
}

/* 桌面版本吧唧预览尺寸优化 - 更合理的尺寸 */
@media (min-width: 1024px) {
  .baji-outer-ring {
    width: calc(68mm * 250 / 25.4); /* 约670px，适中的尺寸 */
    height: calc(68mm * 250 / 25.4);
    max-width: 40vw;
    max-height: 40vw;
  }
}

@media (min-width: 1280px) {
  .baji-outer-ring {
    width: calc(68mm * 300 / 25.4); /* 约803px，稍大一些 */
    height: calc(68mm * 300 / 25.4);
    max-width: 35vw;
    max-height: 35vw;
  }
}

@media (min-width: 1536px) {
  .baji-outer-ring {
    width: calc(68mm * 350 / 25.4); /* 约937px，大屏幕下的合理尺寸 */
    height: calc(68mm * 350 / 25.4);
    max-width: 30vw;
    max-height: 30vw;
  }
}

/* 内圈展示区域 58mm - 精确尺寸 */
.baji-inner-ring {
  position: relative;
  /* 精确计算：58mm在300 DPI下的像素尺寸 */
  width: calc(58mm * 300 / 25.4); /* 约685px */
  height: calc(58mm * 300 / 25.4); /* 约685px */
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    inset 0 0 20px rgba(0, 0, 0, 0.05),
    0 0 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  touch-action: none; /* 禁用默认触摸行为 */
}

/* 桌面版本内圈尺寸优化 - 与外圈保持合理比例 */
@media (min-width: 1024px) {
  .baji-inner-ring {
    width: calc(58mm * 250 / 25.4); /* 约572px，与外圈比例协调 */
    height: calc(58mm * 250 / 25.4);
    max-width: 34vw;
    max-height: 34vw;
  }
}

@media (min-width: 1280px) {
  .baji-inner-ring {
    width: calc(58mm * 300 / 25.4); /* 约685px */
    height: calc(58mm * 300 / 25.4);
    max-width: 30vw;
    max-height: 30vw;
  }
}

@media (min-width: 1536px) {
  .baji-inner-ring {
    width: calc(58mm * 350 / 25.4); /* 约799px */
    height: calc(58mm * 350 / 25.4);
    max-width: 25vw;
    max-height: 25vw;
  }
}

/* 🍎 右下角小上传图标 - 乔布斯式极简（在外圈） */
.upload-icon-small {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(59, 130, 246, 0.9);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  backdrop-filter: blur(10px);
  z-index: 20;
}

.upload-icon-small:hover {
  background: rgba(59, 130, 246, 1);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* 🔄 右下角旋转图标 - 乔布斯式极简 */
.rotate-control-icons {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: flex;
  gap: 8px;
  z-index: 20;
}

.rotate-icon-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.9);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
  backdrop-filter: blur(10px);
}

.rotate-icon-btn:hover {
  background: rgba(16, 185, 129, 1);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.rotate-icon-btn:active {
  transform: scale(0.95);
}

/* 🗺️ 地图式缩放条 - 乔布斯式美感（左上角版） */
.zoom-control-map {
  position: absolute;
  top: 12px;
  left: 0px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 20;
  width: 50px;
}

.zoom-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.9);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.zoom-btn:hover {
  background: rgba(59, 130, 246, 1);
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.zoom-btn:active {
  transform: scale(0.95);
}

.zoom-slider-container {
  width: 120px;
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  position: relative;
  transform: rotate(-90deg);
  margin: 20px 0;
}

.zoom-slider {
  width: 100%;
  height: 100%;
  background: transparent;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.zoom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.zoom-display {
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  min-width: 40px;
  text-align: center;
}

/* 🍎 无图时的上传提示 - 乔布斯式美感 */
.upload-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 5;
}

.upload-placeholder:hover {
  color: #3b82f6;
  transform: translate(-50%, -50%) scale(1.05);
}

.upload-placeholder svg {
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.upload-placeholder:hover svg {
  opacity: 1;
}

/* 专业预览画布 */
.preview-canvas-professional {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50%;
  background: white;
  transition: all 0.3s ease;
  touch-action: none; /* 禁用默认触摸行为 */
  cursor: move;
  object-fit: contain; /* 确保图片比例正确 */
}

.preview-canvas-professional:hover {
  transform: scale(1.02);
}

.preview-canvas-professional:active {
  cursor: grabbing;
}

/* 尺寸指示器 - 已移除 */

/* 专业预览信息面板 */
.preview-info-professional {
  width: 100%;
  max-width: 500px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.info-item-professional {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: white;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.info-item-professional:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.info-item-professional label {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.info-item-professional span {
  font-weight: 100;
  color: #333;
  font-size: 0.75rem;
}

/* 吧唧边缘渐变遮罩效果 */
.baji-inner-ring::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    transparent 0%,
    transparent 70%,
    rgba(0, 0, 0, 0.1) 85%,
    rgba(0, 0, 0, 0.2) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* 外圈到内圈的渐变过渡 */
.baji-outer-ring::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    transparent 0%,
    rgba(59, 130, 246, 0.05) 70%,
    rgba(59, 130, 246, 0.1) 85%,
    rgba(59, 130, 246, 0.2) 100%
  );
  pointer-events: none;
}

/* 上传区域 - 魔法般的拖拽体验 */
.upload-zone {
  border: 2px dashed #d1d5db;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.upload-zone::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  transition: left 0.5s ease;
}

.upload-zone:hover::before {
  left: 100%;
}

.upload-zone:hover,
.upload-zone-active {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
  transform: scale(1.02);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
}

.upload-icon {
  color: #9ca3af;
  transition: all 0.3s ease;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.upload-zone:hover .upload-icon {
  color: var(--primary-color);
  transform: scale(1.1);
}

.upload-success {
  animation: scaleIn 0.5s ease-out;
}

/* 预览区域 - 完美细节 */
.preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: slideInUp 0.6s ease-out;
}

.baji-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.baji-frame {
  width: var(--baji-size);
  height: var(--baji-size);
  border: 3px dashed var(--primary-color);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.baji-frame::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--magic-gradient);
  border-radius: 1rem;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.baji-frame:hover::before {
  opacity: 0.1;
}

.preview-canvas {
  max-width: 100%;
  max-height: 100%;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.preview-canvas:hover {
  transform: scale(1.02);
}

.size-indicator {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 600;
  background: white;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  margin-top: 1.5rem;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: white;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.info-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.info-item label {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

.info-item span {
  font-weight: 600;
  color: #111827;
}

/* 编辑工具 - 已移除 */

.scale-control,
.rotate-control,
.position-control {
  background: white;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.scale-control:hover,
.rotate-control:hover,
.position-control:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.scale-slider-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.scale-slider {
  flex: 1;
  height: 0.5rem;
  background: linear-gradient(to right, #e5e7eb, var(--primary-color));
  border-radius: 0.25rem;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.scale-slider:hover {
  height: 0.75rem;
}

.scale-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
  transition: all 0.2s ease;
}

.scale-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 12px rgba(59, 130, 246, 0.4);
}

.scale-slider::-moz-range-thumb {
  width: 1.5rem;
  height: 1.5rem;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.scale-display {
  font-weight: 700;
  color: var(--primary-color);
  min-width: 3rem;
  text-align: center;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.scale-display:hover {
  transform: scale(1.1);
}

.scale-presets {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.preset-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #64748b;
}

.preset-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

/* 旋转控制 - 视觉化按钮 */
.rotate-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.rotate-btn,
.reset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.rotate-btn:hover,
.reset-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.reset-btn {
  background: #fef3c7;
  border-color: #fbbf24;
  color: #92400e;
}

.reset-btn:hover {
  background: var(--warning-color);
  border-color: var(--warning-color);
  color: white;
}

/* 位置调整提示 */
.position-hint {
  background: white;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  text-align: center;
}

.position-hint:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.hint-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

/* 按钮样式 - 乔布斯式完美细节 */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.75rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: #2563eb;
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: white;
  color: var(--secondary-color);
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #9ca3af;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.btn-warning {
  background: var(--warning-color);
  color: white;
  border-color: var(--warning-color);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover:not(:disabled) {
  background: #d97706;
  border-color: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.btn-info {
  background: #06b6d4;
  color: white;
  border-color: #06b6d4;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-info:hover:not(:disabled) {
  background: #0891b2;
  border-color: #0891b2;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
}

/* 操作按钮区域 */
.action-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  background: white;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  animation: slideInUp 0.8s ease-out;
}

/* 桌面版工具面板样式 */
.desktop-tools-panel {
  animation: slideInRight 0.6s ease-out;
}

.tools-container {
  animation: fadeIn 0.8s ease-out;
}

.tool-section {
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 1.5rem;
}

.tool-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* 自定义滑块样式 */
.slider {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.slider::-webkit-slider-track {
  background: #e5e7eb;
  height: 8px;
  border-radius: 4px;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  background: #3b82f6;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
  background: #2563eb;
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.slider::-moz-range-track {
  background: #e5e7eb;
  height: 8px;
  border-radius: 4px;
  border: none;
}

.slider::-moz-range-thumb {
  background: #3b82f6;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.slider::-moz-range-thumb:hover {
  background: #2563eb;
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

/* 响应式设计 - 完美适配 */
@media (max-width: 1024px) {
  .design-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* 桌面版工具面板在移动端隐藏 */
  .desktop-tools-panel {
    display: none;
  }
  
  .action-buttons {
    margin-top: 2rem;
  }
}

/* 🍎 乔布斯式移动端优化 - 简洁高效 */
@media (max-width: 768px) {
  .design-container {
    padding: 0.5rem;
    gap: 0.5rem;
    grid-template-columns: 1fr;
    /* 移动端保持全宽，不受桌面版max-width影响 */
    max-width: 100%;
  }
  
  /* 预览区域 - 更大更清晰 */
  .preview-section {
    order: 1;
    margin-bottom: 0.5rem;
  }
  
  .baji-frame-professional {
    padding: 0.5rem;
    border-radius: 1rem;
  }
  
  .baji-outer-ring {
    /* 移动端保持精确比例，但适当缩小 */
    width: calc(68mm * 200 / 25.4); /* 约536px，缩小到200 DPI */
    height: calc(68mm * 200 / 25.4);
    max-width: 90vw;
    max-height: 90vw;
  }
  
  .baji-inner-ring {
    /* 移动端保持精确比例 */
    width: calc(58mm * 200 / 25.4); /* 约457px，缩小到200 DPI */
    height: calc(58mm * 200 / 25.4);
    max-width: 77vw;
    max-height: 77vw;
  }
  
  /* 编辑工具区域 - 已移除 */
  
  /* 缩放控制 - 已移除，集成到预览框 */
  
  /* 旋转控制 - 已移除，集成到预览框 */
  
  /* 位置控制 - 已移除，集成到预览框 */
  
  /* 信息显示 - 合并为一行 */
  .preview-info-professional {
    order: 3;
    margin-bottom: 0.5rem;
  }
  
  .info-grid {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }
  
  .info-item-professional {
    flex: 1;
    text-align: center;
    padding: 0.25rem;
  }
  
  .info-item-professional label {
    font-size: 0.625rem;
    color: #6b7280;
    margin-bottom: 0.125rem;
  }
  
  .scale-display,
  .rotation-display,
  .position-display {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1f2937;
  }
  
  /* 操作按钮 - 水平布局 */
  .action-buttons {
    order: 4;
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    margin-top: 0;
  }
  
  .action-buttons .btn {
    flex: 1;
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    margin-bottom: 0;
    min-height: 44px; /* 确保触摸目标足够大 */
  }
  
  /* 魔法按钮 - 移动端优化 */
  .magic-button {
    font-size: 1rem;
    padding: 16px 24px;
    border-radius: 12px;
    min-height: 44px;
    touch-action: manipulation;
  }
  
  .magic-button:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }
  
  /* 魔法输入框 - 移动端优化 */
  .magic-input {
    font-size: 16px; /* 防止iOS缩放 */
    padding: 12px 16px;
    border-radius: 8px;
    min-height: 44px;
  }
  
  /* 魔法卡片 - 移动端优化 */
  .magic-card {
    margin: 0.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
  .magic-card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
  
  /* 触摸优化 */
  .touch-optimized {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }
  
  /* 滚动优化 */
  .scroll-optimized {
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
  }
  
  /* 防止水平滚动 */
  body {
    overflow-x: hidden;
  }
  
  /* 确保所有可点击元素都有足够的触摸目标 */
  button, a, input[type="button"], input[type="submit"], .clickable {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* 移动端特定的动画 */
  @keyframes mobileSlideIn {
    from {
      transform: translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  
  .mobile-slide-in {
    animation: mobileSlideIn 0.3s ease-out;
  }
  
  /* 移动端特定的粒子效果 */
  .particle {
    pointer-events: none;
  }
  
  /* 移动端特定的魔法效果 */
  .magic-glow-effect {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
  }
  
  /* 移动端特定的成功庆祝 */
  .success-celebration {
    font-size: 2rem;
    animation: mobileBounce 0.6s ease-out;
  }
  
  @keyframes mobileBounce {
    0%, 20%, 50%, 80%, 100% {
      transform: translateY(0);
    }
    40% {
      transform: translateY(-10px);
    }
    60% {
      transform: translateY(-5px);
    }
  }
  
  /* 上传区域 - 已移除，整合到预览区 */
  
  /* 尺寸指示器 - 已移除 */
  
  /* 移动端旋转图标优化 */
  .rotate-control-icons {
    bottom: 8px;
    left: 8px;
    gap: 6px;
  }
  
  .rotate-icon-btn {
    width: 28px;
    height: 28px;
  }
  
  .zoom-btn {
    width: 28px;
    height: 28px;
  }
  
  .zoom-slider-container {
    width: 80px;
    margin: 15px 0;
  }
  
  .zoom-display {
    font-size: 0.625rem;
    padding: 1px 4px;
    min-width: 32px;
  }
  
  /* 位置提示 - 隐藏 */
  .position-hint {
    display: none;
  }
}

/* 动画效果 - 魔法般的体验 */
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes scaleIn {
  from { 
    transform: scale(0.8); 
    opacity: 0; 
  }
  to { 
    transform: scale(1); 
    opacity: 1; 
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { 
    transform: scale(1); 
  }
  50% { 
    transform: scale(1.05); 
  }
}

@keyframes magicGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.6);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

.scale-in {
  animation: scaleIn 0.5s ease-out;
}

.pulse {
  animation: pulse 0.6s ease-in-out;
}

.magic-glow {
  animation: magicGlow 2s ease-in-out infinite;
}

/* 成功状态 - 情感化反馈 */
.success {
  background: var(--success-gradient);
  color: white;
  animation: scaleIn 0.5s ease-out;
}

.success::before {
  content: '✨';
  margin-right: 0.5rem;
  animation: pulse 1s ease-in-out infinite;
}

/* 粒子效果 - 魔法般的视觉反馈 */
.magic-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--magic-gradient);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1000;
  animation: particleFloat 2s ease-out forwards;
}

@keyframes particleFloat {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-100px) scale(0) rotate(360deg);
  }
}

/* 彩带效果 - 庆祝动画 */
@keyframes confettiFall {
  0% {
    transform: translateY(-10px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* 成功脉冲 - 瞬间反馈 */
@keyframes successPulse {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

/* 加载状态 - 优雅的等待 */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* 错误通知 - 优雅的错误处理 */
.error-notification {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: var(--error-color);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  z-index: 1000;
  animation: slideInRight 0.3s ease-out;
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

/* 引导高亮 - 用户引导 */
.guide-highlight {
  position: relative;
  z-index: 1000;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.5);
  border-radius: 0.75rem;
  animation: pulse 1s ease-in-out infinite;
}

.guide-tooltip {
  position: fixed;
  background: #1f2937;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  max-width: 250px;
  z-index: 1001;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: scaleIn 0.3s ease-out;
}

.guide-tooltip::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border: 8px solid transparent;
}

.guide-tooltip-top::after {
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  border-top-color: #1f2937;
}

.guide-tooltip-bottom::after {
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: #1f2937;
}

.guide-tooltip-left::after {
  right: -16px;
  top: 50%;
  transform: translateY(-50%);
  border-left-color: #1f2937;
}

.guide-tooltip-right::after {
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  border-right-color: #1f2937;
}

.guide-next-btn {
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.guide-next-btn:hover {
  background: #2563eb;
  transform: scale(1.05);
}

/* 上下文帮助 - 智能提示 */
.context-help-tooltip {
  position: fixed;
  background: #1f2937;
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  max-width: 280px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: fadeIn 0.2s ease-out;
}

.help-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #f9fafb;
}

.help-content {
  color: #d1d5db;
  line-height: 1.4;
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .btn,
  .preset-btn,
  .rotate-btn,
  .reset-btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .scale-slider {
    height: 1rem;
  }
  
  .scale-slider::-webkit-slider-thumb {
    width: 2rem;
    height: 2rem;
  }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #0000ff;
    --secondary-color: #000000;
  }
  
  .btn {
    border-width: 3px;
  }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ✨ Magic Experience 系统样式 */

/* 魔法按钮效果 */
.magic-button {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.magic-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.magic-button:hover::before {
  left: 100%;
}

.magic-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.magic-button:active {
  transform: translateY(0) scale(0.98);
}

/* 魔法光环效果 */
.magic-glow-effect {
  position: relative;
}

.magic-glow-effect::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  animation: magicGlowRotate 3s linear infinite;
}

.magic-glow-effect.active::after {
  opacity: 0.7;
}

@keyframes magicGlowRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 粒子系统 */
.particle-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border-radius: 50%;
  pointer-events: none;
  animation: particleFloat 2s ease-out forwards;
}

@keyframes particleFloat {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-150px) scale(0) rotate(360deg);
  }
}

/* 庆祝彩带效果 */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10000;
}

.confetti {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #ff6b6b;
  animation: confettiFall 3s ease-out forwards;
}

.confetti:nth-child(2n) { background: #4ecdc4; }
.confetti:nth-child(3n) { background: #45b7d1; }
.confetti:nth-child(4n) { background: #96ceb4; }
.confetti:nth-child(5n) { background: #feca57; }

@keyframes confettiFall {
  0% {
    transform: translateY(-10px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* 成功庆祝动画 */
.success-celebration {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  z-index: 10000;
  animation: successPulse 1s ease-out forwards;
}

@keyframes successPulse {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

/* 魔法拖拽效果 */
.magic-drag-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
    rgba(102, 126, 234, 0.1) 0%, 
    transparent 50%);
  pointer-events: none;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.magic-drag-overlay.active {
  opacity: 1;
}

/* 音效可视化 */
.audio-visualizer {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  z-index: 1000;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s ease;
}

.audio-visualizer.active {
  opacity: 1;
  transform: scale(1);
  animation: audioPulse 0.5s ease-out;
}

@keyframes audioPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* 魔法提示框 */
.magic-tooltip {
  position: fixed;
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  max-width: 300px;
  z-index: 1001;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: magicTooltipAppear 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.magic-tooltip::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #1f2937;
}

@keyframes magicTooltipAppear {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 魔法加载效果 */
.magic-loading {
  position: relative;
  overflow: hidden;
}

.magic-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(102, 126, 234, 0.3), 
    transparent);
  animation: magicLoading 2s infinite;
}

@keyframes magicLoading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* 魔法按钮组 */
.magic-button-group {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.magic-button-group .btn {
  position: relative;
  overflow: hidden;
}

.magic-button-group .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.magic-button-group .btn:hover::before {
  left: 100%;
}

/* 魔法输入框 */
.magic-input {
  position: relative;
  overflow: hidden;
}

.magic-input input {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid transparent;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.magic-input input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background: white;
}

.magic-input::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: left 0.6s ease;
  border-radius: inherit;
}

.magic-input:focus-within::before {
  left: 100%;
}

/* 魔法卡片 */
.magic-card {
  position: relative;
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  overflow: hidden;
}

.magic-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(102, 126, 234, 0.05) 0%, 
    rgba(118, 75, 162, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.magic-card:hover::before {
  opacity: 1;
}

.magic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* 魔法进度条 */
.magic-progress {
  position: relative;
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.magic-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
  position: relative;
}

.magic-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: magicProgressShine 2s infinite;
}

@keyframes magicProgressShine {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* 魔法通知 */
.magic-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  animation: magicNotificationSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 4px solid #667eea;
  max-width: 350px;
}

@keyframes magicNotificationSlide {
  0% {
    opacity: 0;
    transform: translateX(100%);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.magic-notification.success {
  border-left-color: #10b981;
}

.magic-notification.error {
  border-left-color: #ef4444;
}

.magic-notification.warning {
  border-left-color: #f59e0b;
}

/* 魔法模态框 */
.magic-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: magicModalFadeIn 0.3s ease;
}

.magic-modal-content {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  animation: magicModalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes magicModalFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes magicModalSlideIn {
  0% {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 魔法开关 */
.magic-switch {
  position: relative;
  width: 60px;
  height: 30px;
  background: #e5e7eb;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.magic-switch.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.magic-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.magic-switch.active::after {
  transform: translateX(30px);
}

/* 魔法标签 */
.magic-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  animation: magicTagPulse 2s ease-in-out infinite;
}

@keyframes magicTagPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* 魔法分隔线 */
.magic-divider {
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
  margin: 2rem 0;
}

.magic-divider::after {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: #667eea;
  border-radius: 50%;
  animation: magicDividerPulse 2s ease-in-out infinite;
}

@keyframes magicDividerPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}


/* 上传状态图标 - 右上角 */
.upload-status-icon {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.status-uploading-icon {
  background: rgba(59, 130, 246, 0.9);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  animation: pulse-uploading 1.5s ease-in-out infinite;
}
 
.status-uploaded-icon {
  background: none;
  color: rgba(200, 200, 200, .8); 
}

.status-failed-icon {
  background: rgba(239, 68, 68, 0.9);
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.status-failed-icon:hover {
  background: rgba(239, 68, 68, 1);
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

/* 上传状态图标动画 */
@keyframes pulse-uploading {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

/* 云图标特殊动画 */
.status-uploaded-icon svg {
  animation: cloudFloat 3s ease-in-out infinite;
}

@keyframes cloudFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-2px);
  }
}

/* === 故障艺术工具类 (Glitch Utilities) === */
.glitch-text { position: relative; }
.glitch-text::before, .glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
}
.glitch-text::before {
  left: 2px; text-shadow: -1px 0 var(--error-color); clip: rect(24px, 550px, 90px, 0);
  animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}
.glitch-text::after {
  left: -2px; text-shadow: -1px 0 var(--primary-color); clip: rect(85px, 550px, 140px, 0);
  animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

/* 玻璃态卡片通用类 */
.glass-card {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.glass-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.3);
}

@keyframes glitch-anim-1 {
  0% { clip: rect(20px, 9999px, 10px, 0); }
  100% { clip: rect(80px, 9999px, 90px, 0); }
}
@keyframes glitch-anim-2 {
  0% { clip: rect(90px, 9999px, 100px, 0); }
  100% { clip: rect(10px, 9999px, 40px, 0); }
}

/* === 订单状态霓虹灯效 === */
/* 待支付 / 未支付 */
.neon-badge-pending, .neon-badge-unpaid {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24; /* 琥珀色 */
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.1);
}
/* 处理中 */
.neon-badge-processing {
    background: rgba(6, 182, 212, 0.1);
    color: #22d3ee; /* 赛博蓝 */
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.1);
    animation: pulse-slow 3s infinite;
}
/* 已完成 / 已支付 */
.neon-badge-completed, .neon-badge-paid, .neon-badge-printed {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80; /* 亮绿 */
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.1);
}
/* 已取消 */
.neon-badge-cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171; /* 红色 */
    border-color: rgba(239, 68, 68, 0.3);
    text-decoration: line-through;
    opacity: 0.7;
}

@keyframes pulse-slow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* === 核心制作台专用样式 (Reactor Core) === */
.baji-outer-ring {
    width: min(85vw, 65vh);
    height: min(85vw, 65vh);
    max-width: 600px;
    max-height: 600px;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.8);
    transition: all 0.3s ease-out;
}
.baji-inner-ring {
    width: 85.3%;
    height: 85.3%;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}
.preview-canvas-professional {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

/* 赛博按钮 */
.cyber-btn-outline {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    color: #94a3b8;
    border-radius: 8px;
    transition: all 0.2s;
}
.cyber-btn-outline:hover {
    background: rgba(34, 211, 238, 0.1);
    border-color: rgba(34, 211, 238, 0.5);
    color: #22d3ee;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.2);
}

@media (max-width: 768px) {
    .baji-outer-ring { width: 80vw; height: 80vw; }
    .desktop-tools-panel { display: none !important; }
}

@keyframes spin { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }

/* === 全息档案卡片 (Holo-Archive Card) === */
.holo-card {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.holo-card:hover {
    border-color: rgba(34, 211, 238, 0.4);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.15);
}

.holo-card .case-image-container {
    position: relative;
    background: radial-gradient(circle at center, #1e293b 0%, #020617 100%);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.holo-card .case-image {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

.holo-card:hover .case-image {
    transform: scale(1.1) rotate(3deg);
}

.holo-card .case-info {
    padding: 1.25rem;
}

.holo-card .case-title {
    color: #f1f5f9;
    font-family: var(--font-hero, 'Smiley Sans', 'Exo 2', sans-serif);
}

.holo-card .case-category {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: monospace;
    font-size: 0.75rem;
}

.holo-card .case-stats {
    color: #64748b !important;
    font-family: monospace;
}

.holo-card .case-overlay {
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(4px);
}

.holo-card .action-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    backdrop-filter: blur(4px);
}

.holo-card .action-btn:hover {
    background: var(--neon-cyan, #22d3ee) !important;
    border-color: var(--neon-cyan, #22d3ee) !important;
    color: black !important;
    box-shadow: 0 0 15px var(--neon-cyan, #22d3ee);
}

/* === 画廊移动端适配与输入可读性增强 === */
.search-input {
  color: #e2e8f0 !important;
}
.search-input::placeholder {
  color: #94a3b8 !important;
}

@media (max-width: 768px) {
  .filter-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filter-tabs::-webkit-scrollbar { display: none; }
  .filter-tabs > button { flex: 0 0 auto; }
  .gallery-header .text-9xl { transform: scale(1.1) translate(-50%, -50%); }
  .search-box .relative { padding-left: 0.25rem; padding-right: 0.25rem; }
}
