/* 现代化主页样式 - 参考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:
        'Ma Shan Zheng',
        '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;
    /* 默认允许垂直滚动 */
}

/* 确保所有 Font Awesome 图标使用正确的字体（优先级最高） */
i.fas,
i.far,
i.fab,
i.fal,
i.fa,
[class^="fa-"],
[class*=" fa-"] {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    /* Solid icons require 900 */
    font-style: normal !important;
}

/* 图标本体默认 inline-flex + 水平垂直居中（适用于全站） */
i.fas,
i.far,
i.fab,
i.fal,
i.fa,
[class^="fa-"],
[class*=" fa-"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 添加传统文化装饰元素 */
.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;
    /* 与页面其他部分字体一致 */
    letter-spacing: normal !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;
}

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,
body:not(.index-page) .modern-navbar .nav-date-info svg {
    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: normal;
    /* 统一字间距，与其他部分一致 */
    font-family:
        'Noto Serif SC',
        'Noto Serif CJK SC',
        'Source Han Serif SC',
        'Source Han Serif CN',
        serif !important;
    /* 与页面其他部分字体一致 */
    font-size: clamp(1rem, 1.4vw + 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,
body.index-page .modern-navbar .nav-brand svg,
.index-page .modern-navbar .nav-brand svg {
    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-toggle svg {
        width: 24px;
        height: 24px;
    }

    .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;
    }

    /* 移动端导航链接中的图标（3D 大图标单独放大） */
    .nav-menu.open .btn-modern svg:not(.nav-icon-3d),
    .nav-menu.open .nav-link-modern svg:not(.nav-icon-3d) {
        width: 18px;
        height: 18px;
    }

    .nav-menu.open .btn-modern svg.nav-icon-3d,
    .nav-menu.open .nav-link-modern svg.nav-icon-3d {
        width: 32px !important;
        height: 32px !important;
    }
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    /* 固定间距，避免抖动 */
    font-size: clamp(1.25rem, 2vw + 0.75rem, 2.25rem) !important;
    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: normal;
    /* 统一字间距，与其他部分一致 */
    flex-shrink: 0;
    /* 防止收缩 */
    z-index: 10;
}

.nav-brand i,
.nav-brand i::before {
    font-size: clamp(1.5rem, 2vw + 1rem, 2.5rem) !important;
    color: #c41e3a !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    display: inline-block !important;
    font-weight: 900 !important;
    font-style: normal !important;
    display: inline-block !important;
}

/* Lucide品牌图标样式 */
.nav-brand svg,
.brand-dragon-icon {
    width: clamp(1.5rem, 2vw + 1rem, 2.5rem) !important;
    height: clamp(1.5rem, 2vw + 1rem, 2.5rem) !important;
    color: #c41e3a !important;
    flex-shrink: 0;
    animation: brandPulse 3s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(196, 30, 58, 0.3));
}

@keyframes brandPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* 3D醒狮图标特殊样式 */
.brand-dragon-icon {
    width: clamp(1.8rem, 2vw + 1rem, 2.8rem) !important;
    height: clamp(1.8rem, 2vw + 1rem, 2.8rem) !important;
    animation: lionFloat 4s ease-in-out infinite;
}

@keyframes lionFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-2px) rotate(-1deg);
    }

    75% {
        transform: translateY(1px) rotate(1deg);
    }
}

.nav-brand span {
    margin: 0;
    padding: 0;
    font-size: clamp(1.25rem, 2vw + 0.75rem, 2.25rem) !important;
    font-weight: 700 !important;
    /* 加粗 */
    font-family:
        'Noto Serif SC',
        'Noto Serif CJK SC',
        'Source Han Serif SC',
        'Source Han Serif CN',
        serif !important;
    /* 与页面其他部分字体一致 */
}

.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;
    }
}

/* 下拉菜单项 - 统一所有页面的样式，确保字体加粗和大小一致，增强区分度 */
.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.4rem !important;
    /* 统一字体大小，所有页面一致 */
    font-weight: 800 !important;
    /* 加粗字体，更醒目，统一所有页面 */
    font-family:
        'Ma Shan Zheng',
        '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;
}

/* 下拉箭头动画 */
.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;
}

/* Lucide 等小图标在 btn-modern 中的样式（3D 主导航图标用 .nav-icon-3d 单独放大） */
.btn-modern svg:not(.nav-icon-3d),
.nav-link-modern svg:not(.nav-icon-3d) {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.btn-modern:hover svg:not(.nav-icon-3d),
.nav-link-modern:hover svg:not(.nav-icon-3d) {
    transform: scale(1.1);
}

/* 主导航：同时带 btn-modern + nav-link-modern 时用 flex 垂直居中（避免 inline-block 压过 inline-flex） */
.modern-navbar .nav-menu .btn-modern.nav-link-modern {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.65rem !important;
    vertical-align: middle;
}

/* 主导航 3D 图标尺寸（覆盖上方 16px 限制，与 1.5rem 文字比例协调） */
.modern-navbar .nav-menu .nav-link-modern svg.nav-icon-3d,
.modern-navbar .nav-menu .btn-modern svg.nav-icon-3d {
    width: clamp(30px, 2.5vw, 38px) !important;
    height: clamp(30px, 2.5vw, 38px) !important;
    min-width: 30px;
    min-height: 30px;
    flex-shrink: 0;
    vertical-align: middle;
    align-self: center;
    transform: translateY(-2px);
    /* 微上移，使图标视觉上与文字更协调 */
}

.nav-link-modern:hover .nav-icon-3d,
.nav-link-modern.active .nav-icon-3d {
    transform: scale(1.15) translateY(-4px);
    /* hover 时更明显上移 */
}

/* 下拉箭头动画 */
.dropdown-arrow {
    transition: transform 0.3s ease !important;
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0;
    vertical-align: middle;
}

.nav-dropdown:hover .dropdown-arrow,
.dropdown-menu.show~.btn-modern .dropdown-arrow {
    transform: rotate(180deg) !important;
}

.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;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    /* 导航链接居中 */
    gap: 0.5rem;
    flex-wrap: wrap;
    flex: 1;
    /* 占据剩余空间，实现居中效果 */
    position: absolute;
    /* 使用绝对定位确保真正居中 */
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    /* 自动宽度，根据内容调整 */
    max-width: calc(100% - 650px);
    /* 限制最大宽度，为左右两侧预留更多空间（品牌区域约200px + 右侧时间区域约300px + 安全边距） */
    z-index: 5;
    /* 确保在 nav-actions 之下，避免重叠 */
}

.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字体 - 与页面其他部分一致 */
    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: normal;
    /* 统一字间距，与其他部分一致 */
    -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);
    }
}


.nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* 确保内容靠右对齐 */
    gap: var(--spacing-md);
    flex-shrink: 0;
    /* 防止收缩 */
    min-width: 0;
    /* 允许缩小到0，如果为空则不占空间 */
    z-index: 10;
    /* 确保在 nav-menu 之上，避免被导航链接背景覆盖 */
    flex: 0 0 auto;
    /* 确保不收缩，保持原始大小 */
    margin-left: auto;
    /* 确保靠右对齐 */
    width: auto;
    /* 自动宽度 */
    min-width: 300px;
    /* 增加最小宽度，确保有足够空间，避免与导航菜单重叠 */
    position: relative;
    /* 确保 z-index 生效 */
    /* 首页 .nav-actions 常为 flex:1 横向拉满，透明区域仍拦截点击且 z-index(10) 高于 .nav-menu(5)，中间导航链接只有下半截可点 */
    pointer-events: none;
}

.nav-actions>* {
    pointer-events: auto;
}

/* 首页：日期条可占满剩余横向空间并换行，避免挤成一竖条 */
body.index-page .modern-navbar .nav-actions,
.index-page .modern-navbar .nav-actions {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
}

/* 导航栏日期信息样式 */
.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,
.nav-date-info svg {
    font-size: 0.9rem;
    color: #6b7280;
    margin-right: 0.2rem;
    margin-top: -1px;
    /* 微上移，与文字视觉对齐 */
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    overflow: visible;
}

/* 日期图标通用样式 */
.date-icon {
    transition: transform 0.3s ease, color 0.3s ease;
}

.date-icon:hover {
    transform: scale(1.1);
    color: var(--primary-color) !important;
}

/* 农历图标特殊效果 */
.lunar-icon {
    animation: gentlePulse 3s ease-in-out infinite;
}

@keyframes gentlePulse {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* 节气容器样式 */
.solar-term-container {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* 节气图标样式 */
.solar-term-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.solar-term-icon:hover {
    transform: rotate(15deg) scale(1.1);
}

/* 节气文字样式 */
.solar-term-text {
    display: inline-block;
}

/* 节气悬停效果 */
.solar-term-container:hover .solar-term-icon {
    animation: solarTermBounce 0.5s ease;
}

@keyframes solarTermBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}

/* 24节气图标颜色主题 */
.solar-term-icon.lichun {
    color: #22c55e;
}

/* 立春 - 绿色 */
.solar-term-icon.yushui {
    color: #3b82f6;
}

/* 雨水 - 蓝色 */
.solar-term-icon.jingzhe {
    color: #8b5cf6;
}

/* 惊蛰 - 紫色 */
.solar-term-icon.chunfen {
    color: #10b981;
}

/* 春分 - 翠绿 */
.solar-term-icon.qingming {
    color: #22c55e;
}

/* 清明 - 草绿 */
.solar-term-icon.guyu {
    color: #06b6d4;
}

/* 谷雨 - 青色 */
.solar-term-icon.lixia {
    color: #f59e0b;
}

/* 立夏 - 橙黄 */
.solar-term-icon.xiaoman {
    color: #84cc16;
}

/* 小满 - 黄绿 */
.solar-term-icon.mangzhong {
    color: #eab308;
}

/* 芒种 - 黄色 */
.solar-term-icon.xiazhi {
    color: #f97316;
}

/* 夏至 - 橙色 */
.solar-term-icon.xiaoshu {
    color: #ef4444;
}

/* 小暑 - 红色 */
.solar-term-icon.dashu {
    color: #dc2626;
}

/* 大暑 - 深红 */
.solar-term-icon.liuqiu {
    color: #a855f7;
}

/* 立秋 - 紫红 */
.solar-term-icon.chushu {
    color: #ec4899;
}

/* 处暑 - 粉红 */
.solar-term-icon.bailu {
    color: #94a3b8;
}

/* 白露 - 银白 */
.solar-term-icon.qiufen {
    color: #f59e0b;
}

/* 秋分 - 金黄 */
.solar-term-icon.hanlu {
    color: #64748b;
}

/* 寒露 - 灰蓝 */
.solar-term-icon.shuangjiang {
    color: #e2e8f0;
}

/* 霜降 - 霜白 */
.solar-term-icon.lidong {
    color: #1d4ed8;
}

/* 立冬 - 深蓝 */
.solar-term-icon.xiaoxue {
    color: #60a5fa;
}

/* 小雪 - 浅蓝 */
.solar-term-icon.daxue {
    color: #bfdbfe;
}

/* 大雪 - 雪白 */
.solar-term-icon.dongzhi {
    color: #1e40af;
}

/* 冬至 - 靛蓝 */
.solar-term-icon.xiaohan {
    color: #0ea5e9;
}

/* 小寒 - 天蓝 */
.solar-term-icon.dahan {
    color: #0284c7;
}

/* 大寒 - 湖蓝 */

.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.1rem;
    padding-left: 0.1rem;
    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;
}

/* 确保导航栏中的昵称样式 */
.nav-user-info .user-nickname,
.nav-user-info #user-nickname-display {
    color: #c41e3a !important;
    font-weight: 700 !important;
    font-family: 'Times New Roman', Times, serif !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: 'Times New Roman', Times, 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: 'Times New Roman', Times, 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: 'Times New Roman', Times, 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: 'Times New Roman', Times, 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;
    white-space: normal;
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 0.25rem;
    column-gap: 0.4rem;
    max-width: min(100%, 42rem);
}

