/* 现代化主页样式 - 参考OpenAI/Gemini设计 */


/* CSS变量定义 - 融入广府文化色彩 */

:root {
    /* 广府传统色彩：朱红、金黄、墨绿、青花蓝 */
    --primary-color: #c41e3a;
    /* 朱红色 - 传统中国红 */
    --primary-hover: #a01729;
    --secondary-color: #2c5530;
    /* 墨绿色 - 岭南园林色 */
    --accent-color: #d4af37;
    /* 金黄色 - 传统金色 */
    --cultural-blue: #1e3a8a;
    /* 青花蓝 - 广彩瓷器色 */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #0f172a;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-cultural: 0 8px 32px rgba(196, 30, 58, 0.15);
    /* 朱红色阴影 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
}


/* 系统消息样式 */

.system-message {
    display: flex;
    justify-content: center;
    margin: 15px 0;
    opacity: 0.8;
}

.system-content {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #6c757d;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.system-content i {
    font-size: 0.8em;
    opacity: 0.7;
}


/* 全局重置和基础样式 */

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

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}


/* 默认允许垂直滚动（其他页面） */

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

body {
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    overflow-y: auto;
    /* 默认允许垂直滚动 */
}


/* 添加传统文化装饰元素 */

.cultural-pattern {
    position: relative;
}

.cultural-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 25% 25%, rgba(212, 175, 55, 0.1) 0%, transparent 50%), radial-gradient(circle at 75% 75%, rgba(196, 30, 58, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}


/* 现代化导航栏 - 融入文化元素 */

.modern-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white !important;
    /* 默认白色背景，其他页面使用 */
    border-bottom: 1px solid #e5e7eb;
    /* 浅灰色底部边框 */
    transition: all 0.3s ease;
}


/* 其他页面（非首页）导航栏样式 - 白色背景，黑色文字 */

body:not(.index-page) .modern-navbar {
    background: white !important;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}


/* 其他页面导航链接 - 统一使用btn-modern圆角样式 */

body:not(.index-page) .modern-navbar .nav-link,
body:not(.index-page) .modern-navbar .btn-modern {
    color: #000000 !important;
    /* 黑色文字 */
    text-shadow: none !important;
    background: none !important;
    border: none !important;
    padding: 0.75rem 1.25rem !important;
    font-size: clamp(1rem, 1.2vw + 0.5rem, 1.5rem) !important;
    /* 与导航链接字体大小一致 */
    font-weight: 800 !important;
    /* 与导航链接字重一致 */
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif !important;
    /* 与VR页面字体一致 */
    letter-spacing: 1px !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    /* 圆角样式，与btn-modern一致 */
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), font-weight 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer;
    display: inline-block;
    position: relative;
}

/* 只针对 chat 页面的导航栏样式，不影响其他页面 */
body.chat-page .modern-navbar .nav-link-modern {
    display: inline-flex !important; /* 强制使用 flex 布局，让 gap 生效 */
    align-items: center !important;
    gap: 0.5rem !important; /* 强制与 main.css 统一间距 */
}

/* chat 页面：确保图标垂直对齐，不偏上 */
body.chat-page .modern-navbar .nav-link-modern i {
    transform: none !important; /* 移除 translateY(-1px)，让图标与其他页面一致 */
    vertical-align: middle !important;
    line-height: 1 !important;
}

/* 导航链接间距统一由 CSS gap 控制，移除所有 margin/padding hack */
body.chat-page .modern-navbar .nav-link-modern span {
    margin-left: 0 !important;
    padding-left: 0 !important;
    text-indent: 0 !important;
}

body:not(.index-page) .modern-navbar .nav-link:hover,
body:not(.index-page) .modern-navbar .btn-modern:hover {
    color: #c41e3a !important;
    /* 悬停时红色 */
    text-shadow: none !important;
    background: rgba(196, 30, 58, 0.08) !important;
    /* 圆角背景 */
    transform: translateY(-1px);
}

body:not(.index-page) .modern-navbar .nav-link.active,
body:not(.index-page) .modern-navbar .btn-modern.active {
    color: #c41e3a !important;
    /* 激活状态红色 */
    text-shadow: none !important;
    background: rgba(196, 30, 58, 0.15) !important;
    /* 圆角背景 */
}

body:not(.index-page) .modern-navbar .nav-link.active::after,
body:not(.index-page) .modern-navbar .btn-modern.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #c41e3a;
    animation: slideIn 0.3s ease;
}


/* 其他页面导航栏日期信息 - 黑色文字 */

body:not(.index-page) .modern-navbar .nav-date-info {
    color: #000000 !important;
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif !important;
}

body:not(.index-page) .modern-navbar .nav-date-info i {
    color: #6b7280 !important;
}

body:not(.index-page) .modern-navbar .nav-date-info span {
    color: #000000 !important;
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif !important;
}

body:not(.index-page) .modern-navbar .nav-date-info .date-separator {
    color: #d1d5db !important;
}


/* 首页导航栏 - 玻璃态效果，覆盖轮播图 */

body.index-page .modern-navbar,
.index-page .modern-navbar {
    background: rgba(255, 255, 255, 0.15) !important;
    /* 半透明白色 */
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}


/* 首页导航栏文字颜色调整 */

body.index-page .modern-navbar .nav-link,
.index-page .modern-navbar .nav-link,
body.index-page .modern-navbar .btn-modern,
.index-page .modern-navbar .btn-modern {
    color: #ffffff !important;
    /* 纯白色，更接近图片效果 */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    /* 更强的阴影增强可读性 */
    font-weight: 800 !important;
    /* 确保粗体 */
    letter-spacing: 1.2px;
    /* 首页导航栏字间距稍大 */
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif !important;
    /* 与VR页面字体一致 */
    font-size: clamp(1rem, 1.2vw + 0.5rem, 1.5rem) !important;
    /* 确保字体大小一致 */
}

body.index-page .modern-navbar .nav-link:hover,
.index-page .modern-navbar .nav-link:hover,
body.index-page .modern-navbar .btn-modern:hover,
.index-page .modern-navbar .btn-modern:hover {
    color: #ffd700 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

body.index-page .modern-navbar .nav-link.active,
.index-page .modern-navbar .nav-link.active,
body.index-page .modern-navbar .btn-modern.active,
.index-page .modern-navbar .btn-modern.active {
    color: #ffffff !important;
    /* 纯白色 */
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    /* 激活状态更强的阴影 */
    font-weight: 800 !important;
    /* 确保粗体 */
}

body.index-page .modern-navbar .nav-link.active::after,
.index-page .modern-navbar .nav-link.active::after,
body.index-page .modern-navbar .btn-modern.active::after,
.index-page .modern-navbar .btn-modern.active::after {
    background: rgba(255, 255, 255, 0.8);
}

body.index-page .modern-navbar .nav-brand,
.index-page .modern-navbar .nav-brand {
    color: #c41e3a !important;
    /* 保持红色 */
    text-shadow: 0 2px 5px rgba(255, 255, 255, 0.3);
}

body.index-page .modern-navbar .nav-brand i,
.index-page .modern-navbar .nav-brand i {
    color: #c41e3a !important;
    /* 保持红色 */
    text-shadow: 0 2px 5px rgba(255, 255, 255, 0.3);
}

body.index-page .modern-navbar .btn-modern,
.index-page .modern-navbar .btn-modern {
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.index-page .modern-navbar .btn-modern:hover,
.index-page .modern-navbar .btn-modern:hover {
    color: #ffd700 !important;
    background: rgba(255, 255, 255, 0.15) !important;
}

body.index-page .modern-navbar .btn-modern.active,
.index-page .modern-navbar .btn-modern.active {
    color: rgba(255, 255, 255, 1) !important;
    background: rgba(255, 255, 255, 0.2) !important;
}

body.index-page .modern-navbar .btn-modern.active::after,
.index-page .modern-navbar .btn-modern.active::after {
    background: rgba(255, 255, 255, 0.8);
}

.nav-container {
    width: 100%;
    margin: 0;
    padding: 0 clamp(0.75rem, 3vw, 2rem);
    /* 固定内边距，避免抖动 */
    display: flex;
    align-items: center;
    justify-content: space-between; /* 确保左右两侧均匀分布 */
    height: clamp(56px, 2.5vw + 54px, 70px);
    gap: clamp(0.5rem, 1.5vw, 2rem);
    /* 左右两侧间距 */
    position: relative;
    /* 为绝对定位的子元素提供定位参考 */
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #1f2937;
}

@media (max-width: 768px) {
    .nav-actions { display: none; }
    .nav-toggle { display: inline-flex; }
    .nav-menu { display: none; }
    .nav-menu.open {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        top: clamp(56px, 2.5vw + 54px, 70px);
        padding: 0.75rem 1rem;
        background: #ffffff;
        gap: 0.5rem;
        flex-direction: column;
        z-index: 1001;
    }
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    /* 固定间距，避免抖动 */
    font-size: clamp(1.25rem, 2vw + 0.75rem, 2.25rem) !important;
    /* 36px - 再大两号 */
    font-weight: 700 !important;
    /* 加粗 */
    color: #c41e3a !important;
    text-decoration: none;
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif !important;
    /* 统一使用传统衬线字体 */
    letter-spacing: 1px;
    flex-shrink: 0;
    /* 防止收缩 */
    z-index: 10;
}

.nav-brand i {
    font-size: clamp(1.5rem, 2vw + 1rem, 2.5rem) !important;
    /* 40px - 更大图标 */
    color: #c41e3a !important;
}

.nav-brand span {
    margin: 0;
    padding: 0;
    font-size: clamp(1.25rem, 2vw + 0.75rem, 2.25rem) !important;
    /* 确保span也使用统一大小 */
    font-weight: 700 !important;
    /* 加粗 */
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif !important;
    /* 与VR页面字体一致 */
}

.nav-dropdown {
    position: relative;
}


/* 功能中心按钮悬停时显示下拉菜单 - 固定位置 */

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown .btn-modern:hover~.dropdown-menu {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
    /* 固定位置 */
}


/* 下拉菜单悬停时保持显示 - 固定位置 */

.nav-dropdown .dropdown-menu:hover {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
    /* 固定位置 */
}


/* 首页导航栏下拉菜单特殊样式 - 非遗文化韵味的古典纸张质感 */

body.index-page .nav-dropdown .dropdown-menu,
.index-page .nav-dropdown .dropdown-menu {
    background: /* 纸张纹理 */
    repeating-linear-gradient( 0deg, rgba(245, 243, 240, 0.1) 0px, transparent 1px, transparent 2px, rgba(245, 243, 240, 0.05) 3px), /* 古典渐变色 - 宣纸/古籍质感 */
    linear-gradient( 135deg, rgba(255, 253, 250, 0.98) 0%, rgba(250, 248, 244, 0.98) 50%, rgba(245, 243, 238, 0.98) 100%), /* 底层暖色调 */
    radial-gradient( ellipse at top left, rgba(212, 175, 55, 0.08) 0%, transparent 50%), radial-gradient( ellipse at bottom right, rgba(196, 30, 58, 0.05) 0%, transparent 50%), /* 基础色 */
    #faf8f4 !important;
    border: 2px solid rgba(212, 190, 165, 0.6) !important;
    /* 古典边框 - 淡金色 */
    backdrop-filter: blur(10px) saturate(120%) !important;
    -webkit-backdrop-filter: blur(10px) saturate(120%) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(196, 30, 58, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -1px 0 rgba(0, 0, 0, 0.05) !important;
}

body.index-page .nav-dropdown .dropdown-menu .dropdown-item,
.index-page .nav-dropdown .dropdown-menu .dropdown-item {
    color: #2c3e50 !important;
    /* 深色文字，更符合古典风格 */
    font-size: 1.25rem !important;
    /* 统一字体大小 */
    font-weight: 800 !important;
    /* 统一加粗字体 */
}

body.index-page .nav-dropdown .dropdown-menu .dropdown-item:hover,
.index-page .nav-dropdown .dropdown-menu .dropdown-item:hover {
    background: rgba(196, 30, 58, 0.1) !important;
    /* 悬停时淡红色背景 */
    color: #c41e3a !important;
    /* 悬停时红色文字 */
}

.dropdown-menu {
    display: none !important;
    position: absolute;
    top: calc(100% + 0.5rem);
    /* 固定位置，避免移动 */
    left: 50%;
    transform: translateX(-50%) translateY(0);
    /* 居中且固定Y位置 */
    /* 非遗文化韵味的古典纸张质感背景 */
    background: /* 纸张纹理 */
    repeating-linear-gradient( 0deg, rgba(245, 243, 240, 0.08) 0px, transparent 1px, transparent 2px, rgba(245, 243, 240, 0.04) 3px), /* 古典渐变色 - 宣纸/古籍质感 */
    linear-gradient( 135deg, rgba(250, 248, 244, 0.98) 0%, rgba(245, 242, 238, 0.98) 50%, rgba(240, 238, 234, 0.98) 100%), /* 底层暖色调 */
    radial-gradient( ellipse at top left, rgba(212, 175, 55, 0.06) 0%, transparent 50%), radial-gradient( ellipse at bottom right, rgba(196, 30, 58, 0.04) 0%, transparent 50%), /* 基础色 */
    #faf8f4;
    border: 2px solid rgba(212, 190, 165, 0.6);
    /* 古典边框 - 淡金色，稍微加深 */
    border-radius: 16px;
    /* 增大圆角，更现代 */
    padding: 1rem 0.5rem !important;
    /* 调整内边距，为菜单项留出空间 */
    min-width: auto;
    width: max-content;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18), 0 6px 20px rgba(196, 30, 58, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -1px 0 rgba(0, 0, 0, 0.08);
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    margin-top: 0;
    z-index: 1000;
    overflow: visible;
    visibility: hidden;
    /* 横向布局 */
    flex-direction: row;
    align-items: center;
    justify-content: center;
    /* 内容居中 */
    gap: 0.25rem !important;
    /* 增加菜单项之间的间距 */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dropdown-menu.show {
    display: flex !important;
    /* 横向布局 */
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
    /* 固定位置，不移动 */
}


/* 下拉菜单动画 - 简化，避免位置移动 */

@keyframes dropdownSlideDown {
    from {
        opacity: 0;
        visibility: hidden;
    }
    to {
        opacity: 1;
        visibility: visible;
    }
}


/* -------------------- 专家背景层（绝对定位，不影响布局） -------------------- */

.messages-container {
    position: relative;
}

.background-layer {
    position: fixed;
    /* 背景固定在视口，不随消息滚动 */
    top: 70px;
    /* 与导航高度对齐 */
    left: 0;
    transform: none;
    width: 100vw;
    /* 覆盖整个聊天界面宽度 */
    height: calc(100vh - 70px);
    z-index: -1;
    /* 永远在内容之后，不挡交互 */
    pointer-events: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

@media (max-width: 768px) {
    /* 移动端仍保持全宽与固定背景 */
    .background-layer {
        width: 100vw;
        height: calc(100vh - 70px);
        left: 0;
        transform: none;
        background-attachment: fixed !important;
    }
}


/* 不同专家的背景图映射（与模板里的欢迎页背景一致） */

.background-layer.expert.expert-cantonese_opera_critic {
    /* 原在线背景: https://jesbinlifelab-image.pages.dev/file/AgACAgUAAyEGAASPuC99AANLaRV_D2vb4sgBuemFqKCxv2_YgV8AAq0LaxvrZLBUgNKOXpJ1FD0BAAMCAAN3AAM2BA.png */
    background-image: url("/chat_pic/粤剧大师.png");
}

.background-layer.expert.expert-architecture_expert {
    /* 原在线背景: https://jesbinlifelab-image.pages.dev/file/AgACAgUAAyEGAASPuC99AANAaQ_j8PEaRHVFfb_UM-yUsHnzsXsAAgkLaxudrIBUQyiHbkqAkgMBAAMCAAN3AAM2BA.png */
    background-image: url("/chat_pic/建筑师傅.png");
}

.background-layer.expert.expert-culinary_expert {
    /* 原在线背景: https://jesbinlifelab-image.pages.dev/file/AgACAgUAAyEGAASPuC99AANBaQ_kDE4FCTZ_KVDatpBmHLtwKDwAAgoLaxudrIBUHgRz2NiqniwBAAMCAAN3AAM2BA.png */
    background-image: url("/chat_pic/美食师傅.png");
}

.background-layer.expert.expert-festival_expert {
    /* 原在线背景: https://jesbinlifelab-image.pages.dev/file/AgACAgUAAyEGAASPuC99AANCaQ_kPxgZHDieNjri3FqGlAZ1T9IAAgsLaxudrIBUUcZCECZgPqQBAAMCAAN3AAM2BA.png */
    background-image: url("/chat_pic/节庆师傅.png");
}

.background-layer.expert.expert-tea_culture_expert {
    /* 原在线背景: https://jesbinlifelab-image.pages.dev/file/AgACAgUAAyEGAASPuC99AANDaQ_kaveQOHZYdfXDmppM6SM81JkAAgwLaxudrIBUvodoIMyVaQ8BAAMCAAN3AAM2BA.png */
    background-image: url("/chat_pic/茶艺师傅.png");
}

.background-layer.expert.expert-craft_expert {
    /* 原在线背景: https://jesbinlifelab-image.pages.dev/file/AgACAgUAAyEGAASPuC99AANEaQ_k-V52KFMW65SFA32aAmpelGcAAg4LaxudrIBUx7bEt5KHJKEBAAMCAAN3AAM2BA.png */
    background-image: url("/chat_pic/工艺师傅.png");
}

.background-layer.expert.expert-literature_expert {
    /* 原在线背景: https://jesbinlifelab-image.pages.dev/file/AgACAgUAAyEGAASPuC99AANFaQ_lXWYcyKUQXIOuhq5uI5SrHPoAAg8LaxudrIBUOAyXpBX-3B8BAAMCAAN3AAM2BA.png */
    background-image: url("/chat_pic/文师傅.png");
}

.background-layer.expert.expert-tcm_expert {
    /* 原在线背景: https://jesbinlifelab-image.pages.dev/file/AgACAgUAAyEGAASPuC99AANGaQ_lhFtvhrmoWslK-N7H4IkmBb4AAhALaxudrIBUOjr8ETKdLDwBAAMCAAN3AAM2BA.png */
    background-image: url("/chat_pic/老中医师傅.png");
}


/* -------------------- 消息操作按钮与动作样式（恢复） -------------------- */


/* 消息操作按钮容器 */

.message-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.375rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    justify-content: flex-start;
    align-items: center;
    width: 100%;
}

.message.user .message-actions,
.message.user-message .message-actions {
    border-top-color: rgba(255, 255, 255, 0.2);
}


/* 单个操作按钮（复制/播放等） */

.action-btn {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: var(--radius-sm);
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0;
    flex-shrink: 0;
    box-sizing: border-box;
    position: relative;
}

.message.user .action-btn,
.message.user-message .action-btn {
    background: #ffffff !important;
    color: #c41e3a !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25) !important;
    opacity: 1 !important;
}

.action-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--primary-color);
}

.message.user .action-btn:hover,
.message.user-message .action-btn:hover {
    background: #ffffff !important;
    color: #c41e3a !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3) !important;
}

.action-btn.speaking {
    background: var(--primary-color);
    color: #ffffff;
}

.message.user .action-btn.speaking,
.message.user-message .action-btn.speaking {
    background: #ffffff !important;
    color: #c41e3a !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.action-btn i {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    line-height: 1;
    text-align: center;
    vertical-align: middle;
}


/* -------------------- 全局操作提示（Toast）样式 -------------------- */

.toast-message {
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%) translateY(-16px);
    padding: 14px 24px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    border: 1px solid transparent;
    font-size: 15px;
    line-height: 1.6;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
    pointer-events: none;
    max-width: 90vw;
    min-width: 320px;
    text-align: center;
}

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

.toast-message.info {
    background: #ecf5ff;
    color: #409eff;
    border-left: 4px solid #409eff;
}

.toast-message.success {
    background: #f0f9eb;
    color: #67c23a;
    border-left: 4px solid #67c23a;
}

.toast-message.warning {
    background: #fdf6ec;
    color: #e6a23c;
    border-left: 4px solid #e6a23c;
}

.toast-message.error {
    background: #fef0f0;
    color: #f56c6c;
    border-left: 4px solid #f56c6c;
}


/* -------------------- 思考模式开关与思考框（恢复） -------------------- */


/* 开关容器 */

.thinking-toggle-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-left: 0;
}


