/**
 * B-P3: AI chat / search page (search.html, en_search.html)
 *
 * Sections:
 *   1. Base & navbar overrides
 *   2. Video background
 *   3. Model cards & search entry
 *   4. Chat layout (header, messages, input)
 *   5. Dark mode toggle & .chat-container.dark-mode
 *   6. Responsive & polish
 *
 * Dark mode tokens: assets/css/tokens.css (--chat-dark-*)
 */

* {
    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;
    min-height: 100dvh;
    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 {
    padding-top: env(safe-area-inset-top, 0px);
    height: calc(70px + env(safe-area-inset-top, 0px));
    box-sizing: border-box;
}

.navbar .mobile-menu-toggle span {
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.navbar .mobile-menu-toggle.active span {
    background-color: #ff3b30 !important;
    box-shadow: none;
}

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

.navbar .mobile-menu:not(.ht-drawer-shell) {
    background: rgba(15, 40, 70, 0.92) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* 平板 / 手机：汉堡菜单，避免五项导航挤爆 */
@media (max-width: 991px) {
    .navbar {
        padding-left: 20px;
        padding-right: 20px;
        justify-content: flex-end;
    }

    .navbar .logo-container {
        position: absolute !important;
        left: max(16px, env(safe-area-inset-left, 0px)) !important;
        right: auto !important;
        top: env(safe-area-inset-top, 0px) !important;
        height: 70px;
        display: flex !important;
        align-items: center;
        margin: 0 !important;
        z-index: 1000;
    }

    .navbar .logo-text {
        font-size: 20px;
    }

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

    .navbar .mobile-menu-toggle {
        display: flex !important;
        z-index: 1001;
        margin-left: auto;
    }

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

@media (min-width: 992px) {
    html:not(.app-client) .navbar .mobile-menu-toggle,
    html:not(.app-client) .navbar .mobile-menu {
        display: none !important;
    }
}

/* 视频背景样式 */
.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;
}

/* 无视频源时隐藏 video，避免移动端黑框 / 播放斜线 */
#background-video.no-video-source,
.video-background video.no-video-source {
    display: none !important;
}

/* --- 3. Model cards & search entry --- */
.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;
}

/* --- 4. Chat layout --- */
/* 聊天容器 - 初始隐藏 + 淡入动画 - 完全覆盖屏幕 */
.chat-container {
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    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: visible;
    padding-top: env(safe-area-inset-top, 0px);
}

.chat-container.active {
    overflow: visible;
}

/* 聊天窗口激活时，防止 body 滚动 */
body:has(.chat-container.active) {
    overflow: hidden !important;
    height: 100vh !important;
    height: 100dvh !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) .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;
    width: 100dvw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 99999 !important;
}

/* 聊天头部 - 透明化调整（完整顶栏，非 minimal 时使用） */
.chat-header:not(.chat-header--minimal) {
    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;
    gap: 8px;
}

.chat-header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 auto;
    flex-shrink: 0;
    min-width: 0;
    max-width: 100%;
}

.model-selector-wrapper,
.chat-header-controls .dark-mode-toggle,
.chat-header-controls .clear-button {
    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-x: hidden; /* 禁止左右拖空白区，只上下滑 */
    overflow-y: auto;
    padding: 40px 60px;
    background: transparent;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    /* 移动端：只允许纵向滑动 */
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

.message {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    animation: fadeIn 0.3s ease-in;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    /* 头像有阴影/描边，禁止裁切 */
    overflow: visible;
}

@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: 100%;
    padding: 18px 24px;
    border-radius: 20px;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
    box-sizing: border-box;
}

.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);
    width: fit-content;
    max-width: 100%;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    white-space: pre-wrap;
}
.message.user .message-content p {
    margin: 0;
}

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

/* 本条回答是否使用了联网搜索 */
.msg-web-search-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.3;
    width: fit-content;
    max-width: 100%;
}
.msg-web-search-badge .msg-web-search-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.msg-web-search-badge.is-on {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.35);
}
.msg-web-search-badge.is-on .msg-web-search-dot {
    background: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}
.msg-web-search-badge.is-off {
    color: #6b7280;
    background: rgba(107, 114, 128, 0.1);
    border: 1px solid rgba(107, 114, 128, 0.22);
}
.msg-web-search-badge.is-off .msg-web-search-dot {
    background: #9ca3af;
}
.chat-container.dark-mode .msg-web-search-badge.is-on {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(147, 197, 253, 0.35);
}
.chat-container.dark-mode .msg-web-search-badge.is-off {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.25);
}

