/* ============================================================
   冲仔移动端 - 精致粉色主题
   ============================================================ */

:root {
  /* 粉色色阶 */
  --pink-50: #fdf2f8;
  --pink-100: #fce7f3;
  --pink-200: #fbcfe8;
  --pink-300: #f9a8d4;
  --pink-400: #f472b6;
  --pink-500: #ec4899;
  --pink-600: #db2777;
  --pink-700: #be185d;

  /* 语义色 */
  --bg-primary: var(--pink-50);
  --bg-glass: rgba(255, 245, 250, 0.75);
  --bg-glass-light: rgba(255, 252, 254, 0.6);
  --accent: var(--pink-500);
  --accent-secondary: var(--pink-600);
  --accent-gradient: linear-gradient(135deg, var(--pink-400), var(--pink-600));
  --accent-dim: rgba(236, 72, 153, 0.08);
  --accent-glow: rgba(236, 72, 153, 0.2);
  --text-primary: #1f1028;
  --text-secondary: #9a7088;
  --text-muted: #c4a0b4;
  --user-bubble: linear-gradient(135deg, var(--pink-400), var(--pink-600));
  --ai-bubble: rgba(255, 253, 254, 0.85);
  --danger: #f43f5e;
  --success: #10b981;
  --warning: #f59e0b;
  --border: rgba(236, 72, 153, 0.08);
  --border-light: rgba(236, 72, 153, 0.15);

  /* 阴影体系 */
  --shadow-xs: 0 1px 2px rgba(31, 16, 40, 0.04);
  --shadow-sm: 0 2px 8px rgba(31, 16, 40, 0.06);
  --shadow-md: 0 4px 16px rgba(31, 16, 40, 0.08);
  --shadow-lg: 0 8px 30px rgba(236, 72, 153, 0.12);
  --shadow-xl: 0 16px 48px rgba(236, 72, 153, 0.15);
  --shadow-glow: 0 0 24px rgba(236, 72, 153, 0.15);

  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC',
    'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 背景装饰 - 多层光晕 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 10%, rgba(244, 114, 182, 0.06), transparent),
    radial-gradient(ellipse 500px 500px at 80% 90%, rgba(219, 39, 119, 0.04), transparent),
    radial-gradient(ellipse 300px 300px at 50% 50%, rgba(251, 207, 232, 0.03), transparent);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   应用布局
   ============================================================ */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ============================================================
   数字人形象区域
   ============================================================ */
.avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 8px;
  position: relative;
  flex-shrink: 0;
}

.avatar-container {
  position: relative;
  width: 152px;
  height: 152px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 外光环 */
.avatar-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px solid var(--pink-300);
  opacity: 0.35;
  animation: pulse-ring 3s ease-in-out infinite;
}

.avatar-ring::after {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid var(--pink-400);
  opacity: 0.2;
  animation: pulse-ring 3s ease-in-out infinite reverse;
}

/* 头像底座 */
.avatar-face {
  position: relative;
  z-index: 2;
  animation: float 4s ease-in-out infinite;
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.6),
    0 0 20px rgba(236, 72, 153, 0.15),
    0 8px 24px rgba(236, 72, 153, 0.1);
}

.avatar-img {
  width: 136px;
  height: 136px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  transition: transform 0.3s ease;
}

/* 状态标签 */
.avatar-status {
  position: absolute;
  bottom: 2px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--pink-100);
  color: var(--pink-500);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 20px;
  z-index: 3;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-xs);
}

.avatar-name {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 3px;
}

/* ============================================================
   粒子效果
   ============================================================ */
.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.particles span {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--pink-400);
  border-radius: 50%;
  opacity: 0;
  animation: particle-float 4s ease-in-out infinite;
  box-shadow: 0 0 6px var(--pink-300);
}

.particles span:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.particles span:nth-child(2) { left: 85%; top: 15%; animation-delay: 0.5s; }
.particles span:nth-child(3) { left: 5%;  top: 70%; animation-delay: 1s; }
.particles span:nth-child(4) { left: 90%; top: 75%; animation-delay: 1.5s; }
.particles span:nth-child(5) { left: 50%; top: 5%;  animation-delay: 2s; }
.particles span:nth-child(6) { left: 50%; top: 95%; animation-delay: 2.5s; }
.particles span:nth-child(7) { left: 25%; top: 90%; animation-delay: 3s; }
.particles span:nth-child(8) { left: 75%; top: 10%; animation-delay: 3.5s; }

/* ============================================================
   对话区域
   ============================================================ */