/* 将思考开关固定在输入框左侧居中位置 */

.input-wrapper .thinking-toggle-container {
    position: absolute;
    left: 0.05rem;
    /* 再往左挪，避免与输入文字重叠 */
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}


/* iOS 风格滑动开关 */

.thinking-toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.thinking-toggle-switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.thinking-toggle-slider {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    background-color: #e5e7eb;
    border-radius: 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.thinking-toggle-slider:before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    top: 3px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.1);
    transform: translateX(0);
}

.thinking-toggle-switch input:checked+.thinking-toggle-slider {
    background-color: var(--primary-color);
    box-shadow: inset 0 2px 4px rgba(196, 30, 58, 0.2);
}

.thinking-toggle-switch input:checked+.thinking-toggle-slider:before {
    transform: translateX(25px);
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.3), 0 1px 3px rgba(196, 30, 58, 0.2);
}

.thinking-toggle-switch:hover .thinking-toggle-slider {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.thinking-toggle-switch:hover input:checked+.thinking-toggle-slider {
    box-shadow: inset 0 2px 4px rgba(196, 30, 58, 0.3), 0 0 0 4px rgba(196, 30, 58, 0.1);
}

.thinking-toggle-switch:active .thinking-toggle-slider:before {
    transform: scale(0.95);
}

.thinking-toggle-switch:active input:checked+.thinking-toggle-slider:before {
    transform: translateX(25px) scale(0.95);
}

.thinking-toggle-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: color 0.3s ease;
}

.thinking-toggle-switch input:checked~.thinking-toggle-label {
    color: var(--primary-color);
    font-weight: 600;
}


/* 思考框样式 */

.thinking-container {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #cbd5e1;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    display: block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.thinking-container.expanded {
    max-height: none;
}

.thinking-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    user-select: none;
    background: #fafafa;
    color: #6b7280;
    transition: background 0.2s ease;
}

.thinking-header:hover {
    background: #f5f5f5;
}

.thinking-icon {
    font-size: 1.125rem;
    margin-right: 0.5rem;
}

.thinking-text {
    flex: 1;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.thinking-time {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-right: 0.5rem;
    white-space: nowrap;
}

.thinking-toggle {
    font-size: 0.75rem;
    color: #9ca3af;
    transition: transform 0.3s ease;
}

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

.thinking-content {
    display: none;
    padding: 1rem 1.25rem;
    background: #ffffff;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
    border-left: 2px solid #e5e7eb;
}

.thinking-container.expanded .thinking-content {
    display: block;
}

.thinking-container:not(.expanded) .thinking-content {
    display: none;
}


/* 下拉菜单项 - 统一所有页面的样式，确保字体加粗和大小一致，增强区分度 */

.dropdown-item {
    display: flex !important;
    align-items: center !important;
    /* 垂直居中 */
    justify-content: center !important;
    /* 水平居中 */
    gap: 0.75rem !important;
    padding: 1rem 1.5rem !important;
    /* 调整内边距 */
    margin: 0.25rem 0.5rem !important;
    /* 增加外边距，增强区分 */
    color: #2c3e50 !important;
    /* 深色文字，符合古典风格 */
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 1.25rem !important;
    /* 统一字体大小，所有页面一致 */
    font-weight: 800 !important;
    /* 加粗字体，更醒目，统一所有页面 */
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif !important;
    /* 统一字体 */
    position: relative !important;
    overflow: visible !important;
    white-space: nowrap !important;
    border-radius: 10px !important;
    /* 增大圆角 */
    text-align: center !important;
    /* 文字居中 */
    letter-spacing: 0.5px !important;
    /* 增加字间距，提升可读性 */
    /* 增强视觉区分 - 每个菜单项独立的背景和边框 */
    background: linear-gradient( 135deg, rgba(255, 255, 255, 0.9) 0%, rgba(250, 248, 244, 0.95) 100%) !important;
    border: 2px solid rgba(212, 190, 165, 0.4) !important;
    /* 淡金色边框 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}


/* 下拉菜单项之间的分隔符 - 改为更明显的视觉分隔 */

.dropdown-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 60%;
    background: linear-gradient( 180deg, transparent 0%, rgba(212, 190, 165, 0.6) 20%, rgba(212, 190, 165, 0.6) 80%, transparent 100%);
    border-radius: 1px;
}


/* 悬停时的背景动画 - 横向布局样式，增强视觉反馈 */

.dropdown-item:hover {
    background: linear-gradient( 135deg, rgba(196, 30, 58, 0.12) 0%, rgba(196, 30, 58, 0.18) 100%) !important;
    /* 渐变红色背景，符合非遗主题 */
    color: #c41e3a !important;
    /* 红色文字 */
    border-color: rgba(196, 30, 58, 0.6) !important;
    /* 悬停时边框变红色 */
    transform: translateY(-3px) scale(1.02) !important;
    /* 轻微上移和放大，增强交互感 */
    box-shadow: 0 6px 16px rgba(196, 30, 58, 0.25), 0 2px 8px rgba(196, 30, 58, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    /* 添加多层阴影，增强层次感 */
}

.dropdown-item i {
    display: none;
    /* 隐藏图标，纯文字显示 */
}

.dropdown-item span {
    flex: 0 0 auto !important;
    /* 不自动伸缩，保持内容宽度 */
    white-space: nowrap !important;
    text-align: center !important;
    /* 文字居中 */
    display: inline-block !important;
    font-size: 1.25rem !important;
    /* 统一字体大小，确保与父元素一致 */
    font-weight: 800 !important;
    /* 加粗字体，确保与父元素一致 */
    line-height: 1.5 !important;
    /* 增加行高，提升可读性 */
}


/* VR逛广府下拉菜单项 - 确保不换行，统一字体大小和加粗 */

.dropdown-item[href="/vr-guangfu"],
.dropdown-item[href*="vr-guangfu"] {
    white-space: nowrap !important;
    font-size: 1.25rem !important;
    /* 统一字体大小 */
    font-weight: 800 !important;
    /* 统一加粗字体 */
}

.dropdown-item[href="/vr-guangfu"] span,
.dropdown-item[href*="vr-guangfu"] span {
    white-space: nowrap !important;
    display: inline-block !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: 1.25rem !important;
    /* 统一字体大小 */
    font-weight: 800 !important;
    /* 统一加粗字体 */
}

.nav-dropdown .nav-link,
.nav-dropdown .btn-modern {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}


/* 确保下拉菜单按钮的字体与导航链接完全一致 */

.nav-dropdown .btn-modern,
.nav-dropdown .nav-link-modern {
    font-size: 1.5rem !important;
    /* 与导航链接字体大小一致 */
    font-weight: 800 !important;
    /* 与导航链接字重一致 */
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif !important;
    /* 与VR页面字体一致 */
    letter-spacing: 1px !important;
    /* 与导航链接字间距一致 */
    -webkit-font-smoothing: antialiased !important;
    /* 字体平滑渲染 */
    -moz-osx-font-smoothing: grayscale !important;
}

/* 确保 chat 页面的导航栏图标与文字间距与其他页面一致 */
.modern-navbar .nav-menu .nav-link-modern {
    gap: 0.5rem !important; /* 强制统一间距 */
}

body:not(.index-page) .modern-navbar .nav-menu .nav-link-modern {
    gap: 0.5rem !important; /* 强制统一间距 */
}


/* 下拉箭头动画 */

.nav-dropdown .fa-chevron-down {
    transition: transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    line-height: 1;
}

.nav-dropdown:hover .fa-chevron-down,
.dropdown-menu.show~.nav-link .fa-chevron-down,
.dropdown-menu.show~.btn-modern .fa-chevron-down {
    transform: rotate(180deg);
}


/* 下拉菜单顶部小三角 */

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

/* 移除 chat.css 中的 .nav-menu 特殊设置，使用 main.css 的通用样式 */

.nav-link {
    color: #1f2937 !important;
    text-decoration: none !important;
    font-weight: 800 !important;
    /* 更粗的字体，接近图片效果 */
    padding: 0.75rem 1.25rem !important;
    font-size: 1.5rem !important;
    /* 24px - 再大两号 */
    /* 使用Noto Serif SC字体 - 与VR页面一致 */
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif !important;
    transition: all 0.3s ease !important;
    position: relative;
    display: inline-block;
    letter-spacing: 1px;
    /* 增加字间距，更接近图片效果 */
    -webkit-font-smoothing: antialiased;
    /* 字体平滑渲染 */
    -moz-osx-font-smoothing: grayscale;
}


/* 悬停效果 */

.nav-link:hover {
    color: #c41e3a !important;
    font-weight: 700 !important;
    /* 加粗 */
    background: rgba(196, 30, 58, 0.08) !important;
    transform: translateY(-1px);
}


/* 当前页面激活状态 - 红色下划线 */

.nav-link.active {
    color: #c41e3a !important;
    font-weight: 700 !important;
    /* 加粗 */
    background: rgba(196, 30, 58, 0.15) !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #c41e3a;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* 移除 chat.css 中的 .nav-actions 特殊设置，使用 main.css 的通用样式 */


/* 导航栏日期信息样式 */

.nav-date-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #1f2937;
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif !important;
    white-space: nowrap;
    font-weight: 500;
}

.nav-date-info i {
    font-size: 0.9rem;
    color: #6b7280;
    margin-right: 0.2rem;
    flex-shrink: 0;
}

.nav-date-info span {
    color: #1f2937;
    display: inline-block;
    min-width: fit-content;
}

.date-separator {
    color: #d1d5db;
    margin: 0 0.5rem;
    font-weight: 300;
}

/* 导航栏用户信息样式 */
.nav-user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
    padding-left: 0.5rem;
    height: 100%;
    max-height: 100%;
}

.user-separator {
    color: #d1d5db;
    margin: 0 0.5rem;
    font-weight: 300;
}

.user-avatar-container {
    position: relative;
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    max-width: 30px;
    max-height: 30px;
    border-radius: 50%;
    overflow: visible;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid rgba(196, 30, 58, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem !important;
    margin-right: 0.5rem !important;
    box-sizing: border-box;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 1000;
}

/* 头像悬停放大效果 */
.user-avatar-container:hover {
    transform: scale(4);
    z-index: 10000;
}

.user-avatar-container:hover .user-avatar,
.user-avatar-container:hover #user-avatar-img {
    border-radius: 50% !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 100% !important;
    height: 100% !important;
    max-width: 120px !important;
    max-height: 120px !important;
    object-fit: cover !important;
}

.user-avatar,
#user-avatar-img {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 30px !important;
    max-height: 30px !important;
    object-fit: cover !important;
    display: block !important;
    box-sizing: border-box !important;
    border-radius: 50% !important;
    transition: transform 0.3s ease;
}

