/* 齿元AI MVP 全局样式 - 基于原型重写 */

:root {
  /* 品牌色 */
  --primary: #3ED7C8;
  --primary-dark: #2BC4B5;
  --primary-light: #D9FAF7;

  /* 辅助色 */
  --bg-warm: #F8FBFA;
  --bg-blue: #E6F4FF;
  --accent-yellow: #FFC857;
  --accent-yellow-light: #FFF5DC;

  /* 中性色 */
  --text-dark: #2D3748;
  --text-medium: #4A5568;
  --text-light: #718096;
  --border: #E2E8F0;
  --white: #FFFFFF;

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(45, 55, 72, 0.06);
  --shadow-md: 0 4px 16px rgba(45, 55, 72, 0.10);
  --shadow-lg: 0 8px 28px rgba(45, 55, 72, 0.14);

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* 尺寸 */
  --container-width: 430px;
  --tab-height: 64px;
  --header-height: 60px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  color: var(--text-dark);
  background: var(--bg-warm);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* 移动端容器 */
.app-container {
  width: 100%;
  max-width: var(--container-width);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg-warm);
  position: relative;
  overflow-x: hidden;
  padding-bottom: var(--tab-height);
}

@media (min-width: 480px) {
  .app-container {
    box-shadow: var(--shadow-md);
  }
}

/* 通用头部 */
.page-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  box-shadow: 0 1px 0 var(--border);
}

.page-header .back-btn {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-medium);
  text-decoration: none;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.page-header .back-btn:hover {
  background: var(--bg-warm);
}

.page-header .page-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
}

/* 底部 Tab 导航 */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--container-width);
  height: var(--tab-height);
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 0 env(safe-area-inset-bottom, 0);
  z-index: 200;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: var(--text-light);
  font-size: 12px;
  transition: color 0.2s ease;
  padding: 8px 0;
}

.tab-item .tab-icon {
  font-size: 22px;
  line-height: 1;
}

.tab-item.active {
  color: var(--primary-dark);
}

.tab-item.active .tab-icon {
  transform: scale(1.1);
}

/* 首页 */
.home-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--tab-height));
  padding: 24px 20px;
}

.home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  overflow: hidden;
  object-fit: cover;
  object-position: center 30%;
}

.brand-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.5px;
}

.greeting-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 28px;
  display: flex;
  gap: 16px;
  align-items: center;
  animation: fadeInUp 0.6s ease;
}

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

.avatar-large {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  object-fit: cover;
  object-position: center 30%;
}

.greeting-text h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 6px 0;
  color: var(--text-dark);
}

.greeting-text p {
  font-size: 15px;
  color: var(--text-medium);
  margin: 0;
}

.main-cta {
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-xl);
  width: 100%;
  padding: 18px 24px;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(62, 215, 200, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  margin-bottom: 28px;
}

.main-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(62, 215, 200, 0.45);
}

.main-cta:active {
  transform: translateY(0);
}

.aux-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.aux-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-decoration: none;
  color: var(--text-dark);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.aux-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.aux-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 4px;
}

.aux-card.knowledge .icon {
  background: var(--bg-blue);
}

.aux-card.profile .icon {
  background: var(--accent-yellow-light);
}

.aux-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.aux-card p {
  font-size: 12px;
  color: var(--text-light);
  margin: 0;
}

.slogan {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  margin-top: auto;
  padding-bottom: 8px;
}

/* 预问诊 */
.preconsult-page {
  padding: 20px;
  min-height: calc(100vh - var(--tab-height));
}

.preconsult-intro {
  text-align: center;
  margin-bottom: 24px;
  animation: fadeIn 0.4s ease;
}

.preconsult-intro .avatar-large {
  margin: 0 auto 16px;
}

.preconsult-intro h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.preconsult-intro p {
  font-size: 15px;
  color: var(--text-medium);
  margin: 0;
}

.progress-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.progress-track {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 13px;
  color: var(--text-light);
  min-width: 56px;
  text-align: right;
}

.question-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.4s ease;
}

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

.question-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 20px 0;
  line-height: 1.5;
}

.question-subtitle {
  font-size: 13px;
  color: var(--text-light);
  margin: -12px 0 16px 0;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--white);
}

.option:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.option.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.option input[type="radio"],
.option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary-dark);
  cursor: pointer;
  flex-shrink: 0;
}

.option .label-text {
  font-size: 15px;
  color: var(--text-dark);
}

.text-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: border-color 0.2s ease;
  margin-bottom: 24px;
}

.text-input:focus {
  border-color: var(--primary);
}

