* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 30%, #b3e5fc 70%, #81d4fa 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #1a365d;
    overflow-x: hidden;
    position: relative;
    font-family: 'Inter', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    padding-top: 0;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(120, 119, 198, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 95% 80%, rgba(255, 119, 198, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* 添加现代字体支持 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* 导航栏样式 - 白色文字，提高在视频背景上的可读性 */
.navbar .logo-text {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.navbar .nav-link {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* 悬停和激活状态显示绿色（与其他页面一致） */
.navbar .nav-link:hover {
    color: #07d96c !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.navbar .nav-link.active {
    color: #07d96c !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

/* 移动端隐藏菜单，使用等比例缩小 */
.navbar .mobile-menu-toggle {
    display: none !important;
}

.navbar .mobile-menu {
    display: none !important;
}

/* 移动端导航栏等比例缩小 */
@media (max-width: 768px) {
    .navbar {
        transform: scale(0.9);
        transform-origin: top left;
    }
    
    .navbar .nav-menu {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .navbar .nav-link {
        font-size: 14px;
        padding: 5px 10px;
    }
}

/* 视频背景样式 */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

/* 第一帧poster样式 */
.video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 1;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.video-poster.hidden {
    opacity: 0;
    pointer-events: none;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
    /* 轻微增强颜色，保持清晰度 */
    filter: saturate(1.1) contrast(1.05);
    -webkit-filter: saturate(1.1) contrast(1.05);
    /* 优化渲染质量 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    z-index: 2;
}

.video-background video.visible {
    opacity: 0.9;
}

.container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 80px 40px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
}

.search-section {
    text-align: center;
    margin-bottom: 40px;
    width: 100%;
    position: relative;
    z-index: 10;
}

.search-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #000000;
    letter-spacing: -0.5px;
}

.search-subtitle {
    font-size: 16px;
    color: #000000;
    margin-bottom: 40px;
    font-weight: bold;
}

.search-box {
    display: flex;
    max-width: 40%;
    width: 40%;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.search-box:focus-within {
    box-shadow: 0 4px 15px rgba(26, 86, 219, 0.15);
    border-color: #93c5fd;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 15px 20px;
    font-size: 16px;
    background: transparent;
    border-radius: 30px;
    color: #4a5568;
}

.search-btn {
    background: #1a56db;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover {
    background: #1e40af;
}

.hidden-section {
    width: 100%;
    max-width: 100%;
    margin-top: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    pointer-events: none;
    position: relative;
    height: 500px;
    overflow: hidden;
    z-index: 1;
    background: transparent;
}

.hidden-section.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.example-queries {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.example-query {
    background: rgba(255, 255, 255, 0.4);
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(10px);
    white-space: nowrap;
    animation: swimLeft 25s linear infinite;
    position: absolute;
    min-width: 200px;
}

/* 为每个卡片设置随机的动画延迟和垂直位置，创造自然的小鱼游动效果 */
.example-query:nth-child(1) { 
    animation-delay: 0s;
    top: 8%;
}
.example-query:nth-child(2) { 
    animation-delay: -1.3s;
    top: 23%;
}
.example-query:nth-child(3) { 
    animation-delay: -3.7s;
    top: 15%;
}
.example-query:nth-child(4) { 
    animation-delay: -5.2s;
    top: 42%;
}
.example-query:nth-child(5) { 
    animation-delay: -7.8s;
    top: 31%;
}
.example-query:nth-child(6) { 
    animation-delay: -9.5s;
    top: 56%;
}
.example-query:nth-child(7) { 
    animation-delay: -11.1s;
    top: 48%;
}
.example-query:nth-child(8) { 
    animation-delay: -13.6s;
    top: 67%;
}
.example-query:nth-child(9) { 
    animation-delay: -15.9s;
    top: 19%;
}
.example-query:nth-child(10) { 
    animation-delay: -17.4s;
    top: 74%;
}
.example-query:nth-child(11) { 
    animation-delay: -19.2s;
    top: 38%;
}
.example-query:nth-child(12) { 
    animation-delay: -21.8s;
    top: 61%;
}
.example-query:nth-child(13) { 
    animation-delay: -23.5s;
    top: 12%;
}
.example-query:nth-child(14) { 
    animation-delay: -25.1s;
    top: 52%;
}
.example-query:nth-child(15) { 
    animation-delay: -27.3s;
    top: 29%;
}
.example-query:nth-child(16) { 
    animation-delay: -29.7s;
    top: 71%;
}
.example-query:nth-child(17) { 
    animation-delay: -31.2s;
    top: 45%;
}
.example-query:nth-child(18) { 
    animation-delay: -33.6s;
    top: 18%;
}
.example-query:nth-child(19) { 
    animation-delay: -35.9s;
    top: 64%;
}
.example-query:nth-child(20) { 
    animation-delay: -37.4s;
    top: 36%;
}
.example-query:nth-child(21) { 
    animation-delay: -39.8s;
    top: 79%;
}
.example-query:nth-child(22) { 
    animation-delay: -41.5s;
    top: 25%;
}
.example-query:nth-child(23) { 
    animation-delay: -43.7s;
    top: 58%;
}
.example-query:nth-child(24) { 
    animation-delay: -45.2s;
    top: 14%;
}

/* 小鱼游动动画 - 从右边游入，往左边游出 */
@keyframes swimLeft {
    0% {
        transform: translateX(100vw);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    95% {
        opacity: 1;
    }
    100% {
        transform: translateX(-100%);
        opacity: 0;
    }
}

.example-query:hover {
    background: white;
    color: #1a56db;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    animation-play-state: paused;
    z-index: 10;
}

/* 搜索区域 - 初始显示 */
.search-section {
    transition: opacity 0.3s ease;
}

.search-section.hidden {
    display: none !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

/* 聊天容器 - 初始隐藏 + 淡入动画 - 完全覆盖屏幕 */
.chat-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* 聊天窗口激活时，防止 body 滚动 */
body:has(.chat-container.active) {
    overflow: hidden !important;
    height: 100vh !important;
    position: fixed !important;
    width: 100% !important;
}

/* 对话页淡入动画 */
@keyframes chatFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-container.active {
    display: flex !important;
    animation: chatFadeIn 0.5s ease-out forwards;
}

/* 聊天窗口激活时，隐藏搜索页面和所有其他内容 */
/* 优化：减少 !important 使用，通过提高选择器特异性实现 */
.chat-container.active ~ .container,
.chat-container.active ~ .footer {
    display: none;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

/* 当聊天窗口激活时，隐藏所有搜索相关元素 */
body:has(.chat-container.active) .container > .search-section,
body:has(.chat-container.active) .footer,
body:has(.chat-container.active) .navbar,
body:has(.chat-container.active) .video-background {
    display: none;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

/* 确保聊天容器在激活时完全覆盖 */
.chat-container.active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
}

/* 聊天头部 - 透明化调整 */
.chat-header {
    background: transparent;
    color: #1a365d;
    padding: 15px 60px;
    box-shadow: none;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    flex-shrink: 0;
}

.chat-header h1 {
    margin: 0;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
    color: #3a9ad9;
}

.chat-header h1:hover {
    opacity: 0.8;
}

.chat-header p {
    margin: 8px 0 0 0;
    opacity: 0.9;
    font-size: 0.9em;
}

/* 消息区域 - 统一背景 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 40px 60px;
    background: transparent;
    min-height: 0;
    display: flex;
    flex-direction: column;
    /* 移动端触摸优化 */
    touch-action: manipulation; /* 防止快速滑动时的误触 */
    -webkit-overflow-scrolling: touch; /* iOS 平滑滚动 */
}

.message {
    margin-bottom: 20px;
    display: flex;
    animation: fadeIn 0.3s ease-in;
}

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

.message.user {
    justify-content: flex-end;
}

.message.assistant {
    justify-content: flex-start;
}

.message-content {
    max-width: 85%;
    padding: 18px 24px;
    border-radius: 20px;
    line-height: 1.6;
    word-wrap: break-word;
}

.message-content p {
    margin: 0.5em 0;
}

.message-content p:first-child {
    margin-top: 0;
}

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

.message-content ul {
    margin: 0.5em 0;
    padding-left: 1.5em;
    list-style-type: disc;
}

.message-content li {
    margin: 0.3em 0;
}

.message-content strong {
    font-weight: 600;
    color: inherit;
}

/* 用户消息 - 使用主网站蓝色 */
.message.user .message-content {
    background: linear-gradient(135deg, #3a9ad9 0%, #075b9e 100%);
    color: white;
    border-bottom-right-radius: 8px;
    box-shadow: 0 2px 8px rgba(58, 154, 217, 0.15);
}

/* AI消息 - 毛玻璃样式 */
.message.assistant .message-content {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    color: #4a5568;
    border: 1px solid rgba(226, 232, 240, 0.5);
    border-bottom-left-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

/* Qwen 模型消息 - 浅蓝色边框 */
.message.assistant.qwen .message-content {
    border: 2px solid #93c5fd;
    box-shadow: 0 2px 8px rgba(147, 197, 253, 0.2);
}

/* DeepSeek 模型消息 - 绿色边框 */
.message.assistant.deepseek .message-content {
    border: 2px solid #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin: 0 10px;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: linear-gradient(135deg, #3a9ad9 0%, #075b9e 100%);
    order: 2;
    color: white;
}

.message.assistant .message-avatar {
    background: #f0f7ff;
    color: #3a9ad9;
    overflow: hidden;
}

.message.assistant .message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* 输入区域 - 统一搜索框样式 */
.chat-input-container {
    padding: 20px 0;
    background: transparent;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    width: 100%;
}

.chat-input-wrapper {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 60px;
}

.chat-input {
    flex: 1;
    padding: 15px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    font-size: 1em;
    resize: none;
    max-height: 120px;
    font-family: inherit;
    transition: all 0.3s;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.chat-input:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 4px 15px rgba(26, 86, 219, 0.15);
}

/* 发送按钮 - 使用主网站蓝色 */
.send-button {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #3a9ad9 0%, #075b9e 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.send-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(58, 154, 217, 0.4);
    background: linear-gradient(135deg, #075b9e 0%, #3a9ad9 100%);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 清空按钮 - 毛玻璃样式 */
.clear-button {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(226, 232, 240, 0.5);
    border-radius: 20px;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s;
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.clear-button.active {
    display: flex;
}

.clear-button:hover {
    background: white;
    color: #3a9ad9;
    border-color: #93c5fd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* ========== 黑暗模式切换按钮 ========== */
.dark-mode-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(226, 232, 240, 0.5);
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.dark-mode-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(58, 154, 217, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.dark-mode-toggle:hover::before {
    width: 100%;
    height: 100%;
}

.dark-mode-toggle:hover {
    background: white;
    color: #3a9ad9;
    border-color: #93c5fd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    transform: scale(1.05);
}

.dark-mode-toggle:active {
    transform: scale(0.95);
}

.dark-mode-toggle span {
    position: relative;
    z-index: 1;
    transition: transform 0.3s;
}

.dark-mode-toggle:hover span {
    transform: rotate(15deg);
}

/* ========== 黑暗模式样式（仅聊天页面） ========== */
.chat-container.dark-mode {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.95) 100%);
    backdrop-filter: blur(10px);
    transition: background 0.3s ease;
}

/* 黑暗模式 - 聊天头部 */
.chat-container.dark-mode .chat-header {
    background: rgba(30, 41, 59, 0.9);
    border-bottom: 1px solid rgba(71, 85, 105, 0.6);
    color: #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.chat-container.dark-mode .chat-header h1 {
    color: #60a5fa;
}

.chat-container.dark-mode .chat-header h1:hover {
    color: #93c5fd;
}

/* 黑暗模式 - 消息区域 */
.chat-container.dark-mode .chat-messages {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.95) 100%);
}

/* 黑暗模式 - 用户消息（保持品牌蓝色，但增强阴影） */
.chat-container.dark-mode .message.user .message-content {
    background: linear-gradient(135deg, #3a9ad9 0%, #075b9e 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(58, 154, 217, 0.4);
}

/* 黑暗模式 - AI消息 */
.chat-container.dark-mode .message.assistant .message-content {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(5px);
    color: #e2e8f0;
    border: 1px solid rgba(71, 85, 105, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.chat-container.dark-mode .message.assistant .message-content p {
    color: #e2e8f0;
}

.chat-container.dark-mode .message.assistant .message-content strong {
    color: #f1f5f9;
}

.chat-container.dark-mode .message.assistant .message-content ul {
    color: #e2e8f0;
}

/* 黑暗模式 - Qwen 模型消息边框 */
.chat-container.dark-mode .message.assistant.qwen .message-content {
    border: 2px solid #60a5fa;
    box-shadow: 0 2px 12px rgba(96, 165, 250, 0.4);
}

/* 黑暗模式 - DeepSeek 模型消息边框 */
.chat-container.dark-mode .message.assistant.deepseek .message-content {
    border: 2px solid #34d399;
    box-shadow: 0 2px 12px rgba(52, 211, 153, 0.4);
}

/* 黑暗模式 - AI头像 */
.chat-container.dark-mode .message.assistant .message-avatar {
    background: rgba(30, 41, 59, 0.9);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

/* 黑暗模式 - 输入区域 */
.chat-container.dark-mode .chat-input-container {
    background: rgba(30, 41, 59, 0.9);
    border-top: 1px solid rgba(71, 85, 105, 0.6);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.chat-container.dark-mode .chat-input {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(71, 85, 105, 0.6);
    color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.chat-container.dark-mode .chat-input::placeholder {
    color: #94a3b8;
}

.chat-container.dark-mode .chat-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 4px 15px rgba(96, 165, 250, 0.3);
    background: rgba(15, 23, 42, 1);
}

/* 黑暗模式 - 发送按钮（保持品牌色） */
.chat-container.dark-mode .send-button {
    background: linear-gradient(135deg, #3a9ad9 0%, #075b9e 100%);
    box-shadow: 0 4px 15px rgba(58, 154, 217, 0.4);
}

.chat-container.dark-mode .send-button:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(58, 154, 217, 0.6);
}

/* 黑暗模式 - 清空按钮 */
.chat-container.dark-mode .clear-button {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(71, 85, 105, 0.6);
    color: #e2e8f0;
}

.chat-container.dark-mode .clear-button:hover {
    background: rgba(30, 41, 59, 1);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 黑暗模式 - 模型选择器 */
.chat-container.dark-mode .model-selector-btn {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(71, 85, 105, 0.6);
    color: #e2e8f0;
}

.chat-container.dark-mode .model-selector-btn:hover {
    background: rgba(30, 41, 59, 1);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.5);
}

.chat-container.dark-mode .model-selector-btn.active {
    background: linear-gradient(135deg, rgba(58, 154, 217, 0.2) 0%, rgba(7, 91, 158, 0.2) 100%);
    border-color: rgba(96, 165, 250, 0.5);
    color: #60a5fa;
}

.chat-container.dark-mode .model-selector-dropdown {
    background: rgba(30, 41, 59, 0.98);
    border-color: rgba(71, 85, 105, 0.6);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.chat-container.dark-mode .model-option {
    color: #e2e8f0;
}

.chat-container.dark-mode .model-option:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.chat-container.dark-mode .model-option.active {
    background: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    font-weight: 600;
}

/* 黑暗模式 - 切换按钮 */
.chat-container.dark-mode .dark-mode-toggle {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(71, 85, 105, 0.6);
    color: #fbbf24;
}

.chat-container.dark-mode .dark-mode-toggle:hover {
    background: rgba(30, 41, 59, 1);
    color: #fcd34d;
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 4px 8px rgba(251, 191, 36, 0.2);
}

.chat-container.dark-mode .dark-mode-toggle::before {
    background: rgba(251, 191, 36, 0.1);
}

/* 黑暗模式 - 滚动条 */
.chat-container.dark-mode .chat-messages::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.5);
}

.chat-container.dark-mode .chat-messages::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.5);
    border-radius: 4px;
}

.chat-container.dark-mode .chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 165, 250, 0.7);
}

/* 黑暗模式 - 输入指示器 */
.chat-container.dark-mode .typing-indicator {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(71, 85, 105, 0.6);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.chat-container.dark-mode .typing-indicator span {
    background: #60a5fa;
}

/* 黑暗模式 - 对比卡片 */
.chat-container.dark-mode .model-response-card {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(71, 85, 105, 0.6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.chat-container.dark-mode .model-response-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(96, 165, 250, 0.4);
}

.chat-container.dark-mode .model-card-header {
    background: rgba(30, 41, 59, 0.9);
    border-bottom-color: rgba(71, 85, 105, 0.6);
}

.chat-container.dark-mode .model-card-header.qwen {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
}

.chat-container.dark-mode .model-card-header.deepseek {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.15) 0%, rgba(34, 197, 94, 0.1) 100%);
}

.chat-container.dark-mode .model-card-name {
    color: #e2e8f0;
}

.chat-container.dark-mode .model-card-name.qwen {
    color: #60a5fa;
}

.chat-container.dark-mode .model-card-name.deepseek {
    color: #34d399;
}

.chat-container.dark-mode .model-card-subtitle {
    color: #94a3b8;
}

.chat-container.dark-mode .model-card-content {
    color: #e2e8f0;
}

.chat-container.dark-mode .model-card-content p {
    color: #e2e8f0;
}

.chat-container.dark-mode .model-card-content strong {
    color: #f1f5f9;
}

.chat-container.dark-mode .model-card-content ul {
    color: #e2e8f0;
}

.chat-container.dark-mode .model-card-content li {
    color: #e2e8f0;
}

/* 黑暗模式 - 滚动到底部按钮 */
.chat-container.dark-mode .scroll-to-bottom-btn {
    background: linear-gradient(135deg, #3a9ad9 0%, #075b9e 100%);
    border-color: rgba(96, 165, 250, 0.3);
    box-shadow: 
        0 4px 20px rgba(58, 154, 217, 0.5),
        0 0 0 0 rgba(58, 154, 217, 0.6);
}

.chat-container.dark-mode .scroll-to-bottom-btn:hover {
    box-shadow: 
        0 8px 30px rgba(58, 154, 217, 0.6),
        0 0 0 4px rgba(58, 154, 217, 0.3);
}

/* 移动端黑暗模式适配 */
@media (max-width: 768px) {
    .dark-mode-toggle {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .chat-container.dark-mode .chat-input-container {
        background: rgba(30, 41, 59, 0.98);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    }
}

/* 滚动到底部按钮 - 现代化设计 - 居中显示 */
.scroll-to-bottom-btn {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px) scale(0.8);
    z-index: 1001;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #3a9ad9 0%, #075b9e 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 
        0 4px 20px rgba(58, 154, 217, 0.4),
        0 0 0 0 rgba(58, 154, 217, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    opacity: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 增强滚动到底部按钮的可见性 */
.scroll-to-bottom-btn.show {
    display: flex !important;
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) scale(1);
    animation: slideUpBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* 当在底部时的样式 */
.scroll-to-bottom-btn.show:not(.has-new-message) {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.scroll-to-bottom-btn.show:not(.has-new-message):hover {
    opacity: 1;
}

/* 按钮出现动画 */
@keyframes slideUpBounce {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px) scale(0.8);
    }
    50% {
        transform: translateX(-50%) translateY(-5px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* 脉冲动画提示（当有新消息时） */
.scroll-to-bottom-btn.has-new-message {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 
            0 4px 20px rgba(58, 154, 217, 0.4),
            0 0 0 0 rgba(58, 154, 217, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 6px 25px rgba(58, 154, 217, 0.6),
            0 0 0 8px rgba(58, 154, 217, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

.scroll-to-bottom-btn:hover {
    transform: translateX(-50%) translateY(-3px) scale(1.08);
    box-shadow: 
        0 8px 30px rgba(58, 154, 217, 0.5),
        0 0 0 4px rgba(58, 154, 217, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #4ba8e9 0%, #1a6bb8 100%);
    border-color: rgba(255, 255, 255, 0.5);
}

.scroll-to-bottom-btn:active {
    transform: translateX(-50%) translateY(-1px) scale(1.02);
    box-shadow: 
        0 2px 10px rgba(58, 154, 217, 0.4),
        0 0 0 2px rgba(58, 154, 217, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 按钮图标动画 */
.scroll-to-bottom-btn svg {
    display: block;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.scroll-to-bottom-btn:hover svg {
    transform: translateY(2px);
}

.scroll-to-bottom-btn:active svg {
    transform: translateY(1px);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .scroll-to-bottom-btn {
        width: 48px;
        height: 48px;
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%) translateY(20px) scale(0.8);
        font-size: 20px;
    }
    
    .scroll-to-bottom-btn.show {
        transform: translateX(-50%) translateY(0) scale(1);
    }
    
    .scroll-to-bottom-btn:hover {
        transform: translateX(-50%) translateY(-3px) scale(1.08);
    }
    
    .scroll-to-bottom-btn:active {
        transform: translateX(-50%) translateY(-1px) scale(1.02);
    }
    
    .scroll-to-bottom-btn svg {
        width: 20px;
        height: 20px;
    }
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    border-bottom-left-radius: 8px;
    max-width: 70px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3a9ad9;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* 滚动条样式 - 统一 */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #93c5fd;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #3a9ad9;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-5px);
    background: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: #f0f7ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: #1a56db;
    font-size: 18px;
}

.feature-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-desc {
    color: #718096;
    font-size: 13px;
    line-height: 1.5;
}

.footer {
    background: rgba(255, 255, 255, 0.85);
    padding: 40px 0 30px;
    margin-top: 50px;
    text-align: center;
    color: #718096;
    font-size: 13px;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(226, 232, 240, 0.3);
}

.footer-company-info {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.company-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.company-info-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.company-info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-color: rgba(58, 154, 217, 0.3);
}

.info-icon {
    font-size: 28px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(58, 154, 217, 0.1) 0%, rgba(7, 91, 158, 0.1) 100%);
    border-radius: 12px;
    flex-shrink: 0;
}

.info-content {
    flex: 1;
    text-align: left;
}

.info-label {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 14px;
    color: #4a5568;
    font-weight: 500;
    line-height: 1.5;
}

.info-value a {
    color: #1a56db;
    text-decoration: none;
    transition: color 0.3s;
}

.info-value a:hover {
    color: #075b9e;
    text-decoration: underline;
}

.footer-copyright {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
}

.copyright-text {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 8px;
    font-weight: 500;
}

.copyright-icp {
    font-size: 12px;
    color: #9ca3af;
}

/* 专利卡片特殊样式 */
.patent-item {
    line-height: 1.6;
}

.patent-item strong {
    color: #1a2937;
    font-weight: 600;
    font-size: 13px;
}

.patent-number {
    color: #1a56db;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Courier New', monospace;
}

@media (max-width: 768px) {
    .patent-card {
        grid-column: span 1; /* 移动端只占一列 */
    }
}

@media (max-width: 768px) {
    .search-title {
        font-size: 28px;
    }
    
    .search-box {
        max-width: 100%;
        width: 100%;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .chat-input-wrapper {
        padding: 0 20px;
        max-width: 100%;
    }
    
    .message-content {
        max-width: 90%;
    }
    
    .chat-messages {
        padding: 20px 20px;
    }
}

/* 移动端输入框适配 - 解决遮挡问题 */
@media (max-width: 768px) and (orientation: portrait) {
    .chat-input-container {
        position: fixed !important; /* 强制优先级 */
        bottom: 0;
        width: 100%;
        padding: 15px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-top: 1px solid rgba(226, 232, 240, 0.8);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .chat-messages {
        padding-bottom: 100px !important; /* 为固定输入框留出空间 */
    }
}

/* 模型选择器样式 */
.model-selector-wrapper {
    position: relative;
}

.model-selector-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(226, 232, 240, 0.5);
    border-radius: 20px;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-right: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.model-selector-btn:hover {
    background: white;
    color: #3a9ad9;
    border-color: #93c5fd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.model-selector-btn.active {
    background: linear-gradient(135deg, #3a9ad9 0%, #075b9e 100%);
    color: white;
    border-color: #3a9ad9;
    box-shadow: 0 4px 15px rgba(58, 154, 217, 0.3);
}

.model-selector-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(226, 232, 240, 0.5);
    min-width: 200px;
    overflow: hidden;
    display: none;
    z-index: 1000;
    animation: slideDown 0.2s ease-out;
}

.model-selector-dropdown.show {
    display: block;
}

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

.model-option {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    color: #4a5568;
    font-size: 14px;
}

.model-option:hover {
    background: rgba(58, 154, 217, 0.1);
    color: #3a9ad9;
}

.model-option.active {
    background: rgba(58, 154, 217, 0.15);
    color: #3a9ad9;
    font-weight: 600;
}

.model-option span {
    font-size: 16px;
}

/* 对比消息容器 */
.message.compare-container {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    animation: fadeIn 0.3s ease-in;
    align-items: stretch;
}

/* 模型回答卡片 */
.model-response-card {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.6);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.model-response-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Qwen 卡片特殊样式 */
.model-response-card.qwen {
    border-top: 3px solid #3a9ad9;
}

.model-response-card.qwen:hover {
    border-color: #3a9ad9;
    box-shadow: 0 8px 30px rgba(58, 154, 217, 0.2);
}

/* DeepSeek 卡片特殊样式 */
.model-response-card.deepseek {
    border-top: 3px solid #10b981;
}

.model-response-card.deepseek:hover {
    border-color: #10b981;
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.2);
}

/* 卡片头部 */
.model-card-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(58, 154, 217, 0.05) 0%, rgba(7, 91, 158, 0.05) 100%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
}

.model-card-header.qwen {
    background: linear-gradient(135deg, rgba(58, 154, 217, 0.08) 0%, rgba(7, 91, 158, 0.05) 100%);
}

.model-card-header.deepseek {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.05) 100%);
}

.model-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.model-card-icon.qwen {
    background: linear-gradient(135deg, #3a9ad9 0%, #075b9e 100%);
    color: white;
}

.model-card-icon.deepseek {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.model-card-title {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.model-card-name {
    font-size: 16px;
    font-weight: 600;
    color: #1a2937;
    margin: 0;
}

.model-card-name.qwen {
    color: #3a9ad9;
}

.model-card-name.deepseek {
    color: #10b981;
}

.model-card-subtitle {
    font-size: 12px;
    color: #718096;
    margin: 0;
}

/* 卡片内容区域 */
.model-card-content {
    padding: 20px;
    flex: 1;
    color: #4a5568;
    line-height: 1.7;
    min-height: 100px;
}

.model-card-content p {
    margin: 0.8em 0;
}

.model-card-content p:first-child {
    margin-top: 0;
}

.model-card-content p:last-child {
    margin-bottom: 0;
}

.model-card-content ul {
    margin: 0.8em 0;
    padding-left: 1.5em;
}

.model-card-content li {
    margin: 0.5em 0;
}

.model-card-content strong {
    font-weight: 600;
    color: #1a2937;
}

/* 卡片加载状态 */
.model-card-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    padding: 40px 20px;
}

.model-card-loading .typing-indicator {
    margin: 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .message.compare-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .model-response-card {
        width: 100%;
    }
    
    .model-card-header {
        padding: 14px 16px;
    }
    
    .model-card-content {
        padding: 16px;
    }
    
    .model-card-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .model-card-name {
        font-size: 15px;
    }
}

/* ========== 美术优化增强 ========== */

/* 1. 消息气泡深度优化 - 增强立体感 */
.message.user .message-content {
    background: linear-gradient(135deg, #3a9ad9 0%, #075b9e 100%);
    box-shadow: 
        0 4px 12px rgba(58, 154, 217, 0.25),
        0 2px 4px rgba(58, 154, 217, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.message.user .message-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    border-radius: 20px;
    pointer-events: none;
}

.message.assistant .message-content {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.message.assistant .message-content:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

/* 2. 文字排版优化 - 增强可读性和层次感 */
.message-content {
    font-size: 15px;
    line-height: 1.75;
    letter-spacing: 0.01em;
}

.message-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 1.2em 0 0.8em 0;
    color: inherit;
    line-height: 1.4;
    letter-spacing: -0.02em;
}

.message-content h3:first-child {
    margin-top: 0;
}

.message-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 1em 0 0.6em 0;
    color: inherit;
    line-height: 1.4;
}

.message-content p {
    margin: 0.8em 0;
    line-height: 1.75;
}

.message-content ul,
.message-content ol {
    margin: 0.8em 0;
    padding-left: 1.8em;
    line-height: 1.75;
}

.message-content li {
    margin: 0.5em 0;
    position: relative;
}

.message-content ul li::marker {
    color: rgba(58, 154, 217, 0.6);
}

.message-content strong {
    font-weight: 700;
    color: inherit;
    letter-spacing: 0.01em;
}

/* 3. 聊天容器背景优化 - 增加深度和质感 */
.chat-container {
    background: linear-gradient(
        135deg,
        rgba(240, 249, 255, 0.95) 0%,
        rgba(224, 242, 254, 0.9) 50%,
        rgba(240, 249, 255, 0.95) 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
}

.chat-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(58, 154, 217, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(147, 197, 253, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.chat-messages {
    position: relative;
    z-index: 1;
}

/* 4. 聊天头部优化 - 增加层次感 */
.chat-header {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0.7) 100%
    );
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    z-index: 10;
}

.chat-header h1 {
    background: linear-gradient(135deg, #3a9ad9 0%, #075b9e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.chat-header h1:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* 5. 输入框优化 - 增强交互反馈 */
.chat-input {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(226, 232, 240, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.06),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.chat-input:focus {
    background: rgba(255, 255, 255, 1);
    border-color: #3a9ad9;
    box-shadow: 
        0 6px 20px rgba(58, 154, 217, 0.2),
        0 2px 8px rgba(58, 154, 217, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

/* 6. 发送按钮优化 - 增强视觉吸引力 */
.send-button {
    background: linear-gradient(135deg, #3a9ad9 0%, #075b9e 100%);
    box-shadow: 
        0 4px 12px rgba(58, 154, 217, 0.3),
        0 2px 4px rgba(58, 154, 217, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.send-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.send-button:hover::before {
    width: 200%;
    height: 200%;
}

.send-button:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 8px 24px rgba(58, 154, 217, 0.4),
        0 4px 8px rgba(58, 154, 217, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.send-button:active:not(:disabled) {
    transform: translateY(0) scale(1);
}

/* 7. 消息出现动画优化 */
@keyframes messageSlideIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message {
    animation: messageSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 8. 头像优化 - 增加边框和阴影 */
.message-avatar {
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        0 0 0 2px rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.message:hover .message-avatar {
    transform: scale(1.05);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 0 0 3px rgba(255, 255, 255, 0.9);
}

/* 9. 控制按钮优化 - 统一视觉风格 */
.model-selector-btn,
.dark-mode-toggle,
.clear-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.model-selector-btn::before,
.dark-mode-toggle::before,
.clear-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(58, 154, 217, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.model-selector-btn:hover::before,
.dark-mode-toggle:hover::before,
.clear-button:hover::before {
    width: 150%;
    height: 150%;
}

/* 10. 滚动条美化 */
.chat-messages::-webkit-scrollbar {
    width: 10px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(240, 249, 255, 0.5);
    border-radius: 5px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #93c5fd 0%, #3a9ad9 100%);
    border-radius: 5px;
    border: 2px solid rgba(240, 249, 255, 0.5);
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #3a9ad9 0%, #075b9e 100%);
}

/* 11. 长文本优化 - 改善阅读体验 */
.message-content {
    text-align: left;
    hyphens: auto;
    -webkit-hyphens: auto;
    word-break: break-word;
}

/* 12. 代码块样式（如果AI回复包含代码） */
.message-content code {
    background: rgba(58, 154, 217, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #075b9e;
}

.message-content pre {
    background: rgba(15, 23, 42, 0.05);
    padding: 12px 16px;
    border-radius: 8px;
    overflow-x: auto;
    border-left: 3px solid #3a9ad9;
    margin: 1em 0;
}

.message-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

/* 13. 引用样式优化 */
.message-content blockquote {
    border-left: 4px solid #3a9ad9;
    padding-left: 16px;
    margin: 1em 0;
    color: rgba(0, 0, 0, 0.7);
    font-style: italic;
    background: rgba(58, 154, 217, 0.05);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
}

/* 14. 移动端优化 */
@media (max-width: 768px) {
    .chat-container {
        width: 100vw;
        height: 100vh;
        overflow: hidden;
    }
    
    .chat-messages {
        padding: 20px 20px;
    }
    
    .message-content {
        font-size: 14px;
        line-height: 1.7;
        max-width: 90%;
        padding: 15px 18px;
    }
    
    .message-content h3 {
        font-size: 16px;
    }
    
    .message-content h4 {
        font-size: 15px;
    }
    
    .chat-header {
        padding: 12px 20px;
    }
    
    .chat-input-container {
        padding: 15px 0;
    }
    
    .chat-input-wrapper {
        max-width: 100%;
        padding: 0 20px;
    }
}

/* ========== 用户消息导航按钮 ========== */
.message-navigation {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10002;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 1; /* 改为默认可见 */
    pointer-events: all; /* 改为默认可点击 */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 只在聊天界面非激活时隐藏 */
.chat-container:not(.active) .message-navigation {
    display: none;
}

.nav-arrow-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(58, 154, 217, 0.9) 0%, rgba(7, 91, 158, 0.9) 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 12px rgba(58, 154, 217, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.nav-arrow-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.nav-arrow-btn:hover::before {
    width: 100%;
    height: 100%;
}

.nav-arrow-btn:hover {
    transform: scale(1.1);
    box-shadow: 
        0 6px 20px rgba(58, 154, 217, 0.5),
        0 0 0 3px rgba(58, 154, 217, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #4ba8e9 0%, #1a6bb8 100%);
}

.nav-arrow-btn:active {
    transform: scale(0.95);
}

.nav-arrow-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-arrow-btn svg {
    position: relative;
    z-index: 1;
    transition: transform 0.3s;
}

.nav-arrow-btn:hover svg {
    transform: scale(1.1);
}

/* 黑暗模式下的导航按钮 */
.chat-container.dark-mode .nav-arrow-btn {
    background: linear-gradient(135deg, rgba(58, 154, 217, 0.9) 0%, rgba(7, 91, 158, 0.9) 100%);
    box-shadow: 
        0 4px 12px rgba(58, 154, 217, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.chat-container.dark-mode .nav-arrow-btn:hover {
    box-shadow: 
        0 6px 20px rgba(58, 154, 217, 0.6),
        0 0 0 3px rgba(58, 154, 217, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* 修复滚动到底部按钮显示 - 确保在聊天窗口激活时可见 */
/* 确保滚动到底部按钮在聊天界面激活时正确显示 */
.chat-container.active .scroll-to-bottom-btn.show {
    display: flex !important;
    opacity: 1 !important;
    z-index: 10001 !important;
}

/* 调试：临时显示按钮（用于测试） */
.chat-container.active .scroll-to-bottom-btn {
    z-index: 10001;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .message-navigation {
        right: 15px;
        gap: 10px;
    }
    
    .nav-arrow-btn {
        width: 40px;
        height: 40px;
    }
    
    .nav-arrow-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* 修复滚动到底部按钮显示 - 确保在聊天窗口激活时可见 */
.chat-container.active .scroll-to-bottom-btn.show {
    display: flex !important;
    opacity: 1 !important;
    z-index: 10001;
}