/* 确保导航栏中的头像被严格限制 */
.nav-user-info .user-avatar-container .user-avatar,
.nav-user-info .user-avatar-container #user-avatar-img,
.nav-user-info #user-avatar-img {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 30px !important;
    max-height: 30px !important;
    object-fit: cover !important;
    display: block !important;
    box-sizing: border-box !important;
    border-radius: 50% !important;
}

.user-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #64748b;
    font-size: 0.875rem;
}

.user-nickname,
#user-nickname-display {
    font-size: 0.85rem !important;
    color: #c41e3a !important;
    font-weight: 700 !important;
    white-space: nowrap;
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif !important;
    margin-left: 0.5rem !important;
    line-height: 1.2;
}

/* 其他页面导航栏用户信息样式 */
body:not(.index-page) .modern-navbar .nav-user-info {
    display: flex;
}

body:not(.index-page) .modern-navbar .nav-user-info .user-nickname {
    color: #c41e3a !important;
    font-weight: 700 !important;
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif !important;
}

body:not(.index-page) .modern-navbar .nav-user-info .user-separator {
    color: #d1d5db !important;
}

/* 首页导航栏用户信息样式 */
body.index-page .modern-navbar .nav-user-info .user-nickname,
.index-page .modern-navbar .nav-user-info .user-nickname {
    color: #c41e3a !important;
    font-weight: 700 !important;
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif !important;
}

body.index-page .modern-navbar .nav-user-info .user-separator,
.index-page .modern-navbar .nav-user-info .user-separator {
    color: rgba(255, 255, 255, 0.5);
}

/* 首页滚动后用户信息样式 */
body.index-page .modern-navbar.navbar-scrolled .nav-user-info .user-nickname,
.index-page .modern-navbar.navbar-scrolled .nav-user-info .user-nickname,
.modern-navbar.navbar-scrolled .nav-user-info .user-nickname {
    color: #c41e3a !important;
    font-weight: 700 !important;
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif !important;
}

body.index-page .modern-navbar.navbar-scrolled .nav-user-info .user-separator,
.index-page .modern-navbar.navbar-scrolled .nav-user-info .user-separator,
.modern-navbar.navbar-scrolled .nav-user-info .user-separator {
    color: #d1d5db !important;
}

/* 首页导航栏日期信息样式 */

body.index-page .modern-navbar .nav-date-info,
.index-page .modern-navbar .nav-date-info {
    color: rgba(255, 255, 255, 0.95);
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif !important;
}

body.index-page .modern-navbar .nav-date-info i,
.index-page .modern-navbar .nav-date-info i {
    color: rgba(255, 255, 255, 0.8);
}

body.index-page .modern-navbar .nav-date-info span,
.index-page .modern-navbar .nav-date-info span {
    color: rgba(255, 255, 255, 0.95);
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif !important;
}

body.index-page .modern-navbar .nav-date-info .date-separator,
.index-page .modern-navbar .nav-date-info .date-separator {
    color: rgba(255, 255, 255, 0.5);
}


/* 导航栏滚动后样式 - 离开第一个页面时恢复普通样式 */

body.index-page .modern-navbar.navbar-scrolled,
.index-page .modern-navbar.navbar-scrolled,
.modern-navbar.navbar-scrolled {
    background: white !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}


/* 首页滚动后导航链接 - 黑色文字 */


/* 确保navbar-scrolled样式能覆盖index-page的样式 */

body.index-page .modern-navbar.navbar-scrolled .nav-link,
.index-page .modern-navbar.navbar-scrolled .nav-link,
.modern-navbar.navbar-scrolled .nav-link {
    color: #000000 !important;
    /* 纯黑色 */
    text-shadow: none !important;
}

body.index-page .modern-navbar.navbar-scrolled .nav-link:hover,
.index-page .modern-navbar.navbar-scrolled .nav-link:hover,
.modern-navbar.navbar-scrolled .nav-link:hover {
    color: #c41e3a !important;
    /* 悬停时红色 */
    text-shadow: none !important;
}

body.index-page .modern-navbar.navbar-scrolled .nav-link.active,
.index-page .modern-navbar.navbar-scrolled .nav-link.active,
.modern-navbar.navbar-scrolled .nav-link.active {
    color: #c41e3a !important;
    /* 激活状态红色 */
    text-shadow: none !important;
}

body.index-page .modern-navbar.navbar-scrolled .nav-link.active::after,
.index-page .modern-navbar.navbar-scrolled .nav-link.active::after,
.modern-navbar.navbar-scrolled .nav-link.active::after {
    background: #c41e3a !important;
}


/* 确保navbar-scrolled样式能覆盖index-page的样式 */

body.index-page .modern-navbar.navbar-scrolled .nav-brand,
.index-page .modern-navbar.navbar-scrolled .nav-brand,
.modern-navbar.navbar-scrolled .nav-brand,
body.index-page .modern-navbar.navbar-scrolled .nav-brand i,
.index-page .modern-navbar.navbar-scrolled .nav-brand i,
.modern-navbar.navbar-scrolled .nav-brand i {
    color: #c41e3a !important;
    text-shadow: none !important;
}

body.index-page .modern-navbar.navbar-scrolled .btn-modern,
.index-page .modern-navbar.navbar-scrolled .btn-modern,
.modern-navbar.navbar-scrolled .btn-modern {
    color: #1f2937 !important;
    text-shadow: none !important;
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif !important;
    /* 统一字体 */
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    letter-spacing: 1px !important;
}

body.index-page .modern-navbar.navbar-scrolled .btn-modern:hover,
.index-page .modern-navbar.navbar-scrolled .btn-modern:hover,
.modern-navbar.navbar-scrolled .btn-modern:hover {
    color: #c41e3a !important;
    background: rgba(196, 30, 58, 0.08) !important;
}

body.index-page .modern-navbar.navbar-scrolled .btn-modern.active,
.index-page .modern-navbar.navbar-scrolled .btn-modern.active,
.modern-navbar.navbar-scrolled .btn-modern.active {
    color: #c41e3a !important;
    background: rgba(196, 30, 58, 0.15) !important;
}

body.index-page .modern-navbar.navbar-scrolled .btn-modern.active::after,
.index-page .modern-navbar.navbar-scrolled .btn-modern.active::after,
.modern-navbar.navbar-scrolled .btn-modern.active::after {
    background: #c41e3a !important;
}


/* 首页滚动后日期信息 - 黑色文字 */

body.index-page .modern-navbar.navbar-scrolled .nav-date-info,
.index-page .modern-navbar.navbar-scrolled .nav-date-info,
.modern-navbar.navbar-scrolled .nav-date-info,
body.index-page .modern-navbar.navbar-scrolled .nav-date-info span,
.index-page .modern-navbar.navbar-scrolled .nav-date-info span,
.modern-navbar.navbar-scrolled .nav-date-info span {
    color: #000000 !important;
    /* 纯黑色 */
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif !important;
    /* 与VR页面字体一致 */
}

body.index-page .modern-navbar.navbar-scrolled .nav-date-info i,
.index-page .modern-navbar.navbar-scrolled .nav-date-info i,
.modern-navbar.navbar-scrolled .nav-date-info i {
    color: #6b7280 !important;
}

body.index-page .modern-navbar.navbar-scrolled .nav-date-info .date-separator,
.index-page .modern-navbar.navbar-scrolled .nav-date-info .date-separator,
.modern-navbar.navbar-scrolled .nav-date-info .date-separator {
    color: #d1d5db !important;
}


/* 功能中心按钮样式 - 与其他导航链接一致 */

.btn-modern {
    background: none !important;
    border: none !important;
    padding: 0.75rem 1.25rem !important;
    font-size: 1.5rem !important;
    /* 24px - 再大两号，与nav-link统一 */
    font-weight: 800 !important;
    /* 与导航链接字重一致 */
    color: #1f2937 !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif !important;
    /* 统一字体 - 与VR页面字体一致 */
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), font-weight 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer;
    display: inline-block;
    letter-spacing: 1px !important;
    /* 与导航链接字间距一致 */
    position: relative;
}

.btn-modern:hover {
    color: #c41e3a !important;
    font-weight: 700 !important;
    /* 加粗 */
    background: rgba(196, 30, 58, 0.08) !important;
    transform: translateY(-1px);
}

.btn-modern.active {
    color: #c41e3a !important;
    font-weight: 700 !important;
    /* 加粗 */
    background: rgba(196, 30, 58, 0.15) !important;
}

.btn-modern.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 16px;
    right: 16px;
    height: 2px;
    background: #c41e3a;
    animation: slideIn 0.3s ease;
}


/* 主页面容器 */

.modern-main {
    padding-top: 0;
    margin-top: 0;
    width: 100vw;
    position: relative;
    overflow-x: hidden;
    margin-left: 0;
    margin-right: 0;
    /* 整页滚动效果 - 使用自定义JavaScript控制，更慢更平滑 */
    scroll-snap-type: none;
    /* 禁用CSS scroll-snap，使用JavaScript控制 */
    scroll-behavior: auto;
    /* 禁用CSS smooth，使用自定义动画 */
    overflow-y: scroll;
    height: 100vh;
    -webkit-overflow-scrolling: touch;
    /* iOS平滑滚动 */
    /* 优化滚动性能 */
    scroll-padding: 0;
    transform: translateZ(0);
    will-change: scroll-position;
    -webkit-transform: translateZ(0);
}


/* 轮播图后的内容区域 */

.modern-main>section:not(.hero-carousel) {
    padding-top: 0;
    margin-top: 0;
    position: relative;
}


/* 轮播图相关的样式已移到.hero-carousel-background下 */


/* Hero Section - 轮播图作为背景 */

.modern-hero {
    position: relative;
    min-height: 100vh;
    height: 100vh;
    /* 全屏高度 */
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #000;
    /* 默认黑色背景 */
    width: 100vw;
    margin: 0;
    padding: 0;
    /* scroll-snap配合CSS平滑滚动 */
    scroll-snap-align: start;
    scroll-snap-stop: always;
    scroll-margin: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    /* 优化渲染性能 */
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}


/* 轮播图背景层 - 在导航栏下方 */

.hero-carousel-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100%;
    z-index: 0;
    /* 在导航栏下方 */
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.hero-carousel-background .carousel-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw !important;
    height: 100% !important;
    z-index: 0;
    /* 在导航栏下方 */
    margin: 0;
    padding: 0;
    min-width: 100vw;
    min-height: 100%;
}

.hero-carousel-background .carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw !important;
    height: 100% !important;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    /* 在导航栏下方 */
    margin: 0;
    padding: 0;
    visibility: visible !important;
    display: block !important;
    min-width: 100vw;
    min-height: 100%;
}

.hero-carousel-background .carousel-slide.active {
    opacity: 1;
    z-index: 1;
    /* 活动slide稍高，但仍在导航栏下方 */
    width: 100vw !important;
    height: 100% !important;
    min-width: 100vw;
    min-height: 100%;
}


/* 遮罩层 - 让内容更清晰 */

.hero-carousel-background .carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
    z-index: 2;
    /* 在导航栏下方 */
}

.hero-carousel-background .carousel-indicators {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 34px;
    z-index: 10;
    align-items: center;
    justify-content: center;
    width: auto;
    margin: 0 auto;
}


/* 非遗风格菱形图标指示器 */

.hero-carousel-background .carousel-indicator {
    width: 40px;
    height: 40px;
    cursor: pointer;
    position: relative;
    padding: 0;
    margin: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: /* 左上L */
    linear-gradient(to right, rgba(255, 255, 255, 0.9) 2px, transparent 2px) 0 0 / 14px 2px no-repeat, linear-gradient(to bottom, rgba(255, 255, 255, 0.9) 2px, transparent 2px) 0 0 / 2px 14px no-repeat, /* 右上L */
    linear-gradient(to left, rgba(255, 255, 255, 0.9) 2px, transparent 2px) 100% 0 / 14px 2px no-repeat, linear-gradient(to bottom, rgba(255, 255, 255, 0.9) 2px, transparent 2px) 100% 0 / 2px 14px no-repeat, /* 左下L */
    linear-gradient(to right, rgba(255, 255, 255, 0.9) 2px, transparent 2px) 0 100% / 14px 2px no-repeat, linear-gradient(to top, rgba(255, 255, 255, 0.9) 2px, transparent 2px) 0 100% / 2px 14px no-repeat, /* 右下L */
    linear-gradient(to left, rgba(255, 255, 255, 0.9) 2px, transparent 2px) 100% 100% / 14px 2px no-repeat, linear-gradient(to top, rgba(255, 255, 255, 0.9) 2px, transparent 2px) 100% 100% / 2px 14px no-repeat, /* 中央网格点 */
    radial-gradient(circle, rgba(255, 255, 255, 0.7) 1px, transparent 1px);
    background-size: 14px 2px, 2px 14px, 14px 2px, 2px 14px, 14px 2px, 2px 14px, 14px 2px, 2px 14px, 5px 5px;
    background-position: 3px 3px, 3px 3px, calc(100% - 3px) 3px, calc(100% - 3px) 3px, 3px calc(100% - 3px), 3px calc(100% - 3px), calc(100% - 3px) calc(100% - 3px), calc(100% - 3px) calc(100% - 3px), center;
}


/* 创建菱形外框 */

.hero-carousel-background .carousel-indicator::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    transform: rotate(45deg);
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: transparent;
    transition: all 0.3s ease;
}


/* 激活状态 - 红色 */

