/* 基于小程序设计风格的网站样式 */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.9);
  --text-tertiary: rgba(255, 255, 255, 0.8);
  --text-dark: #333333;
  --text-medium: #666666;
  --text-light: #999999;
  --border-color: #dddddd;
  --white: #ffffff;
  --bg-light: rgba(255, 255, 255, 0.8);
  --box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  --button-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  background: var(--secondary-gradient);
  color: var(--text-dark);
}

/* 容器样式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(1rem, 5vw, 2rem);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 页面包装器 */
.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* 英雄区域 */
.hero-section {
  text-align: center;
  margin-bottom: clamp(2rem, 8vw, 3.75rem);
  width: 100%;
}

.logo-placeholder {
  font-size: clamp(3rem, 15vw, 5rem);
  margin-bottom: clamp(1rem, 5vw, 1.875rem);
  text-align: center;
}

.logo-placeholder img {
  max-width: 100%;
  height: auto;
}

.main-title {
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: clamp(0.875rem, 4vw, 1.25rem);
  line-height: 1.2;
}

.subtitle {
  font-size: clamp(1.125rem, 5vw, 1.5rem);
  color: var(--text-secondary);
  margin-bottom: clamp(0.75rem, 3vw, 1rem);
}

.description {
  font-size: clamp(1rem, 4vw, 1.125rem);
  color: var(--text-tertiary);
  margin-bottom: clamp(0.5rem, 2vw, 1rem);
}