.preconsult-actions {
  display: flex;
  gap: 12px;
}

.btn {
  flex: 1;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-secondary {
  background: var(--white);
  color: var(--text-medium);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-warm);
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background: var(--border);
  color: var(--text-light);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 聊天页 */
.chat-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--tab-height));
  background: var(--bg-warm);
}

.chat-header {
  background: var(--white);
  padding: 12px 20px;
  box-shadow: 0 1px 0 var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
}

.avatar-tiny {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  object-fit: cover;
  object-position: center 30%;
}

.chat-header .chat-title {
  flex: 1;
}

.chat-header .chat-title h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.chat-header .chat-title p {
  font-size: 12px;
  color: var(--text-light);
  margin: 0;
}

.chat-header .home-link {
  font-size: 20px;
  color: var(--text-medium);
  text-decoration: none;
  padding: 6px;
  border-radius: 50%;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

.summary-card {
  background: var(--bg-blue);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 4px;
  animation: fadeIn 0.5s ease;
}

.summary-card.collapsed .summary-list {
  display: none;
}

.summary-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
}

.summary-toggle {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 400;
}

.summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-list li {
  font-size: 13px;
  color: var(--text-medium);
  display: flex;
  gap: 8px;
}

.summary-list li .label {
  color: var(--text-light);
  min-width: 80px;
}

.summary-list li .value {
  color: var(--text-dark);
  font-weight: 500;
}

.message {
  display: flex;
  gap: 10px;
  max-width: 90%;
  animation: fadeIn 0.3s ease;
}

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

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  overflow: hidden;
}

.message-avatar.doctor-avatar {
  object-fit: cover;
  object-position: center 30%;
}

.message.user .message-avatar {
  background: var(--accent-yellow-light);
}

.message-bubble {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 15px;
  line-height: 1.6;
  word-break: break-word;
}

.message.ai .message-bubble {
  background: var(--white);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
  color: var(--text-dark);
}

.message.user .message-bubble {
  background: var(--primary);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.message.ai .message-bubble p {
  margin: 0 0 8px 0;
}

.message.ai .message-bubble p:last-child {
  margin-bottom: 0;
}

.message.ai .message-bubble .disclaimer {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* 加载态骨架屏 */
.typing-indicator {
  display: flex;
  gap: 10px;
  max-width: 80%;
  align-self: flex-start;
  animation: fadeIn 0.3s ease;
}

.typing-bubble {
  background: var(--white);
  border-radius: var(--radius-md);
  border-bottom-left-radius: 4px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 160px;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-warm) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 85%; }
.skeleton-line.long { width: 100%; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.typing-text {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

/* 快捷推荐问题 */
.quick-replies {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 16px;
  background: var(--white);
  border-top: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.quick-replies::-webkit-scrollbar {
  display: none;
}

.quick-reply {
  flex-shrink: 0;
  padding: 8px 14px;
  border: 1px solid var(--primary);
  color: var(--primary-dark);
  background: var(--primary-light);
  border-radius: var(--radius-xl);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.quick-reply:hover {
  background: var(--primary);
  color: var(--white);
}

/* 聊天输入区 */
.chat-input-area {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0));
  display: flex;
  gap: 10px;
  align-items: flex-end;
  z-index: 20;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  resize: none;
  max-height: 100px;
  min-height: 44px;
  line-height: 1.4;
  transition: border-color 0.2s ease;
}

.chat-input:focus {
  border-color: var(--primary);
}

.send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: var(--white);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.send-btn:hover {
  background: var(--primary-dark);
}

.send-btn:disabled {
  background: var(--border);
  cursor: not-allowed;
}

/* 重试提示 */
.retry-bar {
  background: var(--accent-yellow-light);
  border-top: 1px solid var(--accent-yellow);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-dark);
}

.retry-bar .retry-btn {
  background: var(--accent-yellow);
  color: var(--text-dark);
  border: none;
  border-radius: var(--radius-md);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Demo Key 输入 */
.demo-key-panel {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-key-panel p {
  margin: 0;
  font-size: 12px;
  color: var(--text-light);
}

.demo-key-panel .demo-key-row {
  display: flex;
  gap: 8px;
}

.demo-key-panel input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
}

.demo-key-panel button {
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* 知识页 */
.knowledge-page {
  padding: 16px 16px 20px 16px;
  min-height: calc(100vh - var(--tab-height));
}

.category-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-medium);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-tab.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.article-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.2s ease;
  display: block;
  cursor: pointer;
}

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

.article-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.article-card p {
  font-size: 13px;
  color: var(--text-medium);
  margin: 0 0 12px 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  font-size: 12px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 文章详情 */
.article-detail {
  padding: 20px;
  min-height: calc(100vh - var(--tab-height));
}

.article-detail h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 16px 0;
  line-height: 1.4;
}

.article-detail .content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-medium);
}

