/* ========================================
   Ziwei AI - 主样式文件
   从 index.html 提取于 2024-12-28
   ======================================== */

:root {
      --bg-paper: #FDFDFB;
      --ink-black: #121212;
      --primary-purple: #6B46C1;           /* 主紫色 - 吉祥高贵 */
      --primary-purple-dark: #553C9A;      /* 深紫色 */
      --primary-purple-light: #9F7AEA;     /* 浅紫色 */
      --accent-gold: #C9A227;              /* 金色 - 富贵吉祥 */
      --accent-gold-light: rgba(201, 162, 39, 0.1);
      --accent-gold-warm: #D4AF37;         /* 暖金色 */
      --thinking-bg: #FAF5FF;              /* 淡紫色背景 */
      --border-light: #E9D8FD;             /* 紫色边框 */
      --text-dark: #2D3748;                /* 深灰色文字，不用纯黑 */
      --text-muted: #718096;               /* 次要文字 */

      /* 响应式字体 - 基于视口宽度自适应，扩大范围 */
      --font-xs: clamp(0.9rem, 0.6rem + 0.6vw, 1.5rem);         /* 14.4px → 24px */
      --font-sm: clamp(1rem, 0.7rem + 0.65vw, 1.625rem);        /* 16px → 26px */
      --font-base: clamp(1.125rem, 0.8rem + 0.7vw, 1.875rem);   /* 18px → 30px */
      --font-lg: clamp(1.375rem, 0.9rem + 0.9vw, 2.5rem);       /* 22px → 40px */
      --font-xl: clamp(1.875rem, 1.2rem + 1.4vw, 3.75rem);      /* 30px → 60px */
      --font-2xl: clamp(2.5rem, 1.5rem + 2.2vw, 5.5rem);        /* 40px → 88px */
    }

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

    html, body {
      height: 100%;
      overflow-x: hidden;
    }

    body {
      font-family: 'Inter', -apple-system, sans-serif;
      background-color: var(--bg-paper);
      color: var(--ink-black);
      -webkit-font-smoothing: antialiased;
    }

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

    /* ========== 顶栏 ========== */
    .topbar {
      height: 70px;
      background: var(--bg-paper);
      border-bottom: 1px solid var(--border-light);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 2rem;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 100;
    }

    .logo {
      font-family: 'Cormorant Garamond', 'Noto Serif SC', serif;
      font-size: var(--font-xl);
      font-weight: 600;
      background: linear-gradient(135deg, var(--primary-purple) 0%, var(--accent-gold) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      letter-spacing: 0.02em;
    }

    .logo-icon {
      color: var(--accent-gold);
    }

    /* 语言切换按钮 - 弱化设计 */
    .topbar-btn {
      padding: 0.35rem 0.75rem;
      font-size: 12px;
      color: #9CA3AF;
      background: transparent;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      transition: all 0.2s;
      font-weight: 400;
    }
    .topbar-btn:hover {
      color: #6B46C1;
      background: rgba(107, 70, 193, 0.08);
    }

    /* ========== 主容器 ========== */
    .main-container {
      min-height: 100vh;
      padding-top: 70px;
      display: flex;
      flex-direction: column;
    }

    /* ========== 欢迎区 ========== */
    .welcome-section {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 2rem;
      max-width: 1200px;
      margin: 0 auto;
      width: 100%;
    }

    /* 大屏幕优化 (1920px+) */
    @media (min-width: 1920px) {
      .welcome-section {
        max-width: 1600px;
        padding: 3rem 4rem;
      }
    }

    /* 超大屏幕 (2560px+) */
    @media (min-width: 2560px) {
      .welcome-section {
        max-width: 2200px;
        padding: 4rem 6rem;
      }
    }

    /* 4K屏幕 (3440px+) */
    @media (min-width: 3440px) {
      .welcome-section {
        max-width: 2800px;
        padding: 5rem 8rem;
      }
    }

    .hero-title {
      text-align: center;
      margin-bottom: 2rem;
    }

    .hero-title h1 {
      font-family: 'Cormorant Garamond', 'Noto Serif SC', serif;
      font-size: var(--font-2xl);
      font-weight: 400;
      background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 50%, var(--accent-gold) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      margin-bottom: 0.5rem;
    }

    .hero-title p {
      font-size: var(--font-base);
      color: var(--text-muted);
    }

    /* 预览区 */
    .preview-section {
      width: 100%;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1.5rem;
      margin-bottom: 2rem;
    }

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

    .preview-card {
      background: white;
      border: 1px solid var(--border-light);
      border-radius: 16px;
      padding: clamp(1.5rem, 1rem + 1vw, 2.5rem);
      position: relative;
      overflow: hidden;
      box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    }

    @media (min-width: 1920px) {
      .preview-card {
        border-radius: 20px;
      }
      .preview-section {
        gap: 2rem;
      }
    }

    @media (min-width: 2560px) {
      .preview-card {
        border-radius: 24px;
      }
      .preview-section {
        gap: 3rem;
      }
    }

    .preview-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: linear-gradient(90deg, var(--primary-purple), var(--accent-gold));
    }

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

    .preview-title {
      font-size: var(--font-base);
      font-weight: 600;
      color: var(--ink-black);
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .preview-badge {
      font-size: var(--font-xs);
      padding: 0.25rem 0.5rem;
      background: var(--accent-gold-light);
      color: var(--accent-gold);
      border-radius: 4px;
      font-weight: 600;
    }

    #preview-chart {
      width: 100%;
      height: 220px;
    }

    @media (min-width: 1920px) {
      #preview-chart {
        height: 280px;
      }
    }

    @media (min-width: 2560px) {
      #preview-chart {
        height: 350px;
      }
    }

    @media (min-width: 3440px) {
      #preview-chart {
        height: 420px;
      }
    }

    .preview-ledger {
      max-height: 240px;
      overflow-y: auto;
    }

    @media (min-width: 1920px) {
      .preview-ledger {
        max-height: 300px;
      }
    }

    @media (min-width: 2560px) {
      .preview-ledger {
        max-height: 380px;
      }
    }

    @media (min-width: 3440px) {
      .preview-ledger {
        max-height: 450px;
      }
    }

    .preview-ledger-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.75rem 0;
      border-bottom: 1px solid #f0f0f0;
      font-size: var(--font-sm);
    }
    .preview-ledger-item:last-child { border-bottom: none; }

    .preview-ledger-year {
      font-weight: 700;
      color: var(--primary-purple);
      font-size: var(--font-base);
    }

    .preview-ledger-desc {
      color: #555;
      flex: 1;
      margin: 0 1rem;
    }

    /* 快速问题 */
    .quick-questions {
      width: 100%;
      margin-bottom: 2rem;
    }

    .quick-questions-title {
      font-size: var(--font-sm);
      color: #666;
      text-align: center;
      margin-bottom: 1rem;
    }

    .quick-questions-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1rem;
    }

    @media (max-width: 768px) {
      .quick-questions-grid {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    .quick-btn {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.75rem;
      padding: 1.25rem 1rem;
      background: white;
      border: 1.5px solid var(--border-light);
      border-radius: 16px;
      cursor: pointer;
      transition: all 0.2s;
      font-size: var(--font-sm);
      font-weight: 500;
      color: var(--ink-black);
    }

    .quick-btn:hover {
      border-color: var(--primary-purple);
      background: rgba(107, 70, 193, 0.08);
      transform: translateY(-2px);
      box-shadow: 0 4px 16px rgba(107, 70, 193, 0.2);
    }

    .quick-btn-icon {
      width: clamp(52px, 4vw, 80px);
      height: clamp(52px, 4vw, 80px);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: clamp(1.5rem, 1rem + 1vw, 2.5rem);
      font-weight: 700;
      font-family: 'Noto Serif SC', serif;
    }

    .quick-btn-icon.career { background: #FEF3C7; }
    .quick-btn-icon.love { background: #FCE7F3; }
    .quick-btn-icon.health { background: #DBEAFE; }
    .quick-btn-icon.money { background: #D1FAE5; }

    /* 大屏幕优化快速按钮 */
    @media (min-width: 1920px) {
      .quick-btn {
        padding: 1.75rem 1.5rem;
        gap: 1rem;
      }
      .quick-questions-grid {
        gap: 1.5rem;
      }
    }

    @media (min-width: 2560px) {
      .quick-btn {
        padding: 2rem 2rem;
        gap: 1.25rem;
      }
      .quick-questions-grid {
        gap: 2rem;
      }
    }

    /* 输入区 */
    .input-section {
      width: 100%;
      max-width: 800px;
      margin: 0 auto;
    }

    @media (min-width: 1920px) {
      .input-section {
        max-width: 1000px;
      }
    }

    @media (min-width: 2560px) {
      .input-section {
        max-width: 1200px;
      }
    }

    @media (min-width: 3440px) {
      .input-section {
        max-width: 1500px;
      }
    }

    .input-wrapper {
      display: flex;
      gap: 0.75rem;
      padding: 0.75rem;
      background: white;
      border: 1px solid var(--border-light);
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    }

    .input-field {
      flex: 1;
      border: none;
      outline: none;
      font-size: var(--font-base);
      padding: 0.5rem;
      background: transparent;
    }

    .input-field::placeholder { color: #999; }

    .send-btn {
      padding: 0.75rem 1.5rem;
      background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
      color: white;
      border: none;
      border-radius: 8px;
      font-size: var(--font-sm);
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s;
      box-shadow: 0 2px 8px rgba(107, 70, 193, 0.3);
    }

    .send-btn:hover {
      background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-warm) 100%);
      box-shadow: 0 4px 12px rgba(201, 162, 39, 0.4);
      transform: translateY(-1px);
    }

    .input-hint {
      text-align: center;
      margin-top: 0.75rem;
      font-size: var(--font-xs);
      color: #888;
    }

    /* ========== 出生信息弹窗 ========== */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.5);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 200;
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s;
    }

    .modal-overlay.active {
      opacity: 1;
      visibility: visible;
    }

    .modal-content {
      background: white;
      border-radius: 16px;
      padding: clamp(1.5rem, 1rem + 1vw, 3rem);
      width: 90%;
      max-width: clamp(440px, 30vw, 700px);
      position: relative;
      transform: translateY(20px);
      transition: transform 0.3s;
    }

    @media (min-width: 1920px) {
      .modal-content {
        max-width: 550px;
        padding: 2.5rem;
      }
    }

    @media (min-width: 2560px) {
      .modal-content {
        max-width: 650px;
        padding: 3rem;
      }
    }

    @media (min-width: 3440px) {
      .modal-content {
        max-width: 800px;
        padding: 3.5rem;
      }
    }

    .modal-overlay.active .modal-content {
      transform: translateY(0);
    }

    .modal-title {
      font-family: 'Cormorant Garamond', 'Noto Serif SC', serif;
      font-size: var(--font-xl);
      text-align: center;
      margin-bottom: 0.5rem;
    }

    .modal-subtitle {
      font-size: var(--font-sm);
      color: #666;
      text-align: center;
      margin-bottom: 1.5rem;
    }

    .form-group { margin-bottom: 1rem; }

    .form-label {
      display: block;
      font-size: var(--font-sm);
      color: #333;
      margin-bottom: 0.5rem;
      font-weight: 500;
    }

    .form-row {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: clamp(0.5rem, 0.3rem + 0.3vw, 1rem);
    }

    .form-select, .form-input {
      width: 100%;
      padding: clamp(0.625rem, 0.5rem + 0.3vw, 1rem);
      border: 1px solid var(--border-light);
      border-radius: 6px;
      font-size: clamp(0.875rem, 0.7rem + 0.3vw, 1.125rem);
      outline: none;
      transition: border-color 0.2s;
    }

    .form-select:focus, .form-input:focus {
      border-color: var(--accent-gold);
    }

    @media (min-width: 1920px) {
      .form-row {
        gap: 0.75rem;
      }
      .form-select, .form-input {
        padding: 0.875rem;
        font-size: 1rem;
      }
    }

    @media (min-width: 2560px) {
      .form-row {
        gap: 1rem;
      }
      .form-select, .form-input {
        padding: 1rem;
        font-size: 1.125rem;
      }
    }

    .gender-toggle {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.5rem;
    }

    .gender-btn {
      padding: 0.625rem;
      border: 1px solid var(--border-light);
      border-radius: 6px;
      background: white;
      font-size: var(--font-sm);
      cursor: pointer;
      transition: all 0.2s;
    }

    .gender-btn.active {
      border-color: var(--accent-gold);
      background: var(--accent-gold-light);
      color: var(--accent-gold);
    }

    .modal-submit {
      width: 100%;
      padding: 0.875rem;
      background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
      color: white;
      border: none;
      border-radius: 8px;
      font-size: var(--font-base);
      font-weight: 600;
      cursor: pointer;
      margin-top: 1.5rem;
      transition: all 0.3s;
      box-shadow: 0 2px 8px rgba(107, 70, 193, 0.3);
    }

    .modal-submit:hover {
      background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-warm) 100%);
      box-shadow: 0 4px 12px rgba(201, 162, 39, 0.4);
    }

    .modal-close {
      position: absolute;
      top: 1rem;
      right: 1rem;
      width: 28px;
      height: 28px;
      border: none;
      background: #f5f5f5;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.1rem;
      color: #666;
    }

    /* ========== 对话视图（三栏布局）- 现代简约风格 ========== */
    .chat-view {
      display: none;
      height: calc(100vh - 60px);
    }

    .chat-view.active { display: flex; }

    .welcome-section.hidden { display: none; }

    /* ========== 左侧边栏 - 时间轴风格重构 ========== */
    .chat-sidebar {
      width: 300px;
      background: linear-gradient(180deg, #FAF5FF 0%, #F5F3FF 100%);
      border-right: 1px solid rgba(107, 70, 193, 0.08);
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    @media (max-width: 1024px) {
      .chat-sidebar { display: none; }
    }

    .sidebar-section {
      padding: 20px 16px;
      background: transparent;
    }

    .sidebar-title {
      font-size: 12px;
      font-weight: 600;
      color: #6B46C1;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 6px;
      letter-spacing: 0.03em;
    }

    .sidebar-title span:first-child {
      font-size: 14px;
    }

    /* 增强的图表区域 */
    #sidebar-chart {
      width: 100%;
      height: 180px;
      background: white;
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(107, 70, 193, 0.08);
      border: 1px solid rgba(107, 70, 193, 0.1);
    }

    /* 图例说明 */
    .chart-legend {
      display: flex;
      justify-content: center;
      gap: 16px;
      margin-top: 10px;
      font-size: 11px;
      color: #6B7280;
    }
    .chart-legend-item {
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .chart-legend-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
    }
    .chart-legend-dot.good { background: #10B981; }
    .chart-legend-dot.normal { background: #8B5CF6; }
    .chart-legend-dot.caution { background: #F59E0B; }

    /* 时间轴容器 */
    .sidebar-timeline {
      flex: 1;
      overflow-y: auto;
      padding: 0 16px 20px;
    }

    .sidebar-timeline-title {
      font-size: 12px;
      font-weight: 600;
      color: #6B46C1;
      padding: 16px 0 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .sidebar-timeline-title span:first-child {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    /* 时间轴样式 */
    .timeline-container {
      position: relative;
      padding-left: 20px;
    }

    .timeline-container::before {
      content: '';
      position: absolute;
      left: 6px;
      top: 0;
      bottom: 0;
      width: 2px;
      background: linear-gradient(180deg, #C4B5FD 0%, #E9D5FF 100%);
      border-radius: 1px;
    }

    .timeline-item {
      position: relative;
      padding: 8px 12px;
      margin-bottom: 4px;
      border-radius: 8px;
      background: white;
      cursor: pointer;
      transition: all 0.2s ease;
      border: 1px solid transparent;
    }

    .timeline-item::before {
      content: '';
      position: absolute;
      left: -17px;
      top: 50%;
      transform: translateY(-50%);
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: white;
      border: 2px solid #C4B5FD;
      transition: all 0.2s;
    }

    .timeline-item:hover {
      background: #FAF5FF;
      border-color: rgba(107, 70, 193, 0.2);
    }

    .timeline-item.active {
      background: linear-gradient(135deg, #6B46C1 0%, #7C3AED 100%);
      border-color: transparent;
      box-shadow: 0 4px 12px rgba(107, 70, 193, 0.25);
    }

    .timeline-item.active::before {
      background: #6B46C1;
      border-color: #6B46C1;
      box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.2);
    }

    /* 运势等级图标 */
    .timeline-item.fortune-good::before { border-color: #10B981; background: #D1FAE5; }
    .timeline-item.fortune-normal::before { border-color: #8B5CF6; background: #EDE9FE; }
    .timeline-item.fortune-caution::before { border-color: #F59E0B; background: #FEF3C7; }
    .timeline-item.active.fortune-good::before { background: #10B981; }
    .timeline-item.active.fortune-normal::before { background: #8B5CF6; }
    .timeline-item.active.fortune-caution::before { background: #F59E0B; }

    .timeline-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 4px;
    }

    .timeline-year {
      font-weight: 600;
      font-size: 14px;
      color: #1F2937;
      font-variant-numeric: tabular-nums;
    }

    .timeline-ganzhi {
      font-size: 11px;
      color: #9CA3AF;
      background: #F3F4F6;
      padding: 2px 6px;
      border-radius: 4px;
    }

    .timeline-content {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .timeline-keyword {
      font-size: 12px;
      color: #6B7280;
      flex: 1;
    }

    .timeline-score {
      display: flex;
      align-items: center;
      gap: 2px;
    }

    .timeline-score-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #E5E7EB;
    }
    .timeline-score-dot.filled { background: #8B5CF6; }
    .timeline-score-dot.filled.good { background: #10B981; }
    .timeline-score-dot.filled.caution { background: #F59E0B; }

    .timeline-item.active .timeline-year,
    .timeline-item.active .timeline-keyword { color: white; }
    .timeline-item.active .timeline-ganzhi {
      background: rgba(255,255,255,0.2);
      color: rgba(255,255,255,0.9);
    }
    .timeline-item.active .timeline-score-dot { background: rgba(255,255,255,0.3); }
    .timeline-item.active .timeline-score-dot.filled { background: white; }

    /* 隐藏旧的ledger样式，保留兼容 */
    .sidebar-ledger { display: none; }
    .sidebar-ledger-title { display: none; }
    .sidebar-ledger-item { display: none; }

    /* ========== 中间对话区 ========== */
    .chat-main {
      flex: 1;
      display: flex;
      flex-direction: column;
      background: #FFFFFF;
      min-width: 0;
    }

    /* ========== 聊天区域 - 现代简约风格 ========== */
    .chat-messages {
      flex: 1;
      overflow-y: auto;
      padding: 3rem 2.5rem;
      background: linear-gradient(180deg, #FFFFFF 0%, #FAFBFC 100%);
    }

    .message {
      margin-bottom: 3rem;
      max-width: 720px;
      margin-left: auto;
      margin-right: auto;
    }

    .message-header {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 14px;
    }

    .message-avatar {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    }

    .message-avatar.user {
      background: #F3F4F6;
      color: #6B7280;
      border: 1px solid #E5E7EB;
    }

    .message-avatar.ai {
      background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
      color: white;
      box-shadow: 0 2px 6px rgba(139, 92, 246, 0.25);
    }

    .message-sender {
      font-size: 14px;
      font-weight: 600;
      color: #1F2937;
      letter-spacing: -0.01em;
    }

    .message-content {
      padding-left: 44px;
      max-width: 720px;  /* 控制最大行宽，提升阅读体验 */
    }

    /* ========== 回答文本 - 优雅排版 ========== */
    .message-text {
      font-size: 15px;
      line-height: 1.85;
      color: #4B5563;  /* 略微淡化正文颜色 */
      letter-spacing: 0.01em;
    }

    /* Markdown 标题样式 */
    .message-text h1, .message-text h2, .message-text h3, .message-text h4 {
      font-weight: 600;
      color: #1F2937;
      margin: 1.75rem 0 0.75rem;
      line-height: 1.4;
    }

    .message-text h1 { font-size: 1.25em; }
    .message-text h2 { font-size: 1.15em; }
    .message-text h3 {
      font-size: 1.05em;
      color: #6B46C1;
      border-left: 3px solid #8B5CF6;
      padding-left: 12px;
      margin-left: -15px;
    }
    .message-text h4 {
      font-size: 1em;
      color: #6B7280;
      font-weight: 500;
    }

    .message-text p {
      margin: 1rem 0;
    }

    .message-text ul, .message-text ol {
      margin: 1rem 0;
      padding-left: 1.25rem;
    }

    .message-text li {
      margin: 0.625rem 0;
      padding-left: 0.25rem;
    }

    /* 减少加粗密度，让重点更突出 */
    .message-text strong {
      color: #374151;  /* 不用纯黑 */
      font-weight: 600;
      background: linear-gradient(transparent 65%, rgba(139, 92, 246, 0.15) 65%);
      padding: 0 2px;
    }

    .message-text blockquote {
      border-left: 3px solid #C4B5FD;
      padding: 0.875rem 1.25rem;
      margin: 1.25rem 0;
      background: linear-gradient(135deg, #FAF5FF 0%, #F5F3FF 100%);
      border-radius: 0 10px 10px 0;
      color: #6B7280;
      font-style: normal;
    }

    .message-text blockquote p {
      margin: 0.375rem 0;
    }

    .message-text hr {
      border: none;
      border-top: 1px dashed #E5E7EB;
      margin: 2rem 0;
    }

    .message-text code {
      background: #F3F4F6;
      padding: 2px 6px;
      border-radius: 4px;
      font-size: 0.875em;
      color: #6B46C1;
    }

    /* 关键词高亮 - 命理术语 */
    .message-text em {
      color: #7C3AED;
      font-style: normal;
      background: linear-gradient(transparent 60%, #EDE9FE 60%);
    }

    /* 年份高亮样式 */
    .message-text strong:has(+ strong),
    .message-text p > strong:first-child {
      background: none;
    }

    /* ========== 思维过程展示 - 简洁折叠风格 ========== */
    .thinking-process {
      background: #F9FAFB;
      border: 1px solid #E5E7EB;
      border-radius: 12px;
      margin-bottom: 1.25rem;
      overflow: hidden;
    }

    .thinking-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 18px;
      cursor: pointer;
      user-select: none;
      transition: background 0.15s;
      border-bottom: 1px solid transparent;
    }

    .thinking-process.expanded .thinking-header {
      border-bottom-color: #E5E7EB;
    }

    .thinking-header:hover { background: rgba(0,0,0,0.02); }

    .thinking-title {
      display: flex;
      align-items: center;
      gap: 12px;
      font-size: var(--font-sm);
      font-weight: 500;
      color: #374151;
    }

    .thinking-title span:first-child {
      font-size: var(--font-base);
    }

    .thinking-toggle {
      font-size: var(--font-xs);
      color: #9CA3AF;
      transition: transform 0.3s ease;
      padding: 6px;
    }

    .thinking-process.expanded .thinking-toggle {
      transform: rotate(180deg);
    }

    .thinking-content {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.35s ease-out;
    }

    .thinking-process.expanded .thinking-content {
      max-height: 500px;
      overflow-y: auto;
    }

    .thinking-inner {
      padding: 20px 22px;
    }

    /* 思考步骤 - 简洁紧凑 */
    .thinking-step {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 10px 0;
      font-size: var(--font-sm);
      color: #6B7280;
      line-height: 1.6;
    }

    .thinking-step:not(:last-child) {
      border-bottom: 1px solid #F3F4F6;
    }

    .thinking-step .step-icon {
      flex-shrink: 0;
      font-size: var(--font-sm);
      width: 24px;
      text-align: center;
    }

    .thinking-step .step-text {
      flex: 1;
      word-break: break-word;
    }

    /* 不同类型步骤的样式 */
    .thinking-step.phase {
      font-weight: 500;
      color: #4B5563;
      background: #F9FAFB;
      margin: 0 -18px;
      padding: 10px 18px;
      border-bottom: none !important;
    }

    .thinking-step.decision {
      background: #FFFBEB;
      margin: 4px -18px;
      padding: 10px 18px;
      border-radius: 0;
      border-bottom: none !important;
    }

    .thinking-step.decision .step-text {
      color: #92400E;
      font-weight: 500;
    }

    .thinking-step.finding .step-text {
      color: #059669;
    }

    .thinking-step.layer {
      border-left: 3px solid #60A5FA;
      background: #EFF6FF;
      margin: 4px -18px 4px -15px;
      padding: 8px 18px 8px 15px;
      border-bottom: none !important;
    }

    .thinking-step-title {
      font-weight: 600;
      color: var(--accent-gold);
      margin-bottom: 0.25rem;
    }

    /* 思考动画 - 更精致 */
    .thinking-dots {
      display: flex;
      gap: 5px;
      align-items: center;
    }

    .thinking-dots span {
      width: 5px;
      height: 5px;
      background: #9CA3AF;
      border-radius: 50%;
      animation: pulse-dot 1.4s infinite ease-in-out;
    }

    .thinking-dots span:nth-child(1) { animation-delay: 0s; }
    .thinking-dots span:nth-child(2) { animation-delay: 0.16s; }
    .thinking-dots span:nth-child(3) { animation-delay: 0.32s; }

    @keyframes pulse-dot {
      0%, 80%, 100% { transform: scale(0.8); opacity: 0.4; }
      40% { transform: scale(1.1); opacity: 1; }
    }

    /* 对话输入底栏 - 追问式设计 */
    .chat-input-bar {
      padding: 1rem 2rem 1.25rem;
      border-top: 1px solid rgba(0,0,0,0.04);
      background: linear-gradient(180deg, #FFFFFF 0%, #FAFAFA 100%);
    }

    .chat-input-wrapper {
      max-width: 680px;
      margin: 0 auto;
    }

    /* 追问提示 */
    .followup-hint {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      font-size: 12px;
      color: #9CA3AF;
      margin-bottom: 10px;
    }
    .followup-icon {
      font-size: 14px;
    }

    .chat-input-bar .input-wrapper {
      background: #F9FAFB;
      border: 1px solid #E5E7EB;
      border-radius: 12px;
      padding: 3px;
      display: flex;
      align-items: center;
      transition: all 0.2s ease;
    }

    .chat-input-bar .input-wrapper:focus-within {
      border-color: #8B5CF6;
      box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.08);
      background: #FFFFFF;
    }

    .chat-input-bar .input-field {
      flex: 1;
      border: none;
      outline: none;
      background: transparent;
      font-size: 14px;
      padding: 10px 14px;
      color: #1F2937;
    }

    .chat-input-bar .input-field::placeholder {
      color: #9CA3AF;
    }

    .chat-input-bar .send-btn {
      font-size: 13px;
      font-weight: 500;
      padding: 8px 16px;
      background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
      color: white;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .chat-input-bar .send-btn:hover {
      background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
    }

    /* 自定义滚动条 */
    .chat-messages::-webkit-scrollbar,
    .sidebar-ledger::-webkit-scrollbar,
    .preview-ledger::-webkit-scrollbar {
      width: 5px;
    }
    .chat-messages::-webkit-scrollbar-track,
    .sidebar-ledger::-webkit-scrollbar-track,
    .preview-ledger::-webkit-scrollbar-track {
      background: transparent;
    }
    .chat-messages::-webkit-scrollbar-thumb,
    .sidebar-ledger::-webkit-scrollbar-thumb,
    .preview-ledger::-webkit-scrollbar-thumb {
      background: #ddd;
      border-radius: 3px;
    }

    .hidden { display: none !important; }

    /* ========== SEO Footer Section - 极简优雅 ========== */
    .seo-footer-section {
      background: linear-gradient(180deg, transparent 0%, rgba(107, 70, 193, 0.02) 100%);
      padding: 5rem 2rem 3rem;
      margin-top: 0;
      text-align: center;
    }

    .seo-inner {
      max-width: 900px;
      margin: 0 auto;
    }

    /* 主标语 */
    .seo-hero {
      margin-bottom: 4rem;
    }

    .seo-tagline {
      font-family: 'Noto Serif SC', serif;
      font-size: var(--font-xl);
      font-weight: 300;
      color: var(--primary-purple);
      letter-spacing: 0.15em;
      margin: 0;
      opacity: 0.9;
    }

    .seo-tagline-en {
      font-family: 'Cormorant Garamond', serif;
      font-size: var(--font-base);
      font-weight: 300;
      font-style: italic;
      color: var(--text-muted);
      letter-spacing: 0.08em;
      margin-top: 0.75rem;
      opacity: 0.7;
    }

    /* 特性列表 */
    .seo-features {
      display: flex;
      justify-content: center;
      gap: 4rem;
      margin-bottom: 4rem;
      flex-wrap: wrap;
    }

    .seo-feature {
      text-align: center;
      max-width: 200px;
    }

    .seo-feature-icon {
      display: block;
      font-size: 1.5rem;
      color: var(--primary-purple-light);
      margin-bottom: 1rem;
      opacity: 0.6;
    }

    .seo-feature h3 {
      font-family: 'Noto Serif SC', serif;
      font-size: var(--font-sm);
      font-weight: 400;
      color: var(--text-dark);
      margin: 0 0 0.5rem 0;
      letter-spacing: 0.05em;
    }

    .seo-feature p {
      font-family: 'Inter', sans-serif;
      font-size: calc(var(--font-xs) * 0.9);
      color: var(--text-muted);
      margin: 0;
      letter-spacing: 0.02em;
      opacity: 0.8;
    }

    /* 隐藏的SEO文本 - 极简灰色小字 */
    .seo-hidden-text {
      margin-bottom: 3rem;
      padding: 1.5rem 0;
      border-top: 1px solid rgba(107, 70, 193, 0.08);
      border-bottom: 1px solid rgba(107, 70, 193, 0.08);
    }

    .seo-hidden-text p {
      font-size: calc(var(--font-xs) * 0.85);
      color: var(--text-muted);
      opacity: 0.5;
      margin: 0;
      letter-spacing: 0.1em;
      line-height: 2;
    }

    /* 底部版权 */
    .seo-copyright {
      opacity: 0.6;
    }

    .seo-copyright p {
      font-size: var(--font-xs);
      color: var(--text-muted);
      margin: 0;
      letter-spacing: 0.05em;
    }

    .seo-copyright p:first-child {
      font-family: 'Noto Serif SC', serif;
      margin-bottom: 0.5rem;
    }

    .seo-links {
      display: flex;
      justify-content: center;
      gap: 0.75rem;
      flex-wrap: wrap;
    }

    .seo-links span {
      font-size: calc(var(--font-xs) * 0.85);
      color: var(--text-muted);
      opacity: 0.7;
    }

    /* 响应式 */
    @media (max-width: 768px) {
      .welcome-section {
        padding: 1.5rem 1rem;
        justify-content: flex-start;
        padding-top: 1.5rem;
      }

      .quick-questions-grid {
        grid-template-columns: repeat(2, 1fr);
      }

      .seo-footer-section {
        padding: 3rem 1.5rem 2rem;
      }

      .seo-tagline {
        font-size: var(--font-lg);
        letter-spacing: 0.1em;
      }

      .seo-features {
        gap: 2rem;
      }

      .seo-feature {
        flex: 1 1 100%;
        max-width: none;
      }
    }