/**
 * ChatFate Dashboard Styles
 * 3D仪表盘主题样式
 */

:root {
  --primary: #111827;
  --accent-purple: #7C3AED;
  --accent-pink: #EC4899;
}

/* 自定义滚动条样式 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #c1c9d4;
  border-radius: 5px;
  border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ========== 基础样式 ========== */
html, body {
  height: auto;
  min-height: 100vh;
}

html {
  overflow-y: scroll;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: #F9FAFB;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(124, 58, 237, 0.05), transparent 25%),
    radial-gradient(circle at 90% 60%, rgba(236, 72, 153, 0.05), transparent 25%);
  overflow: visible;
  display: flex;
  flex-direction: column;
}

/* Dashboard激活后禁止滚动 */
body.app-active {
  overflow: hidden;
  height: 100vh;
}

html:has(body.app-active) {
  overflow: hidden;
}

.serif-cn { font-family: 'Noto Serif SC', serif; }

/* ========== 导航栏 ========== */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 40;
  transition: all 0.3s;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.nav-logo-icon {
  width: 2rem;
  height: 2rem;
  background: black;
  color: white;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: serif;
  font-weight: bold;
  font-size: 1.125rem;
  font-style: italic;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* 语言切换 */
.lang-toggle {
  background: #f3f4f6;
  padding: 0.25rem;
  border-radius: 9999px;
  display: flex;
  cursor: pointer;
}

.lang-opt {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: bold;
  color: #6b7280;
  transition: all 0.2s;
}

.lang-opt.active {
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  color: black;
}

/* 登录按钮样式在文件末尾统一定义 */

/* ========== Landing页面 ========== */
.landing-content {
  padding-top: 4.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 20;
  padding-left: 1rem;
  padding-right: 1rem;
  transition: all 0.5s;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.status-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* 标题 */
.hero-title {
  font-size: 3rem;
  font-weight: 500;
  color: #111827;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  text-align: center;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 4.5rem;
  }
}

.hero-gradient {
  background: linear-gradient(90deg, #7c3aed, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: #6b7280;
  margin-bottom: 2.5rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  font-weight: 300;
  line-height: 1.6;
}

/* 输入框 */
.input-wrapper {
  position: relative;
  width: 100%;
  max-width: 60rem;
  margin: 0 auto;
  z-index: 30;
}

.input-container {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  transition: border-color 0.2s;
}

.input-container:hover,
.input-container:focus-within {
  border-color: #c4b5fd;
}

.input-icon {
  padding-left: 1rem;
  padding-right: 0.75rem;
  color: #7c3aed;
}

.input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.125rem;
  color: #111827;
  height: 3rem;
  font-weight: 500;
  min-width: 200px;
}

.input-field::placeholder {
  color: #9ca3af;
}

.btn-analyze {
  background: black;
  color: white;
  height: 3rem;
  padding: 0 1.5rem;
  border-radius: 0.75rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s;
}

.btn-analyze:hover {
  background: #374151;
}

/* ========== 3D仪表盘容器 ========== */
.hero-dashboard-container {
  perspective: 1200px;
  margin-top: -3rem; /* 拉近与输入框的距离 */
  width: 100%;
  flex: 1 0 auto; /* 不收缩 */
  min-height: 640px; /* 完整显示chat-input */
  display: flex;
  justify-content: center;
  align-items: flex-end;
  position: relative;
  mask-image: linear-gradient(to bottom, black 98%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 98%, transparent 100%);
  transition: all 0.8s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: 10;
  pointer-events: none;
}

.hero-dashboard {
  width: 90%;
  max-width: 1300px;
  height: 135%; /* 大幅增加内容高度 */
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 24px 24px 0 0;
  box-shadow:
    0 -20px 60px -10px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255,255,255,1);
  transform: rotateX(10deg) translateY(0px) scale(0.95); /* 移除translateY显示更多底部 */
  transform-origin: center bottom;
  transition: all 0.8s cubic-bezier(0.65, 0, 0.35, 1);
  position: relative;
  overflow: hidden;
}

/* 激活状态 */
body.app-active .hero-dashboard-container {
  margin-top: 0;
  mask-image: none;
  -webkit-mask-image: none;
  height: 100vh;
  z-index: 50;
  align-items: flex-start;
  pointer-events: auto;
}

body.app-active .hero-dashboard {
  transform: rotateX(0deg) translateY(0) scale(1);
  width: 100%;
  max-width: 100%;
  height: 100%;
  border-radius: 0;
  background: #FAFAFA;
}