.article-detail .content p {
  margin: 0 0 14px 0;
}

/* 个人中心 */
.profile-page {
  padding: 20px;
  min-height: calc(100vh - var(--tab-height));
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  object-fit: cover;
  object-position: center 30%;
}

.profile-info h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.profile-info p {
  font-size: 14px;
  color: var(--text-light);
  margin: 0;
}

.menu-list {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-dark);
  transition: background 0.2s ease;
  cursor: pointer;
}

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

.menu-item:hover {
  background: var(--bg-warm);
}

.menu-item .icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--primary-light);
}

.menu-item .text {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
}

.menu-item .arrow {
  color: var(--text-light);
  font-size: 18px;
}

.danger-zone {
  margin-top: 24px;
}

.danger-btn {
  width: 100%;
  padding: 14px;
  border: 1px solid #FC8181;
  color: #C53030;
  background: var(--white);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.danger-btn:hover {
  background: #FFF5F5;
}

/* 记录页 */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  min-height: calc(100vh - var(--tab-height));
}

.history-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text-dark);
  display: block;
}

.history-card h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px 0;
}

.history-card p {
  font-size: 13px;
  color: var(--text-medium);
  margin: 0 0 8px 0;
}

.history-card .meta {
  font-size: 12px;
  color: var(--text-light);
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-light);
}

.empty-state .icon {
  font-size: 56px;
  margin-bottom: 12px;
}

/* 关于/免责声明 */
.simple-page {
  padding: 20px;
  min-height: calc(100vh - var(--tab-height));
}

.simple-page h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 16px 0;
}

.simple-page p {
  font-size: 15px;
  color: var(--text-medium);
  line-height: 1.8;
  margin: 0 0 14px 0;
}

/* Toast 提示 */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(45, 55, 72, 0.92);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius-xl);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 1000;
  max-width: 80%;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 隐藏 */
.hidden {
  display: none !important;
}

/* 医生头像（方案 A 3D 卡通） */
.doctor-avatar {
  object-fit: cover;
  object-position: center 30%;
}

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

@keyframes avatar-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@keyframes avatar-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-12px) scale(1.08); }
  55% { transform: translateY(4px) scale(0.96); }
  80% { transform: translateY(-2px) scale(1.02); }
}

/* 首页大头像：持续呼吸浮动 + 点击弹跳 */
.greeting-card .avatar-large.doctor-avatar {
  animation: avatar-float 2.5s ease-in-out infinite;
  cursor: pointer;
}

.greeting-card .avatar-large.doctor-avatar.bounce {
  animation: avatar-bounce 0.55s ease !important;
}

/* 预问诊介绍区头像：温和浮动 */
.preconsult-intro .avatar-large.doctor-avatar {
  animation: avatar-float 3s ease-in-out infinite;
}

/* 聊天页 header 小头像呼吸 */
.chat-header .avatar-tiny.doctor-avatar {
  animation: avatar-float 3s ease-in-out infinite;
}

/* AI 消息气泡头像默认呼吸 */
.message-avatar.doctor-avatar {
  animation: avatar-float 3s ease-in-out infinite;
}

/* AI 思考/加载态：加速浮动 + 脉冲缩放 */
.typing-indicator .message-avatar.doctor-avatar {
  animation: avatar-float 1.2s ease-in-out infinite, avatar-pulse 1.2s ease-in-out infinite;
}

/* 发送消息后 AI 头像短暂反馈 */
.message.ai .message-avatar.doctor-avatar.bounce {
  animation: avatar-bounce 0.4s ease !important;
}

/* 减弱动画偏好 */
@media (prefers-reduced-motion: reduce) {
  .doctor-avatar,
  .greeting-card .avatar-large.doctor-avatar,
  .preconsult-intro .avatar-large.doctor-avatar,
  .chat-header .avatar-tiny.doctor-avatar,
  .message-avatar.doctor-avatar,
  .typing-indicator .message-avatar.doctor-avatar {
    animation: none !important;
  }
}

/* 安全提示卡片 */
.safety-warning {
  background: var(--accent-yellow-light);
  border: 1px solid var(--accent-yellow);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.6;
}

.safety-warning strong {
  color: var(--text-dark);
}

/* 空状态增强 */
.empty-state .title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.empty-state .subtitle {
  font-size: 13px;
  color: var(--text-light);
}