body.index-page .modern-navbar .nav-date-info i,
.index-page .modern-navbar .nav-date-info i,
body.index-page .modern-navbar .nav-date-info svg,
.index-page .modern-navbar .nav-date-info svg {
    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,
body.index-page .modern-navbar.navbar-scrolled .nav-brand svg,
.index-page .modern-navbar.navbar-scrolled .nav-brand svg,
.modern-navbar.navbar-scrolled .nav-brand svg {
    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,
body.index-page .modern-navbar.navbar-scrolled .nav-date-info svg,
.index-page .modern-navbar.navbar-scrolled .nav-date-info svg,
.modern-navbar.navbar-scrolled .nav-date-info svg {
    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;
}

/* ============================================
   导航链接字体全局基线
   确保在任何页面（game-page / chat-page 等）都强制统一加粗
   ============================================ */
.nav-link-modern,
.nav-link-modern span,
.nav-link-modern .nav-icon-3d+span,
.btn-modern,
.btn-modern span {
    font-family: 'Ma Shan Zheng', 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', serif !important;
    font-weight: 800 !important;
    font-size: clamp(1.15rem, 1.4vw + 0.55rem, 1.7rem) !important;
    letter-spacing: normal !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* ============================================
   游戏页面 (.game-page) 导航栏样式
   复用 body:not(.index-page) 已有规则，仅补充 SVG 图标颜色
   ============================================ */
body.game-page .modern-navbar .nav-date-info svg {
    /* 不覆盖 navbar 里各 SVG 的 inline stroke 颜色 */
    color: unset !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: 0;
    right: 0;
    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);
}

/* 首页：锚点预留导航栏高度；隐藏滚动条 */
body.index-page .modern-main {
    scroll-padding-top: 92px;
    scroll-padding-bottom: 24px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body.index-page .modern-main::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* 首页内部可滚容器也隐藏滚动条 */
body.index-page .cta-section,
body.index-page .cta-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body.index-page .cta-section::-webkit-scrollbar,
body.index-page .cta-container::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

body.index-page * {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body.index-page *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* 轮播图后的内容区域 */
.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:not(.ready) .carousel-slide {
    transition: none;
}

.hero-carousel-background:not(.ready) .carousel-slide.active {
    opacity: 1;
}

.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: flex-start;
    /* 内容在顶部 */
    align-items: stretch;
    /* footer拉伸到全宽 */
    scroll-snap-align: start;
    scroll-snap-stop: always;
    scroll-margin: 0;
    position: relative;
    padding: 0;
    /* 移除padding，由内容自行撑开；navbar为fixed定位不占用section空间 */
    opacity: 1 !important;
    /* 确保可见 */
    transform: translateZ(0) !important;
    /* 使用硬件加速 */
    overflow: hidden;
    /* 禁止嵌套滚动，内容在section内自然排列 */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.cta-container {
    flex: 1;
    /* 占据可用空间 */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* 不创建嵌套滚动 */
}

/* 原有的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:
        /* 底层宫廷红绸缎渐变 */
        radial-gradient(ellipse at 30% 0%, rgba(122, 11, 24, 0.97) 0%, rgba(60, 9, 15, 0.92) 55%, rgba(40, 6, 10, 0.97) 100%),
        linear-gradient(120deg, rgba(122, 11, 24, 0.75) 0%, rgba(80, 10, 16, 0.78) 40%, rgba(50, 8, 12, 0.82) 100%),
        /* 金砂晕染层 */
        radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.26) 0%, transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(212, 175, 55, 0.18) 0%, transparent 55%),
        /* 宫格暗纹（极低不透明度） */
        repeating-linear-gradient(0deg, rgba(255, 215, 0, 0.02) 0px, transparent 48px, transparent 96px),
        repeating-linear-gradient(90deg, rgba(255, 215, 0, 0.02) 0px, transparent 48px, transparent 96px),
        /* 轻微水波纹理，增强层次 */
        radial-gradient(ellipse at bottom left, rgba(212, 175, 55, 0.06) 0%, transparent 60%),
        /* 基础色 */
        #3b0a0f !important;
    background-blend-mode: multiply, screen, soft-light, soft-light, overlay, overlay, normal, normal;
    background-size: 200% 200% !important;
    animation: palaceDrift 18s ease-in-out infinite;
    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%;
    }
}

/* 专家区红金背景缓慢漂移动画 */
@keyframes palaceDrift {
    0% {
        background-position: 0% 50%;
        filter: saturate(1);
    }

    50% {
        background-position: 100% 50%;
        filter: saturate(1.02);
    }

    100% {
        background-position: 0% 50%;
        filter: saturate(1);
    }
}

.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 {
    /* 亮金色文字，无描边，使用文字渐变增强质感 */
    background: linear-gradient(180deg, #fff6cc 0%, #ffe38a 40%, #f5c556 70%, #d7a73a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #f2c860;
    /* 兼容回退色 */
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.30);
    font-weight: 800;
    /* 居中 */
    font-size: clamp(2.4rem, 4.8vw, 3.4rem);
    display: inline-flex;
    /* 使内容在牌匾内水平垂直居中 */
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    /* 让文字与横幅更贴合 */
    line-height: clamp(50px, 7vw, 80px);
    /* 与牌匾高度一致，实现垂直居中 */
    letter-spacing: 1px;
}

/* 红金丝绸横幅（标题背后） */
.modern-section#experts .section-title::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    /* 牌匾与标题中心对齐 */
    width: clamp(600px, 70vw, 1100px);
    /* 横幅更宽防止越界 */
    height: clamp(50px, 7vw, 80px);
    border-radius: 28px / 46px;
    /* 拱形牌匾的弧度效果 */
    background:
        linear-gradient(135deg, rgba(122, 11, 24, 0.85), rgba(70, 8, 12, 0.9)),
        radial-gradient(circle at 30% 40%, rgba(212, 175, 55, 0.26), transparent 60%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.25) 0%, transparent 20%, transparent 80%, rgba(0, 0, 0, 0.25) 100%);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -2px 0 rgba(0, 0, 0, 0.35);
    border: 1.5px solid rgba(212, 175, 55, 0.35);
    filter: saturate(1.05);
    z-index: -1;
}