body.app-active .landing-content {
  opacity: 0;
  transform: translateY(-50px);
  transition: all 0.5s ease-in;
  pointer-events: none;
}

/* ========== Homepage预览版压缩样式 ========== */
.dashboard-preview {
  /* 压缩各区域间距 */
  grid-template-columns: 240px 1fr 280px;
}

.dashboard-preview .sidebar-header {
  padding: 0.5rem 0.75rem;
}

.dashboard-preview .sidebar-title {
  font-size: 0.7rem;
}

.dashboard-preview .sidebar-subtitle {
  font-size: 0.6rem;
}

.dashboard-preview .sidebar-content {
  padding: 0 0.5rem;
}

.dashboard-preview .year-card {
  padding: 0.5rem;
  margin-bottom: 0.35rem;
}

.dashboard-preview .year-label {
  font-size: 0.9rem;
}

.dashboard-preview .year-meta {
  font-size: 0.55rem;
}

.dashboard-preview .year-badge {
  font-size: 0.55rem;
  padding: 0.15rem 0.4rem;
}

.dashboard-preview .year-desc {
  font-size: 0.6rem;
  margin-top: 0.25rem;
}

/* 预览版保持与真实dashboard相同布局 */
.dashboard-preview #preview-chart {
  height: 140px;
}

.dashboard-preview .chat-avatar {
  width: 24px;
  height: 24px;
  font-size: 0.6rem;
}

.dashboard-preview .chat-bubble {
  font-size: 0.65rem;
  padding: 0.5rem;
  line-height: 1.3;
}

.dashboard-preview .chat-input-area {
  padding: 0.5rem;
}

.dashboard-preview .chat-input {
  padding: 0.4rem 0.6rem;
  font-size: 0.7rem;
}

.dashboard-preview .chat-send-btn {
  padding: 0.4rem;
}

.dashboard-preview .sidebar-right .sidebar-title {
  padding: 0.5rem 0.75rem;
  font-size: 0.7rem;
}

.dashboard-preview .palace-card {
  padding: 0.5rem;
  margin: 0 0.5rem 0.5rem;
}

.dashboard-preview .palace-label {
  font-size: 0.6rem;
}

.dashboard-preview .palace-sector {
  font-size: 0.55rem;
  padding: 0.1rem 0.3rem;
}

.dashboard-preview .palace-main-star {
  font-size: 0.85rem;
}

.dashboard-preview .palace-traits {
  font-size: 0.55rem;
}

.dashboard-preview .star-row-label {
  font-size: 0.55rem;
}

.dashboard-preview .star-tag {
  font-size: 0.5rem;
  padding: 0.1rem 0.25rem;
}

.dashboard-preview .san-fang-section {
  padding: 0 0.5rem;
}

.dashboard-preview .san-fang-title {
  font-size: 0.6rem;
  margin-bottom: 0.35rem;
}

.dashboard-preview .san-fang-item {
  padding: 0.35rem;
  margin-bottom: 0.25rem;
}

.dashboard-preview .san-fang-icon {
  width: 22px;
  height: 22px;
  font-size: 0.65rem;
}

.dashboard-preview .san-fang-info h4 {
  font-size: 0.6rem;
}

.dashboard-preview .san-fang-info p {
  font-size: 0.55rem;
}

/* 真实仪表盘容器 */
.real-dashboard-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #FAFAFA;
  z-index: 100;
}

/* ========== 仪表盘网格布局 ========== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 300px 1fr 340px;
  height: 100%;
  width: 100%;
}

/* 侧边栏公共样式 */
.sidebar {
  background: rgba(249,250,251,0.8);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
}

.sidebar-left {
  border-right: 1px solid #e5e7eb;
}

.sidebar-right {
  border-left: 1px solid #e5e7eb;
  padding: 1.5rem;
}

.chart-snapshot {
  margin-bottom: 1rem;
}

.snapshot-birth-btn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #111827;
  font-weight: 600;
}

.snapshot-birth-btn:focus-visible {
  outline: 2px solid rgba(124, 58, 237, 0.5);
  outline-offset: 2px;
  border-radius: 0.5rem;
}

.snapshot-birth-edit {
  font-size: 0.75rem;
  color: #9ca3af;
  opacity: 0;
  transform: translateY(-1px);
  transition: opacity 0.2s ease, color 0.2s ease;
}

.snapshot-birth-btn:hover .snapshot-birth-edit {
  opacity: 1;
  color: #7c3aed;
}