/* ============================================================
   顶部紧凑信息栏（对齐小程序 chat-header）
   ============================================================ */
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 8px;
  flex-shrink: 0;
}
.ch-avatar-wrap { position: relative; flex: none; }
.ch-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(255, 111, 164, 0.3);
  overflow: hidden;
  background: linear-gradient(135deg, #ffd7e6, #ff8fb3);
}
.ch-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-notes {
  position: absolute;
  top: -6px;
  right: -8px;
  display: flex;
  gap: 2px;
}
.ch-notes .note {
  font-size: 13px;
  color: var(--pink-500);
  animation: floatNote 2s ease-in-out infinite;
}
.ch-notes .note:nth-child(2) { animation-delay: 0.5s; }
@keyframes floatNote {
  0% { opacity: 0; transform: translateY(0); }
  20% { opacity: 1; transform: translateY(-5px); }
  80% { opacity: 1; transform: translateY(-20px); }
  100% { opacity: 0; transform: translateY(-25px); }
}
.ch-info { flex: 1; min-width: 0; }
.ch-name-row { display: flex; align-items: center; gap: 8px; }
.ch-name { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.ch-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: #e7f8ee;
  color: #2bbf6d;
}
.ch-sub { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.music-btn {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid #f9a8d4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pink-500);
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(236, 72, 153, 0.25);
  transition: var(--transition);
}
.music-btn:hover { transform: scale(1.06); }
.toolbar-tip { font-size: 11px; color: var(--text-muted); }

.chat-section {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px;
  scroll-behavior: smooth;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
  justify-content: flex-end;
}

/* 空对话引导语胶囊 */
.guide-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px 0 4px;
  width: 100%;
  box-sizing: border-box;
}
.guide-title {
  font-size: 13px;
  color: #b48ea3;
  margin-bottom: 2px;
}
.guide-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #f5d3e4;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.06);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.18s;
}
.guide-chip:hover {
  background: #fce7f3;
  border-color: #f9a8d4;
  transform: translateY(-1px);
}
.guide-chip-text {
  font-size: 14px;
  color: #6d4b63;
}
.guide-arrow {
  font-size: 20px;
  color: #ec4899;
  line-height: 1;
}

/* 约拍案例图集 */
.msg.msg-cases { max-width: 92%; }
/* 给气泡确定宽度 + 缩略图固定 px，避免 calc(100%) 在宽度不定的 flex 父下回退大尺寸 */
.cases-bubble { width: 360px; max-width: 100%; box-sizing: border-box; }
.cases-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.case-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  background: #f3e6ee;
  cursor: zoom-in;
}

/* 消息气泡 */
.msg {
  display: flex;
  gap: 8px;
  max-width: 82%;
  animation: msg-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg.ai {
  align-self: flex-start;
}

.msg-bubble {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.7;
  word-break: break-word;
  letter-spacing: 0.3px;
}

.msg.user .msg-bubble {
  background: var(--user-bubble);
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.2);
}

.msg.ai .msg-bubble {
  background: var(--ai-bubble);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-bottom-left-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.msg-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 3px;
  font-weight: 500;
}

/* 消息包裹层（气泡 + 播放胶囊 纵向排列） */
.msg-wrapper {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.msg.ai .msg-wrapper { align-items: flex-start; }
.msg.user .msg-wrapper { align-items: flex-end; }

/* 播放按钮（气泡下方弱化胶囊） */
.msg-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  border: none;
  background: rgba(236, 72, 153, 0.07);
  color: #d76d97;
  font-size: 12px;
  line-height: 1;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}
.msg-play-btn svg { display: block; }
.msg-play-btn:hover {
  background: rgba(236, 72, 153, 0.14);
  color: var(--pink-500);
}
.msg-play-btn:active { transform: scale(0.96); }

/* 打字指示器 */
.typing-indicator {
  display: flex;
  gap: 5px;
  padding: 4px 2px;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: var(--accent-gradient);
  border-radius: 50%;
  animation: typing-dot 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

/* ============================================================
   输入区域
   ============================================================ */
.input-section {
  padding: 8px 16px 4px;
  flex-shrink: 0;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: 28px;
  padding: 7px 7px 7px 18px;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}

.input-row:focus-within {
  border-color: var(--pink-300);
  box-shadow: 0 0 0 3px var(--accent-dim), var(--shadow-sm);
}

.input-text {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 15px;
  padding: 14px 0;
  font-family: inherit;
}

.input-text::placeholder { color: var(--text-muted); }

/* 发送按钮 */
.btn-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--accent-gradient);
  color: #fff;
  transition: var(--transition);
  box-shadow: 0 3px 12px rgba(236, 72, 153, 0.25);
}

.btn-send:hover {
  transform: scale(1.06);
  box-shadow: 0 5px 18px rgba(236, 72, 153, 0.35);
}

.btn-send:active { transform: scale(0.95); }

.btn-send:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 麦克风按钮 */
.btn-mic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-secondary);
  transition: var(--transition);
}

.btn-mic:hover {
  color: var(--pink-500);
  border-color: var(--pink-300);
  background: var(--pink-50);
}

.btn-mic.recording {
  color: var(--danger);
  border-color: rgba(244, 63, 94, 0.3);
  background: rgba(244, 63, 94, 0.08);
  animation: mic-pulse 1s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.15);
}