/* 标题横幅的云纹金边（使用遮罩模拟云纹边框） */
.modern-section#experts .section-title::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    /* 与标题中心重合 */
    width: clamp(620px, 72vw, 1150px);
    height: clamp(56px, 7.6vw, 86px);
    border-radius: 30px / 48px;
    pointer-events: none;
    z-index: -1;
    background: transparent;
    /* 仅保留金色边框，避免与金色文字冲突 */
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -2px 0 rgba(0, 0, 0, 0.32);
    border: 2px solid rgba(212, 175, 55, 0.55);
    /* 使用遮罩制造云纹边框的掏空效果（顶部/底部的云纹）*/
    -webkit-mask:
        radial-gradient(circle at 12px 50%, #000 10px, transparent 11px) top left/40px 40px repeat-x,
        radial-gradient(circle at calc(100% - 12px) 50%, #000 10px, transparent 11px) top right/40px 40px repeat-x,
        radial-gradient(circle at 12px 50%, #000 10px, transparent 11px) bottom left/40px 40px repeat-x,
        radial-gradient(circle at calc(100% - 12px) 50%, #000 10px, transparent 11px) bottom right/40px 40px repeat-x,
        linear-gradient(#000, #000) center/100% calc(100% - 18px) no-repeat;
    mask:
        radial-gradient(circle at 12px 50%, #000 10px, transparent 11px) top left/40px 40px repeat-x,
        radial-gradient(circle at calc(100% - 12px) 50%, #000 10px, transparent 11px) top right/40px 40px repeat-x,
        radial-gradient(circle at 12px 50%, #000 10px, transparent 11px) bottom left/40px 40px repeat-x,
        radial-gradient(circle at calc(100% - 12px) 50%, #000 10px, transparent 11px) bottom right/40px 40px repeat-x,
        linear-gradient(#000, #000) center/100% calc(100% - 18px) no-repeat;
}

/* 专家区副标题：提高对比度为白色并加阴影 */
.modern-section#experts .section-subtitle {
    color: rgba(255, 255, 255, 0.92) !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.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);
    column-gap: var(--spacing-lg);
    row-gap: calc(var(--spacing-xl) * 1.4);
    max-width: 100%;
    /* 不限制网格最大宽度，随容器伸展 */
    margin: 0 auto;
}

.expert-card {
    /* 历史文化纸张质感背景 */
    background:
        /* 暗雕斜向压纹（极低透明度，不喧宾） */
        repeating-linear-gradient(45deg,
            rgba(0, 0, 0, 0.015) 0px,
            rgba(0, 0, 0, 0.015) 8px,
            transparent 8px,
            transparent 16px),
        /* 暗雕圆形压纹晕染（增加立体层次） */
        radial-gradient(40% 60% at 20% 80%,
            rgba(0, 0, 0, 0.04) 0%,
            transparent 60%),
        /* 纸张纹理 */
        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),
        inset 0 6px 14px rgba(0, 0, 0, 0.06);
    /* 暗雕的内阴影，增强立体 */
    /* 古典边框 - 仿古书页边缘 */
    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, overlay, multiply, screen, normal, normal, normal, normal;
    /* 与新增两层对应 */
    /* 保证左右分区有足够高度 */
    min-height: 320px;
}

/* 轻量纹样默认层：在信息面板上叠加，保持低透明度不影响可读性 */
.experts-grid .expert-card .expert-info::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    opacity: 0.65;
    background: none;
    /* 由具体类别覆盖 */
}

/* ——— 类别定制：云纹/回纹/波纹 与描边 ——— */
/* 粤剧：暗金云纹 + 红系描边 */
.experts-grid .expert-card[data-agent="cantonese_opera_critic"] {
    border-color: rgba(196, 30, 58, 0.45);
    border-top-color: rgba(212, 175, 55, 0.55);
    box-shadow: 0 12px 32px rgba(196, 30, 58, 0.12), 0 4px 16px rgba(196, 30, 58, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.experts-grid .expert-card[data-agent="cantonese_opera_critic"] .expert-info::after {
    background:
        radial-gradient(24px 18px at 12% 22%, rgba(212, 175, 55, 0.10), transparent 70%),
        radial-gradient(22px 18px at 28% 40%, rgba(212, 175, 55, 0.08), transparent 70%),
        radial-gradient(24px 18px at 44% 24%, rgba(212, 175, 55, 0.10), transparent 70%),
        radial-gradient(22px 18px at 62% 42%, rgba(212, 175, 55, 0.08), transparent 70%),
        radial-gradient(24px 18px at 78% 26%, rgba(212, 175, 55, 0.10), transparent 70%),
        radial-gradient(22px 18px at 90% 44%, rgba(212, 175, 55, 0.08), transparent 70%);
    background-blend-mode: screen;
}

/* 建筑：青铜回纹 + 棕系描边 */
.experts-grid .expert-card[data-agent="architecture_historian"] {
    border-color: rgba(125, 94, 65, 0.45);
    border-top-color: rgba(146, 120, 88, 0.55);
    box-shadow: 0 12px 32px rgba(88, 70, 50, 0.12), 0 4px 16px rgba(88, 70, 50, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.experts-grid .expert-card[data-agent="architecture_historian"] .expert-info::after {
    background:
        repeating-linear-gradient(90deg,
            rgba(88, 120, 100, 0.08) 0px,
            rgba(88, 120, 100, 0.08) 8px,
            transparent 8px,
            transparent 16px),
        repeating-linear-gradient(0deg,
            rgba(88, 120, 100, 0.08) 0px,
            rgba(88, 120, 100, 0.08) 8px,
            transparent 8px,
            transparent 16px);
    background-blend-mode: multiply;
}

/* 美食：金线波纹 + 暖色描边 */
.experts-grid .expert-card[data-agent="food_culture_expert"] {
    border-color: rgba(196, 140, 80, 0.45);
    border-top-color: rgba(212, 175, 55, 0.60);
    box-shadow: 0 12px 32px rgba(196, 140, 80, 0.12), 0 4px 16px rgba(196, 140, 80, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.experts-grid .expert-card[data-agent="food_culture_expert"] .expert-info::after {
    background:
        repeating-linear-gradient(135deg,
            rgba(255, 215, 100, 0.10) 0px,
            rgba(255, 215, 100, 0.10) 6px,
            transparent 6px,
            transparent 12px),
        radial-gradient(ellipse at 80% 20%, rgba(212, 175, 55, 0.10) 0%, transparent 65%);
    background-blend-mode: screen, multiply;
}

/* 只在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 {
    /* 保留微动效果，不再改变透明度 */
}

.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-image: var(--expert-bg-url, 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-image: var(--expert-bg-url, 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-image: var(--expert-bg-url, 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-image: var(--expert-bg-url, 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-image: var(--expert-bg-url, 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-image: var(--expert-bg-url, 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-image: var(--expert-bg-url, 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-image: var(--expert-bg-url, 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, #c41e3a, #8b1538);
    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: 11px 22px;
    border-radius: 999px;
    border: 2px solid rgba(240, 192, 64, 0.55);
    background: linear-gradient(160deg, #c41e3a 0%, #8b1538 60%, #5a0e22 100%);
    box-shadow:
        0 4px 16px rgba(196, 30, 58, 0.35),
        0 0 0 0 rgba(240, 192, 64, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.28s ease,
        transform 0.28s ease,
        box-shadow 0.28s ease;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

/* 金色顶边装饰线 */
.expert-card .expert-btn::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 18px;
    right: 18px;
    height: 1.5px;
    border-radius: 1px;
    background: linear-gradient(90deg, transparent, rgba(240, 192, 64, 0.8), transparent);
}

.expert-card:hover .expert-btn {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-4px);
    box-shadow:
        0 12px 32px rgba(196, 30, 58, 0.45),
        0 0 24px 4px rgba(240, 192, 64, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    border-color: rgba(240, 192, 64, 0.75);
}

.expert-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(196, 30, 58, 0.4);
}

.expert-btn:active {
    transform: translateY(-1px);
}

.expert-btn i {
    font-size: 0.82rem;
    transition: transform 0.2s ease;
}

.expert-btn:hover i {
    transform: translateX(2px);
}

/* 功能特色 */
.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-image: linear-gradient(rgba(255, 248, 235, 0.60), rgba(255, 248, 235, 0.65)), url('https://edgeoneimg.cdn.sn/i/69d9058a7dbff_1775830410.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: visible;
    position: relative;
}

/* 刺绣边框效果 */
.cta-section::before {
    content: "";
    position: absolute;
    inset: 10px;
    pointer-events: none;
    border: 2px solid transparent;
    border-image: repeating-linear-gradient(90deg,
            rgba(196, 30, 58, 0.4) 0px,
            rgba(212, 175, 55, 0.7) 2px,
            rgba(46, 125, 50, 0.4) 4px,
            rgba(212, 175, 55, 0.7) 6px,
            rgba(25, 118, 210, 0.4) 8px,
            rgba(212, 175, 55, 0.7) 10px) 1;
    box-shadow:
        inset 0 0 30px rgba(180, 150, 80, 0.12),
        inset 0 0 60px rgba(180, 150, 80, 0.06);
    z-index: 0;
}

/* 四角彩色刺绣角花 */
.cta-section::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        /* 左上角 - 金红为主 */
        radial-gradient(ellipse 100px 100px at 0% 0%, rgba(212, 175, 55, 0.3) 0%, rgba(196, 30, 58, 0.15) 50%, transparent 75%),
        radial-gradient(ellipse 60px 60px at 18px 18px, rgba(196, 30, 58, 0.25) 0%, rgba(212, 175, 55, 0.1) 60%, transparent 80%),
        radial-gradient(circle at 10px 10px, rgba(255, 235, 180, 0.5) 0px, rgba(212, 175, 55, 0.3) 3px, transparent 6px),

        /* 右上角 - 金蓝为主 */
        radial-gradient(ellipse 100px 100px at 100% 0%, rgba(212, 175, 55, 0.3) 0%, rgba(25, 118, 210, 0.15) 50%, transparent 75%),
        radial-gradient(ellipse 60px 60px at calc(100% - 18px) 18px, rgba(25, 118, 210, 0.25) 0%, rgba(212, 175, 55, 0.1) 60%, transparent 80%),
        radial-gradient(circle at calc(100% - 10px) 10px, rgba(100, 181, 246, 0.45) 0px, rgba(25, 118, 210, 0.3) 3px, transparent 6px),

        /* 左下角 - 金绿为主 */
        radial-gradient(ellipse 100px 100px at 0% 100%, rgba(212, 175, 55, 0.3) 0%, rgba(46, 125, 50, 0.15) 50%, transparent 75%),
        radial-gradient(ellipse 60px 60px at 18px calc(100% - 18px), rgba(46, 125, 50, 0.25) 0%, rgba(212, 175, 55, 0.1) 60%, transparent 80%),
        radial-gradient(circle at 10px calc(100% - 10px), rgba(129, 199, 132, 0.45) 0px, rgba(46, 125, 50, 0.3) 3px, transparent 6px),

        /* 右下角 - 金紫为主 */
        radial-gradient(ellipse 100px 100px at 100% 100%, rgba(212, 175, 55, 0.3) 0%, rgba(123, 31, 162, 0.15) 50%, transparent 75%),
        radial-gradient(ellipse 60px 60px at calc(100% - 18px) calc(100% - 18px), rgba(123, 31, 162, 0.25) 0%, rgba(212, 175, 55, 0.1) 60%, transparent 80%),
        radial-gradient(circle at calc(100% - 10px) calc(100% - 10px), rgba(186, 104, 200, 0.45) 0px, rgba(123, 31, 162, 0.3) 3px, transparent 6px);
    z-index: 1;
}

/* 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) calc(var(--spacing-2xl) + 120px) var(--spacing-lg);
    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);
    }
}

.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 标题 + 统计 同一行 */
.cta-top-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1rem, 3vw, 2.5rem);
    margin-bottom: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    position: relative;
}

.cta-top-row .cta-header {
    flex: 1 1 380px;
    max-width: 720px;
    text-align: left;
    margin-bottom: 0;
    padding-top: 0;
}

.cta-top-row .cta-header::before {
    top: -12px;
    left: 0;
    transform: none;
}

.cta-top-row .cta-header::after {
    left: 0;
    transform: none;
    width: min(100%, 320px);
    bottom: -18px;
}

.cta-top-row .cta-badge {
    margin-bottom: var(--spacing-sm);
}

.cta-top-row .cta-main-title {
    margin-bottom: var(--spacing-xs);
}

.cta-top-row .cta-subtitle {
    margin: 0;
    max-width: 100%;
}

.cta-top-row .cta-stats {
    flex: 0 1 auto;
    justify-content: flex-end;
    margin-bottom: 0;
    padding: 0;
    gap: clamp(1rem, 2.5vw, 2.25rem);
    align-items: center;
}

@media (max-width: 992px) {
    .cta-top-row {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-top-row .cta-header {
        text-align: center;
        max-width: none;
    }

    .cta-top-row .cta-header::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .cta-top-row .cta-header::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .cta-top-row .cta-stats {
        justify-content: center;
    }
}

/* 首页 CTA：去掉页脚后不再用 space-between 撑底；留出导航栏下方安全区，避免顶部内容被挡 */
body.index-page .cta-section {
    justify-content: flex-start;
    padding-bottom: var(--spacing-lg);
    overflow: visible;
    padding-top: max(96px, calc(env(safe-area-inset-top, 0px) + 80px));
    /* 锚点/程序滚动到此区块时预留固定导航栏高度，避免徽章与装饰符被裁切 */
    scroll-margin-top: 88px;
    /* 勿强制至少一屏高：否则 .cta-container flex:1 会在弹幕墙下撑出大块空白 */
    min-height: auto;
    height: auto;
}

/* 首页：压缩 CTA 顶栏，把纵向空间留给弹幕墙 */
body.index-page .cta-section .cta-container {
    margin: var(--spacing-md) auto var(--spacing-lg) auto;
    padding-top: var(--spacing-md);
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
    padding-bottom: var(--spacing-xl);
    gap: var(--spacing-md);
    overflow: visible;
    /* 随内容增高，不要铺满 section 剩余高度（避免底部空白可滚动区域） */
    flex: 0 1 auto;
}

body.index-page .cta-section .cta-top-row {
    margin-bottom: var(--spacing-sm);
    /* 为 .cta-header::before 装饰留出上方空间，避免被裁切 */
    padding-top: clamp(0.85rem, 2vw, 1.35rem);
    gap: clamp(0.65rem, 2vw, 1.25rem);
    align-items: flex-end;
    overflow: visible;
}

body.index-page .cta-section .cta-top-row .cta-header {
    padding-top: 0.25rem;
    overflow: visible;
}

body.index-page .cta-section .cta-top-row .cta-header::before {
    font-size: 1.5rem;
    top: -6px;
    opacity: 0.55;
}

body.index-page .cta-section .cta-top-row .cta-header::after {
    bottom: -8px;
    height: 2px;
    width: min(100%, 200px);
    opacity: 0.85;
}

body.index-page .cta-section .cta-top-row .cta-badge {
    padding: 4px 12px;
    font-size: 0.76rem;
    margin-bottom: 6px;
    border-width: 1px;
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.1);
}

body.index-page .cta-section .cta-top-row .cta-main-title {
    font-size: clamp(1.25rem, 2.4vw, 1.85rem);
    letter-spacing: 0.06em;
    margin-bottom: 2px;
    line-height: 1.28;
}

body.index-page .cta-section .cta-top-row .cta-subtitle {
    font-size: clamp(0.8rem, 1.25vw, 0.95rem);
    line-height: 1.5;
    margin: 0;
}

body.index-page .cta-section .cta-top-row .cta-stats {
    gap: clamp(0.65rem, 1.8vw, 1.35rem);
    padding: 4px 0;
}

body.index-page .cta-section .cta-top-row .stat-item {
    min-width: 0;
    padding: 0 6px;
}

body.index-page .cta-section .cta-top-row .stat-number {
    font-size: clamp(1.65rem, 3.4vw, 2.45rem);
    font-weight: 800;
    margin-bottom: 0;
    letter-spacing: -0.02em;
}

body.index-page .cta-section .cta-top-row .stat-label {
    font-size: clamp(0.82rem, 1.35vw, 1.05rem);
    font-weight: 600;
    line-height: 1.35;
    margin-top: 4px;
    opacity: 0.95;
}

/* 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;
    position: sticky;
    bottom: var(--spacing-lg);
    z-index: 2;
}

.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-xl) 0 var(--spacing-sm);
    position: relative;
    /* 统一所有页面的footer样式 */
    margin-top: 0;
}

.cta-section .modern-footer {
    flex-shrink: 0;
}

@media (max-height: 700px) {
    .cta-container {
        padding-bottom: calc(var(--spacing-3xl) + 140px);
    }
}

/* 在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-md);
}

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

.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-sm);
}

.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-xs);
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-sm);
    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-height: 800px) {
    .modern-footer {
        padding: var(--spacing-md) 0 var(--spacing-xs);
    }

    .footer-content {
        gap: var(--spacing-sm);
        margin-bottom: var(--spacing-sm);
    }

    .footer-links {
        gap: var(--spacing-xs);
    }

    .footer-bottom {
        padding-top: var(--spacing-xs);
    }
}

/* 首页在低视口高度下的超紧凑footer方案：隐藏次级链接，仅保留品牌与版权 */
@media (max-height: 750px) {
    body.index-page .modern-footer {
        padding: var(--spacing-sm) 0 var(--spacing-xs) !important;
    }

    body.index-page .footer-container {
        padding: 0 var(--spacing-sm) !important;
    }

    body.index-page .footer-content {
        grid-template-columns: 1fr !important;
        gap: var(--spacing-xs) !important;
        margin-bottom: var(--spacing-xs) !important;
        text-align: center !important;
    }

    body.index-page .footer-links {
        display: none !important;
    }

    body.index-page .brand-logo {
        font-size: 1rem !important;
    }

    body.index-page .brand-logo span {
        font-size: 0.9rem !important;
    }

    body.index-page .footer-brand p {
        font-size: 0.85rem !important;
    }

    body.index-page .footer-bottom {
        padding-top: var(--spacing-xs) !important;
        font-size: 0.8rem !important;
    }
}

@media (max-height: 620px) {
    body.index-page .modern-footer {
        padding: var(--spacing-2xs) 0 var(--spacing-2xs) !important;
    }

    body.index-page .footer-bottom {
        font-size: 0.75rem !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;
        row-gap: var(--spacing-xl);
        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;
}


/* =========================
   CTA区覆盖性微调样式
   - 增大统计说明文字
   - 功能卡文本一行/两行展示
   ========================= */
.stat-label {
    font-size: 1.15rem;
    line-height: 1.25;
    letter-spacing: 0.2px;
}

.cta-feature-card p {
    line-height: 1.4;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.cta-feature-card p.one-line {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cta-feature-card p.two-line {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 顶部导航链接图标与文字的排列与样式（文化标识） */
.modern-navbar .nav-menu .nav-link-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem !important;
    /* 图标与文字间距，与其他页面保持一致，使用 !important 确保优先级 */
}

.modern-navbar .nav-menu .nav-link-modern i,
.modern-navbar .nav-menu .nav-link-modern i::before {
    font-size: 1.25rem;
    /* 提升图标尺寸，使更醒目 */
    opacity: 0.95;
    line-height: 1;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    /* Solid icons require 900 */
    font-style: normal !important;
    display: inline-block !important;
}

.modern-navbar .nav-menu .nav-link-modern:hover i {
    color: #ffd700;
    /* 悬停时与文字保持统一的高亮色 */
}

/* 非首页导航：匹配首页的图标与文字大小、间距设置（仅限尺寸与间距） */
body:not(.index-page) .modern-navbar .nav-menu .nav-link-modern {
    font-size: 1.7rem;
    /* 与首页导航链接文字大小一致 */
    font-weight: 800;
    /* 与首页字重一致 */
    gap: 0.5rem !important;
    /* 与其他页面保持一致 */
}

body:not(.index-page) .modern-navbar .nav-menu .nav-link-modern i,
body:not(.index-page) .modern-navbar .nav-menu .nav-link-modern i::before {
    font-size: 1.25rem;
    /* 图标尺寸与首页一致 */
    transform: translateY(-1px);
    /* 非首页：图标微微上移，更贴近文字基线 */
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    /* Solid icons require 900 */
    font-style: normal !important;
    display: inline-block !important;
    vertical-align: middle !important;
    /* 确保垂直居中对齐 */
    line-height: 1 !important;
    /* 与首页保持一致 */
}

/* === 全局统一导航栏与底部字体（覆盖页面内自定义字体，如文脉溯源页） === */
/* 排除图标元素，避免影响Font Awesome图标显示 */
.modern-navbar,
.modern-navbar *:not(i):not(.fas):not(.far):not(.fab):not(.fal):not(.fa):not([class^="fa-"]):not([class*=" fa-"]) {
    font-family:
        'Ma Shan Zheng',
        'Noto Serif SC',
        'Noto Serif CJK SC',
        'Source Han Serif SC',
        'Source Han Serif CN',
        serif !important;
}

/* Font Awesome 图标字体例外 - 确保图标正常显示（优先级最高） */
.modern-navbar i,
.modern-navbar .fas,
.modern-navbar .far,
.modern-navbar .fab,
.modern-navbar .fal,
.modern-navbar .fa,
.modern-navbar [class^="fa-"],
.modern-navbar [class*=" fa-"],
.modern-navbar i *,
.modern-navbar .fas *,
.modern-navbar .far *,
.modern-navbar .fab *,
.modern-navbar .fal *,
.modern-navbar .fa *,
.modern-navbar i::before,
.modern-navbar .fas::before,
.modern-navbar .far::before,
.modern-navbar .fab::before,
.modern-navbar .fal::before,
.modern-navbar .fa::before,
.modern-navbar [class^="fa-"]::before,
.modern-navbar [class*=" fa-"]::before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    /* Solid icons require 900 */
    font-style: normal !important;
    display: inline-block !important;
}

/* 导航栏用户昵称仍然使用 Times New Roman，保持高亮风格 */
.modern-navbar .nav-user-info .user-nickname,
.modern-navbar .nav-user-info #user-nickname-display {
    font-family: 'Times New Roman', Times, serif !important;
}

.modern-footer,
.modern-footer * {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* 头像悬停放大效果（确保在所有页面生效） */
.modern-navbar .user-avatar-container {
    position: relative;
    overflow: visible;
}

.modern-navbar .user-avatar-container:hover {
    transform: scale(1.5);
    z-index: 9999;
}

.modern-navbar .user-avatar-container:hover .user-avatar,
.modern-navbar .user-avatar-container:hover #user-avatar-img {
    border-radius: 50% !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* ============================================
   页面预加载优化样式
   ============================================ */

/* 优化导航栏链接的交互 */
.nav-link-modern {
    position: relative;
    transition: all 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
    font-weight: 800 !important;
}

.nav-link-modern::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color, #d4af37);
    transition: all 0.3s ease;
}

.nav-link-modern:hover::after,
.nav-link-modern.active::after {
    width: 100%;
}

/* 3D 立体图标全局样式 */
.nav-icon-3d {
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
    transform-origin: center center;
}

.nav-link-modern:hover .nav-icon-3d,
.nav-link-modern.active .nav-icon-3d {
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
}

/* 下拉菜单 3D 图标（比主列略小，仍明显大于原 16px） */
.dropdown-item .nav-icon-3d {
    width: clamp(26px, 2.2vw, 32px) !important;
    height: clamp(26px, 2.2vw, 32px) !important;
    min-width: 26px;
    min-height: 26px;
    flex-shrink: 0;
    align-self: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
}

.dropdown-item:hover .nav-icon-3d {
    transform: scale(1.2) rotate(-5deg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* 页面切换时的平滑滚动 */
html {
    scroll-behavior: smooth;
}


/* ============================================
   弹幕墙 + 智能体分析 样式
   ============================================ */

/* ---- 整体布局：外层宣纸色与页头统一；弹幕幕布 .danmaku-screen 单独保持纯黑 ---- */
.danmaku-zone {
    display: grid;
    grid-template-columns: 1fr minmax(300px, 420px);
    grid-template-rows: 1fr;
    gap: 16px;
    width: 100%;
    height: clamp(700px, 90vh, 980px);
    align-items: stretch;
    padding: 18px 18px 18px;
    background: linear-gradient(180deg, #fdf8f0 0%, #f5ede0 52%, #ede0cc 100%);
    border-radius: 22px;
    border: 1px solid rgba(196, 30, 58, 0.14);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.08),
        0 2px 0 rgba(212, 175, 55, 0.12) inset;
    box-sizing: border-box;
    overflow: hidden;
}

/* ---- 左侧弹幕区 ---- */
.danmaku-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    overflow: hidden;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.danmaku-header-main {
    flex: 1 1 200px;
    min-width: 0;
}

.danmaku-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.danmaku-pause-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 6px 14px 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.45);
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.92) 0%,
            rgba(253, 245, 230, 0.95) 100%);
    color: #7f1d1d;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition:
        background 0.25s,
        border-color 0.25s,
        box-shadow 0.25s,
        transform 0.15s;
}

.danmaku-pause-btn:hover {
    border-color: rgba(251, 146, 60, 0.55);
    box-shadow:
        0 4px 14px rgba(251, 146, 60, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

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

.danmaku-pause-btn i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    font-size: 14px;
    color: #fff;
    background: linear-gradient(145deg, #fb923c 0%, #ea580c 100%);
    box-shadow:
        0 2px 8px rgba(234, 88, 12, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    line-height: 1;
    font-style: normal;
}

.danmaku-pause-btn i::before {
    line-height: 1;
}

/* 三角形播放图标略偏左，向右微移实现视觉居中 */
.danmaku-pause-btn i.fa-play {
    padding-left: 2px;
}

.danmaku-pause-btn i.fa-pause {
    letter-spacing: 0;
}

.danmaku-pause-btn[aria-pressed='true'] {
    border-color: rgba(52, 211, 153, 0.5);
    background: linear-gradient(135deg,
            rgba(236, 253, 245, 0.95) 0%,
            rgba(255, 255, 255, 0.92) 100%);
    color: #166534;
}

.danmaku-pause-btn[aria-pressed='true'] i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #34d399 0%, #059669 100%);
    box-shadow:
        0 2px 8px rgba(5, 150, 105, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.danmaku-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.danmaku-header-inline {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 18px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(196, 30, 58, 0.12);
    flex-shrink: 0;
}

.danmaku-subtitle-inline {
    margin: 6px 0 0;
    font-size: 0.82rem;
    line-height: 1.55;
    color: rgba(90, 55, 35, 0.65);
    min-width: 0;
}

.danmaku-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.12rem;
    font-weight: 700;
    color: #7f1d1d;
    flex-shrink: 0;
}

.danmaku-title-row i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #c41e3a;
    line-height: 1;
    font-style: normal;
}

.danmaku-title-row i::before {
    line-height: 1;
}

.danmaku-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(127, 29, 29, 0.55);
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    border: 1px solid rgba(248, 113, 113, 0.25);
}

.live-dot {
    width: 7px;
    height: 7px;
    background: #f87171;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.75);
    animation: pulse-dot 1.2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.7);
    }
}

.danmaku-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    padding-left: 2px;
}

/* ---- 弹幕幕布：底图 + 略压暗，保证弹幕可读 ---- */
.danmaku-screen {
    position: relative;
    width: 100%;
    flex: 1 1 0;
    min-height: 300px;
    border-radius: 18px;
    overflow: hidden;
    background-color: #0a0608;
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.55) 100%),
        url("https://img.cdn1.vip/i/69c7c877a1775_1774700663.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid rgba(0, 0, 0, 0.85);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.danmaku-screen.dm-paused .danmaku-item.dm-active {
    animation-play-state: paused;
}

/* Canvas 星空知识网（置于 overlay / scene-bg / watermark 之下，弹幕轨道之上） */
.danmaku-bg-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: auto;
    opacity: 0.85;
    transition: opacity 0.4s ease;
}

/* AI 解读时背景微亮（由 JS 控制 class 切换） */
.danmaku-screen.bg-thinking .danmaku-bg-canvas {
    opacity: 1;
}

/* 幕布整体聚焦态（暂停 / 解读时） */
.danmaku-screen.bg-thinking .danmaku-overlay {
    background: radial-gradient(ellipse at 50% 50%,
            rgba(212, 175, 55, 0.14) 0%,
            rgba(196, 30, 58, 0.06) 35%,
            transparent 65%);
}

.danmaku-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 20%,
            rgba(212, 175, 55, 0.08) 0%,
            transparent 55%);
    pointer-events: none;
    z-index: 3;
}

/* 幕布背景装饰 */
.danmaku-scene-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.3;
}

.scene-arc {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 80px;
    border: 3px solid rgba(212, 175, 55, 0.15);
    border-top: none;
    border-radius: 0 0 50% 50%;
}

.scene-arc.arc-2 {
    width: 50%;
    height: 60px;
    border-color: rgba(196, 30, 58, 0.1);
}

.danmaku-watermark {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -52%);
    font-size: clamp(88px, 22vw, 168px);
    font-family:
        'Noto Serif SC',
        'Noto Serif CJK SC',
        'Source Han Serif SC',
        serif;
    color: rgba(212, 175, 55, 0.14);
    text-shadow: 0 0 40px rgba(255, 248, 235, 0.08);
    pointer-events: none;
    z-index: 1;
    font-weight: 800;
    letter-spacing: 0.02em;
    user-select: none;
    line-height: 1;
}

/* 弹幕轨道层：上下留白，避免字幕被裁切 */
.danmaku-tracks {
    position: absolute;
    top: 14px;
    bottom: 16px;
    left: 0;
    right: 0;
    z-index: 4;
    pointer-events: none;
}

/* 占位引导语 */
.danmaku-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 2;
    color: rgba(255, 255, 255, 0.28);
    pointer-events: none;
}

.danmaku-placeholder i {
    font-size: 2.5rem;
    animation: float-icon 3s ease-in-out infinite;
}

.danmaku-placeholder p {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.danmaku-placeholder span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.22);
}

/* ================================================================
   浮动的福袋（点击触发 3D 非遗翻卡）
================================================================ */

/* 容器：福袋定位在幕布各角落，由 CSS animation 控制漂浮 */
/* ================================================================
   随机漂移的小「福」红包（在 danmaku-screen 内自由移动）
================================================================ */
.fu-dot {
    position: absolute;
    z-index: 15;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: top 2.2s cubic-bezier(0.45, 0.05, 0.55, 0.95),
        left 2.2s cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

/* 小红包本体 */
.fu-dot .fb-inner {
    position: relative;
    width: 22px;
    height: 28px;
    background: linear-gradient(168deg, #c41e3a 0%, #8b1a2d 60%, #6b1020 100%);
    border-radius: 4px 4px 6px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -1px 0 rgba(0, 0, 0, 0.25),
        0 2px 6px rgba(0, 0, 0, 0.35);
}

/* 福字 */
.fu-dot .fb-symbol {
    font-size: 0.7rem;
    font-weight: 900;
    color: #fbbf24;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 0 6px rgba(251, 191, 36, 0.4);
    font-family: "Microsoft YaHei", "PingFang SC", serif;
    line-height: 1;
    z-index: 2;
}

/* 红包束带（上下） */
.fu-dot .fb-strap {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 3px;
    background: linear-gradient(90deg, #d4af37, #f0c040, #d4af37);
    border-radius: 1.5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.fu-dot .fb-strap-left {
    top: 6px;
}

.fu-dot .fb-strap-right {
    bottom: 6px;
}

/* 红包高光 */
.fu-dot .fb-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 4px 4px 6px 6px;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.14) 0%, transparent 50%);
    pointer-events: none;
}

/* 呼吸光晕 */
.fu-dot .fb-glow {
    position: absolute;
    inset: -6px;
    border-radius: 10px;
    background: radial-gradient(circle, rgba(196, 30, 58, 0.22) 0%, transparent 70%);
    animation: fb-glow-pulse 2.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes fb-glow-pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

.fu-dot:hover .fb-inner {
    filter: brightness(1.15);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 -1px 0 rgba(0, 0, 0, 0.25),
        0 4px 14px rgba(212, 175, 55, 0.5),
        0 0 16px rgba(196, 30, 58, 0.3);
}

.fu-dot:active .fb-inner {
    transform: scale(0.88);
}

/* 福袋被点开后的爆炸消失动画 */
.fu-dot.opened {
    animation: fb-explode 0.5s ease forwards !important;
    pointer-events: none;
}

@keyframes fb-explode {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    40% {
        opacity: 1;
        transform: scale(1.5) rotate(15deg);
        filter: drop-shadow(0 0 18px #fbbf24);
    }

    100% {
        opacity: 0;
        transform: scale(0);
    }
}

/* ================================================================
   3D 非遗翻卡（弹幕墙中央弹出，无遮罩）
================================================================ */
/* 叠加层：覆盖整个弹幕幕布 */
.flip-card-overlay {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 500;
    background: transparent;
    transform: translate(0, 0);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.flip-card-overlay.open {
    pointer-events: auto;
    opacity: 1;
}

/* 卡片容器：flex 居中 */
.flip-card-wrapper {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.flip-card-overlay.open .flip-card-wrapper {
    pointer-events: auto;
}

/* 翻卡主体 */
.flip-card {
    position: relative;
    width: 320px;
    height: 420px;
    perspective: 1000px;
    transform-style: preserve-3d;
    cursor: default;
}

/* ===== 弹出动画：从小到大渐显 ===== */
.flip-card-overlay.open .flip-card {
    animation: card-pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes card-pop-in {
    0% {
        opacity: 0;
        transform: scale(0.2) translateZ(0);
    }

    60% {
        opacity: 1;
        transform: scale(1.06) translateZ(0);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateZ(0);
    }
}

/* 关闭时强制停止动画，防止残留 */
.flip-card-overlay:not(.open) .flip-card {
    animation: none !important;
    opacity: 0;
    transform: scale(0.2);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* 两面基础 */
.flip-card-face {
    position: absolute;
    inset: 0;
    border-radius: 22px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

/* ===== 正面：3D 非遗展示 ===== */
.flip-card-front {
    background: linear-gradient(160deg, #1a0a0e 0%, #2d0a14 50%, #0d0508 100%);
    border: 1.5px solid rgba(212, 175, 55, 0.35);
    box-shadow:
        0 0 60px rgba(196, 30, 58, 0.25),
        0 20px 60px rgba(0, 0, 0, 0.55),
        inset 0 0 80px rgba(212, 175, 55, 0.04);
    transform: scale(1);
    opacity: 1;
}

/* 打开后正面渐隐 */
.flip-card-overlay.open .flip-card-front {
    opacity: 0;
    transform: scale(0.88);
    pointer-events: none;
}

/* ===== 背面：传统中式喜庆风格 ===== */
.flip-card-back {
    background: linear-gradient(168deg, #fffef5 0%, #fff9e6 50%, #fde68a 100%);
    box-shadow:
        0 0 50px rgba(212, 175, 55, 0.35),
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    transform: scale(0.88);
    opacity: 0;
}

/* 打开后背面渐显 */
.flip-card-overlay.open .flip-card-back {
    opacity: 1;
    transform: scale(1);
}

/* 3D 场景容器 */
.fc-3d-scene {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    position: relative;
}

/* 图标包装（带 CSS 3D tilt 效果） */
.fc-icon-wrap {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fc-icon-float 3s ease-in-out infinite;
}

.fc-icon {
    font-size: 5.5rem;
    line-height: 1;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.6));
    transition: transform 0.3s;
}

/* 图标背景光晕 */
.fc-icon-glow {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.3) 0%, transparent 70%);
    animation: glow-spin 4s linear infinite;
}

@keyframes glow-spin {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.2);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* 3D 浮动动画 */
@keyframes fc-icon-float {

    0%,
    100% {
        transform: translateY(0) rotateX(0deg) rotateY(0deg);
    }

    25% {
        transform: translateY(-8px) rotateX(5deg) rotateY(-5deg);
    }

    75% {
        transform: translateY(4px) rotateX(-3deg) rotateY(4deg);
    }
}

/* 周围粒子 */
.fc-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* 3D 标签 */
.fc-3d-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.55);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 4px 12px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.3);
}

/* 正面底部提示 */
.flip-card-front::after {
    content: '↑ 福袋已打开 ↑';
    position: absolute;
    bottom: 18px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.72rem;
    color: rgba(212, 175, 55, 0.45);
    letter-spacing: 0.1em;
    animation: hint-blink 2s ease-in-out infinite;
}

@keyframes hint-blink {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.9;
    }
}

/* ===== 背面：传统中式喜庆风格 ===== */
.flip-card-back {
    background: linear-gradient(168deg, #fffef5 0%, #fff9e6 50%, #fde68a 100%);
    transform: scale(0.88);
    opacity: 0;
}

/* 外层装饰框 */
.fc-border-frame {
    position: absolute;
    inset: 10px;
    border-radius: 14px;
    border: 2.5px solid transparent;
    background:
        linear-gradient(#fffef5, #fffef5) padding-box,
        linear-gradient(135deg, #d4af37 0%, #c41e3a 30%, #d4af37 50%, #c41e3a 70%, #d4af37 100%) border-box;
    pointer-events: none;
    z-index: 1;
}

/* 内部金色细线 */
.fc-border-inner {
    position: absolute;
    inset: 16px;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    pointer-events: none;
    z-index: 1;
}

/* 背面内容 */
.fc-back-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 30px 24px;
    gap: 8px;
    text-align: center;
}

.fc-back-icon {
    font-size: 2.8rem;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
}

.fc-back-name {
    font-size: 1.5rem;
    font-weight: 900;
    color: #7f1d1d;
    font-family: "Microsoft YaHei", "PingFang SC", serif;
    letter-spacing: 0.1em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.fc-back-divider {
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #c41e3a 20%, #d4af37 50%, #c41e3a 80%, transparent);
    border-radius: 2px;
    margin: 4px 0;
}

.fc-back-desc {
    font-size: 0.88rem;
    line-height: 1.8;
    color: #3f2f1e;
    flex: 1;
    display: flex;
    align-items: center;
}

.fc-back-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.fc-tag {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid;
    color: #92400e;
    border-color: rgba(196, 30, 58, 0.3);
    background: rgba(254, 243, 199, 0.6);
}

.fc-back-tip {
    font-size: 0.68rem;
    color: rgba(120, 60, 20, 0.55);
    line-height: 1.5;
}

/* 关闭按钮：在卡片背面右上角 */
.flip-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c41e3a, #8b1a2d);
    color: #fbbf24;
    border: 2px solid #d4af37;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 10;
}

.flip-close-btn:hover {
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 5px 18px rgba(196, 30, 58, 0.45);
}

/* ================================================================
   福袋奖励弹窗（游戏风恭喜特效）
================================================================ */

/* 全屏遮罩层 */
.reward-popup {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9000;
    background: rgba(8, 3, 5, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.reward-popup.open {
    pointer-events: auto;
    opacity: 1;
}

/* 关闭：卡片向右上方收缩，示意收入右侧卡包 */
.reward-popup.reward--exit-right {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.42s ease;
}

/* 避免 translate3d(min(...)) 在部分国产浏览器 / 旧 WebView 中整段声明被丢弃 */
.reward-popup.reward--exit-right .reward-modal {
    transform: translate3d(42vw, -5vh, 0) scale(0.26) rotate(10deg);
    opacity: 0;
    filter: blur(2px);
}

@media (min-width: 1280px) {
    .reward-popup.reward--exit-right .reward-modal {
        transform: translate3d(520px, -5vh, 0) scale(0.26) rotate(10deg);
    }
}

/* 粒子层：覆盖整个弹窗（允许烟火超框散射） */
.reward-particles {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    pointer-events: none;
    overflow: visible;
    z-index: 200;
}

/* 弹窗主体（内层为 3D 翻面，外层保留描边与投影） */
.reward-modal {
    position: relative;
    width: 480px;
    max-width: 96vw;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: none;
    border-radius: 26px;
    box-shadow: none;
    transform-origin: 55% 45%;
    transition:
        transform 0.55s cubic-bezier(0.45, 0, 0.2, 1),
        opacity 0.48s ease,
        filter 0.45s ease;
}

@media (min-width: 541px) {
    .reward-modal {
        max-width: 520px;
    }
}

.reward-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 220;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: rgba(255, 250, 235, 0.95);
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background 0.2s,
        transform 0.15s,
        color 0.2s;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.reward-popup.open:not(.reward--flipped) .reward-popup-close {
    background: rgba(107, 42, 22, 0.12);
    color: #5c2e1a;
    box-shadow: 0 2px 10px rgba(196, 30, 58, 0.12);
}

.reward-popup.reward--flipped .reward-popup-close {
    background: rgba(0, 0, 0, 0.45);
    color: #fff8e7;
}

.reward-popup-close:hover {
    transform: scale(1.08);
    background: rgba(196, 30, 58, 0.55);
    color: #fff;
}

.reward-popup.open:not(.reward--flipped) .reward-popup-close:hover {
    background: rgba(196, 30, 58, 0.2);
    color: #7f1d1d;
}

.reward-popup-close:focus-visible {
    outline: 2px solid #f0c040;
    outline-offset: 2px;
}

/* 動畫只作用在透視容器上，避免父級 transform 打斷 3D 翻面 */
.reward-flip-scene {
    width: 100%;
    perspective: 1100px;
    perspective-origin: 50% 50%;
    animation: reward-modal-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.reward-flip-inner {
    position: relative;
    min-height: 440px;
    height: 58vh;
    max-height: 640px;
    transform-style: preserve-3d;
    transition: transform 0.85s cubic-bezier(0.4, 0.15, 0.2, 1);
}

@media (max-height: 700px) {
    .reward-flip-inner {
        min-height: 380px;
        max-height: 520px;
        height: 54vh;
    }
}

@media (min-height: 900px) {
    .reward-flip-inner {
        min-height: 520px;
        max-height: 700px;
        height: 62vh;
    }
}

.reward-popup.reward--flipped .reward-flip-inner {
    transform: rotateY(180deg);
}

.reward-face {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: 26px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 20px 22px 18px;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow:
        0 0 80px rgba(196, 30, 58, 0.35),
        0 0 160px rgba(212, 175, 55, 0.12),
        0 24px 80px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(212, 175, 55, 0.45);
}

.reward-face--front {
    transform: rotateY(0deg);
    isolation: isolate;
    gap: 14px;
    padding: 26px 24px 24px;
    /* 多层：顶光、底晕、祥云纹理感斜纹、暖色基底 */
    background:
        radial-gradient(ellipse 95% 70% at 50% -15%, rgba(255, 235, 200, 0.75) 0%, transparent 58%),
        radial-gradient(ellipse 90% 50% at 50% 108%, rgba(196, 30, 58, 0.09) 0%, transparent 52%),
        repeating-linear-gradient(-18deg,
            transparent 0,
            transparent 11px,
            rgba(212, 175, 55, 0.045) 11px,
            rgba(212, 175, 55, 0.045) 12px),
        linear-gradient(168deg, #fffbf4 0%, #f8ead2 42%, #e9cf9e 100%);
    color: #3d2a1c;
    justify-content: center;
    box-shadow:
        0 0 100px rgba(196, 30, 58, 0.22),
        0 0 180px rgba(212, 175, 55, 0.14),
        0 22px 70px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.65),
        inset 0 -1px 0 rgba(196, 30, 58, 0.06);
}

/* 正面：顶部金弧与角部点缀（不增加 DOM） */
.reward-face--front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 88%;
    height: 120px;
    border-radius: 0 0 50% 50%;
    background: radial-gradient(ellipse 100% 100% at 50% 0%, rgba(240, 192, 64, 0.22) 0%, transparent 72%);
    pointer-events: none;
    z-index: 0;
}

.reward-face--front::after {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 18px;
    border: 1px solid rgba(212, 175, 55, 0.28);
    box-shadow: inset 0 0 40px rgba(255, 248, 235, 0.35);
    pointer-events: none;
    z-index: 0;
    opacity: 0.85;
}

.reward-face--front>* {
    position: relative;
    z-index: 1;
}

.reward-face--back {
    transform: rotateY(180deg);
    background: linear-gradient(160deg, #1a0a0e 0%, #2d0a14 40%, #1a0810 100%);
    color: #f0f0f0;
}

.reward-face--back .reward-icon-wrap {
    width: 84px;
    height: 84px;
}

.reward-face--back .reward-icon {
    font-size: 3.15rem;
}

.reward-face--back .reward-actions {
    margin-top: 10px;
    padding-top: 4px;
    flex-shrink: 0;
    width: 100%;
}

.reward-gift-ribbon {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 58px;
    height: 76px;
    background: linear-gradient(90deg, #9a1220 0%, #c41e3a 22%, #e85d6f 50%, #c41e3a 78%, #7a0f1e 100%);
    border-radius: 0 0 12px 12px;
    box-shadow:
        0 8px 20px rgba(196, 30, 58, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset -2px 0 4px rgba(0, 0, 0, 0.12);
    pointer-events: none;
    z-index: 2;
}

.reward-gift-ribbon::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 8px;
    right: 8px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 120, 0.85), transparent);
    opacity: 0.9;
}

.reward-gift-ribbon::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -14px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 29px solid transparent;
    border-right: 29px solid transparent;
    border-top: 16px solid #6d1022;
    filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.2));
}

/* 正面主图标：金底托红包，更有「贺礼」感 */
.reward-face--front .reward-gift-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 108px;
    height: 108px;
    margin-top: 34px;
    font-size: 3.45rem;
    line-height: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 28%, #fffef8 0%, #f5e0a8 42%, #c9a227 88%, #8b6914 100%);
    box-shadow:
        0 0 0 3px rgba(212, 175, 55, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.95) inset,
        0 10px 28px rgba(196, 30, 58, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.08);
    filter: drop-shadow(0 3px 8px rgba(139, 40, 20, 0.18));
}

.reward-gift-heading {
    margin: 0;
    padding: 0 4px;
    font-size: 1.52rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    line-height: 1.35;
    color: #5a1810;
    font-family: 'Noto Serif SC', 'Songti SC', Georgia, serif;
    text-shadow:
        0 1px 0 rgba(255, 252, 245, 0.95),
        0 2px 12px rgba(212, 175, 55, 0.28);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .reward-gift-heading {
        background: linear-gradient(135deg, #5c1e12 0%, #9a3412 48%, #6d2414 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
        text-shadow: none;
    }
}

.reward-gift-lead {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 700;
    color: #7a3e18;
    letter-spacing: 0.06em;
    text-shadow: 0 1px 0 rgba(255, 250, 240, 0.8);
}

.reward-face--front .reward-gift-hint {
    margin: 0 0 4px;
    padding: 8px 12px;
    /* 整句单行：原 max-width 过窄易把最后一字挤到第二行；窄屏用 clamp 略缩字号 */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-size: clamp(0.72rem, 2.9vw, 0.86rem);
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: rgba(61, 42, 28, 0.78);
    white-space: nowrap;
    text-align: center;
    background: rgba(255, 252, 245, 0.55);
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.reward-flip-cta {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 32px;
    border-radius: 999px;
    border: 2px solid rgba(212, 175, 55, 0.65);
    background: linear-gradient(165deg, #fffefb 0%, #ffe8dc 38%, #ffd0bc 100%);
    color: #7f1d1d;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    cursor: pointer;
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.85) inset,
        0 8px 28px rgba(196, 30, 58, 0.22),
        0 0 0 1px rgba(196, 30, 58, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    animation: reward-cta-breathe 3.2s ease-in-out infinite;
}

@keyframes reward-cta-breathe {

    0%,
    100% {
        box-shadow:
            0 2px 0 rgba(255, 255, 255, 0.85) inset,
            0 8px 28px rgba(196, 30, 58, 0.2),
            0 0 0 1px rgba(196, 30, 58, 0.08),
            0 0 0 0 rgba(240, 192, 64, 0);
    }

    50% {
        box-shadow:
            0 2px 0 rgba(255, 255, 255, 0.85) inset,
            0 10px 32px rgba(196, 30, 58, 0.28),
            0 0 0 1px rgba(196, 30, 58, 0.1),
            0 0 28px 3px rgba(240, 192, 64, 0.28);
    }
}

.reward-flip-cta:hover {
    transform: translateY(-3px);
    filter: brightness(1.02);
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.9) inset,
        0 14px 36px rgba(196, 30, 58, 0.32),
        0 0 0 1px rgba(212, 175, 55, 0.35);
    animation: none;
}

.reward-flip-cta:active {
    transform: translateY(-1px);
}

.reward-flip-cta:focus-visible {
    outline: 2px solid #c41e3a;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .reward-flip-cta {
        animation: none;
    }
}

.reward-face--back .reward-title {
    text-transform: none;
    letter-spacing: 0.12em;
    font-size: 0.98rem;
    font-weight: 700;
    color: rgba(245, 220, 150, 0.92);
}

.reward-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin: -4px 0 2px;
}

.reward-back-tag {
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid rgba(100, 180, 255, 0.35);
    color: #93c5fd;
    background: rgba(30, 58, 95, 0.35);
    letter-spacing: 0.04em;
}

.reward-blessing {
    width: 100%;
    margin: 2px 0 2px;
    padding: 10px 12px;
    font-size: 1.02rem;
    line-height: 1.55;
    color: rgba(255, 250, 235, 0.92);
    background: rgba(0, 0, 0, 0.22);
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    font-style: italic;
    letter-spacing: 0.04em;
}

.reward-btn--guide {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.22), rgba(196, 30, 58, 0.2));
    color: #f0c040;
    border: 1.5px solid rgba(212, 175, 55, 0.45);
}

.reward-btn--guide:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.32), rgba(196, 30, 58, 0.28));
    color: #fde68a;
}