.chat-sessions-section {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.chat-sessions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.chat-sessions-title {
  font-weight: 700;
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.chat-new-btn {
  border: none;
  cursor: pointer;
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.35rem 0.6rem;
  border-radius: 0.6rem;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.2);
  transition: all 0.2s;
}

.chat-new-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

.chat-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 220px;
  overflow-y: auto;
}

.chat-session-item {
  text-align: left;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(229, 231, 235, 0.9);
  background: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  transition: all 0.2s;
}

.chat-session-item:hover {
  border-color: #a78bfa;
  background: white;
}

.chat-session-item.active {
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.12) inset;
}

.chat-session-title {
  font-weight: 600;
  font-size: 0.8rem;
  color: #111827;
  line-height: 1.2;
}

.chat-session-meta {
  font-size: 0.65rem;
  color: #9ca3af;
  margin-top: 0.2rem;
}

.chat-session-empty {
  font-size: 0.75rem;
  color: #9ca3af;
  text-align: center;
  padding: 0.75rem 0.5rem;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(229,231,235,0.5);
}

.sidebar-title {
  font-weight: bold;
  color: #111827;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-subtitle {
  font-size: 0.625rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

/* ========== 流年卡片 ========== */
.year-card {
  padding: 0.75rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.year-card:hover {
  border-color: #a78bfa;
}

.year-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.year-label {
  font-weight: bold;
  font-size: 1.125rem;
  color: #111827;
  font-family: serif;
}

.year-meta {
  font-size: 0.625rem;
  color: #9ca3af;
}

.year-badge {
  font-size: 0.625rem;
  font-weight: bold;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
}

.year-badge.purple {
  color: #7c3aed;
  background: #f3e8ff;
  border: 1px solid #e9d5ff;
}

.year-badge.pink {
  color: #db2777;
  background: #fce7f3;
  border: 1px solid #fbcfe8;
}

.year-badge.blue {
  color: #2563eb;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
}

.year-desc {
  font-size: 0.75rem;
  color: #4b5563;
  line-height: 1.4;
}

/* ========== 命宫卡片 ========== */
.palace-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.palace-card::before {
  content: "☯";
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.5rem;
  font-size: 3.75rem;
  opacity: 0.05;
}

.palace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.palace-label {
  font-size: 0.75rem;
  color: #9ca3af;
  text-transform: uppercase;
  font-weight: bold;
}

.palace-sector {
  font-size: 0.625rem;
  background: #f3f4f6;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  color: #6b7280;
}

.palace-main-star {
  font-size: 1.5rem;
  font-family: serif;
  font-weight: bold;
  color: #7c3aed;
  margin-bottom: 0.25rem;
}

.palace-traits {
  font-size: 0.75rem;
  color: #6b7280;
  font-style: italic;
  margin-bottom: 1rem;
}

/* 星曜标签 */
.star-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.star-row-label {
  font-size: 0.625rem;
  color: #9ca3af;
  width: 2rem;
}

.star-tags {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.star-tag {
  font-size: 0.625rem;
  font-weight: bold;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

.star-tag.major { background: #f3e8ff; color: #7c3aed; }
.star-tag.lucky { background: #dcfce7; color: #166534; }
.star-tag.bad { background: #fee2e2; color: #991b1b; }

/* ========== 三方四正 ========== */
.san-fang-section {
  margin-top: 0.75rem;
}

.san-fang-title {
  font-size: 0.75rem;
  font-weight: bold;
  color: #111827;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.san-fang-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: white;
  border: 1px solid #f3f4f6;
  margin-bottom: 0.75rem;
}

.san-fang-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}

.san-fang-icon.wealth { background: #fef3c7; color: #d97706; }
.san-fang-icon.career { background: #dbeafe; color: #2563eb; }
.san-fang-icon.travel { background: #dcfce7; color: #16a34a; }

.san-fang-info h4 {
  font-size: 0.75rem;
  font-weight: bold;
  color: #374151;
  margin: 0;
}

.san-fang-info p {
  font-size: 0.625rem;
  color: #9ca3af;
  margin: 0;
}

/* ========== 中间主区域 ========== */
.main-content {
  background: white;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* 图表区域 */
.chart-area {
  height: 20rem;
  border-bottom: 1px solid #f3f4f6;
  padding: 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  z-index: 10;
}

.chart-title {
  font-weight: bold;
  color: #374151;
  font-size: 0.875rem;
}

.chart-legend {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.chart-legend-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #7c3aed;
}

.chart-legend-text {
  font-size: 0.75rem;
  color: #9ca3af;
}

#main-chart,
#preview-chart {
  width: 100%;
  flex: 1;
  min-height: 120px;
}

/* 聊天区域 - 预览版本 */
.hero-dashboard .chat-area {
  flex: 0;
  background: white;
  overflow-y: visible;
  padding: 0.75rem;
}

/* 聊天区域 - 真实 Dashboard */
.real-dashboard-container .chat-area {
  flex: 1;
  background: white;
  overflow-y: auto;
  padding: 1.5rem;
  min-height: 0; /* 关键：允许flex子元素收缩并显示滚动条 */
}

.real-dashboard-container .main-content {
  overflow: hidden;
}

/* Homepage预览版：显示suggestion按钮 */
.hero-dashboard .suggestion-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.hero-dashboard .suggestion-card {
  font-size: 0.7rem;
  padding: 0.4rem 0.6rem;
}

/* Homepage预览版：显示chat-input-area */
.hero-dashboard .chat-input-area {
  padding: 0.5rem;
  margin-top: 0.5rem;
}

.hero-dashboard .chat-input {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
}

.chat-message {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.4s ease-out forwards;
  opacity: 0;
  transform: translateY(10px);
}

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

.chat-message.user {
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: black;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.chat-bubble {
  background: #f9fafb;
  padding: 1rem;
  border-radius: 1rem;
  border-top-left-radius: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #374151;
  max-width: 32rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border: 1px solid #f3f4f6;
}

.chat-message.user .chat-bubble {
  background: black;
  color: white;
  border-top-left-radius: 1rem;
  border-top-right-radius: 0;
}

/* Markdown渲染样式 */
.chat-bubble h1, .chat-bubble h2, .chat-bubble h3 {
  font-weight: bold;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: #111827;
}
.chat-bubble h1 { font-size: 1.25rem; }
.chat-bubble h2 { font-size: 1.125rem; }
.chat-bubble h3 { font-size: 1rem; color: #7c3aed; }

.chat-bubble p {
  margin-bottom: 0.75rem;
}

.chat-bubble strong {
  color: #7c3aed;
  font-weight: 600;
}

.chat-bubble em {
  color: #6b7280;
}

.chat-bubble ul, .chat-bubble ol {
  margin-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.chat-bubble li {
  margin-bottom: 0.25rem;
}

.chat-bubble hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 1rem 0;
}

.chat-bubble code {
  background: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.chat-bubble blockquote {
  border-left: 3px solid #7c3aed;
  padding-left: 1rem;
  margin: 0.75rem 0;
  color: #6b7280;
  font-style: italic;
}

/* 快捷按钮 */
.suggestion-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
  margin-left: 3rem;
  max-width: 32rem;
}

.suggestion-btn {
  padding: 0.75rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.suggestion-btn:hover {
  border-color: #a78bfa;
  background: white;
}

.suggestion-label {
  font-size: 0.625rem;
  font-weight: bold;
  color: #9ca3af;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.suggestion-btn:hover .suggestion-label {
  color: #7c3aed;
}

.suggestion-text {
  font-size: 0.875rem;
  color: #7c3aed;  /* 紫色表示可点击 */
  font-weight: 500;
  text-decoration: underline;  /* 下划线强调可点击 */
  text-decoration-color: #c4b5fd;  /* 淡紫色下划线 */
  text-underline-offset: 2px;
}

.suggestion-item:hover .suggestion-text {
  color: #6d28d9;  /* 深紫色 */
  text-decoration-color: #7c3aed;
}

/* 输入区域 */
.chat-input-area {
  padding: 1rem;
  border-top: 1px solid #f3f4f6;
}

.chat-input-wrapper {
  position: relative;
}

.chat-input {
  width: 100%;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  padding-right: 3rem;
  font-size: 0.875rem;
  outline: none;
  transition: all 0.2s;
}

.chat-input:focus {
  background: white;
  border-color: #c4b5fd;
  box-shadow: 0 0 0 3px rgba(196,181,253,0.2);
}

.chat-send-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.375rem;
  background: #e5e7eb;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s;
}

.chat-send-btn:hover {
  background: #7c3aed;
  color: white;
}

/* ========== 热门问题标签 ========== */
.popular-questions {
  padding: 0.75rem 1rem;
  border-top: 1px solid #f3f4f6;
}

.popular-label {
  font-size: 0.7rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.popular-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.popular-tag {
  font-size: 0.75rem;
  color: #6b7280;
  background: #f3f4f6;
  padding: 0.375rem 0.75rem;
  border-radius: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.popular-tag:hover {
  color: #7c3aed;
  background: #f3e8ff;
  border-color: #c4b5fd;
}

/* ========== 信任标识 ========== */
.trust-badges {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid #f3f4f6;
  background: #fafafa;
  border-radius: 0 0 0.75rem 0.75rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.trust-icon {
  font-size: 0.875rem;
}

.trust-text {
  font-size: 0.7rem;
  color: #9ca3af;
  font-weight: 500;
}

/* ========== 弹窗 ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s;
}

.modal-overlay.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: white;
  width: 100%;
  max-width: 28rem;
  padding: 2rem;
  border-radius: 1.5rem;
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.2);
  transform: scale(0.95);
  transition: transform 0.3s;
  position: relative;
  overflow: hidden;
}

.modal-overlay.show .modal-content {
  transform: scale(1);
}

.modal-accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0.5rem;
  background: linear-gradient(90deg, #7c3aed, #ec4899);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-family: serif;
  font-size: 1.5rem;
  font-weight: bold;
  color: #111827;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #9ca3af;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: black;
}

.modal-desc {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* 表单 */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: bold;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.gender-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.gender-btn {
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: bold;
  color: #4b5563;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
}

.gender-btn:hover,
.gender-btn.selected {
  border-color: #7c3aed;
  color: #7c3aed;
}

.form-input,
.form-select {
  width: 100%;
  padding: 0.75rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  outline: none;
  font-weight: 500;
  color: #111827;
  transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus {
  border-color: #7c3aed;
}

.btn-submit {
  width: 100%;
  padding: 1rem;
  margin-top: 0.5rem;
  background: black;
  color: white;
  border: none;
  border-radius: 0.75rem;
  font-weight: bold;
  font-size: 1.125rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s;
}

.btn-submit:hover {
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.3);
  transform: scale(1.01);
}

.btn-submit .arrow {
  transition: transform 0.2s;
}

.btn-submit:hover .arrow {
  transform: translateX(4px);
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 250px 1fr 280px;
  }
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-left,
  .sidebar-right {
    display: none;
  }

  .hero-title {
    font-size: 2.5rem;
  }
}

/* ========== Thinking 思考过程样式 ========== */
.thinking-container {
  margin-bottom: 0.75rem;
}

.thinking-container.collapsed {
  margin-bottom: 0.5rem;
}

.thinking-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.8rem;
  color: #64748b;
  transition: all 0.2s;
}

.thinking-header:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.thinking-icon {
  font-size: 1rem;
}

.thinking-label {
  font-weight: 500;
  color: #475569;
}

.thinking-dots {
  display: inline-flex;
  gap: 2px;
}

.thinking-dots span {
  animation: dotPulse 1.4s infinite;
  opacity: 0.3;
}

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

@keyframes dotPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.thinking-arrow {
  margin-left: auto;
  font-size: 0.7rem;
  color: #94a3b8;
}

.thinking-steps {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: #fafafa;
  border: 1px solid #f1f5f9;
  border-radius: 0.5rem;
}

.thinking-step {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.375rem 0;
  font-size: 0.75rem;
  color: #64748b;
  border-bottom: 1px solid #f1f5f9;
  animation: stepFadeIn 0.3s ease-out;
}

.thinking-step:last-child {
  border-bottom: none;
}

@keyframes stepFadeIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.step-icon {
  flex-shrink: 0;
  width: 1rem;
  text-align: center;
}

.step-text {
  flex: 1;
  line-height: 1.4;
}

.response-content {
  /* 正文内容样式继承 chat-bubble */
}

/* ========== 验证蒙层相关样式 ========== */

/* 验证蒙层渐入动画 */
#verify-overlay {
  animation: overlayFadeIn 0.3s ease-out;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#verify-overlay > div {
  animation: overlaySlideIn 0.4s ease-out;
}

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

/* Dashboard 解锁动效 */
.dashboard-unlocking {
  animation: dashboardUnlock 0.8s ease-out forwards;
}

@keyframes dashboardUnlock {
  0% {
    filter: blur(2px) brightness(0.95);
    opacity: 0.7;
  }
  50% {
    filter: blur(0px) brightness(1.05);
    opacity: 1;
  }
  100% {
    filter: blur(0px) brightness(1);
    opacity: 1;
  }
}

.dashboard-unlocked {
  animation: dashboardPulse 0.5s ease-out;
}

@keyframes dashboardPulse {
  0%, 100% {
    box-shadow: none;
  }
  50% {
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.3);
  }
}

/* 验证结果消息特殊样式 */
.chat-message.verification-result .chat-bubble {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(236, 72, 153, 0.1));
  border: 1px solid rgba(124, 58, 237, 0.2);
}

/* ========== Login Button ========== */
.btn-login {
  background: linear-gradient(135deg, #7C3AED, #EC4899);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

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