/* 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;
    box-sizing: border-box;
}

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

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

/* 专家组头像：线描 SVG + 短标签，与工具栏 glyph 同风格 */
.message-avatar.expert-avatar {
    flex-direction: column;
    justify-content: center;
    padding: 4px;
    font-size: 10px;
    line-height: 1.1;
    text-align: center;
    background: linear-gradient(135deg, #f0f7ff 0%, #e0efff 100%);
    border: 1px solid rgba(58, 154, 217, 0.35);
}
.message-avatar.expert-avatar .expert-emoji,
.message-avatar.expert-avatar .expert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 1px;
    line-height: 0;
    color: inherit;
}
.message-avatar.expert-avatar .expert-emoji .toolbar-glyph,
.message-avatar.expert-avatar .expert-icon .toolbar-glyph,
.message-avatar.expert-avatar .expert-glyph {
    width: 16px;
    height: 16px;
    display: block;
}
.message.user .message-avatar .toolbar-glyph {
    width: 18px;
    height: 18px;
    display: block;
}
.message-avatar.expert-avatar .expert-label {
    display: block;
    color: #075b9e;
    font-weight: 600;
}
.message-avatar.expert-avatar[data-expert="distribution"] { border-color: rgba(34, 139, 34, 0.5); background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%); color: #2e7d32; }
.message-avatar.expert-avatar[data-expert="distribution"] .expert-label { color: #2e7d32; }
.message-avatar.expert-avatar[data-expert="power_quality"] { border-color: rgba(139, 90, 43, 0.5); background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%); color: #6d4c41; }
.message-avatar.expert-avatar[data-expert="power_quality"] .expert-label { color: #6d4c41; }
.message-avatar.expert-avatar[data-expert="protection"] { border-color: rgba(123, 31, 162, 0.4); background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%); color: #6a1b9a; }
.message-avatar.expert-avatar[data-expert="protection"] .expert-label { color: #6a1b9a; }
.message-avatar.expert-avatar[data-expert="scada"] { border-color: rgba(244, 67, 54, 0.4); background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%); color: #c62828; }
.message-avatar.expert-avatar[data-expert="scada"] .expert-label { color: #c62828; }
.message-avatar.expert-avatar[data-expert="standards"] { border-color: rgba(0, 150, 136, 0.5); background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%); color: #00695c; }
.message-avatar.expert-avatar[data-expert="standards"] .expert-label { color: #00695c; }
.message-avatar.expert-avatar[data-expert="meeting-summary"] { border-color: rgba(103, 58, 183, 0.5); background: linear-gradient(135deg, #ede7f6 0%, #d1c4e9 100%); color: #4527a0; }
.message-avatar.expert-avatar[data-expert="meeting-summary"] .expert-label { color: #4527a0; }

/* 消息体：内容 + 操作栏（复制/编辑）
   预留头像宽度，避免 85% + 头像撑出横向滚动 */
.message-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1 1 auto;
    max-width: min(85%, calc(100% - 52px));
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}
.message.user .message-body {
    align-items: flex-end;
    flex: 0 1 auto;
    width: fit-content;
    max-width: min(85%, calc(100% - 52px));
}
.message-actions {
    margin-top: 6px;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.message.user .message-actions {
    align-self: flex-end;
}
.message-action-btn {
    font-size: 12px;
    color: #64748b;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}
.message-action-btn:hover {
    color: #3a9ad9;
    background: rgba(58, 154, 217, 0.1);
}
.message.user .message-action-btn:hover {
    color: #075b9e;
    background: rgba(255, 255, 255, 0.25);
}
.message-actions-compare {
    justify-content: flex-start;
    padding: 4px 16px 12px;
    margin-top: 0;
}
.compare-container .message-actions-compare {
    flex-basis: auto;
    width: auto;
    padding-left: 16px;
}
.model-response-card > .message-actions-compare {
    justify-content: flex-start;
    align-self: flex-start;
    width: 100%;
    box-sizing: border-box;
}

/* 专家「思考」区块：与下方正式回答同宽 */
.message.has-thinking .message-body {
    max-width: min(85%, calc(100% - 52px));
    width: 100%;
}

.message-thinking {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 12px;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    box-sizing: border-box;
}
.message-thinking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    font-weight: 700;
    color: #111827;
}
.message-thinking-header:hover {
    background: rgba(226, 232, 240, 0.75);
}
.message-thinking-title {
    margin-right: 8px;
    color: #111827;
}
.message-thinking-toggle {
    font-size: 12px;
    color: #475569;
    flex-shrink: 0;
    line-height: 1;
    margin-left: auto;
}
.model-card-content .message-thinking-header {
    gap: 8px;
}
.model-card-content .message-thinking-toggle {
    display: inline-block;
    min-width: 1em;
    text-align: center;
    opacity: 0.9;
}
.message-thinking-content {
    padding: 12px 14px 14px;
    font-size: 14px;
    line-height: 1.55;
    color: #111827;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
}
.message-thinking-content,
.message-thinking-content p,
.message-thinking-content li,
.message-thinking-content span,
.message-thinking-content strong,
.message-thinking-content div,
.message-thinking-content h1,
.message-thinking-content h2,
.message-thinking-content h3,
.message-thinking-content h4,
.message-thinking-content code {
    color: #111827 !important;
}
.message-thinking-content.loading {
    color: #64748b;
    font-style: italic;
}
.message-thinking-content p {
    margin: 0.4em 0;
}
.message-thinking-content p:first-child { margin-top: 0; }
.message-thinking-content p:last-child { margin-bottom: 0; }
.message-thinking.collapsed .message-thinking-content {
    display: none;
}
.message.has-thinking .message-content {
    margin-top: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* 思考进行中：答案气泡用跳动省略号占位 */
.message-content.is-waiting-answer,
.model-card-answer.is-waiting-answer {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding-top: 14px;
    padding-bottom: 14px;
}
.answer-wait-dots {
    display: inline-flex;
    align-items: flex-end;
    gap: 5px;
    padding: 2px 4px;
    line-height: 1;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0;
    color: #64748b;
    user-select: none;
}
.answer-wait-dots span {
    display: inline-block;
    animation: answer-dot-bounce 1.15s ease-in-out infinite;
}
.answer-wait-dots span:nth-child(1) { animation-delay: 0s; }
.answer-wait-dots span:nth-child(2) { animation-delay: 0.12s; }
.answer-wait-dots span:nth-child(3) { animation-delay: 0.24s; }
.answer-wait-dots span:nth-child(4) { animation-delay: 0.36s; }
.answer-wait-dots span:nth-child(5) { animation-delay: 0.48s; }
@keyframes answer-dot-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
    30% { transform: translateY(-8px); opacity: 1; }
}
.chat-container.dark-mode .answer-wait-dots {
    color: #94a3b8;
}

/* 输入区域 - 统一搜索框样式 */
.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;
}

/* 输入区右侧「会议」按钮：与发送按钮同高，小药丸形状 */
.meeting-inline-btn {
    width: auto;
    min-width: 48px;
    padding: 0 14px;
    border-radius: 24px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}
.meeting-inline-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.5);
}
.meeting-inline-label {
    margin-left: 4px;
    font-size: 14px;
    font-weight: 500;
}

/* 专家组主题：仅输入区发送按钮（不含会议按钮）与专家配色一致 */
.chat-input-container.expert-theme-distribution .send-button:not(.meeting-inline-btn) {
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.35);
}
.chat-input-container.expert-theme-distribution .send-button:not(.meeting-inline-btn):hover:not(:disabled) {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.5);
}
.chat-input-container.expert-theme-distribution .chat-input:focus {
    border-color: #43a047;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.2);
}

.chat-input-container.expert-theme-power_quality .send-button:not(.meeting-inline-btn) {
    background: linear-gradient(135deg, #ffb74d 0%, #f57c00 100%);
    box-shadow: 0 4px 12px rgba(245, 124, 0, 0.35);
}
.chat-input-container.expert-theme-power_quality .send-button:not(.meeting-inline-btn):hover:not(:disabled) {
    background: linear-gradient(135deg, #f57c00 0%, #e65100 100%);
    box-shadow: 0 4px 15px rgba(245, 124, 0, 0.5);
}
.chat-input-container.expert-theme-power_quality .chat-input:focus {
    border-color: #ffb74d;
    box-shadow: 0 4px 15px rgba(245, 124, 0, 0.2);
}

.chat-input-container.expert-theme-protection .send-button:not(.meeting-inline-btn) {
    background: linear-gradient(135deg, #ab47bc 0%, #6a1b9a 100%);
    box-shadow: 0 4px 12px rgba(106, 27, 154, 0.35);
}
.chat-input-container.expert-theme-protection .send-button:not(.meeting-inline-btn):hover:not(:disabled) {
    background: linear-gradient(135deg, #6a1b9a 0%, #4a148c 100%);
    box-shadow: 0 4px 15px rgba(106, 27, 154, 0.5);
}
.chat-input-container.expert-theme-protection .chat-input:focus {
    border-color: #ab47bc;
    box-shadow: 0 4px 15px rgba(106, 27, 154, 0.2);
}

.chat-input-container.expert-theme-scada .send-button:not(.meeting-inline-btn) {
    background: linear-gradient(135deg, #ef5350 0%, #c62828 100%);
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.35);
}
.chat-input-container.expert-theme-scada .send-button:not(.meeting-inline-btn):hover:not(:disabled) {
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
    box-shadow: 0 4px 15px rgba(198, 40, 40, 0.5);
}
.chat-input-container.expert-theme-scada .chat-input:focus {
    border-color: #ef5350;
    box-shadow: 0 4px 15px rgba(198, 40, 40, 0.2);
}

.chat-input-container.expert-theme-standards .send-button:not(.meeting-inline-btn) {
    background: linear-gradient(135deg, #26a69a 0%, #00695c 100%);
    box-shadow: 0 4px 12px rgba(0, 105, 92, 0.35);
}
.chat-input-container.expert-theme-standards .send-button:not(.meeting-inline-btn):hover:not(:disabled) {
    background: linear-gradient(135deg, #00695c 0%, #004d40 100%);
    box-shadow: 0 4px 15px rgba(0, 105, 92, 0.5);
}
.chat-input-container.expert-theme-standards .chat-input:focus {
    border-color: #26a69a;
    box-shadow: 0 4px 15px rgba(0, 105, 92, 0.2);
}

/* 清空按钮 - 毛玻璃样式 */
.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;
    min-width: 40px;
    border-radius: 12px;
    background: linear-gradient(180deg, #2a2a2a 0%, #151515 100%);
    backdrop-filter: none;
    border: 1px solid #404040;
    color: #e8e8e8;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: none;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.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: linear-gradient(180deg, #333 0%, #1a1a1a 100%);
    color: #fff6e8;
    border-color: #d4a574;
    box-shadow: none;
    transform: none;
}

.dark-mode-toggle:active {
    transform: none;
}

.dark-mode-toggle span,
.dark-mode-toggle .dark-mode-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.dark-mode-toggle:hover span {
    transform: none;
}

/* 白天模式主题钮：浅底深色图标（App 内由更高优先级规则覆盖） */
.chat-container:not(.dark-mode) .dark-mode-toggle {
    background: #ffffff;
    border-color: #d1d5db;
    color: #4b5563;
}

/* ========== 黑暗模式样式（仅聊天页面） ========== */
.chat-container.dark-mode {
    background: linear-gradient(135deg, var(--chat-dark-surface-deep) 0%, var(--chat-dark-surface) 100%);
    backdrop-filter: blur(10px);
    transition: background 0.3s ease;
}

/* 黑暗模式 - 聊天头部 */
.chat-container.dark-mode .chat-header:not(.chat-header--minimal) {
    background: var(--chat-dark-surface);
    border-bottom: 1px solid var(--chat-dark-border);
    color: var(--chat-dark-text);
    box-shadow: 0 2px 10px var(--chat-dark-shadow);
}

.chat-container.dark-mode .chat-header:not(.chat-header--minimal) h1 {
    color: var(--chat-dark-accent);
}

.chat-container.dark-mode .chat-header:not(.chat-header--minimal) h1:hover {
    color: var(--chat-dark-accent-hover);
}

/* 黑暗模式 - 消息区域 */
.chat-container.dark-mode .chat-messages {
    background: linear-gradient(135deg, var(--chat-dark-surface-deep) 0%, var(--chat-dark-surface) 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: var(--chat-dark-surface);
    backdrop-filter: blur(5px);
    color: var(--chat-dark-text);
    border: 1px solid var(--chat-dark-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.chat-container.dark-mode .message.assistant .message-content p {
    color: var(--chat-dark-text);
}

.chat-container.dark-mode .message.assistant .message-content strong {
    color: var(--chat-dark-text-strong);
}

.chat-container.dark-mode .message.assistant .message-content ul {
    color: var(--chat-dark-text);
}

/* 黑暗模式 - 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 .message-avatar.expert-avatar {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(96, 165, 250, 0.4);
    color: #93c5fd;
}
.chat-container.dark-mode .message-avatar.expert-avatar .expert-label {
    color: #93c5fd;
}
.chat-container.dark-mode .message-avatar.expert-avatar[data-expert="distribution"] { border-color: rgba(74, 222, 128, 0.4); }
.chat-container.dark-mode .message-avatar.expert-avatar[data-expert="power_quality"] { border-color: rgba(250, 204, 21, 0.4); }
.chat-container.dark-mode .message-avatar.expert-avatar[data-expert="protection"] { border-color: rgba(192, 132, 252, 0.4); }
.chat-container.dark-mode .message-avatar.expert-avatar[data-expert="scada"] { border-color: rgba(248, 113, 113, 0.4); }
.chat-container.dark-mode .message-avatar.expert-avatar[data-expert="standards"] { border-color: rgba(45, 212, 191, 0.4); }
.chat-container.dark-mode .message-avatar.expert-avatar[data-expert="meeting-summary"] { border-color: rgba(167, 139, 250, 0.5); }
.chat-container.dark-mode .message-avatar.expert-avatar[data-expert="meeting-summary"] .expert-label { color: #c4b5fd; }

.chat-container.dark-mode .message-action-btn { color: #94a3b8; }
.chat-container.dark-mode .message-action-btn:hover { color: #60a5fa; background: rgba(96, 165, 250, 0.15); }
.chat-container.dark-mode .message.user .message-action-btn:hover { color: #93c5fd; background: rgba(255, 255, 255, 0.15); }

.chat-container.dark-mode .message-thinking { background: rgba(30, 41, 59, 0.6); border-color: rgba(71, 85, 105, 0.5); }
.chat-container.dark-mode .message-thinking-header,
.chat-container.dark-mode .message-thinking-title { color: #ffffff !important; }
.chat-container.dark-mode .message-thinking-toggle { color: #e2e8f0 !important; }
.chat-container.dark-mode .message-thinking-header:hover { background: rgba(51, 65, 85, 0.5); }
.chat-container.dark-mode .message-thinking-content,
.chat-container.dark-mode .message-thinking-content p,
.chat-container.dark-mode .message-thinking-content li,
.chat-container.dark-mode .message-thinking-content span,
.chat-container.dark-mode .message-thinking-content strong,
.chat-container.dark-mode .message-thinking-content div,
.chat-container.dark-mode .message-thinking-content h1,
.chat-container.dark-mode .message-thinking-content h2,
.chat-container.dark-mode .message-thinking-content h3,
.chat-container.dark-mode .message-thinking-content h4,
.chat-container.dark-mode .message-thinking-content code {
    color: #e2e8f0 !important;
}
.chat-container.dark-mode .message-thinking-content { border-top-color: rgba(71, 85, 105, 0.5); }
.chat-container.dark-mode .message-thinking-content.loading { color: #94a3b8 !important; }

/* 黑暗模式 - 输入区域 */
.chat-container.dark-mode .chat-input-container {
    background: var(--chat-dark-surface);
    border-top: 1px solid var(--chat-dark-border);
    box-shadow: 0 -2px 10px var(--chat-dark-shadow);
}

.chat-container.dark-mode .chat-input {
    background: var(--chat-dark-input-bg);
    border: 1px solid var(--chat-dark-border);
    color: var(--chat-dark-text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.chat-container.dark-mode .chat-input::placeholder {
    color: var(--chat-dark-text-muted);
}

.chat-container.dark-mode .chat-input:focus {
    border-color: var(--chat-dark-accent);
    box-shadow: 0 4px 15px rgba(96, 165, 250, 0.3);
    background: var(--chat-dark-bg-start);
}

/* 黑暗模式 - 发送按钮（保持品牌色） */
.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 .chat-input-container.expert-theme-distribution .send-button:not(.meeting-inline-btn) { background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%); }
.chat-container.dark-mode .chat-input-container.expert-theme-power_quality .send-button:not(.meeting-inline-btn) { background: linear-gradient(135deg, #facc15 0%, #eab308 100%); }
.chat-container.dark-mode .chat-input-container.expert-theme-protection .send-button:not(.meeting-inline-btn) { background: linear-gradient(135deg, #c084fc 0%, #a855f7 100%); }
.chat-container.dark-mode .chat-input-container.expert-theme-scada .send-button:not(.meeting-inline-btn) { background: linear-gradient(135deg, #f87171 0%, #ef4444 100%); }
.chat-container.dark-mode .chat-input-container.expert-theme-standards .send-button:not(.meeting-inline-btn) { background: linear-gradient(135deg, #2dd4bf 0%, #14b8a6 100%); }

.chat-container.dark-mode .meeting-inline-btn {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}
.chat-container.dark-mode .meeting-inline-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

/* 黑暗模式 - 清空按钮 */
.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);
}

/* 黑暗模式 / App 石墨主题 - 模型与专家按钮（含首屏工具栏，不依赖 .chat-container.dark-mode） */
.chat-container.dark-mode .model-selector-btn,
html.app-client body.app-search-page .model-selector-btn,
html.app-client body.app-search-page .chat-bottom-toolbar .model-selector-btn {
    background: linear-gradient(180deg, #2a2a2a 0%, #151515 100%);
    border: 1px solid #404040;
    color: #e8e8e8;
    box-shadow: none;
}

.chat-container.dark-mode .model-selector-btn:hover,
html.app-client body.app-search-page .model-selector-btn:hover {
    background: linear-gradient(180deg, #333 0%, #1a1a1a 100%);
    color: #fff6e8;
    border-color: #d4a574;
}

.chat-container.dark-mode .model-selector-btn.active,
html.app-client body.app-search-page .model-selector-btn.active {
    background: linear-gradient(180deg, #2a2a2a 0%, #151515 100%);
    border-color: #d4a574;
    color: #fff6e8;
    box-shadow: 0 0 0 1px rgba(212, 165, 116, 0.22);
    font-weight: 600;
}

html.app-client body.app-search-page .expert-selector-wrapper .model-selector-btn.active {
    border-color: #d4a574;
    color: #e8c49a;
}

.chat-container.dark-mode .model-selector-dropdown,
html.app-client body.app-search-page .model-selector-dropdown {
    background: rgba(18, 18, 18, 0.98);
    border-color: #2e2e2e;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    color: #e8e8e8;
}

.chat-container.dark-mode .model-option,
html.app-client body.app-search-page .model-option {
    color: #d4d4d4;
}

.chat-container.dark-mode .model-option:hover,
html.app-client body.app-search-page .model-option:hover {
    background: rgba(212, 165, 116, 0.12);
    color: #fff6e8;
}

.chat-container.dark-mode .model-option.active,
html.app-client body.app-search-page .model-option.active {
    background: rgba(212, 165, 116, 0.18);
    color: #e8c49a;
    font-weight: 600;
}

html.app-client body.app-search-page .chat-bottom-toolbar .model-selector-dropdown .model-option.expert-option[data-expert="none"] {
    color: #e8c49a;
    border-bottom-color: #2e2e2e;
}

html.app-client body.app-search-page .chat-bottom-toolbar .model-selector-dropdown .model-option.expert-option.active,
html.app-client body.app-search-page .chat-bottom-toolbar .model-selector-dropdown .model-option.active {
    background: rgba(212, 165, 116, 0.16);
    color: #e8c49a;
}

html.app-client body.app-search-page .chat-bottom-toolbar .model-selector-dropdown {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px #2e2e2e;
}

.model-selector-btn .toolbar-glyph {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    display: block;
    opacity: 0.95;
}

.model-selector-btn #model-selector-icon,
.model-selector-btn #initial-model-selector-icon,
.model-selector-btn #expert-selector-icon,
.model-selector-btn #initial-expert-selector-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.model-option-icon-emoji .toolbar-glyph {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
}

/* 黑暗模式 - 切换按钮 */
.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: none;
    box-shadow: none;
}

.chat-container.dark-mode .model-response-card:hover {
    box-shadow: none;
    border: none;
}

.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(167, 139, 250, 0.15) 0%, rgba(196, 181, 253, 0.08) 100%);
}

.chat-container.dark-mode .model-card-header.deepseek {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(2, 132, 199, 0.08) 100%);
}

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

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

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

.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: #f8fafc;
}

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

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

.chat-container.dark-mode .model-card-answer.message-content {
    background: transparent;
    border: none;
    box-shadow: none;
    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;
}
.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;
        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;
}

.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%;
    }
    
    .chat-input-wrapper {
        padding: 0 20px;
        max-width: 100%;
    }
    
    .message-content {
        max-width: 100%;
    }

    .message.has-thinking .message-body {
        max-width: calc(100% - 48px);
    }
    
    .chat-messages {
        padding: 20px 16px;
        overflow-x: hidden;
    }
}

/* 移动端输入框适配 - 解决遮挡问题（手机竖屏） */
@media (max-width: 768px) and (orientation: portrait) {
    .chat-input-container {
        position: fixed !important;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        padding: 15px 15px calc(15px + env(safe-area-inset-bottom, 0px)) 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: 140px !important; /* 为固定输入框 + 安全区留出空间 */
    }
}

/* iPad/平板：底部输入框固定，避免被挤出视口（横屏竖屏均生效，含 iPad Pro 横屏） */
@media (max-width: 1400px) {
    .chat-container.active .chat-input-container {
        position: fixed !important;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)) 20px;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid rgba(226, 232, 240, 0.8);
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
        z-index: 1000;
    }
    
    .chat-container.active .chat-messages {
        padding-bottom: 140px !important;
    }
    
    .chat-container.active.dark-mode .chat-input-container {
        background: rgba(30, 41, 59, 0.96);
        border-top-color: rgba(71, 85, 105, 0.6);
    }
}

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

/* 双模型选择器：选中专家时隐藏，仅「不使用专家」时显示 */
#dual-model-selector-wrapper.hidden-when-expert,
#initial-dual-model-selector-wrapper.hidden-when-expert {
    display: none !important;
}

/* 专家组：选中 Qwen / DeepSeek 单模型时隐藏，仅双模型模式显示 */
.expert-selector-wrapper.hidden-when-single-model {
    display: none !important;
}

.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);
    min-width: 132px;
}

.model-selector-btn #model-selector-text,
.model-selector-btn #initial-model-selector-text {
    flex: 1;
    text-align: left;
    white-space: nowrap;
}

.model-selector-caret {
    margin-left: 2px;
    font-size: 10px;
    flex-shrink: 0;
    opacity: 0.85;
}

.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: rgba(255, 255, 255, 0.7);
    color: #4a5568;
    border-color: rgba(226, 232, 240, 0.5);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    font-weight: 600;
}

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

.expert-selector-wrapper .model-selector-dropdown {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    animation: expertSlideDown 0.2s ease-out;
}

@keyframes expertSlideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

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

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

.model-option.model-option-logo-only {
    justify-content: center;
}

.model-option.model-option-logo-only .model-logo-icon {
    height: 22px;
    max-width: 120px;
}

.model-selector-btn.model-selector-logo-only {
    min-width: auto;
    padding: 8px 12px;
    gap: 6px;
}

.model-selector-btn.model-selector-logo-only #model-selector-text:empty,
.model-selector-btn.model-selector-logo-only #initial-model-selector-text:empty {
    display: none;
}

.model-selector-btn:not(.model-selector-logo-only) #model-selector-icon:empty,
.model-selector-btn:not(.model-selector-logo-only) #initial-model-selector-icon:empty {
    display: none;
}

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

.model-option-label {
    flex: 1;
    text-align: left;
    white-space: nowrap;
}

.model-option-icon-emoji {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

.model-logo-icon {
    height: 20px;
    width: auto;
    max-width: 88px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

#model-selector-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

#model-selector-icon .model-logo-icon {
    height: 18px;
    width: auto;
    max-width: 72px;
    object-fit: contain;
}

.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;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 25px;
    animation: fadeIn 0.3s ease-in;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* 联网标记独占整行，禁止被 stretch 拉成巨型胶囊 */
.message.compare-container > .msg-web-search-badge {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    align-self: flex-start;
    align-items: center;
    height: auto !important;
    min-height: 0;
    margin: 0;
    box-sizing: border-box;
}

/* 模型回答卡片 */
.model-response-card {
    flex: 1 1 calc(50% - 8px);
    min-width: min(100%, 280px);
    max-width: 100%;
    background: #ffffff;
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: none;
    border: none;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    color: #1f2937;
}

.model-response-card:hover {
    box-shadow: none;
}

/* Qwen / DeepSeek：不再用外框线区分，靠标题色即可 */
.model-response-card.qwen,
.model-response-card.deepseek {
    border: none;
}

.model-response-card.qwen:hover,
.model-response-card.deepseek:hover {
    border: none;
    box-shadow: none;
}

/* 卡片头部 */
.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(167, 139, 250, 0.1) 0%, rgba(196, 181, 253, 0.06) 100%);
}

.model-card-header.deepseek {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(2, 132, 199, 0.05) 100%);
}

.model-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 4px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.model-card-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.model-card-icon.qwen {
    background: #fff;
    border-color: rgba(167, 139, 250, 0.25);
    box-shadow: 0 1px 4px rgba(167, 139, 250, 0.15);
}

.model-card-icon.deepseek {
    background: #fff;
    border-color: rgba(14, 165, 233, 0.25);
    box-shadow: 0 1px 4px rgba(14, 165, 233, 0.15);
}

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

.model-card-name {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.model-card-name.qwen {
    color: #6d28d9;
}

.model-card-name.deepseek {
    color: #0369a1;
}

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

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

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

.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;
    color: inherit;
}

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

.model-card-content strong {
    font-weight: 700;
    color: #0f172a;
}

.model-card-answer.message-content {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 4px 0 0;
    margin: 0;
    color: inherit;
    border-radius: 0;
}

.model-card-content .message-thinking {
    margin-bottom: 12px;
}

/* 卡片加载状态 */
.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;
    }
    
    .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 h1,
.message-content h2,
.message-content h3 {
    font-weight: 700;
    margin: 1.2em 0 0.8em 0;
    color: inherit;
    line-height: 1.4;
    letter-spacing: -0.02em;
}

.message-content h1 { font-size: 20px; }
.message-content h2 { font-size: 19px; }
.message-content h3 { font-size: 18px; }

.message-content h1:first-child,
.message-content h2:first-child,
.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:not(.chat-header--minimal) {
    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:not(.chat-header--minimal) 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:not(.chat-header--minimal) h1:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* 极简顶栏：仅 HuyTech 角标 */
.chat-header.chat-header--minimal {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.chat-header.chat-header--minimal h1,
.chat-header.chat-header--minimal .chat-brand-badge {
    background: none !important;
    -webkit-text-fill-color: inherit !important;
    color: inherit;
    transform: none !important;
}

.chat-bottom-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    overflow: visible;
}

.chat-bottom-toolbar .model-selector-btn {
    min-width: 0;
    margin-right: 0;
}

.chat-bottom-toolbar .model-selector-wrapper {
    position: relative;
    flex-shrink: 0;
}

.chat-bottom-toolbar .model-selector-dropdown {
    z-index: 100060;
    max-height: min(320px, 45vh);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
    box-shadow:
        0 16px 40px rgba(15, 23, 42, 0.18),
        0 0 0 1px rgba(226, 232, 240, 0.9);
    padding: 6px 0;
}

.model-selector-dropdown.show.is-toolbar-fixed.opens-up {
    animation: chatToolbarDropUp 0.22s ease-out !important;
}

.model-selector-dropdown.show.is-toolbar-fixed.opens-down {
    animation: chatToolbarDropDown 0.22s ease-out !important;
}

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

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

.chat-bottom-toolbar .model-selector-dropdown .model-option.expert-option {
    justify-content: flex-start;
    gap: 10px;
    padding: 11px 16px;
    font-size: 13px;
}

.chat-bottom-toolbar .model-selector-dropdown .model-option.expert-option span:first-child,
.chat-bottom-toolbar .model-selector-dropdown .model-option.expert-option .expert-option-icon {
    width: 1.35em;
    text-align: center;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}
.chat-bottom-toolbar .model-selector-dropdown .model-option.expert-option .expert-option-icon .toolbar-glyph {
    width: 15px;
    height: 15px;
    display: block;
}

.chat-bottom-toolbar .model-selector-dropdown .model-option.expert-option[data-expert="none"] {
    font-weight: 600;
    color: #2563eb;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    margin-bottom: 4px;
    padding-bottom: 12px;
}

.chat-bottom-toolbar .model-selector-dropdown .model-option.expert-option.active {
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-weight: 600;
}

.chat-bottom-toolbar .model-selector-dropdown .model-option:hover {
    background: rgba(241, 245, 249, 0.95);
}

.chat-bottom-toolbar .model-selector-dropdown .model-option.active {
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
}

.chat-bottom-toolbar .clear-button {
    display: flex;
}

/* 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 1px 4px rgba(0, 0, 0, 0.12),
        0 0 0 1.5px rgba(255, 255, 255, 0.55);
    transition: box-shadow 0.3s ease;
}

.message:hover .message-avatar {
    transform: none;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.14),
        0 0 0 2px rgba(255, 255, 255, 0.65);
}

/* 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. 长文本优化 - 改善阅读体验（仅 AI 回复 aggressive 断行，避免用户短消息被压成竖排） */
.message.assistant .message-content {
    text-align: left;
    hyphens: auto;
    -webkit-hyphens: auto;
    word-break: break-word;
}
.message.user .message-content {
    text-align: left;
    hyphens: none;
    word-break: normal;
    overflow-wrap: 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;
    max-width: 100%;
    border-left: 3px solid #3a9ad9;
    margin: 1em 0;
    box-sizing: border-box;
}

.message-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.message-content img {
    max-width: 100%;
    height: auto;
}

.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 {
        /* 不用 100vw，避免含滚动条时整页左右拖 */
        width: 100%;
        max-width: 100%;
        height: 100vh;
        height: 100dvh;
        overflow-x: hidden;
        overflow-y: hidden;
    }
    
    .chat-messages {
        padding: 16px 12px;
        overflow-x: hidden;
        touch-action: pan-y;
    }

    .message,
    .message-body,
    .message-content {
        max-width: 100%;
    }

    .message-body,
    .message.user .message-body,
    .message.has-thinking .message-body {
        max-width: calc(100% - 48px);
    }
    
    .message-content {
        font-size: 14px;
        line-height: 1.7;
        max-width: 100%;
        padding: 14px 14px;
    }
    
    .message-content h3 {
        font-size: 16px;
    }
    
    .message-content h4 {
        font-size: 15px;
    }
    
    .chat-bottom-toolbar {
        gap: 6px;
        overflow: visible;
        flex-wrap: wrap;
        justify-content: center;
    }

    .chat-bottom-toolbar .model-selector-btn {
        padding: 6px 10px;
        font-size: 12px;
        gap: 4px;
        flex-shrink: 0;
    }

    #model-selector-text,
    #expert-selector-text,
    #initial-model-selector-text,
    #initial-expert-selector-text {
        max-width: 6em;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .chat-bottom-toolbar .clear-button {
        padding: 6px 8px;
        font-size: 12px;
        flex-shrink: 0;
    }
    
    .chat-input-container {
        padding: 15px 0;
    }
    
    .chat-input-wrapper {
        max-width: 100%;
        padding: 0 20px;
    }

}

/* 手机 / 平板：示例问题改为可滚动网格，避免绝对定位横漂穿帮 */
@media (max-width: 991px) {
    .hidden-section {
        position: relative;
        height: auto;
        max-height: min(42vh, 360px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        margin-top: 16px;
    }

    .example-queries {
        position: relative;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        height: auto;
        width: 100%;
        overflow: visible;
        padding: 4px 2px 12px;
    }

    .example-query {
        position: static !important;
        top: auto !important;
        left: auto !important;
        animation: none !important;
        white-space: normal;
        min-width: 0;
        width: 100%;
        font-size: 13px;
        padding: 10px 12px;
        line-height: 1.4;
    }
}

@media (min-width: 481px) and (max-width: 991px) {
    .example-queries {
        grid-template-columns: 1fr 1fr;
    }
}

/* 极窄手机：缩短文字，保留图标与下拉箭头 */
@media (max-width: 430px) {
    #model-selector-text,
    #expert-selector-text,
    #initial-model-selector-text,
    #initial-expert-selector-text {
        display: none;
    }

    .clear-button .clear-label {
        display: none;
    }

    .clear-button {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .model-selector-btn {
        min-width: 40px;
        justify-content: center;
        padding: 6px 8px;
    }
}

/* ========== 用户消息导航按钮 ========== */
.message-navigation {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10002;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.chat-container:not(.active) .message-navigation {
    display: none;
}

/* 箭头无圆底：白天模式黑色箭头，暗色模式浅色箭头 */
.nav-arrow-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    color: #1e293b;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-arrow-btn::before {
    display: none;
}

.nav-arrow-btn:hover {
    opacity: 0.9;
    transform: scale(1.08);
}

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

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

.nav-arrow-btn svg {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
}

.nav-arrow-btn:hover svg {
    transform: none;
}

.chat-container.dark-mode .nav-arrow-btn {
    background: transparent;
    box-shadow: none;
    color: #e2e8f0;
}
.chat-container.dark-mode .nav-arrow-btn svg {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}
.chat-container.dark-mode .nav-arrow-btn:hover {
    box-shadow: none;
}

/* 修复滚动到底部按钮显示 - 确保在聊天窗口激活时可见 */
/* 确保滚动到底部按钮在聊天界面激活时正确显示 */
.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;
    }
}