.hero-carousel-background .carousel-indicator.active {
    background: /* 左上L */
    linear-gradient(to right, #c41e3a 2px, transparent 2px) 0 0 / 14px 2px no-repeat, linear-gradient(to bottom, #c41e3a 2px, transparent 2px) 0 0 / 2px 14px no-repeat, /* 右上L */
    linear-gradient(to left, #c41e3a 2px, transparent 2px) 100% 0 / 14px 2px no-repeat, linear-gradient(to bottom, #c41e3a 2px, transparent 2px) 100% 0 / 2px 14px no-repeat, /* 左下L */
    linear-gradient(to right, #c41e3a 2px, transparent 2px) 0 100% / 14px 2px no-repeat, linear-gradient(to top, #c41e3a 2px, transparent 2px) 0 100% / 2px 14px no-repeat, /* 右下L */
    linear-gradient(to left, #c41e3a 2px, transparent 2px) 100% 100% / 14px 2px no-repeat, linear-gradient(to top, #c41e3a 2px, transparent 2px) 100% 100% / 2px 14px no-repeat, /* 中央网格点 */
    radial-gradient(circle, #c41e3a 1px, transparent 1px);
    background-size: 14px 2px, 2px 14px, 14px 2px, 2px 14px, 14px 2px, 2px 14px, 14px 2px, 2px 14px, 5px 5px;
    background-position: 3px 3px, 3px 3px, calc(100% - 3px) 3px, calc(100% - 3px) 3px, 3px calc(100% - 3px), 3px calc(100% - 3px), calc(100% - 3px) calc(100% - 3px), calc(100% - 3px) calc(100% - 3px), center;
    box-shadow: 0 0 12px rgba(196, 30, 58, 0.6);
}

.hero-carousel-background .carousel-indicator.active::before {
    border-color: #c41e3a;
    box-shadow: 0 0 10px rgba(196, 30, 58, 0.5);
}


/* 悬停效果 */

.hero-carousel-background .carousel-indicator:hover {
    transform: scale(1.15);
}

.hero-carousel-background .carousel-indicator.active:hover {
    transform: scale(1.15);
    box-shadow: 0 0 15px rgba(196, 30, 58, 0.8);
}

.hero-carousel-background .carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    font-size: 20px;
    margin: 0;
    padding: 0;
}

.hero-carousel-background .carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.hero-carousel-background .carousel-arrow.prev {
    left: 30px !important;
    right: auto !important;
}

.hero-carousel-background .carousel-arrow.next {
    right: 30px !important;
    left: auto !important;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    /* 放在轮播图下方 */
    pointer-events: none;
    opacity: 0.5;
    /* 降低不透明度，让轮播图更明显 */
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.1) 0%, rgba(212, 175, 55, 0.1) 50%, rgba(30, 58, 138, 0.1) 100%);
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4af37' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

.hero-content {
    position: relative;
    z-index: 5;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
    align-items: center;
}

.hero-text {
    max-width: 600px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--spacing-lg);
}

.title-main {
    display: block;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.title-highlight {
    display: block;
    color: #ffffff;
    font-size: 0.8em;
    margin-top: var(--spacing-sm);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

.hero-description {
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: var(--spacing-2xl);
    line-height: 1.7;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 0, 0, 0.4);
}

.hero-actions {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.btn-hero {
    padding: var(--spacing-md) var(--spacing-2xl);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-hero.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    box-shadow: var(--shadow-cultural);
}

.btn-hero.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(196, 30, 58, 0.3);
}

.btn-hero.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    border: 2px solid var(--accent-color);
    box-shadow: var(--shadow-md);
}

.btn-hero.btn-secondary:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-3px);
}


/* Hero Visual - 文化元素装饰 */

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
    border: 2px solid var(--accent-color);
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

.card-dots {
    display: flex;
    gap: var(--spacing-xs);
}

.card-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-color);
    opacity: 0.6;
}

.card-dots span:first-child {
    background: var(--primary-color);
    opacity: 1;
}

.card-title {
    font-weight: 600;
    color: var(--text-primary);
}

.card-content {
    position: relative;
    z-index: 1;
}

.chat-preview {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    min-width: 300px;
}

.message {
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    /* max-width: 80%; */
    animation: fadeInUp 0.6s ease-out;
}

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

.user-message {
    background: var(--primary-color);
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

.ai-message {
    background: var(--bg-secondary);
    color: var(--text-primary);
    align-self: flex-start;
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.shhd .ai-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    flex-shrink: 0;
}


/* 平滑滚动行为 - 更流畅的滚动体验 */

html {
    scroll-behavior: smooth;
}


/* 其他页面：允许正常滚动（默认设置，优先级更高） */

body {
    scroll-behavior: smooth;
    overflow: auto !important;
    /* 允许正常滚动，其他页面优先 */
    overflow-x: hidden;
    /* 禁用横向滚动 */
    min-height: 100vh;
    /* 最小高度为视口高度 */
    height: auto;
    /* 允许高度自适应 */
}


/* 首页特殊设置：禁用body滚动，使用modern-main滚动 */

body.index-page {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    /* 防止过度滚动 */
    overflow: hidden !important;
    /* 禁用body滚动，使用modern-main滚动（仅首页） */
    height: 100% !important;
    /* 平滑滚动动画 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* 首页时html也禁用滚动（通过JavaScript动态添加类） */

html.index-page-scroll-disabled {
    overflow: hidden;
    height: 100%;
}


/* 确保所有元素都有硬件加速，提升滚动性能 */

.modern-section {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    scroll-margin: 0;
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* 优化渲染性能 */
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}


/* 功能特色section - 整页滚动 */

.features-section {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: flex-start;
    /* 顶部对齐 */
    justify-content: flex-start;
    /* 左侧对齐 */
    padding: 0 !important;
    /* 移除所有padding */
    padding-top: 70px !important;
    /* 仅上方留白，与导航栏高度一致 */
    padding-bottom: 0 !important;
    /* 下方不留白 */
    margin: 0 !important;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    scroll-margin: 0;
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* 优化渲染性能 */
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    overflow: hidden;
    /* 隐藏溢出内容 */
}

.cta-section {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    /* 改为纵向布局，容纳CTA内容和footer */
    justify-content: space-between;
    /* 内容在顶部，footer在底部 */
    align-items: stretch;
    /* footer拉伸到全宽 */
    scroll-snap-align: start;
    scroll-snap-stop: always;
    scroll-margin: 0;
    position: relative;
    padding: 0;
    /* 移除padding，让内容正常显示 */
    padding-top: 80px;
    /* 顶部padding */
    padding-bottom: 0;
    /* 底部不需要padding，由footer处理 */
    opacity: 1 !important;
    /* 确保可见 */
    transform: translateZ(0) !important;
    /* 使用硬件加速 */
    overflow-y: auto;
    /* 允许内容滚动，如果内容超过视口 */
    /* 优化渲染性能 */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.cta-container {
    flex: 1;
    /* 占据可用空间 */
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    /* 如果内容过多，允许滚动 */
}


/* 原有的features-section和cta-section样式保持 */

.features-section-old,
.cta-section-old,
.section-container,
.expert-card {
    will-change: transform, opacity;
    transform: translateZ(0);
    /* 启用硬件加速 */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}


/* 专家团队 - 文化主题卡片（广府非遗特色样式） */

.modern-section#experts {
    padding: var(--spacing-3xl) 0;
    position: relative;
    margin-top: 0;
    z-index: 1;
    min-height: 100vh;
    /* 全屏高度 */
    height: 100vh;
    display: flex;
    align-items: flex-start;
    /* 改为从顶部对齐 */
    justify-content: center;
    /* 非遗文化韵味的古典纸张质感背景 */
    background: /* 纸张纹理 */
    repeating-linear-gradient( 0deg, rgba(245, 243, 240, 0.12) 0px, transparent 1px, transparent 2px, rgba(245, 243, 240, 0.06) 3px), repeating-linear-gradient( 90deg, rgba(238, 235, 230, 0.1) 0px, transparent 1px, transparent 3px, rgba(238, 235, 230, 0.05) 4px), /* 古典渐变色 - 宣纸/古籍质感 */
    linear-gradient( 135deg, #faf8f4 0%, #f5f2eb 25%, #f0ede6 50%, #ebe8e1 75%, #e8e5de 100%), /* 底层暖色调 */
    radial-gradient( ellipse at top left, rgba(212, 175, 55, 0.08) 0%, transparent 50%), radial-gradient( ellipse at bottom right, rgba(196, 30, 58, 0.06) 0%, transparent 50%), /* 传统纹理 */
    repeating-linear-gradient( 0deg, transparent, transparent 100px, rgba(196, 30, 58, 0.015) 100px, rgba(196, 30, 58, 0.015) 102px), /* 基础色 */
    #faf8f4 !important;
    background-blend-mode: multiply, screen, normal, normal, normal, normal, normal;
    overflow: visible;
}


/* 专家section顶部装饰线 */

.modern-section#experts::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 6px;
    background: linear-gradient( 90deg, transparent, rgba(212, 175, 55, 0.5) 20%, var(--primary-color) 50%, rgba(212, 175, 55, 0.5) 80%, transparent);
    border-radius: 0 0 3px 3px;
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.25);
    z-index: 10;
}


/* 专家section底部装饰线 */

.modern-section#experts::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: linear-gradient( 90deg, transparent, rgba(196, 30, 58, 0.3) 50%, transparent);
    z-index: 10;
}


/* 普通modern-section保持原有样式 */

.modern-section:not(#experts) {
    padding: var(--spacing-3xl) 0;
    position: relative;
    background: var(--bg-primary);
    margin-top: 0;
    z-index: 1;
    min-height: 100vh;
    /* 全屏高度 */
    height: 100vh;
    display: flex;
    align-items: flex-start;
    /* 改为从顶部对齐 */
    justify-content: center;
    /* 动态浅黄色背景 */
    background: linear-gradient(135deg, rgba(255, 248, 220, 0.7) 0%, rgba(255, 250, 240, 0.85) 30%, rgba(255, 248, 220, 0.75) 60%, rgba(255, 250, 240, 0.8) 100%) !important;
    background-size: 200% 200% !important;
    animation: gentleWave 10s ease-in-out infinite !important;
}


/* 动态背景动画 */

@keyframes gentleWave {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.modern-section {
    padding-top: 280px;
    /* 增加顶部padding，避免被导航栏挡住 */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
    /* 整页滚动捕捉点 - 平滑过渡 */
    scroll-snap-align: start;
    scroll-snap-stop: always;
    scroll-margin: 0;
}


/* 滚动进入视口时的动画 */

.modern-section.visible {
    opacity: 1;
    transform: translateY(0);
}


/* 确保专家section在页面初始加载时可见 - 临时禁用动画以显示内容 */

.modern-section#experts {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: none !important;
}


/* 为不同section添加延迟，创造层次感 */

.modern-section:nth-child(1).visible {
    transition-delay: 0.1s;
}

.modern-section:nth-child(2).visible {
    transition-delay: 0.2s;
}

.modern-section:nth-child(3).visible {
    transition-delay: 0.3s;
}

.modern-section:nth-child(4).visible {
    transition-delay: 0.4s;
}

.section-container {
    max-width: 1800px;
    /* 放宽最大宽度，减少两侧空白 */
    width: calc(100% - 40px);
    /* 两侧留白从80px降到40px */
    margin: 0 auto;
    padding: var(--spacing-2xl) var(--spacing-md);
    /* 水平内边距减小 */
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1), transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
    /* 在flex布局中自适应 */
    flex: 0 0 auto;
}

.modern-section.visible .section-container {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.15s;
}


/* 确保features-section中的容器始终可见 */

.features-section .section-container {
    opacity: 1 !important;
    transform: translateY(0) !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 70px 0 0 0 !important;
    /* 上方留白，避免被导航栏遮挡 */
    margin: 0 !important;
    height: calc(100vh - 0px) !important;
    /* 使用视口高度 */
    min-height: 100vh !important;
    /* 确保最小高度 */
    max-height: none !important;
    /* 移除最大高度限制 */
    display: flex !important;
    align-items: stretch !important;
    /* 拉伸对齐，确保两个子元素高度一致 */
    justify-content: flex-start !important;
    /* 左侧对齐，包含介绍卡片 */
    flex-direction: row !important;
    /* 横向排列，左侧介绍卡片，右侧卡片容器 */
    box-sizing: border-box !important;
    /* 确保padding包含在高度内 */
    gap: 0 !important;
    overflow: visible !important;
    /* 确保内容可见 */
}


/* features-section标题区域样式 */

.features-section .section-header {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    padding: var(--spacing-lg) var(--spacing-xl);
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1), transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
    position: relative;
}


/* 专家section的标题装饰 */

.modern-section#experts .section-header::before {
    content: "❋";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 40px;
    color: rgba(196, 30, 58, 0.15);
    font-family: serif;
    line-height: 1;
}

.modern-section#experts .section-header::after {
    content: "";
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-color) 20%, #d4af37 50%, var(--primary-color) 80%, transparent);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.2);
}


/* 第二个页面的section-header增加上边距 */

.modern-section .section-header {
    margin-top: 50px !important;
}

.modern-section.visible .section-header {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.25s;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    letter-spacing: 2px;
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif;
}


/* 专家section标题特殊样式 */

.modern-section#experts .section-title {
    text-shadow: 0 4px 8px rgba(196, 30, 58, 0.15);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.experts-grid {
    display: grid;
    /* 桌面端每行四个卡片 */
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    max-width: 100%;
    /* 不限制网格最大宽度，随容器伸展 */
    margin: 0 auto;
}