/* 语音识别预览 */
.speech-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
}

.speech-dot {
  width: 7px;
  height: 7px;
  background: var(--danger);
  border-radius: 50%;
  animation: mic-pulse 1s ease-in-out infinite;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(244, 63, 94, 0.3);
}

/* ============================================================
   底部工具栏
   ============================================================ */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px 14px;
  flex-shrink: 0;
}

/* 语音开关 */
.toggle-voice {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.toggle-voice input { display: none; }

.toggle-slider {
  width: 38px;
  height: 21px;
  background: rgba(236, 72, 153, 0.1);
  border-radius: 11px;
  position: relative;
  transition: background 0.3s;
  border: 1px solid var(--border);
}

.toggle-slider::after {
  content: '';
  position: absolute;
  width: 15px;
  height: 15px;
  background: #fff;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-voice input:checked + .toggle-slider {
  background: var(--accent-gradient);
  border-color: transparent;
}

.toggle-voice input:checked + .toggle-slider::after {
  transform: translateX(17px);
}

.toggle-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* 清空按钮 */
.btn-clear {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-clear:hover {
  color: var(--danger);
  border-color: rgba(244, 63, 94, 0.2);
  background: rgba(244, 63, 94, 0.06);
}

/* ============================================================
   头像状态动画
   ============================================================ */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.04); opacity: 0.15; }
}

@keyframes particle-float {
  0% { opacity: 0; transform: translateY(0) scale(0.5); }
  30% { opacity: 0.4; }
  100% { opacity: 0; transform: translateY(-20px) scale(1); }
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes typing-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-6px); opacity: 1; }
}

@keyframes mic-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* 思考状态 */
.avatar-container.thinking .avatar-ring {
  border-color: var(--warning);
  animation: pulse-ring 1.5s ease-in-out infinite;
}
.avatar-container.thinking .avatar-ring::after { border-color: var(--warning); }
.avatar-container.thinking .avatar-status {
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.2);
}

/* 说话状态 */
.avatar-container.speaking .avatar-ring {
  border-color: var(--success);
  animation: pulse-ring 0.8s ease-in-out infinite;
}
.avatar-container.speaking .avatar-ring::after { border-color: var(--success); }
.avatar-container.speaking .avatar-status {
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.2);
}
.avatar-container.speaking .avatar-img {
  animation: speak-pulse 0.35s ease-in-out infinite alternate;
}

@keyframes speak-pulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.015); }
}

/* 倾听状态 */
.avatar-container.listening .avatar-ring {
  border-color: var(--danger);
  animation: pulse-ring 1s ease-in-out infinite;
}
.avatar-container.listening .avatar-ring::after { border-color: var(--danger); }
.avatar-container.listening .avatar-status {
  color: var(--danger);
  border-color: rgba(244, 63, 94, 0.2);
}

/* ============================================================
   Markdown 渲染
   ============================================================ */
.msg-bubble code {
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

.msg.user .msg-bubble code {
  background: rgba(255, 255, 255, 0.15);
}

.msg-bubble pre {
  background: rgba(0, 0, 0, 0.04);
  padding: 12px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 8px 0;
  border: 1px solid var(--border);
}

.msg.user .msg-bubble pre {
  background: rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.1);
}

.msg-bubble pre code {
  background: none;
  padding: 0;
  font-size: 12px;
  line-height: 1.5;
}

.msg-bubble p { margin: 4px 0; }
.msg-bubble ul, .msg-bubble ol { padding-left: 18px; margin: 4px 0; }

/* ============================================================
   滚动条
   ============================================================ */
.chat-section::-webkit-scrollbar { width: 3px; }
.chat-section::-webkit-scrollbar-track { background: transparent; }
.chat-section::-webkit-scrollbar-thumb {
  background: rgba(236, 72, 153, 0.12);
  border-radius: 3px;
}
.chat-section::-webkit-scrollbar-thumb:hover {
  background: rgba(236, 72, 153, 0.25);
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 520px) {
  .app { max-width: 100%; }
  .avatar-container { width: 120px; height: 120px; }
  .avatar-face .avatar-img { width: 108px; height: 108px; }
  .avatar-section { padding: 6px 0 6px; }
  .mobile-topbar { padding: 6px 12px; padding-top: calc(6px + env(safe-area-inset-top, 0px)); }
}

@media (min-height: 800px) {
  .avatar-container { width: 170px; height: 170px; }
  .avatar-face .avatar-img { width: 154px; height: 154px; }
}

/* ============================================================
   预约下单弹窗
   ============================================================ */