/* App：首屏暗底 / 黑夜模式 → 石墨按钮；白天模式 → 浅色按钮 */
html.app-client body.app-search-page .search-section .model-selector-btn,
html.app-client body.app-search-page .search-section .ai-button,
html.app-client body.app-search-page .chat-container.dark-mode .model-selector-btn,
html.app-client body.app-search-page .chat-container.dark-mode .dark-mode-toggle,
html.app-client body.app-search-page .chat-container.dark-mode .clear-button,
html.app-client body.app-search-page .chat-container.dark-mode .ai-button {
    background: linear-gradient(180deg, #2a2a2a 0%, #151515 100%);
    border: 1px solid #404040;
    color: #e8e8e8;
    box-shadow: none;
}

html.app-client body.app-search-page .dark-mode-toggle {
    border-radius: 12px;
    width: 40px;
    height: 40px;
}

html.app-client body.app-search-page .chat-container.dark-mode .model-selector-btn:hover,
html.app-client body.app-search-page .chat-container.dark-mode .dark-mode-toggle:hover,
html.app-client body.app-search-page .chat-container.dark-mode .clear-button:hover,
html.app-client body.app-search-page .chat-container.dark-mode .ai-button:hover,
html.app-client body.app-search-page .search-section .model-selector-btn:hover,
html.app-client body.app-search-page .search-section .ai-button:hover {
    background: linear-gradient(180deg, #333 0%, #1a1a1a 100%);
    border-color: #d4a574;
    color: #fff6e8;
}

html.app-client body.app-search-page .chat-container.dark-mode .model-selector-btn.active,
html.app-client body.app-search-page .chat-container.dark-mode .expert-selector-wrapper .model-selector-btn.active {
    background: linear-gradient(180deg, #2a2a2a 0%, #151515 100%);
    border-color: #d4a574;
    color: #e8c49a;
    box-shadow: 0 0 0 1px rgba(212, 165, 116, 0.22);
}

html.app-client body.app-search-page .chat-container.dark-mode .model-selector-dropdown,
html.app-client body.app-search-page .search-section .model-selector-dropdown {
    background: rgba(18, 18, 18, 0.98);
    border-color: #2e2e2e;
    color: #e8e8e8;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px #2e2e2e;
}

/* 白天模式：底部工具栏浅色，与浅色对话区一致 */
html.app-client body.app-search-page .chat-container:not(.dark-mode) .model-selector-btn,
html.app-client body.app-search-page .chat-container:not(.dark-mode) .dark-mode-toggle,
html.app-client body.app-search-page .chat-container:not(.dark-mode) .clear-button,
html.app-client body.app-search-page .chat-container:not(.dark-mode) .ai-button {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    color: #374151 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

html.app-client body.app-search-page .chat-container:not(.dark-mode) .model-selector-btn:hover,
html.app-client body.app-search-page .chat-container:not(.dark-mode) .dark-mode-toggle:hover,
html.app-client body.app-search-page .chat-container:not(.dark-mode) .clear-button:hover,
html.app-client body.app-search-page .chat-container:not(.dark-mode) .ai-button:hover {
    background: #f9fafb !important;
    border-color: #d4a574 !important;
    color: #1f2937 !important;
}

html.app-client body.app-search-page .chat-container:not(.dark-mode) .model-selector-btn.active,
html.app-client body.app-search-page .chat-container:not(.dark-mode) .expert-selector-wrapper .model-selector-btn.active {
    border-color: #d4a574 !important;
    color: #8a6238 !important;
    background: #fffaf3 !important;
}

html.app-client body.app-search-page .chat-container:not(.dark-mode) .model-selector-dropdown {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    color: #374151 !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12) !important;
}

html.app-client body.app-search-page .chat-container:not(.dark-mode) .model-option {
    color: #4b5563 !important;
}

html.app-client body.app-search-page .chat-container:not(.dark-mode) .model-option:hover,
html.app-client body.app-search-page .chat-container:not(.dark-mode) .model-option.active {
    background: rgba(212, 165, 116, 0.14) !important;
    color: #8a6238 !important;
}

html.app-client body.app-search-page .dark-mode-toggle .toolbar-glyph,
html.app-client body.app-search-page .clear-button .toolbar-glyph {
    width: 16px;
    height: 16px;
    display: block;
}

html.app-client body.app-search-page .dark-mode-toggle::before,
html.app-client body.app-search-page .clear-button::before {
    display: none;
}

/* 非 App 网页：黑暗模式下主题/清空也用石墨 */
.chat-container.dark-mode .dark-mode-toggle,
.chat-container.dark-mode .clear-button {
    background: linear-gradient(180deg, #2a2a2a 0%, #151515 100%);
    border: 1px solid #404040;
    color: #e8e8e8;
    box-shadow: none;
    border-radius: 12px;
}

.chat-container.dark-mode .dark-mode-toggle:hover,
.chat-container.dark-mode .clear-button:hover {
    background: linear-gradient(180deg, #333 0%, #1a1a1a 100%);
    border-color: #d4a574;
    color: #fff6e8;
}