.expert-card {
    /* 历史文化纸张质感背景 */
    background: /* 纸张纹理 */
    repeating-linear-gradient( 0deg, rgba(245, 243, 240, 0.1) 0px, transparent 1px, transparent 2px, rgba(245, 243, 240, 0.05) 3px), repeating-linear-gradient( 90deg, rgba(238, 235, 230, 0.08) 0px, transparent 1px, transparent 3px, rgba(238, 235, 230, 0.04) 4px), /* 古典渐变色 - 宣纸/古籍质感 */
    linear-gradient( 135deg, #faf8f4 0%, #f5f2eb 25%, #f0ede6 50%, #ebe8e1 75%, #e8e5de 100%), /* 底层暖色调 */
    radial-gradient( ellipse at top left, rgba(212, 175, 55, 0.05) 0%, transparent 50%), radial-gradient( ellipse at bottom right, rgba(196, 30, 58, 0.03) 0%, transparent 50%), /* 基础色 */
    #faf8f4;
    border-radius: 16px;
    padding: var(--spacing-xl);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(196, 30, 58, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -1px 0 rgba(0, 0, 0, 0.03);
    /* 古典边框 - 仿古书页边缘 */
    border: 3px solid rgba(212, 190, 165, 0.4);
    border-top: 3px solid rgba(212, 175, 55, 0.3);
    border-bottom: 3px solid rgba(180, 160, 140, 0.4);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    /* 默认显示，除非在modern-section中需要动画 */
    opacity: 1;
    transform: translateY(0);
    will-change: opacity, transform;
    background-blend-mode: multiply, screen, normal, normal, normal, normal;
    /* 保证左右分区有足够高度 */
    min-height: 320px;
}


/* 只在modern-section内的expert-card需要动画效果 */

.modern-section .expert-card {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-section.visible .expert-card {
    opacity: 1;
    transform: translateY(0);
}


/* 确保页面加载时可见的section立即显示 */

.modern-section:first-of-type.visible .expert-card {
    opacity: 1;
    transform: translateY(0);
}


/* 为卡片添加交错动画效果 */

.expert-card:nth-child(1) {
    transition-delay: 0.1s;
}

.expert-card:nth-child(2) {
    transition-delay: 0.2s;
}

.expert-card:nth-child(3) {
    transition-delay: 0.3s;
}

.expert-card:nth-child(4) {
    transition-delay: 0.4s;
}

.expert-card:nth-child(5) {
    transition-delay: 0.5s;
}

.expert-card:nth-child(6) {
    transition-delay: 0.6s;
}

.expert-card:nth-child(7) {
    transition-delay: 0.7s;
}

.expert-card:nth-child(8) {
    transition-delay: 0.8s;
}

.experts-grid .expert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 5px;
    background: linear-gradient( 90deg, transparent, rgba(212, 175, 55, 0.6) 20%, var(--primary-color) 50%, rgba(212, 175, 55, 0.6) 80%, transparent);
    border-radius: 0 0 3px 3px;
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.3);
    z-index: 2;
}


/* 左侧图片区域：使用伪元素承载背景图（仅用于首页专家网格） */

.experts-grid .expert-card::after {
    content: '';
    position: absolute;
    top: var(--spacing-xl);
    left: var(--spacing-xl);
    bottom: var(--spacing-xl);
    width: 44%;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    z-index: 0;
    opacity: 1;
    transition: transform 0.6s ease;
    pointer-events: none;
}

.expert-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 50px rgba(196, 30, 58, 0.25), 0 8px 20px rgba(196, 30, 58, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    /* 悬停时边框加深，增强古典感 */
    border-color: rgba(196, 30, 58, 0.5);
    border-top-color: rgba(212, 175, 55, 0.5);
    border-bottom-color: rgba(180, 160, 140, 0.6);
    /* 悬停时背景略微加深 */
    background: repeating-linear-gradient( 0deg, rgba(245, 243, 240, 0.15) 0px, transparent 1px, transparent 2px, rgba(245, 243, 240, 0.08) 3px), repeating-linear-gradient( 90deg, rgba(238, 235, 230, 0.12) 0px, transparent 1px, transparent 3px, rgba(238, 235, 230, 0.06) 4px), linear-gradient( 135deg, #f8f5f0 0%, #f3f0eb 25%, #eee9e4 50%, #e9e4df 75%, #e6e1dc 100%), radial-gradient( ellipse at top left, rgba(212, 175, 55, 0.08) 0%, transparent 50%), radial-gradient( ellipse at bottom right, rgba(196, 30, 58, 0.05) 0%, transparent 50%), #f8f5f0;
}

.experts-grid .expert-card:hover::after {
    transform: translate3d(0, 0, 0);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.expert-card:hover .card-glow {
    opacity: 1;
}

.expert-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin-bottom: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

.expert-icon.opera-expert {
    background: linear-gradient(135deg, var(--primary-color), #e53e3e);
}

.expert-icon.architecture-expert {
    background: linear-gradient(135deg, var(--secondary-color), #38a169);
}


/* 首页专家卡片背景图（按类别设置，仅作用于首页专家网格） */

.experts-grid .expert-card[data-agent="cantonese_opera_critic"]::after {
    background: url('https://img.cdn1.vip/i/69115053105df_1762742355.webp');
    background-size: cover;
    background-position: center;
}

.experts-grid .expert-card[data-agent="architecture_expert"]::after {
    background: url('https://img.cdn1.vip/i/69114fcd27d6f_1762742221.webp');
    background-size: cover;
    background-position: center;
}

.experts-grid .expert-card[data-agent="culinary_expert"]::after {
    background: url('https://img.cdn1.vip/i/69115026339d0_1762742310.webp');
    background-size: cover;
    background-position: center;
}

.experts-grid .expert-card[data-agent="festival_expert"]::after {
    background: url('https://img.cdn1.vip/i/69114f703693c_1762742128.webp');
    background-size: cover;
    background-position: center;
}

.experts-grid .expert-card[data-agent="tea_culture_expert"]::after {
    background: url('https://img.cdn1.vip/i/69114f1c1befc_1762742044.webp');
    background-size: cover;
    background-position: center;
}

.experts-grid .expert-card[data-agent="craft_expert"]::after {
    background: url('https://img.cdn1.vip/i/69114f4adf485_1762742090.webp');
    background-size: cover;
    background-position: center;
}

.experts-grid .expert-card[data-agent="literature_expert"]::after {
    background: url('https://img.cdn1.vip/i/69115038d2ea5_1762742328.webp');
    background-size: cover;
    background-position: center;
}

.experts-grid .expert-card[data-agent="tcm_expert"]::after {
    background: url('https://img.cdn1.vip/i/69114fff338ab_1762742271.webp');
    background-size: cover;
    background-position: center;
}


/* 文化气息优化：图案微动与印章环饰（仅首页专家网格）*/

.experts-grid .expert-card::after {
    transition: transform 0.6s ease;
}

.experts-grid .expert-card:hover::after {
    transform: scale(1.03);
}


/* 左侧图片区域的悬浮遮罩，仅在悬浮时出现 */

.experts-grid .expert-card::before {
    content: '';
    position: absolute;
    top: var(--spacing-xl);
    left: var(--spacing-xl);
    bottom: var(--spacing-xl);
    width: 44%;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.0);
    box-shadow: none;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1;
    /* 在图片之上、按钮之下 */
    pointer-events: none;
}

.experts-grid .expert-card:hover::before {
    background: rgba(0, 0, 0, 0.15);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.25);
    opacity: 1;
}


/* 专家信息玻璃态背景，提高文本可读性（仅首页专家网格） */

.experts-grid .expert-card .expert-info {
    /* 明信片式右侧信息面板 */
    position: relative;
    margin-left: auto;
    width: 54%;
    background: /* 纸张纹理 */
    repeating-linear-gradient( 0deg, rgba(245, 243, 240, 0.35) 0px, rgba(245, 243, 240, 0.35) 1px, rgba(245, 243, 240, 0.2) 2px, rgba(245, 243, 240, 0.2) 3px), linear-gradient(135deg, #fffaf0 0%, #fbf6ea 50%, #f7f1e4 100%);
    border-radius: 16px;
    padding: var(--spacing-lg);
    border: 1.5px solid rgba(190, 170, 145, 0.7);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    /* 让标题、简介与标签形成上下布局，并保证底部对齐 */
    display: flex;
    flex-direction: column;
    min-height: 260px;
    height: calc(100% - 2 * var(--spacing-xl));
    box-sizing: border-box;
}


/* 首页专家卡片标题居中，仅作用于首页网格 */

.experts-grid .expert-card .expert-info h3 {
    text-align: center;
    /* 防止中文标题换行，保持一行显示 */
    white-space: nowrap;
    word-break: keep-all;
    /* 自适应缩放，避免在较窄卡片中溢出 */
    font-size: clamp(1.25rem, 1.8vw, 1.5rem);
    line-height: 1.25;
}


/* 明信片信息面板的装饰虚线边 */

.experts-grid .expert-card .expert-info::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 10px;
    bottom: 10px;
    width: 8px;
    background-image: repeating-linear-gradient( to bottom, rgba(196, 30, 58, 0.5) 0, rgba(196, 30, 58, 0.5) 4px, transparent 4px, transparent 8px);
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.08));
}


/* 左上角印章式专家图标，仅作用于首页网格 */

.experts-grid .expert-card .expert-icon {
    position: absolute;
    left: 18px;
    top: 18px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.expert-icon::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(212, 175, 55, 0.35);
    box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.08), inset 0 0 12px rgba(196, 30, 58, 0.12);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.expert-card:hover .expert-icon::after {
    transform: scale(1.06);
    box-shadow: 0 0 0 8px rgba(212, 175, 55, 0.1), inset 0 0 16px rgba(196, 30, 58, 0.18);
}

.expert-icon.culinary-expert {
    background: linear-gradient(135deg, var(--accent-color), #ed8936);
}

.expert-icon.festival-expert {
    background: linear-gradient(135deg, var(--cultural-blue), #3182ce);
}

.expert-icon.tea-culture-expert {
    background: linear-gradient(135deg, #16a085, #1abc9c);
}

.expert-icon.craft-expert {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.expert-icon.literature-expert {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.expert-icon.tcm-expert {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.expert-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.25);
}

.expert-info p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}


/* 首页专家网格的段落右移，避免贴边或被遮挡 */

.experts-grid .expert-card .expert-info p {
    padding-left: var(--spacing-md);
    /* 减少段落底部留白，统一标签的垂直位置 */
    margin-bottom: var(--spacing-sm);
}

.experts-grid .expert-card .expert-tags {
    /* 两个标签按内容自适应宽度，避免被压缩 */
    display: grid;
    grid-template-columns: repeat(2, max-content);
    justify-content: flex-start;
    gap: var(--spacing-xs);
    align-items: center;
    margin-bottom: 0;
    /* 将标签栏推至信息面板底部，实现各卡片底部对齐 */
    margin-top: auto;
}

.tag {
    padding: var(--spacing-xs) var(--spacing-sm);
    /* 去除透明度，使用实色背景以增强可读性 */
    background: linear-gradient(135deg, #fff3c4 0%, #ffe7a3 100%);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid #d4af37;
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif;
    box-shadow: 0 2px 4px rgba(196, 30, 58, 0.1);
    transition: all 0.3s ease;
    /* 优先完整显示文本：允许按内容撑开，避免省略号 */
    white-space: nowrap;
    text-align: center;
}

.tag:hover {
    background: linear-gradient(135deg, #ffe8a3 0%, #ffd978 100%);
    border-color: #c7982a;
    transform: translateY(-1px);
}

.expert-btn {
    width: 100%;
    padding: var(--spacing-md);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}


/* 将按钮固定在左侧图片区域的底部 */

.expert-card .expert-btn {
    position: absolute;
    left: calc(var(--spacing-xl) + 16px);
    bottom: calc(var(--spacing-xl) + 16px);
    width: auto;
    min-width: 160px;
    padding: 12px 18px;
    box-shadow: 0 8px 18px rgba(196, 30, 58, 0.22);
    z-index: 2;
    /* 确保在左侧图片之上可见 */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.expert-card:hover .expert-btn {
    opacity: 1;
    pointer-events: auto;
}

.expert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(196, 30, 58, 0.3);
}


/* 功能特色 */

.features-section {
    padding: 0 !important;
    /* 移除padding，由section-container控制 */
    background: var(--bg-secondary);
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), transform 1s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
    overflow: visible !important;
    /* 确保内容不被裁剪 */
}

.features-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.features-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 80%, rgba(196, 30, 58, 0.05) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
}


/* 左侧固定介绍卡片 */

.accordion-intro-card {
    width: 180px !important;
    flex-shrink: 0 !important;
    height: 100% !important;
    /* 100%高度，与父容器一致 */
    min-height: calc(100vh - 70px) !important;
    /* 最小高度确保完整显示 */
    background: linear-gradient(135deg, #1a4a3a 0%, #0f2e23 100%);
    /* 深绿色渐变 */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    box-sizing: border-box;
    z-index: 2;
    overflow: visible !important;
    /* 改为visible，确保内容不被裁剪 */
    /* 与右侧卡片高度统一 - 通过父容器的align-items: stretch实现 */
    align-self: stretch !important;
}


/* 背景装饰图案 */

.accordion-intro-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 50% 10%, rgba(26, 74, 58, 0.6) 0%, transparent 40%), radial-gradient(circle at 50% 90%, rgba(26, 74, 58, 0.6) 0%, transparent 40%), repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(15, 46, 35, 0.1) 2px, rgba(15, 46, 35, 0.1) 4px);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}


/* 顶部和底部装饰图案 */

.intro-decoration {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    height: 120px;
    background: radial-gradient(ellipse at center, rgba(15, 46, 35, 0.4) 0%, transparent 70%);
    z-index: 1;
}

.intro-decoration-top {
    top: 0;
}

.intro-decoration-bottom {
    bottom: 0;
    transform: rotate(180deg);
}


/* 文字块 */

.intro-text-block {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
}

.intro-title,
.intro-subtitle {
    writing-mode: vertical-rl;
    text-orientation: upright;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.2rem;
    /* 从1.5rem缩小到1.2rem */
    font-weight: 700;
    letter-spacing: 0.1em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    margin: 0;
    white-space: nowrap;
    position: relative;
    z-index: 3;
}

.intro-subtitle {
    font-size: 1rem;
    /* 从1.2rem缩小到1rem */
    font-weight: 600;
}


/* 查看更多链接样式 */

.intro-link {
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.intro-link:hover {
    color: rgba(255, 255, 255, 1) !important;
    text-shadow: 0 2px 12px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.intro-link:active {
    transform: scale(1.05);
}


/* 装饰性图标 */

.intro-decorative-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: var(--spacing-sm) 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.6rem;
    z-index: 3;
}

.intro-decorative-icon i {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
    position: relative;
    z-index: 2;
}


/* 外圈装饰圆环 */

.intro-decorative-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: scale(1.3);
    z-index: 0;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}


/* 内圈装饰圆点 */

.intro-decorative-icon::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    z-index: 1;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
}


/* 虚线连接 */

.intro-dotted-line {
    position: relative;
    width: 2px;
    height: 40px;
    margin: var(--spacing-md) 0;
    z-index: 2;
}

.intro-dotted-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100%;
    background: repeating-linear-gradient( to bottom, rgba(255, 255, 255, 0.6) 0px, rgba(255, 255, 255, 0.6) 4px, transparent 4px, transparent 8px);
}


/* 角落装饰图标 */

.intro-corner-icon {
    width: 12px;
    height: 12px;
    border-left: 2px solid rgba(255, 255, 255, 0.7);
    border-bottom: 2px solid rgba(255, 255, 255, 0.7);
    margin: var(--spacing-xs) 0;
    position: relative;
}

.intro-text-block:last-child .intro-corner-icon {
    border-left: 2px solid rgba(255, 255, 255, 0.7);
    border-top: 2px solid rgba(255, 255, 255, 0.7);
    border-bottom: none;
}


/* 拉风琴效果容器 */

.accordion-container {
    display: flex !important;
    width: calc(100% - 180px) !important;
    /* 减去左侧介绍卡片宽度 */
    max-width: calc(100% - 180px) !important;
    height: 100% !important;
    /* 100%高度，由flex容器控制，与左侧卡片一致 */
    min-height: calc(100vh - 70px) !important;
    /* 最小高度确保完整显示 */
    max-height: none !important;
    /* 移除最大高度限制，允许内容完整显示 */
    gap: 0 !important;
    /* 无间隙 */
    position: relative;
    z-index: 1;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    /* 保持16:9比例的约束，但优先匹配父容器高度 */
    flex-shrink: 0;
    /* 不允许收缩 */
    align-self: stretch !important;
    /* 拉伸到与父容器相同高度 */
    flex: 1 1 auto !important;
    /* 允许flex grow和shrink */
    overflow: visible !important;
    /* 改为visible，确保内容不被裁剪 */
}


/* 拉风琴卡片 */

.accordion-card {
    flex: 1;
    min-width: 0;
    /* 允许缩小 */
    height: 100% !important;
    position: relative;
    cursor: pointer;
    transition: flex 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    opacity: 1 !important;
    visibility: visible !important;
    border-right: none;
    /* 去掉边框 */
}

.accordion-card:last-child {
    border-right: none;
}


/* 卡片内容 */

.accordion-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 0;
    /* 去掉圆角，紧贴 */
    overflow: hidden;
    box-shadow: none;
    /* 默认无阴影 */
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}


/* 卡片图片区域 */

.accordion-image {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    /* 确保背景图片正确显示 */
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.accordion-image i {
    display: none !important;
    /* 隐藏图标 */
}

.accordion-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* 添加半透明遮罩，确保图标和文字可读性 */
    background: rgba(0, 0, 0, 0.3);
    transition: opacity 0.6s ease;
    z-index: 1;
}


/* 卡片文字区域 */

.accordion-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-xl);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    color: white;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
}

.accordion-text h3 {
    font-size: 2.5rem !important;
    /* 加大字体 */
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    white-space: nowrap;
    text-align: center !important;
    /* 居中 */
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif !important;
    /* 统一使用传统衬线字体 */
    letter-spacing: 0.1em;
    /* 字间距 */
}

.accordion-text>p {
    font-size: 0.85rem;
    /* 从0.9rem缩小到0.85rem，与detail保持一致 */
    opacity: 0;
    transition: opacity 0.4s ease 0.2s;
    line-height: 1.5;
    margin-bottom: var(--spacing-md);
}


/* 详细内容（展开时显示） */

.accordion-detail {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease 0.3s, max-height 0.6s ease 0.3s;
}

.accordion-detail p {
    font-size: 0.85rem;
    /* 从0.95rem缩小到0.85rem */
    line-height: 1.6;
    margin-top: var(--spacing-md);
    text-align: center;
}


/* 文字标签（折叠时显示在图片中心） */