.booking-modal,
.order-success-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.booking-overlay {
  position: absolute;
  inset: 0;
  background: rgba(31, 16, 40, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.booking-card {
  position: relative;
  background: #fff;
  border-radius: 24px;
  width: 90%;
  max-width: 420px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  z-index: 1001;
  animation: modal-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.booking-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.booking-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pink-50);
  border: none;
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.booking-close:hover {
  background: var(--pink-100);
  color: var(--pink-600);
}

.booking-body { padding: 20px 24px; }

.form-group { margin-bottom: 14px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xs);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--pink-50);
  outline: none;
  transition: var(--transition);
  box-sizing: border-box;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--pink-400);
  box-shadow: 0 0 0 3px var(--accent-dim);
  background: #fff;
}

.form-group textarea {
  resize: vertical;
  min-height: 60px;
}

.booking-tip {
  background: var(--pink-50);
  border: 1px solid var(--pink-100);
  border-radius: var(--radius-xs);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--pink-600);
  margin-top: 8px;
  line-height: 1.6;
}

.booking-footer {
  display: flex;
  gap: 10px;
  padding: 16px 24px 20px;
}

.btn-cancel {
  flex: 1;
  padding: 12px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-cancel:hover {
  background: var(--pink-50);
  border-color: var(--pink-200);
}

.btn-submit {
  flex: 2;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.25);
  letter-spacing: 1px;
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.35);
}

.btn-submit:active { transform: translateY(0); }

/* 订单成功弹窗 */
.success-card {
  position: relative;
  background: #fff;
  border-radius: 24px;
  padding: 36px 28px;
  text-align: center;
  width: 85%;
  max-width: 360px;
  box-shadow: var(--shadow-xl);
  z-index: 1001;
  animation: modal-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.success-icon { font-size: 48px; margin-bottom: 14px; }

.success-card h3 {
  color: var(--pink-600);
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
}

.success-card p {
  color: var(--text-primary);
  font-size: 14px;
  margin: 6px 0;
  line-height: 1.6;
}

.success-note {
  color: var(--text-secondary) !important;
  font-size: 12px !important;
}

.success-card .btn-submit {
  margin-top: 20px;
  width: 100%;
}

/* ============================================================
   风格参考卡片
   ============================================================ */
.style-ref-card {
  background: linear-gradient(135deg, var(--pink-50), #fff) !important;
  border: 1px solid var(--pink-200) !important;
  box-shadow: var(--shadow-sm) !important;
}

.style-ref-header {
  font-size: 15px;
  font-weight: 700;
  color: var(--pink-600);
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

.style-ref-images {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}

.style-ref-images img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--pink-100);
  flex-shrink: 0;
  scroll-snap-align: start;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.style-ref-images img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-sm);
}

.style-ref-desc {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 10px;
}

.style-ref-tip {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
}

/* ============================================================
   图片预览
   ============================================================ */
.image-preview {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.image-preview-content {
  position: relative;
  z-index: 2001;
  max-width: 90vw;
  max-height: 85vh;
  animation: preview-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes preview-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.image-preview-content img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.image-preview-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.image-preview-close:hover {
  background: #fff;
  transform: scale(1.1);
}

/* 风格图片点击提示 */
.style-ref-img-clickable {
  cursor: zoom-in;
  transition: var(--transition);
}

.style-ref-img-clickable:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-md);
}

/* 时间段选择器 */
.time-slot-selector {
  display: flex; gap: 10px; margin-top: 4px;
}

.time-slot-option {
  flex: 1; position: relative; cursor: pointer;
}

.time-slot-option input { display: none; }

.time-slot-label {
  display: block; text-align: center; padding: 10px;
  border: 1.5px solid var(--border-light); border-radius: var(--radius-xs);
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  background: var(--pink-50); transition: var(--transition);
}

.time-slot-option input:checked + .time-slot-label {
  border-color: var(--pink-400);
  background: var(--pink-100);
  color: var(--pink-600);
  font-weight: 600;
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.time-slot-option input:disabled + .time-slot-label {
  opacity: 0.4; cursor: not-allowed;
  background: var(--gray-100);
}

.time-slot-status {
  font-size: 12px; color: var(--text-secondary); margin-top: 6px; min-height: 18px;
}

.time-slot-status.warning { color: var(--warning); }
.time-slot-status.error { color: var(--danger); }

/* ============================================================
   顶部导航栏
   ============================================================ */
.mobile-topbar {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  padding-top: calc(8px + env(safe-area-inset-top, 0px));
  flex-shrink: 0;
  position: relative;
  z-index: 100;
}

.hamburger-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  cursor: pointer; color: var(--text-primary);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.hamburger-btn:active { background: var(--pink-100); transform: scale(0.95); }

.topbar-title {
  flex: 1; text-align: center;
  font-size: 16px; font-weight: 600; color: var(--text-primary);
}

.topbar-spacer { width: 38px; }

/* ============================================================
   侧边抽屉菜单
   ============================================================ */
.sidebar-backdrop {
  position: fixed; inset: 0;
  background: rgba(31, 16, 40, 0.35);
  backdrop-filter: blur(4px);
  z-index: 900;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.active { opacity: 1; pointer-events: auto; }

.sidebar-drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 280px;
  max-width: 80vw;
  background: #fff;
  z-index: 910;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-xl);
  padding-top: env(safe-area-inset-top, 0px);
}