@media (prefers-reduced-motion: reduce) {
    .reward-flip-inner {
        transition: none;
    }

    .reward-popup.reward--flipped .reward-flip-inner {
        transform: none;
    }

    .reward-face--back {
        transform: none;
        position: relative;
        display: none;
    }

    .reward-popup.reward--flipped .reward-face--front {
        display: none;
    }

    .reward-popup.reward--flipped .reward-face--back {
        display: flex;
    }

    .reward-popup.reward--exit-right,
    .reward-popup.reward--exit-right .reward-modal {
        transition: none !important;
    }
}

@keyframes reward-modal-in {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.reward-popup:not(.open) .reward-flip-scene {
    animation: none;
}

/* 顶部金色光环 */
.reward-crown-ring {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 6px;
    background: linear-gradient(90deg, transparent, #d4af37 30%, #f0c040 50%, #d4af37 70%, transparent);
    border-radius: 0 0 999px 999px;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5), 0 0 40px rgba(212, 175, 55, 0.2);
}

/* 图标区 */
.reward-icon-wrap {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: reward-icon-pop 0.6s 0.1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes reward-icon-pop {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-20deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.reward-icon-glow {
    position: absolute;
    inset: -16px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.5) 0%, transparent 70%);
    animation: reward-glow-pulse 1.5s ease-in-out infinite;
}

@keyframes reward-glow-pulse {

    0%,
    100% {
        transform: scale(0.9);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.reward-icon {
    font-size: 4rem;
    line-height: 1;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.6));
    animation: reward-icon-bounce 0.8s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes reward-icon-bounce {
    0% {
        transform: scale(0);
    }

    60% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* 周围星光 */
.reward-sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.reward-sparkles::before,
.reward-sparkles::after {
    content: '✦';
    position: absolute;
    font-size: 0.9rem;
    color: #f0c040;
    animation: sparkle-fly 1.2s 0.3s ease-out both;
}

.reward-sparkles::before {
    top: 0;
    right: 4px;
    animation-name: sparkle-fly-1;
}

.reward-sparkles::after {
    bottom: 4px;
    left: 0;
    animation-name: sparkle-fly-2;
}

@keyframes sparkle-fly-1 {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(30px, -40px) scale(0);
    }
}

@keyframes sparkle-fly-2 {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-40px, -30px) scale(0);
    }
}