.accordion-card:not(:hover) .accordion-text {
    transform: translate(-50%, -50%) !important;
    /* 居中定位 */
    position: absolute;
    top: 50%;
    left: 50%;
    background: transparent;
    padding: 0;
    width: auto;
    height: auto;
    text-align: center !important;
    /* 确保文字居中 */
    display: flex !important;
    /* 使用flex布局实现完美居中 */
    align-items: center !important;
    /* 垂直居中 */
    justify-content: center !important;
    /* 水平居中 */
}

.accordion-card:not(:hover) .accordion-text h3 {
    writing-mode: vertical-rl !important;
    /* 垂直显示 */
    text-orientation: upright !important;
    /* 文字直立 */
    font-size: 3rem !important;
    /* 调整为更合适的大小（从4.5rem改为3rem） */
    font-weight: 700;
    white-space: nowrap;
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9);
    /* 增强阴影 */
    text-align: center !important;
    /* 居中 */
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif !important;
    /* 统一使用传统衬线字体 */
    letter-spacing: 0.25em;
    /* 字间距 */
    line-height: 1.3;
    /* 行高 */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.accordion-card:not(:hover) .accordion-text>p,
.accordion-card:not(:hover) .accordion-detail {
    display: none;
}


/* 悬停效果 - 展开卡片 */

.accordion-card:hover {
    flex: 2;
    /* 减少展开比例，拉开距离不要太大 */
    z-index: 10;
}

.accordion-card:hover .accordion-content {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-xl);
    /* 展开时添加圆角 */
}

.accordion-card:hover .accordion-image::before {
    opacity: 0.5;
}

.accordion-card:hover .accordion-text {
    transform: translateY(0);
}

.accordion-card:hover .accordion-text>p {
    opacity: 1;
}

.accordion-card:hover .accordion-detail {
    opacity: 1;
    max-height: 200px;
}

.accordion-card:hover .accordion-image i {
    font-size: 6rem;
    transform: scale(1.2);
}


/* 其他卡片缩小 */

.accordion-container:hover .accordion-card:not(:hover) {
    flex: 0.8;
    /* 增加缩小后的宽度，拉开距离不要太大 */
}

.accordion-container:hover .accordion-card:not(:hover) .accordion-image i {
    font-size: 2rem;
    opacity: 0.7;
}


/* 兼容旧样式 - 保持向后兼容 */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    position: relative;
    z-index: 1;
}

.feature-item {
    text-align: center;
    padding: var(--spacing-xl);
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto var(--spacing-lg);
    box-shadow: var(--shadow-cultural);
}

.feature-item h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.feature-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}


/* CTA Section - 传统文化装饰（广府非遗特色样式） */


/* cta-section 全屏样式已在1042行定义，这里只补充背景样式 */

.cta-section {
    /* 非遗文化韵味的古典纸张质感背景 */
    background: /* 纸张纹理 */
    repeating-linear-gradient( 0deg, rgba(245, 243, 240, 0.15) 0px, transparent 1px, transparent 2px, rgba(245, 243, 240, 0.08) 3px), repeating-linear-gradient( 90deg, rgba(238, 235, 230, 0.12) 0px, transparent 1px, transparent 3px, rgba(238, 235, 230, 0.06) 4px), /* 古典渐变色 - 宣纸/古籍质感 */
    linear-gradient( 135deg, #faf8f4 0%, #f5f2eb 25%, #f0ede6 50%, #ebe8e1 75%, #e8e5de 100%), /* 底层暖色调 */
    radial-gradient( ellipse at top left, rgba(212, 175, 55, 0.1) 0%, transparent 50%), radial-gradient( ellipse at bottom right, rgba(196, 30, 58, 0.08) 0%, transparent 50%), /* 传统纹理 */
    repeating-linear-gradient( 0deg, transparent, transparent 100px, rgba(196, 30, 58, 0.02) 100px, rgba(196, 30, 58, 0.02) 102px), /* 基础色 */
    #faf8f4 !important;
    background-blend-mode: multiply, screen, normal, normal, normal, normal, normal;
    overflow: visible;
    /* 允许内容溢出，确保footer显示 */
    position: relative;
}


/* CTA section顶部装饰线 */

.cta-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 6px;
    background: linear-gradient( 90deg, transparent, rgba(212, 175, 55, 0.5) 20%, var(--primary-color) 50%, rgba(212, 175, 55, 0.5) 80%, transparent);
    border-radius: 0 0 3px 3px;
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.25);
    z-index: 10;
}


/* CTA背景装饰 */

.cta-background-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: /* 传统云纹 */
    radial-gradient(circle at 15% 25%, rgba(212, 175, 55, 0.08) 0%, transparent 40%), radial-gradient(circle at 85% 75%, rgba(196, 30, 58, 0.06) 0%, transparent 40%), /* 传统花纹纹理 */
    repeating-linear-gradient( 45deg, transparent, transparent 30px, rgba(212, 175, 55, 0.03) 30px, rgba(212, 175, 55, 0.03) 31px, transparent 31px, transparent 60px, rgba(196, 30, 58, 0.02) 60px, rgba(196, 30, 58, 0.02) 61px), /* 水波纹纹理 */
    repeating-linear-gradient( 0deg, transparent, transparent 80px, rgba(196, 30, 58, 0.015) 80px, rgba(196, 30, 58, 0.015) 82px);
    z-index: 0;
    pointer-events: none;
}

.cta-container {
    max-width: 1400px;
    width: calc(100% - 80px);
    margin: var(--spacing-xl) auto var(--spacing-lg) auto;
    padding: var(--spacing-3xl) var(--spacing-lg) var(--spacing-2xl) var(--spacing-lg);
    /* 增加底部padding */
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3xl);
    flex: 1 1 auto;
    /* 占据主要空间 */
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 1;
    min-height: 0;
    /* 允许收缩 */
    overflow-y: visible;
    /* 允许内容溢出可见 */
}


/* 智能非遗助手面板 - 悬浮在左上角（导航栏下方） */

.ai-assistant-panel {
    position: fixed;
    top: 95px;
    left: 20px;
    width: 280px;
    max-width: calc(100vw - 40px);
    max-height: 400px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    z-index: 999;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
    opacity: 1;
}


/* 收缩状态 - 变成小图标，可拖拽 */

.ai-assistant-panel.collapsed {
    width: 60px;
    height: 60px;
    max-height: 60px;
    border-radius: 50%;
    left: 20px;
    top: 95px;
    /* 导航栏下方 */
    right: auto;
    bottom: auto;
    overflow: visible;
    cursor: move;
    cursor: grab;
}

.ai-assistant-panel.collapsed:active {
    cursor: grabbing;
}

.ai-assistant-panel.collapsed .assistant-header {
    padding: 0;
    justify-content: center;
    align-items: center;
    height: 60px;
    border-radius: 50%;
    cursor: move;
    cursor: grab;
    user-select: none;
}

.ai-assistant-panel.collapsed .assistant-header:active {
    cursor: grabbing;
}

.ai-assistant-panel.collapsed .assistant-header:hover {
    transform: scale(1.05);
}

.ai-assistant-panel.collapsed .assistant-info,
.ai-assistant-panel.collapsed .assistant-toggle,
.ai-assistant-panel.collapsed .assistant-content {
    display: none !important;
}

.ai-assistant-panel.collapsed .assistant-avatar {
    width: 60px;
    height: 60px;
    margin: 0;
    font-size: 28px;
    cursor: pointer;
}

.ai-assistant-panel.collapsed .assistant-avatar:hover {
    transform: scale(1.1);
}

.ai-assistant-panel.minimized {
    max-height: 70px;
}

.ai-assistant-panel.minimized .assistant-content {
    display: none;
}


/* 助手头部 */

.assistant-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.assistant-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}

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

.assistant-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.assistant-status {
    font-size: 13px;
    opacity: 0.9;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.assistant-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.9);
    }
}

.assistant-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.assistant-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}


/* 助手内容区域 */

.assistant-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    background: #f8f9fa;
    overflow-y: auto;
}


/* 助手介绍气泡 */

.assistant-intro {
    padding: 18px;
    flex: 1;
    overflow-y: auto;
    scroll-behavior: smooth;
    margin-bottom: 12px;
}

.intro-bubble {
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
}

.intro-bubble::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 30px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

.intro-bubble p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
}


/* 消息列表 - 隐藏，只显示介绍 */

.assistant-messages {
    display: none;
}

.assistant-messages::-webkit-scrollbar {
    width: 6px;
}

.assistant-messages::-webkit-scrollbar-track {
    background: transparent;
}

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

.assistant-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}


/* 助手消息样式 */

.assistant-message {
    display: flex;
    gap: 12px;
    animation: fadeInUp 0.3s ease;
}

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

/* iOS风格的消息气泡滑入动画 - 从下往上丝滑弹出 */
@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 协作讨论消息气泡的滑入动画 - 使用硬件加速优化性能 */
.message.collaboration {
    will-change: transform, opacity;
    transform-origin: bottom;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
    -webkit-perspective: 1000px;
    /* 动画通过JavaScript动态添加，这里不设置默认动画，避免与JS控制的动画冲突 */
}

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

.assistant-message .message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.assistant-message.user-message .message-avatar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
}

.assistant-message.assistant-message .message-avatar {
    background: linear-gradient(135deg, var(--accent-color), #ed8936);
    color: white;
}

.assistant-message .message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.assistant-message.user-message .message-content {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border-bottom-right-radius: 4px;
}

.assistant-message.assistant-message .message-content {
    background: white;
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}


/* 输入区域 - 移除，不再需要 */

.assistant-input-area {
    display: none;
}


/* 语音模式控制 */

.assistant-voice-control {
    padding: 0 18px 18px 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: auto;
}

.voice-mode-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.2);
}

.voice-mode-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

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

.voice-mode-btn.active {
    background: linear-gradient(135deg, #dc2626, #ea580c);
}

.voice-mode-btn i {
    font-size: 16px;
}


/* 响应式设计 */

@media (max-width: 768px) {
    .ai-assistant-panel {
        width: calc(100vw - 20px);
        max-width: 280px;
        left: 10px;
        top: 85px;
        max-height: 400px;
    }
    .ai-assistant-panel.collapsed {
        width: 60px;
        height: 60px;
    }
    .assistant-content {
        max-height: 320px;
    }
}


/* CTA Header */

.cta-header {
    text-align: center;
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-top: var(--spacing-lg);
}


/* CTA标题装饰 */

.cta-header::before {
    content: "❋";
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 48px;
    color: rgba(196, 30, 58, 0.18);
    font-family: serif;
    line-height: 1;
}

.cta-header::after {
    content: "";
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-color) 20%, #d4af37 50%, var(--primary-color) 80%, transparent);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.2);
}

.cta-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.15) 0%, rgba(212, 175, 55, 0.12) 100%);
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
    border: 2px solid rgba(212, 175, 55, 0.3);
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif;
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.15);
}

.cta-badge i {
    color: var(--accent-color);
}

.cta-main-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    position: relative;
    letter-spacing: 2px;
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif;
    text-shadow: 0 4px 8px rgba(196, 30, 58, 0.15);
}

.cta-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto var(--spacing-md) auto;
    line-height: 1.8;
    font-family: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif;
}


/* CTA Features */

.cta-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 固定4列，避免右边空白 */
    gap: var(--spacing-md);
    margin-bottom: 0.25rem;
    /* 更紧凑的间距，仅4px */
    width: 100%;
    /* 确保占满宽度 */
    max-width: 100%;
    /* 确保不超过容器宽度 */
    box-sizing: border-box;
    /* 确保padding包含在宽度内 */
}


/* CTA Features 响应式布局 */

@media (max-width: 1200px) {
    .cta-features {
        grid-template-columns: repeat(2, 1fr);
        /* 中等屏幕2列 */
    }
}

@media (max-width: 768px) {
    .cta-features {
        grid-template-columns: 1fr;
        /* 小屏幕1列 */
    }
}

.cta-feature-card {
    /* 历史文化纸张质感背景 */
    background: /* 纸张纹理 */
    repeating-linear-gradient( 0deg, rgba(245, 243, 240, 0.12) 0px, transparent 1px, transparent 2px, rgba(245, 243, 240, 0.06) 3px), repeating-linear-gradient( 90deg, rgba(238, 235, 230, 0.1) 0px, transparent 1px, transparent 3px, rgba(238, 235, 230, 0.05) 4px), /* 古典渐变色 - 宣纸/古籍质感 */
    linear-gradient( 135deg, #faf8f4 0%, #f5f2eb 25%, #f0ede6 50%, #ebe8e1 75%, #e8e5de 100%), /* 底层暖色调 */
    radial-gradient( ellipse at top left, rgba(212, 175, 55, 0.06) 0%, transparent 50%), radial-gradient( ellipse at bottom right, rgba(196, 30, 58, 0.04) 0%, transparent 50%), /* 基础色 */
    #faf8f4;
    background-blend-mode: multiply, screen, normal, normal, normal, normal;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 3px 12px rgba(196, 30, 58, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -1px 0 rgba(0, 0, 0, 0.03);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    /* 古典边框 - 仿古书页边缘 */
    border: 3px solid rgba(212, 190, 165, 0.35);
    border-top: 3px solid rgba(212, 175, 55, 0.3);
    border-bottom: 3px solid rgba(180, 160, 140, 0.4);
    position: relative;
    overflow: hidden;
}

.cta-feature-card h3 {
    margin: var(--spacing-xs) 0;
    line-height: 1.2;
    font-size: 1.05rem;
}

.cta-feature-card p {
    margin: 0;
    line-height: 1.3;
    font-size: 0.9rem;
}


/* CTA卡片顶部装饰线 */

.cta-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 4px;
    background: linear-gradient( 90deg, transparent, rgba(212, 175, 55, 0.5) 20%, var(--primary-color) 50%, rgba(212, 175, 55, 0.5) 80%, transparent);
    border-radius: 0 0 2px 2px;
    box-shadow: 0 2px 6px rgba(196, 30, 58, 0.25);
    z-index: 2;
}

.cta-feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 16px 48px rgba(196, 30, 58, 0.2), 0 6px 16px rgba(196, 30, 58, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    border-color: rgba(196, 30, 58, 0.5);
    border-top-color: rgba(212, 175, 55, 0.5);
    border-bottom-color: rgba(180, 160, 140, 0.6);
    /* 悬停时背景略微加深 */
    background: repeating-linear-gradient( 0deg, rgba(245, 243, 240, 0.15) 0px, transparent 1px, transparent 2px, rgba(245, 243, 240, 0.08) 3px), repeating-linear-gradient( 90deg, rgba(238, 235, 230, 0.12) 0px, transparent 1px, transparent 3px, rgba(238, 235, 230, 0.06) 4px), linear-gradient( 135deg, #f8f5f0 0%, #f3f0eb 25%, #eee9e4 50%, #e9e4df 75%, #e6e1dc 100%), radial-gradient( ellipse at top left, rgba(212, 175, 55, 0.08) 0%, transparent 50%), radial-gradient( ellipse at bottom right, rgba(196, 30, 58, 0.06) 0%, transparent 50%), #f8f5f0;
}

.feature-icon-wrapper {
    width: 70px;
    height: 70px;
    margin: 0 auto var(--spacing-lg);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
}

.cta-feature-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.cta-feature-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}


/* CTA Actions */

.cta-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-3xl);
    flex-wrap: wrap;
}