.sidebar-drawer.open { transform: translateX(0); }

.sidebar-user-section {
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-not-logged {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}

.sidebar-avatar-placeholder {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--pink-50);
  border: 2px solid var(--pink-200);
  display: flex; align-items: center; justify-content: center;
}

.sidebar-login-btn {
  width: 100%;
  padding: 10px; border-radius: var(--radius-xs);
  background: var(--accent-gradient);
  color: #fff; font-size: 14px; font-weight: 600;
  border: none; cursor: pointer;
  transition: var(--transition);
}

.sidebar-login-btn:active { opacity: 0.85; transform: scale(0.98); }

.sidebar-logged {
  display: flex; align-items: center; gap: 12px;
}

.sidebar-user-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff; font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.sidebar-user-info { flex: 1; min-width: 0; }

.sidebar-user-name {
  font-size: 15px; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.sidebar-user-phone { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.sidebar-logout-btn {
  padding: 6px 12px; border-radius: var(--radius-xs);
  background: var(--pink-50); border: 1px solid var(--pink-200);
  color: var(--pink-600); font-size: 12px; cursor: pointer;
  transition: var(--transition);
}

.sidebar-logout-btn:active { background: var(--pink-100); }

.sidebar-nav {
  flex: 1; padding: 12px 0; overflow-y: auto;
}

.sidebar-nav-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px 20px;
  background: transparent; border: none;
  font-size: 15px; color: var(--text-primary);
  cursor: pointer; transition: var(--transition);
  text-align: left;
}

.sidebar-nav-item:hover, .sidebar-nav-item:active { background: var(--pink-50); }

.sidebar-nav-item.active {
  color: var(--pink-600); font-weight: 600;
  background: var(--pink-50);
  border-right: 3px solid var(--pink-500);
}

.sidebar-nav-item svg { flex-shrink: 0; }

.sidebar-footer {
  padding: 16px 20px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border-light);
}

.sidebar-footer p {
  font-size: 12px; color: var(--text-muted); text-align: center;
}

.sidebar-mood {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 8px; font-size: 12px; color: var(--text-secondary);
}

.mood-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); transition: var(--transition);
}

/* 注册与资料补充 */
.auth-card, .profile-card {
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.auth-body, .profile-body { overflow-y: auto; }
.auth-body select, .profile-body select {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border-light); border-radius: var(--radius-xs);
  font-size: 14px; background: #fff; color: var(--text-primary);
}
.auth-body .field-extra, .profile-body .field-extra { margin-top: 8px; }
.profile-body .field-extra {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border-light); border-radius: var(--radius-xs);
  font-size: 14px; color: var(--text-primary);
}
.interest-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
}
.auth-body .interest-grid label, .profile-body .interest-grid label {
  display: flex; align-items: center; gap: 6px; margin: 0;
  padding: 8px; border: 1px solid var(--border-light); border-radius: var(--radius-xs);
  font-size: 12px; font-weight: 500; cursor: pointer;
}
.auth-body .interest-grid input, .profile-body .interest-grid input {
  width: 15px; height: 15px; margin: 0; accent-color: var(--pink-500);
}

/* ============================================================
   登录/注册弹窗
   ============================================================ */
.auth-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}

.auth-card {
  position: relative; z-index: 1;
  background: #fff; border-radius: var(--radius);
  width: calc(100% - 48px); max-width: 380px;
  box-shadow: var(--shadow-xl);
  animation: modal-in 0.3s ease;
}

.auth-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 0;
}

.auth-header h3 { font-size: 18px; font-weight: 700; color: var(--text-primary); }

.auth-body { padding: 20px 24px 24px; }

.auth-body .form-group { margin-bottom: 16px; }

.auth-body label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 6px;
}

.auth-body input {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border-light); border-radius: var(--radius-xs);
  font-size: 15px; background: #fff; color: var(--text-primary);
  transition: var(--transition);
}

.auth-body input:focus {
  outline: none; border-color: var(--pink-400);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.auth-submit-btn {
  width: 100%; margin-top: 8px;
  padding: 13px !important; font-size: 15px !important;
}

.auth-switch {
  text-align: center; margin-top: 16px;
  font-size: 13px; color: var(--text-secondary);
}

.auth-switch a {
  color: var(--pink-500); font-weight: 600;
  text-decoration: none; margin-left: 4px;
}

/* ============================================================
   我的订单弹窗
   ============================================================ */
.orders-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}

.orders-card {
  position: relative; z-index: 1;
  background: #fff; border-radius: var(--radius);
  width: calc(100% - 32px); max-width: 480px;
  max-height: 80vh;
  box-shadow: var(--shadow-xl);
  animation: modal-in 0.3s ease;
  display: flex; flex-direction: column;
}