/* 标题文字 */
.reward-title {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.85);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    animation: reward-text-in 0.4s 0.25s ease both;
}

.reward-subtitle {
    font-size: 1.25rem;
    font-weight: 900;
    color: #f0c040;
    letter-spacing: 0.08em;
    text-shadow: 0 0 20px rgba(240, 192, 64, 0.4);
    animation: reward-text-in 0.4s 0.3s ease both;
}

@keyframes reward-text-in {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 卡片名称 */
.reward-card-name {
    font-size: 2.35rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, #fde68a 40%, #d4af37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.12em;
    filter: drop-shadow(0 2px 6px rgba(212, 175, 55, 0.3));
    animation: reward-text-in 0.4s 0.38s ease both;
}

/* 收藏进度 */
.reward-progress-wrap {
    width: 100%;
    margin-top: 2px;
    animation: reward-text-in 0.4s 0.42s ease both;
}

.reward-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: rgba(230, 200, 120, 0.88);
    letter-spacing: 0.08em;
    margin-bottom: 5px;
}

.reward-progress-count {
    font-weight: 800;
    color: #f0c040;
}

.reward-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.reward-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #c41e3a, #d4af37, #f0c040);
    border-radius: 999px;
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.reward-progress-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    margin-top: 6px;
}

/* 积分提示 */
.reward-points {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(196, 30, 58, 0.18));
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 999px;
    padding: 6px 18px;
    color: #f0c040;
    font-weight: 800;
    font-size: 1.02rem;
    letter-spacing: 0.05em;
    animation: reward-points-in 0.6s 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes reward-points-in {
    0% {
        opacity: 0;
        transform: scale(0.6);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.reward-points-icon {
    display: flex;
    align-items: center;
    color: #f0c040;
    animation: star-spin 2s linear infinite;
}

@keyframes star-spin {
    0% {
        transform: rotate(0deg);
    }

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

/* 首次获得 */
.reward-first-badge {
    background: linear-gradient(135deg, #c41e3a, #ff6b35);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 5px 16px;
    border-radius: 999px;
    animation: badge-pop 0.5s 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes badge-pop {
    0% {
        opacity: 0;
        transform: scale(0);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 全集齐 */
.reward-complete-badge {
    background: linear-gradient(135deg, #d4af37, #f0c040);
    color: #3d1a00;
    font-size: 0.92rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 6px 20px;
    border-radius: 999px;
    animation: badge-pop 0.5s 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* 按钮 */
.reward-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    margin-top: 4px;
    animation: reward-text-in 0.4s 0.7s ease both;
}

.reward-btn {
    width: 100%;
    padding: 9px 12px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.reward-btn--collect {
    background: linear-gradient(135deg, #c41e3a, #8b1a2d);
    color: #f0c040;
    border: 1.5px solid rgba(212, 175, 55, 0.5);
    box-shadow: 0 4px 20px rgba(196, 30, 58, 0.35);
}

.reward-btn--collect:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(196, 30, 58, 0.5);
    background: linear-gradient(135deg, #dc2626, #c41e3a);
}

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

.reward-btn--close {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.reward-btn--close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.65);
}

/* ---- 五彩烟火粒子 ---- */
.rp-dot {
    animation: rp-dot-fly 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rp-dot-fly {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }

    60% {
        opacity: 0.85;
    }

    100% {
        opacity: 0;
        transform: translate(var(--tx, 0px), var(--ty, 0px)) scale(0.2);
    }
}

.rp-star {
    animation: rp-star-fly 0.7s ease-out both;
}

@keyframes rp-star-fly {
    0% {
        opacity: 1;
        transform: translate(0, 0) scaleX(1);
    }

    40% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(var(--tx, 0px), var(--ty, -20px)) scaleX(0.35);
    }
}

.rp-ring {
    animation: rp-ring-expand 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rp-ring-expand {
    0% {
        opacity: 1;
        transform: translate(-30px, -30px) scale(0.4);
    }

    100% {
        opacity: 0;
        transform: translate(calc(-30px + var(--tx, 0px) * 2.5), calc(-30px + var(--ty, 0px) * 2.5)) scale(2.8);
    }
}

.rp-flash {
    animation: rp-flash-pulse 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
    border-radius: 50%;
}

@keyframes rp-flash-pulse {
    0% {
        opacity: 1;
        transform: translate(-80px, -80px) scale(0.08);
    }

    100% {
        opacity: 0;
        transform: translate(-80px, -80px) scale(2.4);
    }
}

.rp-confetti {
    animation: rp-confetti-fall 1s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes rp-confetti-fall {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        opacity: 0;
        transform: translate(var(--tx, 0px), var(--ty, 18px)) rotate(var(--rot, 360deg));
    }
}

/* 旧兼容 */
.reward-particle-dot {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: particle-fly 0.6s ease-out both;
}

@keyframes particle-fly {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(var(--tx, 0px), var(--ty, 0px)) scale(0);
    }
}

/* ---- 单条弹幕：B 站式描边字 + 半透明底（池内预设） ---- */
.danmaku-item {
    --dm-travel: 1200px;
    position: absolute;
    left: 100%;
    top: calc(4px + var(--track) * ((100% - 8px) / 8));
    white-space: nowrap;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.02em;
    padding: 4px 12px;
    border-radius: 4px;
    transform: translate3d(0, 0, 0);
    opacity: 0;
    z-index: calc(10 + var(--track));
    pointer-events: auto;
    cursor: pointer;
    will-change: transform;
}

/* 热度分级：点赞量越高，字号越大、描边越明显 */
/* 热度普通（默认 18px） */
/* 热度中等：19px */
.danmaku-item.dm-bili {
    color: #ffffff;
    background: rgba(0, 0, 0, 0.35);
    text-shadow:
        -1px -1px 0 #1a1010,
        1px -1px 0 #1a1010,
        -1px 1px 0 #1a1010,
        1px 1px 0 #1a1010,
        0 0 6px rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.danmaku-item.dm-bili:hover {
    filter: brightness(1.12);
    z-index: 200;
    background: rgba(0, 0, 0, 0.5);
}

/* 多色池（参考稿：青柠 / 粉 / 橙等） */
.danmaku-item.dm-tone-mint.dm-bili {
    color: #a3e635;
}

.danmaku-item.dm-tone-gold.dm-bili {
    color: #fb923c;
}

.danmaku-item.dm-tone-rose.dm-bili {
    color: #f472b6;
}

.danmaku-item.dm-tone-snow.dm-bili {
    color: #f5f5f5;
}

.danmaku-item.dm-tone-teal.dm-bili {
    color: #38bdf8;
}

.danmaku-item.dm-tone-violet.dm-bili {
    color: #c084fc;
}

/* 热度分级（池内预设）：模拟点赞量越高，字号越大、描边越强 */
.danmaku-item.dm-bili.dm-heat-mid {
    font-size: 20px;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 5px;
    text-shadow:
        -1.5px -1.5px 0 #1a1010,
        1.5px -1.5px 0 #1a1010,
        -1.5px 1.5px 0 #1a1010,
        1.5px 1.5px 0 #1a1010,
        0 0 10px rgba(0, 0, 0, 0.72);
}

.danmaku-item.dm-bili.dm-heat-high {
    font-size: 24px;
    font-weight: 900;
    padding: 6px 16px;
    border-radius: 6px;
    text-shadow:
        -2px -2px 0 #1a1010,
        2px -2px 0 #1a1010,
        -2px 2px 0 #1a1010,
        2px 2px 0 #1a1010,
        0 0 14px rgba(0, 0, 0, 0.78),
        0 0 28px rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 当前用户发送：昵称 + 内容，与池内弹幕区分 */
.danmaku-item.dm-self {
    color: #fffdf8;
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.92), rgba(120, 24, 40, 0.92));
    border: 2px solid rgba(255, 213, 120, 0.95);
    box-shadow:
        0 0 0 1px rgba(196, 30, 58, 0.45),
        0 6px 20px rgba(196, 30, 58, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    padding: 4px 12px;
    border-radius: 6px;
}

.danmaku-item.dm-self .dm-user-mark {
    color: #ffe9a8;
    font-weight: 800;
    margin-right: 2px;
}

.danmaku-item.dm-self .dm-msg-body {
    font-weight: 700;
}

.danmaku-item.dm-self:hover {
    filter: brightness(1.06);
    z-index: 200;
}

.danmaku-item.dm-self.dm-heat-mid {
    font-size: 19px;
    padding: 5px 13px;
}

.danmaku-item.dm-self.dm-heat-high {
    font-size: 22px;
    padding: 6px 15px;
}

.danmaku-item.dm-selected {
    background: linear-gradient(120deg, rgba(251, 146, 60, 0.95), rgba(212, 175, 55, 0.92)) !important;
    border: 1px solid rgba(255, 236, 200, 0.65) !important;
    color: #1a1208 !important;
    text-shadow: none !important;
    box-shadow:
        0 0 0 2px rgba(255, 200, 120, 0.5),
        0 12px 28px rgba(251, 146, 60, 0.35);
    z-index: 220;
    animation-play-state: paused;
    filter: none;
}

.danmaku-item.dm-active {
    opacity: 1;
    animation: danmaku-fly linear forwards;
}

@keyframes danmaku-fly {
    from {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }

    to {
        transform: translate3d(calc(-1 * var(--dm-travel, 1200px)), 0, 0);
        opacity: 0.92;
    }
}

/* ---- 弹幕输入区 ---- */
.danmaku-input-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
}

.danmaku-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    padding: 10px 16px 10px 18px;
    border: 1px solid rgba(196, 30, 58, 0.14);
    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.07),
        0 2px 8px rgba(196, 30, 58, 0.06),
        inset 0 0 0 1px rgba(212, 175, 55, 0.2);
    transition:
        border-color 0.25s,
        box-shadow 0.25s;
}

.danmaku-input-wrapper:focus-within {
    border-color: rgba(196, 30, 58, 0.32);
    box-shadow:
        0 6px 22px rgba(0, 0, 0, 0.09),
        0 2px 12px rgba(251, 146, 60, 0.12),
        inset 0 0 0 1px rgba(251, 146, 60, 0.28),
        0 0 0 3px rgba(212, 175, 55, 0.18);
}

@keyframes danmaku-input-empty-hint {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.danmaku-input-wrapper--empty-hint {
    animation: danmaku-input-empty-hint 0.38s ease;
    border-color: rgba(251, 146, 60, 0.45);
}

.danmaku-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.92rem;
    color: rgba(60, 35, 20, 0.92);
    background: transparent;
    padding: 4px 0;
    min-width: 0;
}

.danmaku-input::placeholder {
    color: rgba(90, 55, 35, 0.38);
}

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

.char-count {
    font-size: 0.72rem;
    color: rgba(120, 75, 40, 0.5);
    transition: color 0.2s;
    white-space: nowrap;
}

.danmaku-send-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fb923c, #ea580c);
    color: white;
    border: none;
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        transform 0.2s,
        box-shadow 0.2s,
        opacity 0.2s;
    flex-shrink: 0;
}

.danmaku-send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(251, 146, 60, 0.4);
}

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

.danmaku-send-btn--inactive {
    opacity: 0.88;
    cursor: pointer;
}

.danmaku-send-btn--inactive:hover {
    opacity: 1;
}

.danmaku-send-btn i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-style: normal;
}

.danmaku-send-btn i::before {
    line-height: 1;
}

.danmaku-send-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    background: rgba(120, 80, 50, 0.15);
    box-shadow: none;
}

/* ---- 快捷短语（单行：超出时横向轻滑） ---- */
.quick-phrases {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    min-width: 0;
}

.quick-phrase-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: rgba(120, 75, 40, 0.65);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.quick-phrase-btns {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(196, 30, 58, 0.35) rgba(212, 175, 55, 0.12);
}

.quick-phrase-btns::-webkit-scrollbar {
    height: 3px;
}

.quick-phrase-btns::-webkit-scrollbar-track {
    background: rgba(212, 175, 55, 0.1);
    border-radius: 3px;
}

.quick-phrase-btns::-webkit-scrollbar-thumb {
    background: rgba(196, 30, 58, 0.3);
    border-radius: 3px;
}

.quick-phrase-btn {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: rgba(90, 50, 30, 0.88);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.74rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.quick-phrase-btn:hover {
    background: rgba(254, 243, 199, 0.95);
    border-color: rgba(196, 30, 58, 0.25);
    color: #7f1d1d;
    transform: translateY(-1px);
}

/* 底部说明条（参考稿机器人说明） */
.danmaku-mode-footer {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(212, 175, 55, 0.22);
    flex-shrink: 0;
}

.danmaku-mode-footer-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, rgba(196, 30, 58, 0.12), rgba(212, 175, 55, 0.18));
    color: #c41e3a;
    font-size: 1.25rem;
}

.danmaku-mode-footer-icon i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-style: normal;
}

