/* ══════════════════════════════════════════════════════════════
   Hero 区域 AI 对话样式 - 赛车主题优化版
   ══════════════════════════════════════════════════════════════ */

/* AI 对话容器 */
.hero-ai-chat {
  width: 100%;
  max-width: 720px;
  background: linear-gradient(145deg, rgba(20, 20, 30, 0.98), rgba(30, 25, 35, 0.95));
  border-radius: 24px;
  padding: 24px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(232, 0, 45, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

/* 顶部装饰条 - 赛车风格 */
.hero-ai-chat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #E8002D, #ff4d6a, #E8002D);
  border-radius: 24px 24px 0 0;
}

/* 标题 */
.hero-ai-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.5px;
}

.hero-ai-title::before {
  content: '🏎️';
  font-size: 24px;
}

/* 消息区域 */
.hero-ai-messages {
  height: 300px;
  overflow-y: auto;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* 欢迎语 */
.hero-ai-welcome {
  color: #a0a0a0;
  font-size: 14px;
  line-height: 2;
  text-align: center;
  padding: 10px 0;
}

.hero-ai-welcome .welcome-title {
  font-size: 16px;
  color: #fff;
  margin-bottom: 12px;
  font-weight: 600;
}

.hero-ai-welcome .welcome-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 6px 0;
  color: #c0c0c0;
}

.hero-ai-welcome .welcome-prompt {
  margin-top: 20px;
  padding: 12px 20px;
  background: rgba(232, 0, 45, 0.1);
  border: 1px dashed rgba(232, 0, 45, 0.3);
  border-radius: 12px;
  color: #ff6b7a;
  font-size: 13px;
  display: inline-block;
  margin-top: 16px;
}

/* 单条消息 */
.hero-ai-msg {
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
  animation: msgSlideIn 0.3s ease-out;
}

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

.hero-ai-msg.user {
  flex-direction: row-reverse;
}

/* 头像 */
.hero-ai-msg .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-ai-msg.user .avatar {
  background: linear-gradient(135deg, #E8002D, #ff2d4d);
  font-size: 18px;
}

.hero-ai-msg.assistant .avatar {
  background: linear-gradient(135deg, #2a2a3a, #1a1a2a);
  border: 2px solid rgba(232, 0, 45, 0.3);
}

/* 消息气泡 */
.hero-ai-msg .content {
  max-width: 75%;
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.6;
  position: relative;
}

.hero-ai-msg.user .content {
  background: linear-gradient(135deg, #E8002D, #c70028);
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 16px rgba(232, 0, 45, 0.3);
}

.hero-ai-msg.assistant .content {
  background: rgba(45, 45, 60, 0.9);
  color: #e8e8e8;
  border-bottom-left-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* 加载动画 */
.hero-ai-loading {
  display: flex;
  gap: 6px;
  padding: 8px 4px;
}

.hero-ai-loading .dot {
  width: 8px;
  height: 8px;
  background: #E8002D;
  border-radius: 50%;
  animation: heroPulse 1.4s infinite ease-in-out both;
}

.hero-ai-loading .dot:nth-child(1) { animation-delay: -0.32s; }
.hero-ai-loading .dot:nth-child(2) { animation-delay: -0.16s; }
.hero-ai-loading .dot:nth-child(3) { animation-delay: 0s; }

@keyframes heroPulse {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 10px rgba(232, 0, 45, 0.5);
  }
}

/* 输入区域 */
.hero-ai-input-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.hero-ai-input-row input {
  flex: 1;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
}

.hero-ai-input-row input:focus {
  border-color: rgba(232, 0, 45, 0.5);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 3px rgba(232, 0, 45, 0.1);
}

.hero-ai-input-row input::placeholder {
  color: #666;
}

/* 发送按钮 */
.hero-ai-send {
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #E8002D, #b80028);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(232, 0, 45, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-ai-send:hover:not(:disabled) {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(232, 0, 45, 0.5);
}

.hero-ai-send:active:not(:disabled) {
  transform: scale(0.95);
}

.hero-ai-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #555;
  box-shadow: none;
}

/* 快捷问题标签 */
.hero-ai-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-ai-quick-tag {
  padding: 8px 14px;
  background: rgba(232, 0, 45, 0.1);
  border: 1px solid rgba(232, 0, 45, 0.2);
  border-radius: 20px;
  color: #ff6b7a;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hero-ai-quick-tag:hover {
  background: rgba(232, 0, 45, 0.2);
  border-color: rgba(232, 0, 45, 0.4);
  transform: translateY(-1px);
}

/* 滚动条 */
.hero-ai-messages::-webkit-scrollbar {
  width: 6px;
}

.hero-ai-messages::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.hero-ai-messages::-webkit-scrollbar-thumb {
  background: rgba(232, 0, 45, 0.3);
  border-radius: 3px;
}

.hero-ai-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(232, 0, 45, 0.5);
}

/* 响应式 */
@media (max-width: 768px) {
  .hero-ai-chat {
    padding: 16px;
    border-radius: 20px;
  }

  .hero-ai-chat::before {
    height: 2px;
  }

  .hero-ai-title {
    font-size: 18px;
  }

  .hero-ai-messages {
    height: 220px;
    padding: 14px;
    border-radius: 14px;
  }

  .hero-ai-msg .avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .hero-ai-msg .content {
    max-width: 82%;
    padding: 12px 14px;
    font-size: 13px;
  }

  .hero-ai-input-row input {
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 24px;
  }

  .hero-ai-send {
    width: 46px;
    height: 46px;
    font-size: 18px;
  }

  .hero-ai-quick {
    gap: 6px;
  }

  .hero-ai-quick-tag {
    padding: 6px 12px;
    font-size: 11px;
  }
}

/* 深色模式增强 */
@media (prefers-color-scheme: dark) {
  .hero-ai-chat {
    background: linear-gradient(145deg, rgba(15, 15, 25, 0.98), rgba(25, 20, 30, 0.95));
  }
}