.btn-cta {
    padding: var(--spacing-lg) var(--spacing-2xl);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 200px;
    justify-content: center;
}

.btn-cta-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: var(--shadow-cultural);
}

.btn-cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(196, 30, 58, 0.3);
}

.btn-cta-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-cta-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(196, 30, 58, 0.2);
}


/* CTA Stats */

.cta-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    padding: var(--spacing-md) 0;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-md);
    position: relative;
    z-index: 2;
}

.stat-item {
    text-align: center;
    min-width: 120px;
    opacity: 1 !important;
    /* 默认显示，避免不显示的问题 */
    transform: translateY(0) !important;
    transition: opacity 0.6s ease, transform 0.6s ease;
    visibility: visible !important;
}

.stat-item.animate {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.stat-number {
    font-size: clamp(2.5rem, 4vw, 4rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 2px;
    display: block !important;
    /* 确保显示 */
    visibility: visible !important;
    opacity: 1 !important;
    color: var(--primary-color);
    /* 备用颜色，如果渐变不支持 */
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.2;
    margin: 0;
    display: block !important;
    /* 确保显示 */
    visibility: visible !important;
    opacity: 1 !important;
}

.cta-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.floating-elements {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 20px;
}

.floating-icon {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: white;
    box-shadow: var(--shadow-lg);
    animation: floatIcon 6s ease-in-out infinite;
    transition: transform 0.3s ease;
    flex: 0 0 calc(50% - 15px);
}

@keyframes floatIcon {
    0%,
    100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
}

.floating-icon:hover {
    transform: translateY(-5px) scale(1.1);
}


/* 为每个图标设置不同的动画延迟 */

.floating-icon:nth-child(1) {
    animation-delay: 0s;
}

.floating-icon:nth-child(2) {
    animation-delay: 1.5s;
}

.floating-icon:nth-child(3) {
    animation-delay: 3s;
}

.floating-icon:nth-child(4) {
    animation-delay: 4.5s;
}


/* 现代化页脚 - 文化元素 */


/* Footer在cta-section内的样式 */

.cta-section .modern-footer {
    flex: 0 0 auto;
    /* 不占据额外空间 */
    margin-top: auto;
    /* 推到底部 */
    width: 100%;
    padding: 0;
    /* 移除padding，由内部容器控制 */
    position: relative;
    z-index: 1;
    opacity: 1 !important;
    /* 确保footer可见 */
    visibility: visible !important;
}

.cta-section .modern-footer {
    padding: var(--spacing-md) 0 !important;
    /* 只留一点点空间 */
}

.cta-section .footer-container {
    padding: var(--spacing-sm) var(--spacing-lg) !important;
    /* 减少内部padding */
}

.modern-footer {
    background: var(--bg-dark);
    color: white;
    padding: var(--spacing-3xl) 0 var(--spacing-xl);
    position: relative;
}


/* 在cta-section内的footer精简版 */

.cta-section .footer-content {
    padding: var(--spacing-md) 0 !important;
    /* 减少内容区域padding */
    margin-bottom: var(--spacing-sm) !important;
}

.cta-section .footer-brand,
.cta-section .footer-links {
    margin-bottom: var(--spacing-sm) !important;
}

.cta-section .footer-bottom {
    padding-top: var(--spacing-sm) !important;
    /* 减少底部padding */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem !important;
    /* 稍微缩小字体 */
}

.cta-section .brand-logo span,
.cta-section .footer-brand p {
    font-size: 0.9rem !important;
}

.cta-section .link-group h4 {
    font-size: 0.95rem !important;
    margin-bottom: var(--spacing-xs) !important;
}

.cta-section .link-group a {
    font-size: 0.85rem !important;
    margin-bottom: var(--spacing-xs) !important;
}

.modern-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--cultural-blue));
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-3xl);
    margin-bottom: var(--spacing-2xl);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.25rem;
    font-weight: 700;
}

.brand-logo i,
.brand-logo svg {
    font-size: 1.5rem;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
}

.link-group h4 {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.link-group a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: var(--spacing-sm);
    transition: color 0.3s ease;
}

.link-group a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-xl);
    border-top: 1px solid #334155;
    color: #94a3b8;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

.footer-brand,
.footer-brand span,
.footer-brand p,
.footer-links,
.footer-links h4,
.footer-links a {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}


/* 响应式设计 */

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-actions {
        justify-content: center;
    }
    .experts-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .cta-container {
        padding: var(--spacing-xl) var(--spacing-md);
        gap: var(--spacing-xl);
    }
    /* .cta-features 的响应式已经在上面定义，这里不需要重复 */
    .cta-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-cta {
        width: 100%;
    }
    .cta-stats {
        gap: var(--spacing-xl);
    }
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-links {
        grid-template-columns: 1fr;
    }
}


/* 滚动动画 */

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

.animate-on-scroll {
    animation: slideInUp 0.6s ease-out;
}


/* 文化主题装饰线条 */

.cultural-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--accent-color) 20%, var(--primary-color) 50%, var(--accent-color) 80%, transparent 100%);
    margin: var(--spacing-2xl) 0;
}


/* 传统图案背景 */

.traditional-bg {
    background-image: radial-gradient(circle at 25% 25%, rgba(212, 175, 55, 0.1) 0%, transparent 50%), radial-gradient(circle at 75% 75%, rgba(196, 30, 58, 0.1) 0%, transparent 50%), linear-gradient(45deg, transparent 49%, rgba(212, 175, 55, 0.05) 50%, transparent 51%);
}


/* 专家智能体页面样式 */

.agent-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

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

.agent-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-color);
}

.agent-card .card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.agent-card:hover .card-glow {
    opacity: 1;
}

.avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cultural-bg {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

.cultural-text {
    color: var(--primary-color);
}

.cultural-badge {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.cultural-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.cultural-card {
    position: relative;
}

.cultural-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.cultural-card:hover::after {
    opacity: 1;
}

.expert-response-card {
    --expert-accent: var(--primary-color);
    --expert-accent-2: var(--accent-color);
    --expert-bg: #fffdf8;
    --expert-border: #ebe3d6;
    background: linear-gradient(165deg, #fffefb 0%, #faf6ef 100%);
    border: 1px solid var(--expert-border);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(45, 24, 16, 0.06);
    padding: 0.85rem 1rem 0.65rem;
    margin: 0.35rem 0 0.6rem;
    max-width: 100%;
    box-sizing: border-box;
}

.expert-response-card .expert-response-header {
    margin-bottom: 0;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(45, 24, 16, 0.08);
}

.expert-response-card .expert-response-brand {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
}

.expert-response-card .title-icon {
    flex-shrink: 0;
    font-size: 1.35rem;
    line-height: 1.2;
    margin-top: 0.1rem;
}

.expert-response-card .expert-response-headtext {
    flex: 1;
    min-width: 0;
}

.expert-response-card .expert-response-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #2d241c;
    letter-spacing: 0.02em;
    line-height: 1.35;
}

.expert-response-card .expert-response-subtitle {
    color: #6b5d52;
    font-size: 0.78rem;
    margin-top: 0.2rem;
    line-height: 1.4;
    opacity: 0.92;
}

.expert-response-card .expert-response-body {
    margin-top: 0.75rem;
}

.expert-response-card .expert-response-section {
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(45, 24, 16, 0.06);
}

.expert-response-card .expert-response-section:last-child {
    border-bottom: none;
    padding-bottom: 0.15rem;
}

.expert-response-card .section-title {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--expert-accent);
    margin-bottom: 0.45rem;
    padding: 0.35rem 0.55rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border-left: 3px solid var(--expert-accent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.expert-response-card .section-icon {
    margin-right: 0.35rem;
    font-size: 0.95rem;
    line-height: 1;
}

.expert-response-card .section-content {
    color: #3d342e;
    font-size: 0.9rem;
    line-height: 1.75;
    max-width: 38rem;
    letter-spacing: 0.02em;
}

.expert-response-card .expert-response-p {
    margin: 0 0 0.65em;
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    text-align: justify;
    text-justify: inter-ideograph;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.expert-response-card .expert-response-p:last-child {
    margin-bottom: 0;
}

.expert-response-card .expert-response-footer {
    margin-top: 0.55rem;
    padding-top: 0.45rem;
    border-top: 1px dashed rgba(45, 24, 16, 0.1);
}

.expert-response-card .expert-signature {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: #8a7d72;
}

.expert-response-card .expert-meta-sep {
    opacity: 0.6;
}

.expert-response-card .expert-name {
    font-weight: 600;
    color: #5c524a;
}

.expert-response-card .highlight-box {
    background: rgba(255, 236, 179, 0.35);
    border-left: 3px solid var(--expert-accent);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    margin: 0.35rem 0;
}

.expert-response-card .tip-box {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(212, 175, 55, 0.12);
    border-left: 3px solid var(--expert-accent-2);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    margin: 0.35rem 0;
}

.expert-response-card .cultural-quote {
    font-style: italic;
    background: rgba(36, 36, 36, 0.04);
    border-left: 3px solid var(--expert-border);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    margin: 0.35rem 0;
}

.expert-response-card.expert-cantonese_opera {
    --expert-accent: #c41e3a;
    --expert-accent-2: #d4af37;
}

.expert-response-card.expert-architecture {
    --expert-accent: #2d5016;
    --expert-accent-2: #4a7c59;
}

.expert-response-card.expert-culinary {
    --expert-accent: #ff6b35;
    --expert-accent-2: #f7931e;
}

.expert-response-card.expert-festival {
    --expert-accent: #8e44ad;
    --expert-accent-2: #e74c3c;
}

.expert-response-card.expert-tea_culture {
    --expert-accent: #2d5016;
    --expert-accent-2: #6aa84f;
}

.expert-response-card.expert-craft {
    --expert-accent: #4a90e2;
    --expert-accent-2: #357abd;
}

.expert-response-card.expert-literature {
    --expert-accent: #9b59b6;
    --expert-accent-2: #8e44ad;
}

.expert-response-card.expert-tcm {
    --expert-accent: #27ae60;
    --expert-accent-2: #1e8449;
}

.expert-response-card.expert-general {
    --expert-accent: var(--primary-color);
    --expert-accent-2: var(--accent-color);
}

.message-content .emphasis-strong {
    font-weight: 700;
    color: var(--text-primary);
}

.message-content .emphasis-em {
    font-style: italic;
    color: var(--text-secondary);
}

.message-content .emphasis-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    background: rgba(15, 23, 42, 0.06);
    border-radius: 4px;
    padding: 0 3px;
}

.message.opera-expert .emphasis-strong {
    color: #c41e3a;
}

.message.architecture-expert .emphasis-strong {
    color: #2d5016;
}

.message.culinary-expert .emphasis-strong {
    color: #ff6b35;
}

.message.festival-expert .emphasis-strong {
    color: #8e44ad;
}

.message.tea-culture-expert .emphasis-strong {
    color: #2d5016;
}

.message.craft-expert .emphasis-strong {
    color: #4a90e2;
}

.message.literature-expert .emphasis-strong {
    color: #9b59b6;
}

.message.tcm-expert .emphasis-strong {
    color: #27ae60;
}

.message.ambassador .emphasis-strong {
    color: var(--primary-color);
}

.message-content .number-icon {
    display: inline-block;
    padding: 0 0.45em;
    min-width: 1.25em;
    height: 1.25em;
    line-height: 1.25em;
    border-radius: 999px;
    background: #334155;
    color: #fff;
    font-weight: 700;
    font-size: 0.85em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    vertical-align: baseline;
    margin-right: 0.35em;
}

.message-content .cn-number-icon {
    display: inline-block;
    padding: 0 0.45em;
    min-width: 1.25em;
    height: 1.25em;
    line-height: 1.25em;
    border-radius: 999px;
    background: #334155;
    color: #fff;
    font-weight: 700;
    font-size: 0.85em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    vertical-align: baseline;
    margin-right: 0.35em;
}

.message.opera-expert .number-icon,
.message.opera-expert .cn-number-icon {
    background: #c41e3a;
}

.message.architecture-expert .number-icon,
.message.architecture-expert .cn-number-icon {
    background: #2d5016;
}

.message.culinary-expert .number-icon,
.message.culinary-expert .cn-number-icon {
    background: #ff6b35;
}

.message.festival-expert .number-icon,
.message.festival-expert .cn-number-icon {
    background: #8e44ad;
}

.message.tea-culture-expert .number-icon,
.message.tea-culture-expert .cn-number-icon {
    background: #2d5016;
}

.message.craft-expert .number-icon,
.message.craft-expert .cn-number-icon {
    background: #4a90e2;
}

.message.literature-expert .number-icon,
.message.literature-expert .cn-number-icon {
    background: #9b59b6;
}

.message.tcm-expert .number-icon,
.message.tcm-expert .cn-number-icon {
    background: #27ae60;
}

.message.ambassador .number-icon,
.message.ambassador .cn-number-icon {
    background: var(--primary-color);
}

.kb-ref-tags {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.kb-ref-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #fffaf0 0%, #f7eee0 100%);
    color: #3b3b3b;
    border: 1.5px solid #c41e3a;
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform .12s ease, box-shadow .12s ease;
}

.kb-ref-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.kb-ref-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #c41e3a;
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06) inset;
}

.kb-ref-title {
    font-weight: 500;
    letter-spacing: .2px;
}

.kb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.kb-modal {
    width: min(720px, 92vw);
    max-height: 70vh;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.kb-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

.kb-modal-header .kb-close {
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
}

.kb-modal-body {
    padding: 12px 14px;
    overflow: auto;
    line-height: 1.6;
}

.kb-text-container {
    position: relative;
}

.loading-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.6));
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    width: fit-content;
}

.loading-animation {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c41e3a;
    opacity: 0.35;
    animation: kb-bounce 1.2s infinite ease-in-out;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.15s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.3s;
}

.loading-hint {
    font-size: 12px;
    color: #6b7280;
    letter-spacing: 0.2px;
}

.loading-time {
    font-size: 12px;
    color: #9ca3af;
}

@keyframes kb-bounce {
    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: 0.35;
    }
    40% {
        transform: translateY(-5px);
        opacity: 0.85;
    }
}

.message.agent .message-content {
    background: radial-gradient(rgba(34, 24, 16, 0.035) 1px, transparent 1px), radial-gradient(rgba(34, 24, 16, 0.03) 1px, transparent 1px), repeating-linear-gradient(45deg, rgba(196, 30, 58, 0.02) 0 2px, transparent 2px 6px), linear-gradient(180deg, #fffdf7 0%, #fbf5e9 100%) !important;
    background-size: 3px 3px, 5px 5px, 16px 16px, auto;
    background-position: 0 0, 0 0, 0 0, 0 0;
    border: 1px solid #efe5d4 !important;
    border-radius: 14px !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08) !important;
    padding: 12px 16px !important;
    position: relative;
    border-left: 6px solid #d9c8a6 !important;
}

.message.agent .message-content::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: #d9c8a6;
    z-index: 1;
    pointer-events: none;
}

.message.agent .message-content.markdown-content {
    background: radial-gradient(rgba(34, 24, 16, 0.035) 1px, transparent 1px), radial-gradient(rgba(34, 24, 16, 0.03) 1px, transparent 1px), repeating-linear-gradient(45deg, rgba(196, 30, 58, 0.02) 0 2px, transparent 2px 6px), linear-gradient(180deg, #fffdf7 0%, #fbf5e9 100%) !important;
    background-size: 3px 3px, 5px 5px, 16px 16px, auto;
    background-position: 0 0, 0 0, 0 0, 0 0;
}

.message.agent .message-content::after {
    content: "";
    position: absolute;
    right: 10px;
    bottom: -6px;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.08), transparent 60%);
    filter: blur(1px);
    border-radius: 50%;
}