.danmaku-mode-footer-icon i::before {
    line-height: 1;
}

.danmaku-mode-footer-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(80, 50, 30, 0.72);
}

.danmaku-mode-footer-text strong {
    color: #7f1d1d;
    font-weight: 700;
}

/* 左侧栏底部：续话岭南 + 最近弹幕（同一行） */
.danmaku-continue-row {
    flex-shrink: 0;
    margin-top: 4px;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
    flex-wrap: wrap;
}

.danmaku-continue-row .btn-continue-guide {
    flex: 1 1 200px;
    min-width: 0;
    box-sizing: border-box;
}

.btn-recent-danmaku {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 11px 16px;
    border-radius: 999px;
    border: 1px solid rgba(196, 30, 58, 0.22);
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(253, 245, 230, 0.98) 100%);
    color: #7f1d1d;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition:
        transform 0.2s,
        box-shadow 0.2s,
        border-color 0.2s;
}

.btn-recent-danmaku:hover {
    border-color: rgba(212, 175, 55, 0.55);
    box-shadow:
        0 6px 18px rgba(212, 175, 55, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

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

.btn-recent-danmaku-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(145deg, #fde68a, #fbbf24);
    color: #451a03;
    box-shadow: 0 2px 8px rgba(251, 146, 60, 0.28);
    line-height: 0;
}

.btn-recent-danmaku-icon i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 15px;
    line-height: 1;
    font-style: normal;
}

.btn-recent-danmaku-icon i::before {
    line-height: 1;
}

.btn-recent-danmaku-label {
    white-space: nowrap;
}

.btn-recent-danmaku-count {
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 5px;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.25rem;
    text-align: center;
    background: rgba(196, 30, 58, 0.12);
    color: #c41e3a;
    border: 1px solid rgba(196, 30, 58, 0.2);
}

.btn-recent-danmaku-count:empty,
.btn-recent-danmaku-count[hidden] {
    display: none;
}

/* 最近弹幕弹窗 */
.recent-dm-modal {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.22s ease,
        visibility 0.22s ease;
}

.recent-dm-modal.recent-dm-modal--open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

body.recent-dm-modal-open {
    overflow: hidden;
}

.recent-dm-modal-backdrop {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: rgba(35, 28, 22, 0.48);
    cursor: pointer;
}

.recent-dm-modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    max-height: min(480px, 78vh);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #fdf8f0 0%, #f0e6d8 100%);
    border-radius: 18px;
    border: 1px solid rgba(196, 30, 58, 0.14);
    box-shadow:
        0 24px 56px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

.recent-dm-modal-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 12px 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.75) 0%, rgba(253, 245, 230, 0.55) 100%);
    border-bottom: 1px solid rgba(196, 30, 58, 0.1);
    flex-shrink: 0;
}