.orders-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 12px; flex-shrink: 0;
}

.orders-header h3 { font-size: 18px; font-weight: 700; color: var(--text-primary); }

.orders-body {
  flex: 1; overflow-y: auto; padding: 0 24px 24px;
  -webkit-overflow-scrolling: touch;
}

.orders-empty {
  text-align: center; padding: 48px 0;
  color: var(--text-muted); font-size: 14px;
}

.order-item {
  padding: 14px 0; border-bottom: 1px solid var(--border-light);
}

.order-item:last-child { border-bottom: none; }

.order-item-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}

.order-item-no { font-size: 13px; font-weight: 600; color: var(--text-primary); }

.order-item-status {
  font-size: 11px; padding: 3px 8px;
  border-radius: 20px; font-weight: 600;
}

.order-item-status.s0 { background: #fef3c7; color: #92400e; }
.order-item-status.s1 { background: #dbeafe; color: #1e40af; }
.order-item-status.s2 { background: var(--pink-100); color: var(--pink-700); }
.order-item-status.s3 { background: #d1fae5; color: #065f46; }
.order-item-status.s4 { background: #f3f4f6; color: #6b7280; }

.order-item-info {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px;
  font-size: 12px; color: var(--text-secondary);
}

.order-item-info strong { color: var(--text-primary); font-weight: 500; }

.order-item-actions { margin-top: 8px; display: flex; justify-content: flex-end; }
.order-cancel-btn {
  font-size: 12px; color: var(--pink-600);
  background: transparent; border: 1px solid var(--pink-200);
  border-radius: 999px; padding: 4px 14px; cursor: pointer;
  font-family: inherit; transition: all 0.18s;
}
.order-cancel-btn:hover { background: var(--pink-50); border-color: var(--pink-400); }
.order-cancel-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================
   个人信息弹窗
   ============================================================ */
.profile-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}

.profile-card {
  position: relative; z-index: 1;
  background: #fff; border-radius: var(--radius);
  width: calc(100% - 48px); max-width: 380px;
  box-shadow: var(--shadow-xl);
  animation: modal-in 0.3s ease;
}

.profile-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 0;
}

.profile-header h3 { font-size: 18px; font-weight: 700; color: var(--text-primary); }

.profile-body { padding: 20px 24px 24px; }

.profile-avatar-section {
  display: flex; justify-content: center; margin-bottom: 20px;
}

.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff; font-size: 28px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
}

.profile-body .form-group { margin-bottom: 16px; }

.profile-body label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 6px;
}

.profile-field {
  padding: 10px 14px;
  background: var(--pink-50);
  border-radius: var(--radius-xs);
  font-size: 14px; color: var(--text-primary);
}

.profile-edit-row {
  display: flex; gap: 8px;
}

.profile-edit-row input {
  flex: 1; padding: 10px 14px;
  border: 1.5px solid var(--border-light); border-radius: var(--radius-xs);
  font-size: 14px; background: #fff; color: var(--text-primary);
  transition: var(--transition);
}