.message.opera-expert .message-content::before,
.message.opera-expert .message-content {
    border-left-color: #c41e3a !important;
}

.message.architecture-expert .message-content::before,
.message.architecture-expert .message-content {
    border-left-color: #2d5016 !important;
}

.message.culinary-expert .message-content::before,
.message.culinary-expert .message-content {
    border-left-color: #e55a2b !important;
}

.message.festival-expert .message-content::before,
.message.festival-expert .message-content {
    border-left-color: #b8941f !important;
}

.message.tea-culture-expert .message-content::before,
.message.tea-culture-expert .message-content {
    border-left-color: #2d5016 !important;
}

.message.craft-expert .message-content::before,
.message.craft-expert .message-content {
    border-left-color: #357abd !important;
}

.message.literature-expert .message-content::before,
.message.literature-expert .message-content {
    border-left-color: #7d3c98 !important;
}

.message.tcm-expert .message-content::before,
.message.tcm-expert .message-content {
    border-left-color: #1e8449 !important;
}

.message.ambassador .message-content::before,
.message.ambassador .message-content {
    border-left-color: var(--primary-color) !important;
}

.inline-ref {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 9px;
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 700;
    font-size: 12px;
    line-height: 18px;
    box-shadow: 0 0 0 1px rgba(46, 125, 50, 0.18) inset;
    margin: 0 4px;
}

.kb-summary {
    margin: 12px 0 10px 0;
    border: 1.5px solid #d9c8a6;
    border-radius: 12px;
    background: linear-gradient(180deg, #fffaf2 0%, #fff4e6 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    width: 260px;
    height: 38px;
    transform: none;
    transform-origin: top left;
    transition: width .25s ease, height .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
}

.kb-summary.expanded {
    width: 100%;
    height: auto;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.kb-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 12px;
    font-weight: 600;
    color: #5b4a3a;
    cursor: pointer;
}

.kb-summary-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.kb-summary-title::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d9c8a6;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06) inset;
}

.kb-summary-toggle {
    font-size: 12px;
    color: #7a6a5a;
    background: linear-gradient(180deg, #faf3e7 0%, #f3eadb 100%);
    border: 1px solid #e8dcc8;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    padding: 0 10px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.03);
    transition: all .2s ease;
}

.kb-summary-toggle:hover { background: linear-gradient(180deg, #fdf6ec 0%, #f5eedf 100%); }

.kb-summary.expanded .kb-summary-toggle {
    background: linear-gradient(180deg, #eaf7ee 0%, #dff2e6 100%);
    border-color: #b7dfc3;
    color: #2e7d32;
}

.kb-summary-body {
    display: block;
    margin: 0 10px 10px 10px;
    padding: 0 12px;
    border: 1px solid #eadfcd;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
    max-height: 0;
    opacity: 0;
    transition: max-height .25s ease, opacity .25s ease, padding .25s ease, background .25s ease;
}

.kb-summary.expanded .kb-summary-body {
    max-height: 500px;
    opacity: 1;
    padding: 10px 12px;
}

.message.opera-expert .kb-summary {
    border-color: #c41e3a;
}

.message.opera-expert .kb-summary-title::before {
    background: #c41e3a;
}

.message.architecture-expert .kb-summary {
    border-color: #2d5016;
}

.message.architecture-expert .kb-summary-title::before {
    background: #2d5016;
}

.message.culinary-expert .kb-summary {
    border-color: #e55a2b;
}

.message.culinary-expert .kb-summary-title::before {
    background: #e55a2b;
}

.message.festival-expert .kb-summary {
    border-color: #b8941f;
}

.message.festival-expert .kb-summary-title::before {
    background: #b8941f;
}

.message.tea-culture-expert .kb-summary {
    border-color: #2d5016;
}

.message.tea-culture-expert .kb-summary-title::before {
    background: #2d5016;
}

.message.craft-expert .kb-summary {
    border-color: #357abd;
}

.message.craft-expert .kb-summary-title::before {
    background: #357abd;
}

.message.literature-expert .kb-summary {
    border-color: #7d3c98;
}

.message.literature-expert .kb-summary-title::before {
    background: #7d3c98;
}

.message.tcm-expert .kb-summary {
    border-color: #1e8449;
}

.message.tcm-expert .kb-summary-title::before {
    background: #1e8449;
}

.message.ambassador .kb-summary {
    border-color: var(--primary-color);
}

.message.ambassador .kb-summary-title::before {
    background: var(--primary-color);
}
.img-gen-container { margin-top: 10px; border: 1px solid #eadfcd; border-radius: 12px; padding: 8px; background: linear-gradient(180deg, #fffaf2, #fff4e6); display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; }
.img-gen-skel { width: 360px; height: 360px; border-radius: 10px; background: linear-gradient(90deg, #f1e7d9 0%, #f7efe2 50%, #f1e7d9 100%); background-size: 200% 100%; animation: img-shimmer 1.2s infinite; }
.img-gen { width: 480px; max-width: 100%; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); cursor: pointer; }
.img-gen-caption { font-size: 12px; color: #6b5a48; }
.img-gen-fail { font-size: 12px; color: #a83232; }
@keyframes img-shimmer { 0% { background-position: 0 0; } 100% { background-position: 200% 0; } }
.input-status {
    margin-left: 8px;
    font-size: 12px;
    color: #c41e3a;
    background: #fff0f0;
    border-radius: 8px;
    padding: 2px 6px;
    border: 1px solid rgba(196, 30, 58, 0.25);
}
 .img-mode-banner {
     display: flex;
     align-items: center;
     gap: 8px;
     margin: 8px 0;
     background: linear-gradient(180deg, #fffaf2, #fff4e6);
     border: 1px solid #eadfcd;
     border-radius: 10px;
     padding: 6px 10px;
     color: #6b5a48;
 }
 .img-mode-spinner {
     width: 14px;
     height: 14px;
     border: 2px solid #e0c9a6;
     border-top-color: #c41e3a;
     border-radius: 50%;
     animation: img-mode-spin 1s linear infinite;
 }
 @keyframes img-mode-spin { to { transform: rotate(360deg); } }
 .kb-modal-body .img-preview { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
 .img-gen-spinner { position: absolute; top: 50%; left: 50%; width: 28px; height: 28px; margin-left: -14px; margin-top: -14px; border: 3px solid #e0c9a6; border-top-color: #c41e3a; border-radius: 50%; animation: img-mode-spin 1s linear infinite; }

/* ============================================================
   技能卡片（大师练习题）- 字号与普通消息一致（14px）
   ============================================================ */
.skill-instruction {
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', serif;
    font-size: inherit;
    color: #5c4a3a;
    background: rgba(255,255,255,0.5);
    border-radius: 6px;
    padding: 0.45rem 0.7rem;
    margin-bottom: 0.6rem;
    border-left: 3px solid currentColor;
    line-height: 1.6;
}

/* 配对题：每行「构件名 + 下拉选描述」，触摸与桌面均可靠 */
.skill-match-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin: 0.45rem 0;
}
.skill-match-row {
    padding: 0.55rem 0.65rem;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(45, 24, 16, 0.1);
    border-radius: 10px;
}
.skill-match-row-top {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}
.skill-match-row-num {
    flex-shrink: 0;
    min-width: 1.5rem;
    height: 1.5rem;
    line-height: 1.5rem;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: rgba(196, 30, 58, 0.85);
    border-radius: 50%;
}
.skill-match-row-left {
    flex: 1;
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', serif;
    font-size: inherit;
    font-weight: 600;
    color: #2d241c;
    line-height: 1.55;
    padding: 0.2rem 0.5rem 0.2rem 0.45rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
}
.skill-match-row-select-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.skill-match-select-label {
    font-size: 0.85em;
    color: #8b6b4a;
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', serif;
}
.skill-match-select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', serif;
    font-size: inherit;
    line-height: 1.45;
    color: #2d241c;
    padding: 0.5rem 0.55rem;
    border: 1px solid rgba(45, 24, 16, 0.18);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235c4a3a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    padding-right: 2rem;
    /* 下拉/焦点高亮用暖褐，避免系统默认偏红 */
    accent-color: #8b6b4a;
    color-scheme: light;
}
.skill-match-select option {
    background: #fffdf8;
    color: #2d241c;
}
.skill-match-select:focus {
    outline: 2px solid rgba(139, 107, 74, 0.45);
    outline-offset: 1px;
    border-color: rgba(139, 107, 74, 0.45);
}

/* 配对题：自定义下拉（无系统蓝高亮） */
.skill-match-dd {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.skill-match-dd-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', serif;
    font-size: inherit;
    line-height: 1.45;
    color: #2d241c;
    padding: 0.5rem 0.65rem;
    border: 1px solid rgba(45, 24, 16, 0.18);
    border-radius: 8px;
    background: linear-gradient(180deg, #fffdf8 0%, #faf5ee 100%);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.skill-match-dd-trigger:hover {
    border-color: rgba(139, 107, 74, 0.42);
    background: #fffdf8;
}
.skill-match-dd-trigger:focus {
    outline: none;
}
.skill-match-dd-trigger:focus-visible {
    outline: 2px solid rgba(139, 107, 74, 0.5);
    outline-offset: 2px;
    border-color: rgba(139, 107, 74, 0.4);
}
.skill-match-dd-trigger-open {
    border-color: rgba(139, 107, 74, 0.45);
    box-shadow: 0 0 0 1px rgba(139, 107, 74, 0.12);
}
.skill-match-dd-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.skill-match-dd-text.skill-match-dd-placeholder {
    color: #9a8472;
    font-weight: 400;
}
.skill-match-dd-arrow {
    flex-shrink: 0;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #5c4a3a;
    opacity: 0.85;
    transition: transform 0.2s ease;
}
.skill-match-dd-trigger-open .skill-match-dd-arrow {
    transform: rotate(180deg);
}
.skill-match-dd-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 30;
    max-height: 14rem;
    overflow-y: auto;
    padding: 0.25rem;
    margin: 0;
    list-style: none;
    background: #fffdf8;
    border: 1px solid rgba(45, 24, 16, 0.14);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(45, 24, 16, 0.12), 0 2px 8px rgba(45, 24, 16, 0.06);
}
.skill-match-dd-opt {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', serif;
    font-size: inherit;
    line-height: 1.45;
    color: #2d241c;
    padding: 0.45rem 0.55rem;
    margin: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.skill-match-dd-opt:hover,
.skill-match-dd-opt:focus-visible {
    outline: none;
    background: rgba(139, 107, 74, 0.14);
    color: #1a1510;
}
.skill-match-dd-opt[hidden] {
    display: none !important;
}
.skill-match-dd-opt-clear {
    color: #8b6b4a;
    font-size: 0.92em;
}

.skill-card-actions-row {
    margin-top: 0.8rem !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
}

/* 技能加载提示 - 与消息区字体一致 */
.skill-loading-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    font-family: 'Noto Serif SC', serif;
    color: #8b6b4a;
}
.loading-skill-text {
    margin-top: 0.75rem;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #5c4a3a;
    font-family: 'Noto Serif SC', serif;
}

/* 技能模式下的加载容器：纵向排列 */
.loading-container--skill {
    flex-direction: column !important;
    align-items: center !important;
    padding: 1.5rem 1.5rem !important;
    min-width: 200px;
}
.loading-container--skill .loading-skill-text {
    margin-top: 0.75rem;
    font-size: 14px;
    font-weight: 600;
    color: #5c4a3a;
    font-family: 'Noto Serif SC', serif;
}
.loading-container--skill .loading-time {
    margin-top: 0.4rem;
}

/* 技能卡片：与对话正文同一衬线体系，避免出题区变系统黑体/无衬线 */
.skill-card-outer {
    font-size: inherit;
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', STSong, serif;
}
.skill-card-outer button {
    font-family: inherit;
}

/* 答题结果摘要（提交后卡片内显示），字号跟随外层 JS 设置 */
.skill-result-summary {
    font-family: inherit;
    color: #2d241c;
}
.skill-result-summary-title {
    font-size: inherit;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: #5c4a3a;
}
.skill-result-summary-score {
    font-size: inherit;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: #8b6b4a;
}

/* 脸谱速认：四宫格 + 生图占位 */
.skill-choice-area--face {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}
@media (max-width: 520px) {
    .skill-choice-area--face {
        grid-template-columns: 1fr;
    }
}
.skill-choice-row--face {
    display: flex;
    flex-direction: column;
    align-items: stretch !important;
}
.skill-choice-row--face .skill-face-img-wrap {
    width: 100%;
    aspect-ratio: 1;
    max-height: 180px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(45, 24, 16, 0.06);
    margin-bottom: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.skill-face-img-skel {
    font-size: 0.82rem;
    color: #8b6b4a;
    padding: 0.5rem;
    text-align: center;
    font-family: 'Noto Serif SC', serif;
}
.skill-face-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}
.skill-face-img-fail {
    font-size: 0.8rem;
    color: #b45309;
    padding: 0.5rem;
    text-align: center;
}
.skill-question-line {
    margin-top: 0.35rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    background: rgba(196, 30, 58, 0.06);
    border-left: 3px solid rgba(196, 30, 58, 0.45);
    font-family: 'Noto Serif SC', serif;
    color: #3d2a1a;
    line-height: 1.65;
}

.skill-card-feedback {
    margin-top: 0.5rem;
    padding: 0.55rem 0.6rem;
    border-radius: 10px;
    background: rgba(255, 253, 248, 0.95);
    border: 1px solid rgba(45, 24, 16, 0.12);
}
.skill-card-actions-single {
    justify-content: center;
}
.skill-card-actions-single .skill-card-action-btn {
    min-width: 8rem;
}
.skill-choice-row--ok {
    outline: 2px solid #10b981 !important;
    outline-offset: 2px;
    background: rgba(16, 185, 129, 0.08) !important;
}
.skill-choice-row--bad {
    outline: 2px solid #ef4444 !important;
    outline-offset: 2px;
    background: rgba(239, 68, 68, 0.06) !important;
}
.skill-choice-row--answer {
    outline: 2px dashed #10b981 !important;
    outline-offset: 2px;
}
.skill-fill-input--ok {
    border-bottom-color: #10b981 !important;
    color: #065f46 !important;
}
.skill-fill-input--bad {
    border-bottom-color: #ef4444 !important;
    color: #991b1b !important;
}

/* 排序题提交后：保留原行，对错与填空题一致用底色与边框区分 */
.skill-sort-row--ok {
    border-color: rgba(16, 185, 129, 0.45) !important;
    background: rgba(16, 185, 129, 0.08) !important;
    border-left-color: #10b981 !important;
}
.skill-sort-row--bad {
    border-color: rgba(239, 68, 68, 0.4) !important;
    background: rgba(239, 68, 68, 0.06) !important;
    border-left-color: #ef4444 !important;
}
.skill-sort-num-input--ok {
    border-color: #10b981 !important;
    background: rgba(236, 253, 245, 0.95) !important;
    color: #065f46 !important;
}
.skill-sort-num-input--bad {
    border-color: #ef4444 !important;
    background: rgba(254, 242, 242, 0.95) !important;
    color: #991b1b !important;
}