.recent-dm-modal-head h4 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: #7f1d1d;
    letter-spacing: 0.04em;
    flex: 1;
    min-width: 0;
}

.recent-dm-modal-count {
    font-size: 0.68rem;
    font-weight: 700;
    color: #fb923c;
    background: rgba(251, 146, 60, 0.15);
    border: 1px solid rgba(251, 146, 60, 0.3);
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.recent-dm-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: rgba(196, 30, 58, 0.08);
    color: #7f1d1d;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}

.recent-dm-modal-close:hover {
    background: rgba(196, 30, 58, 0.14);
}

.recent-dm-modal-close i {
    font-size: 14px;
    line-height: 1;
}

.recent-dm-modal-list {
    flex: 1 1 auto;
    min-height: 100px;
    max-height: none;
    overflow-y: auto;
    padding: 12px 14px 16px;
}

.recent-dm-modal-list::-webkit-scrollbar {
    width: 5px;
}

.recent-dm-modal-list::-webkit-scrollbar-thumb {
    background: rgba(196, 30, 58, 0.25);
    border-radius: 8px;
}

/* ---- 小粤传承：面板頭部吉祥物 ---- */
.analysis-header-mascot {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
}

.agent-avatar-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-avatar-card--header {
    width: 100%;
    height: 100%;
}

.agent-avatar-3d {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 6px 16px rgba(196, 30, 58, 0.2)) drop-shadow(0 2px 6px rgba(212, 175, 55, 0.25));
    animation: agent-float 4s ease-in-out infinite;
}

.agent-avatar-3d--header {
    filter: drop-shadow(0 4px 10px rgba(196, 30, 58, 0.18)) drop-shadow(0 2px 5px rgba(212, 175, 55, 0.22));
}

@keyframes agent-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .agent-avatar-3d {
        animation: none;
    }
}

.agent-avatar-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 96px;
    height: 48px;
    background: radial-gradient(ellipse, rgba(212, 175, 55, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    filter: blur(8px);
}

.agent-avatar-glow--header {
    width: 58px;
    height: 28px;
    filter: blur(6px);
}

.analysis-header-mascot .agent-online-dot {
    bottom: 4px;
    right: 2px;
}

/* ---- 中间：AI 分析面板（暖棕底 + 金橙点缀） ---- */
.danmaku-right {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
}

.danmaku-recent-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    line-height: 0;
    color: #451a03;
    background: linear-gradient(145deg, #fde68a, #fbbf24);
    box-shadow: 0 2px 10px rgba(251, 146, 60, 0.3);
    flex-shrink: 0;
}

.danmaku-recent-header-icon i {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    font-size: 14px;
    line-height: 1;
    font-style: normal;
}

.danmaku-recent-header-icon i::before {
    grid-area: 1 / 1;
    line-height: 1;
    display: block;
}

.recent-danmaku-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px 12px;
}

.recent-dm-modal-panel .recent-dm-modal-list.recent-danmaku-list {
    padding: 12px 14px 16px;
    flex: 1 1 auto;
    min-height: 100px;
    max-height: none;
    overflow-y: auto;
}

.recent-dm-item {
    font-size: 0.76rem;
    color: rgba(80, 50, 30, 0.72);
    background: rgba(255, 255, 255, 0.55);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.recent-dm-item:hover {
    color: #7f1d1d;
    background: rgba(254, 243, 199, 0.85);
    border-color: rgba(196, 30, 58, 0.2);
}

.recent-dm-item i {
    flex-shrink: 0;
    color: #c41e3a;
    font-size: 9px;
    opacity: 0.75;
}

.recent-dm-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    text-align: center;
}

.recent-dm-empty i {
    font-size: 1.4rem;
    color: rgba(212, 175, 55, 0.35);
}

.recent-dm-empty p {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(120, 80, 50, 0.45);
    line-height: 1.4;
}

.ai-analysis-panel {
    background: linear-gradient(180deg, #fdf8f0 0%, #f5ede0 55%, #ebe0d0 100%);
    border-radius: 20px;
    border: 1px solid rgba(196, 30, 58, 0.14);
    box-shadow:
        0 20px 48px rgba(0, 0, 0, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

.ai-analysis-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(ellipse at 18% 8%, rgba(212, 175, 55, 0.1) 0%, transparent 48%),
        radial-gradient(ellipse at 82% 92%, rgba(196, 30, 58, 0.06) 0%, transparent 42%);
    pointer-events: none;
    z-index: 0;
}

.ai-analysis-panel>* {
    position: relative;
    z-index: 1;
}

/* 面板头部 */
.analysis-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px 14px 14px;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.75) 0%,
            rgba(253, 245, 230, 0.45) 100%);
    border-bottom: 1px solid rgba(196, 30, 58, 0.1);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    flex-shrink: 0;
}

.agent-online-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 11px;
    height: 11px;
    background: linear-gradient(145deg, #4ade80, #22c55e);
    border-radius: 50%;
    border: 2px solid #fdf8f0;
    box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.35);
    animation: pulse-dot 2s ease-in-out infinite;
    z-index: 2;
}

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

.analysis-agent-info h4 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: #7f1d1d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.04em;
}

.analysis-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: rgba(100, 65, 40, 0.58);
    margin-top: 2px;
}

.analysis-status .status-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
}

.analysis-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(212, 175, 55, 0.15);
    color: #8b6914;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.analysis-badge i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 0.78rem;
}

.analysis-badge--outline {
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.9), rgba(255, 255, 255, 0.75));
    color: #92400e;
    border: 1px solid rgba(212, 175, 55, 0.45);
    padding: 6px 12px;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.12);
}

/* 分析内容区 */
.analysis-body {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(196, 30, 58, 0.4) rgba(212, 175, 55, 0.12);
}

.analysis-body::-webkit-scrollbar {
    width: 5px;
}

.analysis-body::-webkit-scrollbar-track {
    background: rgba(212, 175, 55, 0.12);
    border-radius: 4px;
}

.analysis-body::-webkit-scrollbar-thumb {
    background: rgba(251, 146, 60, 0.4);
    border-radius: 4px;
}

.analysis-body::-webkit-scrollbar-thumb:hover {
    background: rgba(251, 146, 60, 0.58);
}

/* 默认状态 */
.analysis-default {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 18px 12px 20px;
    text-align: center;
}

.default-illustration {
    position: relative;
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%,
            rgba(251, 191, 36, 0.35) 0%,
            rgba(251, 146, 60, 0.12) 45%,
            transparent 70%);
    box-shadow: 0 0 40px rgba(251, 146, 60, 0.15);
}

.illus-waves {
    position: absolute;
    inset: 0;
}

.wave {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(251, 146, 60, 0.22);
    border-radius: 50%;
    animation: wave-expand 3s ease-out infinite;
}

.wave-2 {
    animation-delay: 1s;
}

.wave-3 {
    animation-delay: 2s;
}

@keyframes wave-expand {
    0% {
        transform: scale(0.4);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.default-illustration>i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #d97706;
    position: relative;
    z-index: 1;
    line-height: 1;
    font-style: normal;
    filter: drop-shadow(0 2px 8px rgba(251, 146, 60, 0.35));
}

.default-illustration>i::before {
    line-height: 1;
}

.default-tip {
    color: rgba(90, 55, 35, 0.65);
    font-size: 0.92rem;
    line-height: 1.65;
    margin: 0;
}

.default-features {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.default-feat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: rgba(80, 50, 30, 0.72);
    background: rgba(255, 255, 255, 0.55);
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.22);
}