.profile-edit-row input:focus {
  outline: none; border-color: var(--pink-400);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.btn-save-profile {
  padding: 10px 16px;
  background: var(--accent-gradient);
  color: #fff; border: none; border-radius: var(--radius-xs);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: var(--transition); white-space: nowrap;
}

.btn-save-profile:active { opacity: 0.85; transform: scale(0.97); }

/* ============================================================
   移动端安全区适配
   ============================================================ */
@supports (padding: env(safe-area-inset-bottom)) {
  .toolbar {
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }
  .input-section {
    padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-height: 700px) {
  .avatar-section { padding: 12px 0 6px; }
  .avatar-container { width: 110px; height: 110px; }
  .avatar-face .avatar-img { width: 98px; height: 98px; }
  .avatar-name { font-size: 16px; }
}

/* ============================================================
   心情主题
   ============================================================ */

/* 忧郁 - 蓝色系 */
body.mood-melancholy {
  --pink-50: #eff6ff;
  --pink-100: #dbeafe;
  --pink-200: #bfdbfe;
  --pink-300: #93c5fd;
  --pink-400: #60a5fa;
  --pink-500: #3b82f6;
  --pink-600: #2563eb;
  --pink-700: #1d4ed8;
  --bg-primary: #f0f4ff;
  --bg-glass: rgba(239, 246, 255, 0.75);
  --bg-glass-light: rgba(250, 252, 255, 0.6);
  --accent: #3b82f6;
  --accent-secondary: #2563eb;
  --accent-gradient: linear-gradient(135deg, #60a5fa, #2563eb);
  --accent-dim: rgba(59, 130, 246, 0.08);
  --accent-glow: rgba(59, 130, 246, 0.2);
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --user-bubble: linear-gradient(135deg, #60a5fa, #2563eb);
  --border: rgba(59, 130, 246, 0.08);
  --border-light: rgba(59, 130, 246, 0.15);
  --shadow-lg: 0 8px 30px rgba(59, 130, 246, 0.12);
  --shadow-xl: 0 16px 48px rgba(59, 130, 246, 0.15);
  --shadow-glow: 0 0 24px rgba(59, 130, 246, 0.15);
}

body.mood-melancholy::before {
  background:
    radial-gradient(ellipse 600px 400px at 20% 10%, rgba(96, 165, 250, 0.06), transparent),
    radial-gradient(ellipse 500px 500px at 80% 90%, rgba(37, 99, 235, 0.04), transparent),
    radial-gradient(ellipse 300px 300px at 50% 50%, rgba(191, 219, 254, 0.03), transparent);
}

/* 很不开心 - 黑色系 */
body.mood-sad {
  --pink-50: #f5f5f5;
  --pink-100: #e5e5e5;
  --pink-200: #d4d4d4;
  --pink-300: #a3a3a3;
  --pink-400: #737373;
  --pink-500: #525252;
  --pink-600: #404040;
  --pink-700: #262626;
  --bg-primary: #1a1a1a;
  --bg-glass: rgba(40, 40, 40, 0.85);
  --bg-glass-light: rgba(50, 50, 50, 0.7);
  --accent: #737373;
  --accent-secondary: #525252;
  --accent-gradient: linear-gradient(135deg, #737373, #404040);
  --accent-dim: rgba(115, 115, 115, 0.1);
  --accent-glow: rgba(115, 115, 115, 0.15);
  --text-primary: #e5e5e5;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;
  --user-bubble: linear-gradient(135deg, #737373, #404040);
  --ai-bubble: rgba(50, 50, 50, 0.85);
  --border: rgba(115, 115, 115, 0.1);
  --border-light: rgba(115, 115, 115, 0.2);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.25);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 24px rgba(115, 115, 115, 0.1);
}

body.mood-sad::before {
  background:
    radial-gradient(ellipse 600px 400px at 20% 10%, rgba(80, 80, 80, 0.08), transparent),
    radial-gradient(ellipse 500px 500px at 80% 90%, rgba(40, 40, 40, 0.06), transparent),
    radial-gradient(ellipse 300px 300px at 50% 50%, rgba(60, 60, 60, 0.04), transparent);
}

body.mood-sad .input-row {
  background: rgba(50, 50, 50, 0.8);
}

body.mood-sad .input-text {
  background: transparent;
  color: #e5e5e5;
}

body.mood-sad .input-text::placeholder {
  color: #737373;
}

body.mood-sad .btn-mic, body.mood-sad .btn-send {
  background: rgba(80, 80, 80, 0.6);
  color: #a3a3a3;
}

body.mood-sad .toolbar {
  color: #a3a3a3;
}

body.mood-sad .avatar-ring {
  border-color: #525252;
}

body.mood-sad .avatar-status {
  background: rgba(80, 80, 80, 0.8);
  color: #a3a3a3;
}

/* 愤怒 - 大红色系（深红/暗红，避免粉色感） */
body.mood-angry {
  --pink-50: #fff5f5;
  --pink-100: #fed7d7;
  --pink-200: #feb2b2;
  --pink-300: #fc8181;
  --pink-400: #f56565;
  --pink-500: #e53e3e;
  --pink-600: #c53030;
  --pink-700: #9b2c2c;
  --bg-primary: #fff5f5;
  --bg-glass: rgba(255, 245, 245, 0.8);
  --bg-glass-light: rgba(255, 252, 252, 0.7);
  --accent: #e53e3e;
  --accent-secondary: #c53030;
  --accent-gradient: linear-gradient(135deg, #f56565, #9b2c2c);
  --accent-dim: rgba(229, 62, 62, 0.1);
  --accent-glow: rgba(229, 62, 62, 0.25);
  --text-primary: #2d0a0a;
  --text-secondary: #744242;
  --text-muted: #a05252;
  --user-bubble: linear-gradient(135deg, #f56565, #9b2c2c);
  --border: rgba(229, 62, 62, 0.1);
  --border-light: rgba(229, 62, 62, 0.2);
  --shadow-lg: 0 8px 30px rgba(229, 62, 62, 0.15);
  --shadow-xl: 0 16px 48px rgba(229, 62, 62, 0.2);
  --shadow-glow: 0 0 30px rgba(229, 62, 62, 0.2);
}

body.mood-angry::before {
  background:
    radial-gradient(ellipse 600px 400px at 20% 10%, rgba(245, 101, 101, 0.08), transparent),
    radial-gradient(ellipse 500px 500px at 80% 90%, rgba(155, 44, 44, 0.06), transparent),
    radial-gradient(ellipse 300px 300px at 50% 50%, rgba(254, 215, 215, 0.04), transparent);
}

/* ==================== 海鲜市场样式 ==================== */
.market-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-100);
}

.market-tab {
  padding: 8px 16px;
  border: 1px solid var(--gray-200);
  background: white;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.market-tab:hover {
  border-color: var(--pink-300);
  background: var(--pink-50);
}

.market-tab.active {
  background: var(--accent-gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}

.market-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--gray-100);
  transition: all 0.2s;
}

.market-card:hover {
  border-color: var(--pink-200);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.1);
}

.market-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
}

.market-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.market-avatar,
.market-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pink-100);
}

.market-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--pink-50);
}