/* 功能特性 */
.features {
  display: flex;
  justify-content: space-around;
  margin-bottom: clamp(2rem, 8vw, 3.75rem);
  width: 100%;
  max-width: 800px;
  flex-wrap: wrap;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.feature-top {
  color: white;
  font-size: clamp(0.8rem, 2vw, 1rem); /* 响应式字体大小，最小0.8rem，最大1rem，根据屏幕宽度自动调整 */
  /* 可以将其他内联样式也移到这里，如： */
  /* text-align: right; */
  /* background-color: #3A0CA3; */
  /* width: 100%; */
  /* box-sizing: border-box; */
  margin-bottom: 0px;
  height: 40px; /* 可根据实际需求调整PC端高度 */
}

/* 手机端响应式调整 */
@media (max-width: 767px) {
  .feature-top {
    height: 30px; /* 手机端增加高度 */
    font-size: 16px; /* 可选：同步调整手机端字体大小 */
    margin-bottom: 7px;
 
  }
}

.feature-icon {
  font-size: clamp(2rem, 8vw, 3rem);
  margin-bottom: clamp(0.5rem, 2vw, 0.75rem);
}

.feature-text {
  font-size: clamp(0.875rem, 4vw, 1rem);
  color: var(--text-secondary);
}

/* 操作按钮区域 */
.action-section {
  display: flex;
  flex-direction: row !important; /* 强制水平排列 */
  justify-content: center !important; /* 强制水平居中 */
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: none !important; /* 移除最大宽度限制 */
  margin: 0 auto;
  padding: 20px 0;
}


.primary-btn, .secondary-btn {
  padding: clamp(0.875rem, 4vw, 1rem) clamp(1.5rem, 6vw, 2rem);
  border-radius: 50px;
  font-size: clamp(1rem, 4vw, 1.125rem);
  font-weight: 500;
  text-align: center;
  box-shadow: var(--box-shadow);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  width: 100%;
  max-width: 300px;
}

.primary-btn {
  background: var(--white);
  color: var(--primary-color);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* 表单页面容器 */
.form-container {
  background: var(--white);
  border-radius: clamp(1rem, 4vw, 1.25rem);
  padding: clamp(1.5rem, 8vw, 2.5rem);
  box-shadow: var(--box-shadow);
  width: 100%;
  max-width: 600px;
  margin: clamp(2rem, 8vw, 3rem) auto;
  box-sizing: border-box;
}

.form-header {
  text-align: center;
  margin-bottom: 40px;
}

.form-title {
  font-size: 32px;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.form-subtitle {
  font-size: 18px;
  color: var(--text-medium);
}

/* 上传区域 */
.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  height: clamp(200px, 50vh, 300px);
  border: 2px dashed var(--border-color);
  border-radius: clamp(1rem, 4vw, 1.25rem);
  background: var(--bg-light);
  margin-bottom: clamp(1.5rem, 5vw, 2rem);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: clamp(1rem, 5vw, 1.5rem);
}

.upload-area:hover {
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.9);
}

.upload-btn {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: var(--button-shadow);
  color: var(--white);
  font-size: 48px;
  border: none;
  cursor: pointer;
}

.upload-text {
  color: var(--text-medium);
  font-size: 16px;
  margin-bottom: 10px;
}

.upload-hint {
  font-size: 14px;
  color: var(--text-light);
}

/* 预览区域 */
.preview-area {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.preview-image {
  width: 100%;
  max-height: clamp(200px, 60vh, 400px);
  border-radius: clamp(1rem, 4vw, 1.25rem);
  box-shadow: var(--box-shadow);
  margin-bottom: clamp(1.5rem, 5vw, 2rem);
  object-fit: contain;
}

.preview-text {
  font-size: clamp(1.25rem, 5vw, 1.5rem);
  color: var(--text-dark);
  margin-bottom: clamp(1.5rem, 5vw, 2rem);
}

/* 表单组 */
.form-group {
  margin-bottom: clamp(1.25rem, 5vw, 1.5625rem);
}

.form-label {
  display: block;
  margin-bottom: clamp(0.5rem, 2vw, 0.625rem);
  font-weight: 500;
  color: var(--text-dark);
  font-size: clamp(0.875rem, 3vw, 1rem);
}

.form-input, .form-select {
  width: 100%;
  padding: clamp(0.75rem, 3vw, 0.875rem) clamp(1rem, 4vw, 1.25rem);
  border: 1px solid var(--border-color);
  border-radius: clamp(0.5rem, 2vw, 0.625rem);
  font-size: clamp(0.875rem, 3vw, 1rem);
  transition: border-color 0.3s ease;
  background: var(--white);
  box-sizing: border-box;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 操作按钮 */
.action-buttons {
  display: flex;
  gap: 20px;
  margin-top: 40px;
}

.reselect-btn, .crop-btn, .submit-btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.reselect-btn {
  background: #f0f0f0;
  color: var(--text-medium);
}

.reselect-btn:hover {
  background: #e0e0e0;
  transform: translateY(-2px);
}

.crop-btn, .submit-btn {
  background: var(--primary-gradient);
  color: var(--white);
  box-shadow: var(--button-shadow);
}

.crop-btn:hover, .submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(102, 126, 234, 0.4);
}

/* 状态消息 */
.status-message {
  margin-top: 20px;
  padding: 15px 20px;
  border-radius: 10px;
  font-size: 16px;
  text-align: center;
}

.status-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.status-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* 响应式设计 */
/* 响应式设计 - 平板和小屏设备 */
@media (max-width: 768px) {
  .container {
    padding: clamp(1rem, 4vw, 1.5rem);
  }
  
  .features {
    flex-direction: column;
    gap: clamp(1rem, 4vw, 1.25rem);
    align-items: center;
  }
  
  .form-container {
    padding: clamp(1.25rem, 6vw, 2rem);
  }
  
  .action-buttons {
    flex-direction: column;
    gap: clamp(1rem, 4vw, 1.25rem);
  }
  
  /* 平板设备特定优化 */
  .feature-item {
    width: 100%;
    max-width: 300px;
  }
}

/* 响应式设计 - 移动设备 */
@media (max-width: 480px) {
  .container {
    padding: clamp(0.75rem, 3vw, 1rem);
    justify-content: flex-start;
    min-height: 100vh;
  }
  
  .hero-section {
    margin-bottom: clamp(1.5rem, 6vw, 2.5rem);
  }
  
  .features {
    margin-bottom: clamp(1.5rem, 6vw, 2.5rem);
  }
  
  .form-container {
    padding: clamp(1rem, 5vw, 1.5rem);
    margin: clamp(1.5rem, 6vw, 2rem) auto;
  }
  
  .upload-area {
    height: clamp(180px, 40vh, 250px);
  }
  
  /* 确保触摸友好的按钮尺寸 */
  .primary-btn, .secondary-btn {
    padding: clamp(1rem, 5vw, 1.25rem) clamp(1.5rem, 6vw, 2rem);
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* 响应式设计 - 大屏设备优化 */
@media (min-width: 1200px) {
  .container {
    padding: 2.5rem;
  }
  
  .hero-section {
    margin-bottom: 4rem;
  }
  
  .features {
    margin-bottom: 4rem;
    max-width: 900px;
  }
}

/* 订单卡片样式 */
.order-card {
  background: var(--white);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--box-shadow);
  margin-bottom: 30px;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.order-id {
  font-weight: 500;
  color: var(--text-dark);
}

.order-status {
  padding: 5px 15px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
}

.status-processing {
  background-color: #fff3cd;
  color: #856404;
}

.status-completed {
  background-color: #d4edda;
  color: #155724;
}

.status-pending {
  background-color: #d1ecf1;
  color: #0c5460;
}

/* 页脚样式 */
.footer {
  text-align: center;
  padding: clamp(1rem, 5vw, 1.5rem);
  color: var(--text-medium);
  font-size: clamp(0.875rem, 3vw, 1rem);
  margin-top: clamp(2rem, 8vw, 3.75rem);
  width: 100%;
}

/* 进度指示器 */
.progress-container {
  width: 100%;
  padding: 16px;
  background-color: var(--background-secondary);
  border-radius: 12px;
  margin: 16px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.progress-bar-wrapper {
  width: 100%;
  height: 10px;
  background-color: #f0f0f0;
  border-radius: 5px;
  overflow: hidden;
  margin: 8px 0 16px;
}

.progress-bar {
  height: 100%;
  background: var(--primary-gradient);
  transition: width 0.5s ease;
  border-radius: 5px;
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-bar-completed {
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
}

/* 状态文本样式 */
.status-text {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.status-waiting {
  color: var(--text-secondary);
}

.status-processing {
  color: var(--primary-color);
}

.status-completed {
  color: #4CAF50;
}

.status-error {
  color: #f44336;
}

.status-idle {
  color: var(--text-secondary);
}

/* 状态信息和消息 */
.status-info {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
  padding: 8px 12px;
  background-color: #f5f5f5;
  border-radius: 8px;
}

.status-message {
  padding: 12px;
  border-radius: 8px;
  margin-top: 12px;
  font-size: 14px;
}

.error-message {
  background-color: #ffebee;
  color: #c62828;
  border-left: 4px solid #f44336;
}

/* 加载动画 */
.loading-spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 4px solid var(--white);
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}