.default-feat i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fb923c;
    font-size: 0.82rem;
}

/* 点击弹幕上下文条（参考稿） */
.dm-click-banner {
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(212, 175, 55, 0.22);
    margin-bottom: 4px;
}

.dm-click-banner-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.dm-click-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    color: rgba(100, 65, 40, 0.58);
}

.dm-click-hint i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fb923c;
    font-size: 0.88rem;
    min-width: 1.15em;
}

.dm-panel-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(196, 30, 58, 0.15);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(253, 245, 230, 0.7));
    color: rgba(90, 50, 30, 0.65);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition:
        background 0.2s,
        color 0.2s,
        border-color 0.2s,
        transform 0.15s;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.dm-panel-close i {
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-style: normal;
}

.dm-panel-close i::before {
    line-height: 1;
}

.dm-panel-close:hover {
    background: linear-gradient(160deg, rgba(254, 243, 199, 0.95), rgba(251, 191, 36, 0.2));
    border-color: rgba(251, 146, 60, 0.4);
    color: #7f1d1d;
    transform: scale(1.05);
}

.dm-click-quote {
    font-size: 1.05rem;
    font-weight: 700;
    color: #422006;
    line-height: 1.75;
    word-break: break-word;
    padding: 10px 14px;
    border-radius: 999px;
    background: linear-gradient(110deg, rgba(254, 243, 199, 0.95), rgba(253, 230, 138, 0.65));
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* 弹幕解读结果整体：略大字号与行距，区块间距更疏朗 */
.analysis-result {
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: 1rem;
    line-height: 1.75;
}

.result-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    font-weight: 700;
    color: rgba(60, 35, 20, 0.9);
    text-transform: none;
    letter-spacing: 0.02em;
    flex-wrap: wrap;
}

.result-section-label i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 13px;
    color: #422006;
    background: linear-gradient(145deg, #fde68a, #fbbf24);
    box-shadow: 0 1px 6px rgba(251, 146, 60, 0.3);
    line-height: 1;
    font-style: normal;
}

.result-section-label i::before {
    line-height: 1;
}

.result-section-tag {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid rgba(196, 30, 58, 0.25);
    color: #b45309;
    background: rgba(254, 243, 199, 0.75);
}

.result-section--guide .result-section-label {
    font-size: 0.92rem;
}

/* 情感分析 */
.sentiment-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sentiment-meter {
    flex: 1;
    height: 6px;
    background: rgba(120, 80, 50, 0.12);
    border-radius: 10px;
    overflow: hidden;
}

.sentiment-fill {
    height: 100%;
    width: 55%;
    border-radius: 10px;
    background: var(--accent-color);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1), background 0.5s;
}

.sentiment-tag {
    font-size: 0.88rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    border: 1px solid;
    white-space: nowrap;
    color: var(--accent-color);
}

/* 关键词云 */
.keywords-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.keyword-chip {
    display: inline-block;
    background: rgba(254, 243, 199, 0.65);
    color: #78350f;
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 20px;
    padding: 5px 13px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: default;
    transition: all 0.2s;
    animation: chip-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.keyword-chip:hover {
    background: rgba(253, 230, 138, 0.85);
    transform: translateY(-1px);
}

@keyframes chip-pop {
    from {
        transform: scale(0.6);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 文化解读 */
.interpretation-text {
    font-size: 1.02rem;
    color: rgba(50, 30, 18, 0.88);
    line-height: 1.85;
    background: rgba(255, 255, 255, 0.72);
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(212, 175, 55, 0.22);
}

.interpretation-text p {
    margin: 0 0 0.75em;
    font-size: inherit;
    line-height: inherit;
}

.interpretation-text p:last-child {
    margin-bottom: 0;
}

/* 总体评价 */
.result-summary {
    background: rgba(254, 243, 199, 0.55);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 1.02rem;
    line-height: 1.75;
    color: #92400e;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.result-summary i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fb923c;
    font-size: 1.05rem;
    flex-shrink: 0;
}

/* 加载状态 */
.analysis-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 30px 12px;
}

.loading-spinner {
    position: relative;
    width: 48px;
    height: 48px;
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

.ring-2 {
    inset: 6px;
    border-top-color: var(--accent-color);
    animation-duration: 1.5s;
    animation-direction: reverse;
}

.ring-3 {
    inset: 12px;
    border-top-color: rgba(196, 30, 58, 0.4);
    animation-duration: 2s;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.analysis-loading p {
    color: rgba(100, 65, 40, 0.58);
    font-size: 0.85rem;
    margin: 0;
}

.loading-dots {
    display: flex;
    gap: 5px;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: dot-bounce 1.2s ease-in-out infinite;
}

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

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

@keyframes dot-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

/* AI 共鸣弹幕（侧栏）：标题在底，点击向上展开列表 */
.ai-suggest-strip {
    flex-shrink: 0;
    margin: 0 0 4px;
    margin-top: auto;
    padding: 0;
    border-radius: 16px;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.82) 0%, rgba(253, 245, 230, 0.65) 100%);
    border: 1px solid rgba(196, 30, 58, 0.12);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 6px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 可折叠区域（在标题上方，向上展开） */
.ai-suggest-collapsible {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 12px;
    transition:
        max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease,
        padding-top 0.35s ease,
        padding-bottom 0.35s ease;
    pointer-events: none;
}

.ai-suggest-strip--expanded .ai-suggest-collapsible {
    max-height: min(420px, 48vh);
    opacity: 1;
    padding: 12px 12px 4px;
    pointer-events: auto;
}

.ai-suggest-strip-head {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 14px 12px 16px;
    border: none;
    border-radius: 0 0 15px 15px;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    color: #7f1d1d;
    text-align: left;
    transition: background 0.2s ease;
}

.ai-suggest-strip-head:hover {
    background: rgba(196, 30, 58, 0.06);
}

.ai-suggest-strip-head:focus-visible {
    outline: 2px solid rgba(196, 30, 58, 0.45);
    outline-offset: 2px;
}

.ai-suggest-strip-title {
    flex: 1;
    min-width: 0;
}

/* 展开/收起箭头：收合朝上（向上展开），展开朝下 */
.ai-suggest-chevron {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-suggest-chevron::before {
    content: '';
    display: block;
    width: 7px;
    height: 7px;
    border-right: 2px solid rgba(127, 29, 29, 0.6);
    border-bottom: 2px solid rgba(127, 29, 29, 0.6);
    transform: rotate(-135deg);
    margin-top: 3px;
    transition: transform 0.3s ease;
}

.ai-suggest-strip--expanded .ai-suggest-chevron::before {
    transform: rotate(45deg);
    margin-top: -2px;
}

/* 内联 SVG 星光图标（不依赖 FA 6.1+ 的 fa-sparkles 字形） */
.ai-suggest-strip-head .ai-suggest-strip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: #451a03;
    background: linear-gradient(145deg, #fde68a, #fbbf24);
    box-shadow:
        0 2px 10px rgba(251, 191, 36, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    line-height: 0;
}

.ai-suggest-strip-head .ai-suggest-strip-icon svg {
    display: block;
    flex-shrink: 0;
}

.ai-suggest-hint {
    font-size: 0.78rem;
    color: rgba(100, 65, 40, 0.55);
    margin: 0 0 12px;
    line-height: 1.55;
}

/* 共鸣弹幕列表：固定最大高度 + 始终可见的滚动条 */
.ai-suggest-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: min(260px, 34vh);
    overflow-y: scroll;
    /* 始终显示滚动条（即使不满） */
    overflow-x: hidden;
    padding-right: 6px;
    margin-right: -2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(196, 30, 58, 0.7) rgba(253, 245, 230, 0.95);
}

/* 轨道：始终可见 */
.ai-suggest-list::-webkit-scrollbar {
    width: 10px;
}

.ai-suggest-list::-webkit-scrollbar-track {
    background: rgba(212, 175, 55, 0.22);
    border-radius: 999px;
    border: 1px solid rgba(196, 30, 58, 0.12);
}

/* 滑块 */
.ai-suggest-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c41e3a 0%, #b45309 100%);
    border-radius: 999px;
    border: 2px solid rgba(255, 252, 245, 0.9);
    min-height: 36px;
}

.ai-suggest-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #dc2626 0%, #d97706 100%);
}

.ai-suggest-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px 11px 14px;
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-left: 3px solid rgba(251, 146, 60, 0.75);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.75) 0%, rgba(253, 245, 230, 0.4) 42%);
    transition:
        border-color 0.2s,
        background 0.2s,
        box-shadow 0.2s;
}

.ai-suggest-row:hover {
    border-color: rgba(251, 146, 60, 0.35);
    border-left-color: #ea580c;
    background: linear-gradient(90deg, rgba(254, 243, 199, 0.85) 0%, rgba(255, 255, 255, 0.65) 45%);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.ai-suggest-idx {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 800;
    color: #c2410c;
    min-width: 1.85rem;
    font-variant-numeric: tabular-nums;
}

.ai-suggest-txt {
    font-size: 0.9rem;
    color: rgba(50, 30, 18, 0.9);
    line-height: 1.55;
    flex: 1;
    min-width: 0;
}

.ai-suggest-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.ai-suggest-fill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid rgba(120, 80, 50, 0.2);
    background: rgba(255, 255, 255, 0.85);
    color: rgba(60, 35, 20, 0.88);
    cursor: pointer;
    transition:
        background 0.2s,
        border-color 0.2s,
        color 0.2s;
}

.ai-suggest-fill i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    opacity: 0.95;
    color: #b45309;
    line-height: 1;
    font-style: normal;
}

.ai-suggest-fill i::before {
    line-height: 1;
}

.ai-suggest-fill:hover {
    background: rgba(254, 243, 199, 0.95);
    border-color: rgba(212, 175, 55, 0.45);
    color: #7f1d1d;
}

.ai-suggest-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    border: none;
    background: linear-gradient(135deg, #fb923c 0%, #f97316 45%, #ea580c 100%);
    color: white;
    cursor: pointer;
    box-shadow:
        0 3px 12px rgba(234, 88, 12, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition:
        transform 0.15s,
        box-shadow 0.2s,
        filter 0.2s;
}

.ai-suggest-send:hover {
    transform: translateY(-1px);
    box-shadow:
        0 6px 20px rgba(234, 88, 12, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    filter: brightness(1.05);
}

.ai-suggest-send i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    line-height: 1;
    font-style: normal;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.ai-suggest-send i::before {
    line-height: 1;
}

/* 继续与粤绣凤宝对话（按钮在左侧 .danmaku-continue-row） */
.btn-continue-guide {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 13px 20px;
    border-radius: 999px;
    text-decoration: none;
    font-size: clamp(0.95rem, 1.15vw, 1.12rem);
    font-weight: 700;
    color: #faf5ff;
    background: linear-gradient(125deg, #7c3aed 0%, #6d28d9 35%, #5b21b6 100%);
    border: 1px solid rgba(196, 181, 253, 0.45);
    box-shadow:
        0 8px 28px rgba(91, 33, 182, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition:
        transform 0.2s,
        box-shadow 0.2s,
        filter 0.2s;
}

.btn-continue-guide:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow:
        0 12px 32px rgba(91, 33, 182, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    filter: brightness(1.06);
}

.btn-continue-guide-label {
    flex: 1;
    text-align: center;
    min-width: 0;
    line-height: 1.4;
    font-size: inherit;
    font-weight: inherit;
}

.btn-continue-guide-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
    line-height: 0;
}

.btn-continue-guide-icon i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
    font-size: 17px;
    margin: 0;
}

.btn-continue-guide-icon i::before {
    line-height: 1;
}

.btn-continue-guide-icon--arrow i {
    font-size: 16px;
    padding-left: 2px;
}

/* ============================================
   响应式适配
   ============================================ */

/* 小屏幕：两列堆叠为上下 */
@media (max-width: 1100px) {
    .danmaku-zone {
        grid-template-columns: 1fr minmax(280px, 380px);
        height: auto;
        padding: 16px 14px 18px;
        border-radius: 18px;
        align-items: stretch;
    }

    .danmaku-left {
        height: auto;
        gap: 10px;
    }

    .danmaku-right {
        height: auto;
        overflow: visible;
    }

    .ai-analysis-panel {
        max-height: 520px;
        overflow: hidden;
    }

    .danmaku-screen {
        height: clamp(300px, 50vh, 520px);
        flex: 0 0 auto;
        min-height: 300px;
    }

    .danmaku-item {
        font-size: 16px;
        padding: 3px 8px;
    }

    .danmaku-item.dm-heat-mid {
        font-size: 17px;
    }

    .danmaku-item.dm-heat-high {
        font-size: 18px;
    }

    .ai-suggest-row {
        flex-wrap: wrap;
    }

    .ai-suggest-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 4px;
    }
}

/* 手机：单列堆叠 */
@media (max-width: 680px) {
    .danmaku-zone {
        grid-template-columns: 1fr;
        gap: 14px;
        align-items: start;
    }

    .danmaku-screen {
        height: clamp(260px, 48vh, 440px);
        min-height: 260px;
        flex: 0 0 auto;
    }

    .quick-phrases {
        gap: 8px;
    }

    .ai-analysis-panel {
        max-height: 420px;
    }
}