.market-provider-name {
  font-size: 15px;
  color: var(--text-primary);
  display: block;
}

.market-provider-role {
  font-size: 12px;
  color: var(--text-secondary);
  display: block;
  margin-top: 2px;
}

.market-contact-btn {
  padding: 6px 12px;
  background: var(--accent-gradient);
  color: white;
  border-radius: 16px;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(236, 72, 153, 0.3);
}

/* 性别标签徽章 */
.gender-tag { font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 8px; margin-left: 5px; vertical-align: middle; }
.gender-tag.male { background: #e0f2fe; color: #0369a1; }
.gender-tag.female { background: #fce7f3; color: #be185d; }

/* H5 轻量提示 toast */
.h5-toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%) translateY(10px);
  background: rgba(31, 16, 40, 0.85);
  color: #fff;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 9999;
  max-width: 80vw;
}
.h5-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.market-contact-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(236, 72, 153, 0.4);
}

.market-card-body {
  margin-bottom: 12px;
}

.market-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.market-category-tag {
  font-size: 12px;
  color: var(--pink-600);
  background: var(--pink-50);
  padding: 2px 8px;
  border-radius: 4px;
}

.market-title h3 {
  font-size: 16px;
  color: var(--text-primary);
  margin: 0;
  font-weight: 600;
}

.market-price {
  font-size: 16px;
  font-weight: 600;
  color: #f59e0b;
  margin: 8px 0;
}

.market-description {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  margin: 8px 0;
}

.market-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.market-tag-item {
  font-size: 12px;
  color: var(--pink-600);
  background: var(--pink-50);
  padding: 2px 8px;
  border-radius: 10px;
}

.market-card-footer {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 8px;
  border-top: 1px solid var(--gray-100);
}

/* ============================================================
   音乐播放动效与控制按钮
   ============================================================ */

/* 音符动效容器 */
.music-notes {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 60px;
  height: 60px;
  pointer-events: none;
  z-index: 10;
}

/* 单个音符 */
.music-notes .note {
  position: absolute;
  font-size: 24px;
  color: var(--pink-500);
  opacity: 0;
  animation: floatNote 2s ease-in-out infinite;
  text-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}

.music-notes .note:nth-child(1) {
  left: 0;
  animation-delay: 0s;
}

.music-notes .note:nth-child(2) {
  left: 20px;
  animation-delay: 0.4s;
}

.music-notes .note:nth-child(3) {
  left: 40px;
  animation-delay: 0.8s;
}

@keyframes floatNote {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.8);
  }
  20% {
    opacity: 1;
    transform: translateY(-10px) scale(1);
  }
  80% {
    opacity: 1;
    transform: translateY(-40px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-50px) scale(0.8);
  }
}

/* 音乐控制按钮（可拖拽） */
.music-control-btn {
  position: absolute;
  top: 50%;
  right: -60px;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: move;
  box-shadow: var(--shadow-lg), 0 0 20px rgba(236, 72, 153, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 20;
  user-select: none;
}

.music-control-btn:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-xl), 0 0 30px rgba(236, 72, 153, 0.4);
}

.music-control-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.music-control-btn svg {
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ============================================================
   侧边栏情绪模式切换区域
   ============================================================ */

.mood-switcher-section {
  margin-top: 16px;
  padding: 12px;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(10px);
}

.mood-switcher-title {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 10px;
  font-weight: 500;
}

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

.mood-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border: 2px solid transparent;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 12px;
  color: var(--text-primary);
}

.mood-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.mood-btn:active {
  transform: translateY(0);
}

.mood-btn.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: var(--shadow-sm), 0 0 0 3px rgba(236, 72, 153, 0.1);
}

.mood-btn .mood-emoji {
  font-size: 20px;
  margin-bottom: 4px;
  line-height: 1;
}

.mood-btn .mood-text {
  font-size: 11px;
  font-weight: 500;
}

/* 不同心情按钮的激活状态颜色 */
.mood-happy-btn.active {
  border-color: #f472b6;
  background: rgba(244, 114, 182, 0.1);
}

.mood-melancholy-btn.active {
  border-color: #60a5fa;
  background: rgba(96, 165, 250, 0.1);
}

.mood-sad-btn.active {
  border-color: #6b7280;
  background: rgba(107, 114, 128, 0.1);
}

.mood-angry-btn.active {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}
