/* page-design.scss */
/* 原有设计界面样式保持不变 */
.panel {
  background: white;
  border-radius: 25px;
  padding: 30px;
  margin-bottom: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  animation: fadeIn 0.6s ease;
  transform-origin: top;
  position: relative; /* 为浮动按钮提供定位上下文 */
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 15px;
  border-bottom: 2px solid #ecf0f1;
}

h2 i {
  background: linear-gradient(135deg, #3498db, #9b59b6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(52, 152, 219, 0.1);
}

.section-desc {
  color: #95a5a6;
  margin-bottom: 25px;
  font-size: 0.95rem;
}

.jacket-display-container {
  position: relative;
  margin: 0 auto 30px;
  perspective: 1000px;
}

.jacket-display {
  width: 300px;
  height: 420px;
  margin: 0 auto;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s ease;
}

.jacket-display:hover {
  transform: rotateY(10deg);
}

.jacket-base {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://i.ibb.co/0QrZb0C/jacket-base.png') no-repeat center;
  background-size: contain;
  z-index: 1;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
}

.jacket-part {
  position: absolute;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 2;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.jacket-part:hover {
  transform: translateY(-3px);
  filter: brightness(1.05);
}

.jacket-part.active-part {
  outline: 3px solid #3498db;
  outline-offset: 3px;
  filter: drop-shadow(0 0 8px rgba(52, 152, 219, 0.5));
}

.jacket-hood {
  top: 0;
  left: 50px;
  width: 200px;
  height: 120px;
  border-radius: 100px 100px 0 0;
  z-index: 3;
}

.jacket-body {
  top: 100px;
  left: 25px;
  width: 250px;
  height: 250px;
  border-radius: 20px;
}

.jacket-sleeve {
  top: 110px;
  width: 80px;
  height: 180px;
  border-radius: 40px;
}

.jacket-sleeve.left {
  left: 0;
}

.jacket-sleeve.right {
  right: 0;
}

.color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.color-option {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
}

.color-option:hover {
  transform: scale(1.15);
}

.color-option.active {
  transform: scale(1.2);
  box-shadow: 0 0 0 3px white, 0 0 0 6px #3498db;
}

.color-option.active::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.action-buttons {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.btn {
  flex: 1;
  padding: 18px;
  border-radius: 50px;
  border: none;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, #3498db, #9b59b6);
  color: white;
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 12px 25px rgba(52, 152, 219, 0.4);
  transform: translateY(-3px);
}

.btn-secondary {
  background: white;
  color: #3498db;
  border: 2px solid #3498db;
}

.btn-secondary:hover {
  background: rgba(52, 152, 219, 0.05);
  transform: translateY(-3px);
}

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

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.pulse {
  animation: pulse 2s infinite;
}

@media (max-width: 480px) {
  .jacket-display {
    width: 280px;
    height: 400px;
  }
  
  .panel {
    padding: 25px 20px;
  }
}

/* ===== 新增的AI助手样式 ===== */

/* 右下角AI助手按钮 */
.ai-float-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  border-radius: 50px;
  background: linear-gradient(135deg, #9b59b6, #3498db);
  color: white;
  border: none;
  box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  
  i {
    font-size: 1.2rem;
  }
  
  span {
    font-weight: 600;
  }
  
  &:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(52, 152, 219, 0.5);
  }
}

/* AI模态框 */
.ai-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: 2000;
  backdrop-filter: blur(5px);
}

.ai-modal-content {
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  background: white;
  border-radius: 25px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
  animation: modalFadeIn 0.4s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-modal-header {
  display: flex;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #9b59b6, #3498db);
  color: white;
  position: relative;
  
  .ai-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9b59b6;
    font-size: 1.2rem;
  }
  
  .ai-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-left: 15px;
    flex: 1;
  }
  
  .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    
    &:hover {
      background: rgba(255, 255, 255, 0.2);
    }
  }
}

.ai-messages {
  flex: 1;
  min-height: 300px;
  max-height: 50vh;
  overflow-y: auto;
  padding: 20px;
  background: #f9f9f9;
}

.message {
  padding: 12px 15px;
  margin-bottom: 15px;
  border-radius: 18px;
  max-width: 85%;
  position: relative;
  transition: all 0.3s;
}

.user-message {
  background: linear-gradient(135deg, #3498db, #9b59b6);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 5px;
}

.ai-message {
  background: #ecf0f1;
  color: #2c3e50;
  margin-right: auto;
  border-bottom-left-radius: 5px;
}

/* 趋势推荐消息样式 */
.trend-message {
  background: #e3f2fd !important;
  border-left: 4px solid #2196f3;
  padding: 15px;
}

.color-dot {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
  vertical-align: middle;
  margin: 0 2px;
}

.trend-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.trend-btn {
  padding: 8px 15px;
  background: rgba(33, 150, 243, 0.1);
  border: 1px solid #2196f3;
  border-radius: 20px;
  color: #2196f3;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
  
  &:hover {
    background: rgba(33, 150, 243, 0.2);
    transform: translateY(-2px);
  }
}

.loading-dots {
  display: inline-flex;
  gap: 5px;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  
  span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    display: inline-block;
    animation: dotPulse 1.5s infinite ease-in-out;
    
    &:nth-child(2) {
      animation-delay: 0.2s;
    }
    
    &:nth-child(3) {
      animation-delay: 0.4s;
    }
  }
}

@keyframes dotPulse {
  0%, 100% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
}

/* 预设问题模板样式 */
.preset-questions {
  padding: 15px;
  background: #f8f9fa;
  border-top: 1px solid #eee;
}

.preset-title {
  color: #6c757d;
  margin-bottom: 10px;
  font-size: 0.95rem;
  font-weight: 600;
}

.preset-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.preset-btn {
  padding: 12px 15px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  color: #495057;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s;
  text-align: left;
  display: flex;
  flex-direction: column;
  
  i {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #3498db;
  }
  
  &:hover {
    border-color: #3498db;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.1);
    transform: translateY(-3px);
  }
}

.preset-desc {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 5px;
}

.ai-input-group {
  display: flex;
  padding: 15px;
  background: white;
  border-top: 1px solid #eee;
}

.ai-input {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid #ecf0f1;
  border-radius: 50px;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  
  &:focus {
    border-color: #3498db;
  }
}

.ai-send-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3498db, #9b59b6);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 10px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  
  &:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(52, 152, 219, 0.3);
  }
  
  &:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .ai-float-btn {
    bottom: 20px;
    right: 20px;
    padding: 12px 15px;
    font-size: 0.9rem;
  }
  
  .ai-modal-content {
    width: 95%;
    max-height: 85vh;
  }
  
  .ai-messages {
    min-height: 250px;
    max-height: 60vh;
  }
  
  .preset-buttons {
    grid-template-columns: 1fr;
  }
}
/* 在 SCSS 文件的 AI 助手样式部分进行以下修改 */

/* AI模态框 */
.ai-modal {
  /* 保持原有样式不变 */
}

.ai-modal-content {
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  background: white;
  border-radius: 25px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
  animation: modalFadeIn 0.4s ease;
}

/* 修改消息区域 */
.ai-messages {
  flex: 1;
  min-height: 200px; /* 确保有最小高度 */
  max-height: 40vh; /* 限制最大高度 */
  overflow-y: auto;
  padding: 20px;
  background: #f9f9f9;
}

/* 修改预设问题区域 */
.preset-questions {
  padding: 15px;
  background: #f8f9fa;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee; /* 添加底部边框分隔 */
  max-height: 30vh; /* 限制最大高度 */
  overflow-y: auto; /* 添加滚动条 */
}

/* 修改输入框区域 */
.ai-input-group {
  display: flex;
  padding: 15px;
  background: white;
  border-top: none; /* 移除顶部边框 */
  position: relative; /* 确保位置正确 */
  z-index: 10; /* 确保在顶部显示 */
}

/* 确保输入框在移动设备上正确显示 */
.ai-input {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid #ecf0f1;
  border-radius: 50px;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-sizing: border-box; /* 确保边框和内边距包含在宽度内 */
  
  &:focus {
    border-color: #3498db;
  }
}

/* 响应式调整 - 确保在较小屏幕上所有元素可见 */
@media (max-width: 768px) {
  .ai-modal-content {
    width: 95%;
    max-height: 85vh;
  }
  
  .ai-messages {
    min-height: 150px;
    max-height: 35vh; /* 调整消息区域高度 */
  }
  
  .preset-questions {
    max-height: 20vh; /* 调整预设问题区域高度 */
  }
  
  .preset-buttons {
    grid-template-columns: 1fr;
  }
  
  .preset-btn {
    padding: 10px 12px;
    font-size: 0.85rem;
    
    i {
      font-size: 1rem;
      margin-bottom: 5px;
    }
  }
  
  .preset-desc {
    font-size: 0.75rem;
  }
  
  .ai-input {
    padding: 12px 16px;
    font-size: 0.9rem;
  }
  
  .ai-send-btn {
    width: 45px;
    height: 45px;
  }
}

/* 针对小屏幕设备的额外调整 */
@media (max-width: 480px) {
  .ai-modal-content {
    max-height: 90vh;
  }
  
  .ai-messages {
    min-height: 120px;
    max-height: 30vh;
    padding: 15px;
  }
  
  .message {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  
  .preset-questions {
    padding: 10px;
  }
  
  .ai-input-group {
    padding: 10px;
  }
  
  .ai-float-btn {
    bottom: 15px;
    right: 15px;
    padding: 10px 15px;
    font-size: 0.85rem;
    
    i {
      font-size: 1rem;
    }
  }
}