/* DS随心转 AI聊天页面 - 全局布局样式 */

/* 自托管字体 - Noto Serif SC */
@font-face {
    font-family: 'Noto Serif SC';
    src: url('https://file.dssxz.com/statics/fonts/NotoSerifSC-Regular-subset.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* 全局重置和基础样式 */
* {
    box-sizing: border-box;
}

.chat-home-body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background-color: #FAF9F6;
    /* Rice Paper White */
    color: #2B2B2B;
    /* Ink Black */
    overflow: hidden;
}

.chat-home-main {
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* 主容器 */
.chat-container {
    display: flex;
    height: 100vh;
    width: auto;
    overflow: hidden;
    background-color: #FAF9F6;
}

/* 中间聊天区域基础布局 */
.chat-main {
    --chat-main-bg: #F9F9FB;
    flex: 1;
    min-width: 30%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--chat-main-bg);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #d0d0d0 #f8f9fa;
}

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

.chat-main::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.chat-main::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 4px;
}

.chat-main::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}
/* DS随心转 AI聊天页面 - 侧边栏样式 */

/* 左侧边栏 - 基础样式 */
.chat-sidebar {
    height: 100vh;
    background: #FAF9F6;
    border-right: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    position: relative;
    padding-top: 80px;
    transition: width 0.3s ease, min-width 0.3s ease;
}

/* 展开状态的侧边栏 */
.chat-sidebar.expanded {
    width: 15vw;
    min-width: 260px;
    max-width: 320px;
}

/* 收起状态的侧边栏 */
.chat-sidebar.collapsed {
    width: 60px;
    min-width: 60px;
}

/* 侧边栏收起/展开按钮 */
.sidebar-toggle-btn {
    position: absolute;
    top: 15px;
    right: -15px;
    width: 30px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 50%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chat-sidebar.collapsed .sidebar-toggle-btn {
    right: -15px;
    left: auto;
    top: 15px;
}

.sidebar-toggle-btn i {
    font-size: 14px;
    color: #666;
    transition: transform 0.3s ease;
}

/* 顶部导航区域 */
.chat-nav {
    padding: 20px 10px 4px;
    flex-shrink: 0;
}

.chat-logo {
    margin-bottom: 12px;
}

.chat-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.chat-logo .logo-img {
    width: 32px;
    height: 32px;
    margin-right: 12px;
}

.chat-logo .logo-text {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.chat-navigation {
    width: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 全宽导航按钮样式 */
.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 6px 14px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 6px;
}

.nav-btn-main {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
}

.nav-btn-main .iconfont {
    font-size: 18px;
}

/* 格式转换按钮 */
.nav-btn-convert {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.nav-btn-convert:hover {
    background: linear-gradient(135deg, #5a6dd8 0%, #6a408f 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    text-decoration: none;
}

/* 会员按钮 */
.nav-btn-vip {
    background: linear-gradient(135deg, #D97706 0%, #B45309 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}

.nav-btn-vip:hover {
    background: linear-gradient(135deg, #e09e10 0%, #d91f0b 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 175, 25, 0.4);
    text-decoration: none;
}

/* 分隔线 */
.nav-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
}

/* 分组导航样式 */
.nav-group {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.nav-group-label {
    color: #888;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-group-label .iconfont {
    font-size: 14px;
}

.nav-group-items {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-left: 0;
}

.nav-group-link {
    color: #555;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.nav-group-link:hover {
    color: #667eea;
    background-color: #f0f4ff;
    text-decoration: none;
}

.nav-group-sep {
    color: #d0d0d0;
    font-size: 12px;
    user-select: none;
}

.nav-new-badge {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
    font-weight: 600;
}

/* 用户头像 - 固定在左下角 */
.chat-user-profile {
    position: absolute;
    bottom: 0px;
    left: 20px;
    right: 20px;
    z-index: 200;
}

.chat-user-avatar {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: white;
    border-radius: 50px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
}

.chat-user-avatar:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: #333;
}

.chat-user-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
}

.chat-user-avatar .user-name {
    font-size: 14px;
    font-weight: 500;
    margin-right: 4px;
}

.chat-user-avatar .vip-badge {
    width: 20px;
    height: 20px;
    margin: 0 4px;
}

.chat-user-avatar .layui-icon {
    font-size: 12px;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.chat-user-dropdown.show+.chat-user-avatar .layui-icon {
    transform: rotate(180deg);
}

/* 用户下拉菜单 */
.chat-user-dropdown {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    min-width: 120px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    overflow: visible;
}

.chat-user-dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
}

.chat-user-dropdown.show,
.chat-user-profile:hover .chat-user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-user-dropdown .dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.chat-user-dropdown .dropdown-item:hover {
    background-color: #f5f5f5;
    text-decoration: none;
    color: #333;
}

.chat-user-dropdown .dropdown-divider {
    height: 1px;
    background-color: #e9ecef;
    margin: 4px 0;
}

.chat-user-dropdown .dropdown-logout-btn {
    color: #dc3545;
}

.chat-user-dropdown .dropdown-logout-btn:hover {
    background-color: #fff5f5;
}

/* Nav Item hover popups */
.nav-item-wrapper {
    position: relative;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.nav-item-wrapper:hover {
    background-color: #f0f4ff;
}

.nav-hover-qrcode,
.nav-hover-popup {
    position: absolute;
    left: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-hover-qrcode {
    text-align: center;
    min-width: 160px;
}

.nav-hover-popup {
    min-width: 360px;
    text-align: left;
}

.nav-item-wrapper:hover .nav-hover-qrcode,
.nav-item-wrapper:hover .nav-hover-popup {
    opacity: 1;
    visibility: visible;
}

/* QR Code Arrow */
.nav-hover-qrcode .qrcode-arrow,
.nav-hover-popup .popup-arrow {
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid white;
}

.nav-hover-qrcode img {
    width: 240px;
    height: 240px;
    border-radius: 8px;
    display: block;
    margin: 0 auto 12px;
}

/* Popup content */
.nav-hover-popup .popup-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.nav-hover-popup .popup-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-hover-popup .popup-list li {
    font-size: 13px;
    color: #555;
    padding: 6px 0;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.nav-hover-popup .popup-tip {
    margin: 12px 0 0;
    padding-top: 8px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #888;
    text-align: center;
}

/* === 收起状态侧边栏样式 === */
.collapsed .chat-nav {
    margin-top: 30px;
}

.chat-sidebar.collapsed .chat-logo {
    justify-content: center;
    padding: 15px 0;
}

.chat-sidebar.collapsed .chat-logo .logo-img {
    margin: 0;
    width: 34px;
    height: 34px;
}

.collapsed-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
}

.collapsed-new-chat-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #eee;
    background: #fff;
    color: black;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.collapsed-new-chat-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.collapsed-nav-item {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-decoration: none;
    color: #6c757d;
    transition: all 0.2s ease;
    position: relative;
}

.collapsed-nav-item:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.collapsed-nav-item.nav-item-convert {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.collapsed-nav-item.nav-item-vip {
    background: linear-gradient(135deg, #f5af19 0%, #f12711 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 175, 25, 0.3);
}

.collapsed-user-profile {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.collapsed-user-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
    text-decoration: none;
    transition: all 0.2s ease;
}

.collapsed-user-avatar:hover {
    transform: scale(1.05);
}

.collapsed-user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #f0f0f0;
}

.collapsed-user-dropdown {
    position: absolute;
    bottom: 50%;
    left: 100%;
    transform: translateY(50%) translateX(-10px);
    margin-left: 8px;
    min-width: 120px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    overflow: hidden;
    z-index: 1000;
}

.collapsed-user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(50%) translateX(0);
}

/* Collapsed nav item hover qrcodes */
.collapsed-nav-item-wrapper {
    position: relative;
}

.collapsed-nav-hover-qrcode {
    position: absolute;
    left: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    text-align: center;
    min-width: 160px;
}

.collapsed-nav-item-wrapper:hover .collapsed-nav-hover-qrcode {
    opacity: 1;
    visibility: visible;
}

.collapsed-nav-hover-qrcode .qrcode-arrow {
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid white;
}

.collapsed-nav-hover-qrcode img {
    width: 240px;
    height: 240px;
    border-radius: 8px;
    display: block;
    margin: 0 auto 12px;
}/* DS随心转 AI聊天页面 - 编辑器面板样式 */

/* 右侧编辑器面板 */
.editor-panel {
    flex: 1.5;
    min-width: 400px;
    height: 100vh;
    background: #fff;
    border-left: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: width 0.3s ease, min-width 0.3s ease, opacity 0.3s ease;
}

.editor-panel.collapsed {
    width: 0;
    min-width: 0;
    opacity: 0;
    overflow: hidden;
}

/* 右侧编辑器展开按钮 */
.editor-expand-btn {
    position: fixed;
    right: 0;
    top: 4%;
    transform: translateY(-50%);
    width: 30px;
    height: 40px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px 0 0 8px;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
}

.editor-expand-btn:hover {
    background: #f8f9fa;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
    width: 35px;
}

.editor-expand-btn i {
    font-size: 14px;
    color: #666;
    transition: transform 0.3s ease;
}

/* 编辑器控制区域 */
.editor-controls {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 0 30px;
    border-bottom: 1px solid #e8e8e8;
    background: #fafbfc;
}

.editor-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.editor-buttons {
    display: flex;
    gap: 8px;
}

.editor-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e8e8e8;
    background: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.editor-btn:hover {
    background: #f8f9fa;
    border-color: #d1d5db;
}

.editor-btn i {
    font-size: 14px;
    color: #666;
}

/* 编辑器收起按钮 */
#editorCollapseBtn {
    position: absolute;
    top: 15px;
    left: -18px;
    width: 30px;
    height: 35px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 50%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

#editorCollapseBtn:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#editorCollapseBtn i {
    font-size: 14px;
    color: #666;
    transition: transform 0.3s ease;
}

/* 编辑器内容区域 */
.editor-content {
    flex: 1;
    padding: 4px 20px;
    overflow-y: auto;
}

#react-editor-root {
    height: 100%;
    min-height: 300px;
}

/* 编辑器全屏模态窗口 */
#editorFullscreenModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99998 !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
}

.editor-fullscreen-content {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 90vw !important;
    height: 95vh !important;
    background: white !important;
    border-radius: 8px;
    z-index: 99999 !important;
    margin: 2.5vh auto;
    display: flex;
    flex-direction: column;
}

.editor-fullscreen-header {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid #e8e8e8;
    background: #fafbfc;
    border-radius: 8px 8px 0 0;
}

.editor-fullscreen-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.editor-fullscreen-close {
    width: 36px;
    height: 36px;
    border: 1px solid #e8e8e8;
    background: #fff;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.editor-fullscreen-close:hover {
    background: #f8f9fa;
    border-color: #d1d5db;
}

.editor-fullscreen-body {
    flex: 1;
    padding: 0;
    overflow-y: auto;
}

#react-editor-root-fullscreen {
    height: 100%;
    width: 100%;
}

/* 编辑器内容恢复提示条样式 */
.editor-restore-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border-bottom: 1px solid #BFDBFE;
    flex-shrink: 0;
}

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

.restore-bar-icon {
    font-size: 16px;
}

.restore-bar-text {
    font-size: 13px;
    color: #1E40AF;
    font-weight: 500;
}

.restore-bar-actions {
    display: flex;
    gap: 8px;
}

.restore-bar-btn {
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: inherit;
}

.restore-bar-btn-restore {
    background: #2563EB;
    color: #fff;
}

.restore-bar-btn-restore:hover {
    background: #1D4ED8;
}

.restore-bar-btn-ignore {
    background: transparent;
    color: #6B7280;
    border: 1px solid #D1D5DB;
}

.restore-bar-btn-ignore:hover {
    background: #F3F4F6;
}

/* 修复 Layui 由于重置样式导致的编辑器列表符号丢失问题 */
.ProseMirror ul li {
    list-style: disc;
}

.ProseMirror ol li {
    list-style: decimal;
}

.ProseMirror ul,
.ProseMirror ol {
    padding-left: 24px;
}/* DS随心转 AI聊天页面 - 会话列表样式 */

/* 会话管理区域 */
.chat-session-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 50px;
    /* 为用户头像留出空间 */
}

/* 新建对话按钮 */
.new-chat-btn {
    margin: 10px;
    padding: 12px 16px;
    background: #fff;
    color: black;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    border: solid 1px #eee;
}

.new-chat-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.new-chat-btn:active {
    transform: translateY(0);
}

.new-chat-btn .layui-icon {
    font-size: 16px;
}

/* 会话列表容器 */
.session-list-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.session-title {
    padding: 0 20px 12px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.session-title .layui-icon {
    font-size: 16px;
}

/* 会话列表 */
.session-list {
    flex: 1;
    padding-top: 80px;
    overflow-y: auto;
    padding: 0 0 10px;
}

.session-list::-webkit-scrollbar {
    width: 4px;
}

.session-list::-webkit-scrollbar-track {
    background: transparent;
}

.session-list::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 2px;
}

.session-list::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* 会话项 */
.session-item {
    display: flex;
    align-items: center;
    padding: 6px 2px 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.session-item:hover {
    background: #f0f0f0;
    border-color: #e0e0e0;
}

.session-item.active {
    background: #e3f2fd;
    border-color: #1976d2;
}

.session-content {
    flex: 1;
    min-width: 0;
}

.session-title-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

/* 内联编辑输入框样式 */
.session-title-input {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    width: 100%;
    border: 1px solid #1976d2;
    border-radius: 4px;
    padding: 2px 6px;
    margin-bottom: 4px;
    background: white;
    outline: none;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.session-title-input:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.3);
}

.session-time {
    font-size: 12px;
    color: #999;
}

.session-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.session-item:hover .session-actions {
    opacity: 1;
}

.session-actions .layui-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.session-edit {
    color: #6c757d;
}

.session-edit:hover {
    background-color: #e2e6ea;
    color: #495057;
}

.session-delete {
    color: #dc3545;
}

.session-delete:hover {
    background-color: #f8d7da;
    color: #721c24;
}

/* 空状态 */
.empty-sessions {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-sessions .layui-icon {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 16px;
    display: block;
}

.empty-sessions p {
    margin: 4px 0;
    font-size: 14px;
}

.empty-sessions p:first-of-type {
    font-weight: 500;
    color: #495057;
}/* DS随心转 AI聊天页面 - 消息内容样式 */

/* 欢迎区域 */
.chat-welcome {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    background: #F9F9FB;
}

.welcome-content {
    text-align: center;
    color: #333;
    width: 100%;
    padding: 0 20px;
}

.welcome-content .deepseek-description {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
}

.welcome-content h1 {
    font-size: 24px;
}

.welcome-content p {
    font-size: 14px;
}

/* 品牌欢迎区域 */
.brand-section {
    text-align: center;
    margin-bottom: 60px;
}

.brand-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.brand-header img {
    width: 48px;
    height: 48px;
}

.brand-header .brand-title {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    font-family: "Noto Serif SC", serif;
}

.brand-greeting {
    font-size: 16px;
    color: #666;
    font-weight: 400;
}

/* 搜索状态 */
.search-status {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #666;
    border: 1px solid #eee;
}

.search-status .layui-icon {
    margin-right: 6px;
    color: #1976d2;
}

.search-status-completed {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.search-sources-toggle {
    margin-left: auto;
    cursor: pointer;
    color: #1976d2;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 2px;
    user-select: none;
}

.search-sources-list {
    margin-top: 10px;
    border-top: 1px solid #eee;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-source-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    text-decoration: none;
    color: #333;
    padding: 6px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.search-source-item:hover {
    background-color: #f0f0f0;
    text-decoration: none;
}

.search-source-index {
    background: #e3f2fd;
    color: #1976d2;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

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

.search-source-title {
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-source-url {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-source-item.highlight {
    background-color: #fff3cd;
    transition: background-color 0.3s;
}

/* 引用标注 */
.citation-ref {
    color: #1976d2;
    cursor: pointer;
    margin: 0 2px;
    font-weight: 500;
    user-select: none;
}

.citation-ref:hover {
    text-decoration: underline;
}

/* 指令台时间轴样式 */
.command-timeline-status {
    max-width: 520px;
    margin: 18px auto 8px;
    width: 100%;
    padding: 0 14px 0 62px;
}

.timeline-status-pill {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 0.4px;
    color: #4B5563;
    background: rgba(148, 163, 184, 0.14);
    border: 1px solid rgba(148, 163, 184, 0.26);
}

.command-timeline-status.is-resetting .timeline-status-pill {
    animation: continuityPulse 0.46s ease-out 1;
}

@keyframes continuityPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.22);
    }

    45% {
        transform: scale(1.04);
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.05);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.command-timeline {
    --timeline-area-bg: var(--chat-main-bg, #F9F9FB);
    --timeline-axis-x: 30px;
    --timeline-content-offset: 62px;
    --timeline-line-color: #D9E0EA;
    --timeline-node-color: #7B8EA9;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 14px 180px var(--timeline-content-offset);
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
    border-radius: 18px;
    position: relative;
}

.command-timeline::before {
    content: '';
    position: absolute;
    left: var(--timeline-axis-x);
    top: 10px;
    bottom: 20px;
    width: 3px;
    border-radius: 999px;
    background: var(--timeline-line-color);
}

.command-timeline-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.command-timeline-empty i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
    display: block;
}

/* 指令卡片 */
.command-card {
    --command-card-active-bg: #FDF8EE;
    --command-card-active-accent: #2563EB;
    background: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    position: relative;
}

.command-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.command-card.active {
    background: var(--command-card-active-bg);
    box-shadow: inset 4px 0 0 var(--command-card-active-accent), 0 12px 26px rgba(0, 0, 0, 0.08);
    z-index: 2;
}

.command-card::before {
    content: '';
    position: absolute;
    top: 22px;
    left: -8px;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-right: 8px solid #ffffff;
    filter: drop-shadow(-1px 0 1px rgba(15, 23, 42, 0.08));
}

.command-card.active::before {
    content: none;
}

.command-card::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    left: calc(var(--timeline-axis-x) - var(--timeline-content-offset) - 5px);
    top: 24px;
    background: var(--timeline-node-color);
    box-shadow: 0 0 0 3px var(--timeline-area-bg);
}

.command-card.generating:not(.active) {
    animation: cardPulse 1.5s ease-in-out infinite;
}

@keyframes cardPulse {

    0%,
    100% {
        box-shadow: 0 8px 18px rgba(37, 99, 235, 0.1);
    }

    50% {
        box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
    }
}

.command-card-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.command-card.active .command-card-content::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -28px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 10px solid var(--command-card-active-bg);
    filter: drop-shadow(1px 0 0 rgba(15, 23, 42, 0.08));
}

.command-user {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    min-width: 0;
}

.command-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.command-user-label {
    font-size: 13px;
    color: #666;
    flex-shrink: 0;
}

.command-answer-title {
    width: 100%;
    margin-bottom: 6px;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 700;
    color: #111827;
    white-space: pre-wrap;
    word-break: break-word;
}

.command-user-text {
    font-size: 14px;
    color: #2B2B2B;
    font-weight: 500;
    line-height: 1.6;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.command-user-text::before {
    content: '我：';
}

.command-card.active .command-user-text {
    white-space: pre-line;
    word-break: break-word;
}

.command-card.active .command-user-text.is-multiline-clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    white-space: pre-line;
    overflow: hidden;
}

.command-card.active .command-user-text.is-expanded {
    display: block;
    white-space: pre-wrap;
    overflow: visible;
}

.command-question-toggle {
    margin-top: 6px;
    padding: 0;
    border: none;
    background: none;
    color: #6B7280;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
}

.command-question-toggle:hover {
    color: #1F2937;
    text-decoration: underline;
}

.command-files-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    width: 100%;
}

.command-file-item {
    border: 1px solid rgba(37, 99, 235, 0.2);
    background: rgba(37, 99, 235, 0.03);
    border-radius: 6px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #2563EB;
    cursor: default;
}

.command-file-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.command-file-item .file-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.command-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
}

.command-status-badge {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.command-status-badge.generating {
    background: rgba(59, 130, 246, 0.1);
    color: #2563EB;
}

.command-status-badge.generating::before {
    content: "⏳";
}

.command-status-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.command-status-badge.success::before {
    content: "✅";
    margin-right: 2px;
}

.command-status-badge.error {
    background: rgba(239, 68, 68, 0.1);
    color: #DC2626;
}

.command-status-badge.error::before {
    content: "❌";
    margin-right: 2px;
}

.command-time {
    font-size: 12px;
    color: #999;
}

.timeline-connector {
    display: none;
}

.command-card-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    display: none;
    gap: 12px;
}

.command-card:hover .command-card-actions {
    display: flex;
}

.command-action-btn {
    width: 22px;
    height: 22px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #666;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: none;
}

.command-action-btn:hover {
    color: #2563EB;
    transform: translateY(-1px);
}

.command-action-btn.copy-question:hover {
    color: #10B981;
}

.command-action-btn.edit-resend:hover {
    color: #F59E0B;
}

/* Command timeline tooltip: keep above neighbor action buttons */
.command-action-btn[data-tooltip],
.footer-btn[data-tooltip] {
    position: relative;
}

.command-action-btn[data-tooltip]::after,
.footer-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    top: auto;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    line-height: 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 6000;
    margin-left: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.command-action-btn[data-tooltip]::before,
.footer-btn[data-tooltip]::before {
    content: '';
    position: absolute;
    left: 50%;
    top: auto;
    bottom: calc(100% + 2px);
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.85);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 6000;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.command-action-btn[data-tooltip]:hover,
.footer-btn[data-tooltip]:hover {
    z-index: 40;
}

.command-action-btn[data-tooltip]:hover::after,
.command-action-btn[data-tooltip]:hover::before,
.footer-btn[data-tooltip]:hover::after,
.footer-btn[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
}

.command-action-btn[data-tooltip]:hover::after,
.footer-btn[data-tooltip]:hover::after {
    transform: translateX(-50%) translateY(-2px);
}

/* 消息列表容器 - 兼容旧版 */
.chat-messages {
    flex: none;
    padding: 20px 0 160px 0;
    margin: 0 auto;
    width: 90%;
    display: none;
}

/* 消息通用样式 */
.message {
    display: flex;
    margin-bottom: 24px;
    align-items: flex-start;
    max-width: 100%;
}

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

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

.user-message .message-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    position: relative;
    max-width: 85%;
}

.ai-message .message-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    position: relative;
    padding-left: 42px;
    /* Logo space */
}

/* AI Logo */
.ai-message-logo {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-message-logo img {
    border-radius: 50%;
    object-fit: cover;
    width: 36px;
    height: 36px;
}

/* 消息气泡 */
.message-bubble {
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

.user-message .message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 6px;
    padding: 12px 16px;
}

.ai-message .message-bubble {
    color: #333;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

/* 消息时间/元信息 */
.message-time {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
    opacity: 0.7;
}

.user-message .message-time {
    text-align: right;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

/* 版本切换 */
.message-version-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    padding: 2px 8px;
    background: #f5f5f5;
    border-radius: 12px;
    font-size: 12px;
    color: #666;
    user-select: none;
}

.version-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: #666;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.version-nav-btn:hover:not(:disabled) {
    background: #e0e0e0;
    color: #333;
}

.version-nav-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.version-nav-btn .iconfont {
    font-size: 12px;
}

.version-indicator {
    font-weight: 500;
    min-width: 30px;
    text-align: center;
}

/* 消息编辑按钮 (User) */
.message-edit-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #999;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
    transition: all 0.2s ease;
}

.user-message:hover .message-edit-btn {
    display: inline-flex;
}

.message-edit-btn:hover {
    background: #f0f0f0;
    color: #666;
}

.message-edit-btn .iconfont {
    font-size: 14px;
}

/* 消息编辑状态 */
.message.editing .message-bubble {
    display: none;
}

.message.version-hidden {
    display: none !important;
}

/* User tools container */
.user-message-tools {
    display: none;
    position: absolute;
    left: 0;
    bottom: -28px;
    gap: 4px;
    align-items: center;
}

.user-message:last-of-type .user-message-tools,
.user-message.show-tools .user-message-tools,
.user-message:hover .user-message-tools {
    display: flex;
}

.user-tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #999;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.user-tool-btn:hover {
    background: #f0f0f0;
    color: #666;
}

.user-tool-btn .layui-icon {
    font-size: 14px;
}

/* 消息编辑区域 */
.message-edit-area {
    display: none;
    width: 100%;
}

.message.editing .message-edit-area {
    display: block;
}

.edit-textarea {
    width: 100%;
    min-height: 60px;
    max-height: 200px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease;
}

.edit-textarea:focus {
    border-color: #667eea;
}

.edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.edit-cancel-btn,
.edit-confirm-btn {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.edit-cancel-btn {
    background: #f5f5f5;
    color: #666;
}

.edit-cancel-btn:hover {
    background: #e8e8e8;
}

.edit-confirm-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.edit-confirm-btn:hover {
    opacity: 0.9;
}

/* 消息中的文件显示 */
.message-files {
    padding: 8px;
    border-radius: 8px;
}

.message-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px 6px;
    padding: 8px;
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 8px;
    font-size: 14px;
    color: #28a745;
    transition: all 0.2s ease;
}

.message-file .file-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.message-file svg {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

/* 操作工具栏 */
.message-tools {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.message.ai-message.last-ai-message .message-tools,
.message.ai-message:hover .message-tools {
    opacity: 1;
    visibility: visible;
}

.message-tools .tool-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-decoration: none;
    color: white;
    min-width: auto;
    position: relative;
}

.message-tools .tool-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.message-tools .tool-btn svg {
    width: 20px;
    height: 20px;
}

.message-tools .tool-btn .iconfont {
    font-size: 14px;
}

.message-tools .tool-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* 各种颜色按钮 */
.message-tools .copy-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.message-tools .refine-btn {
    background: linear-gradient(135deg, #00bfa5 0%, #00897b 100%);
}

.message-tools .regenerate-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.message-tools .export-word {
    background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
}

.message-tools .export-pdf {
    background: linear-gradient(135deg, #ea4335 0%, #d33b2c 100%);
}

.message-tools .export-excel {
    background: linear-gradient(135deg, #34a853 0%, #28a745 100%);
}

.message-tools .export-image {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

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

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

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(1);
        opacity: 0.6;
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    }

    40% {
        transform: scale(1.3);
        opacity: 1;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
    }
}

/* 推理内容 */
.message-reasoning {
    width: 100%;
    margin-bottom: 12px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    background-color: #f8f9ff;
    overflow: hidden;
}

.reasoning-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: #e3f2fd;
    border-bottom: 1px solid #e1e4e8;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.reasoning-header:hover {
    background-color: #bbdefb;
}

.reasoning-header-left {
    display: flex;
    align-items: center;
}

.reasoning-header i {
    margin-right: 8px;
    color: #1976d2;
    font-size: 16px;
}

.reasoning-header span {
    flex: 1;
    font-weight: 500;
    color: #1976d2;
    font-size: 14px;
}

.reasoning-toggle {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.reasoning-toggle:hover {
    background-color: rgba(25, 118, 210, 0.1);
}

.reasoning-toggle i {
    color: #1976d2;
    font-size: 14px;
    margin: 0;
}

.reasoning-content {
    padding: 16px;
    display: none;
    background-color: #fafafa;
    border-top: 1px solid #e1e4e8;
    max-height: 300px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    color: #495057;
}

/* Markdown Styles (Prose) */
.message-content,
.message-bubble,
.reasoning-content {
    line-height: 1.8;
    word-wrap: break-word;
    font-size: 15px;
    color: #333;
}

.message-content h1,
.message-bubble h1,
.reasoning-content h1 {
    font-size: 1.8em;
    border-bottom: 2px solid #e1e4e8;
    padding-bottom: 8px;
    margin: 24px 0 16px 0;
    font-weight: 600;
    color: #2c3e50;
}

.message-content h2,
.message-bubble h2,
.reasoning-content h2 {
    font-size: 1.5em;
    border-bottom: 1px solid #e1e4e8;
    padding-bottom: 6px;
    margin: 20px 0 16px 0;
    font-weight: 600;
    color: #2c3e50;
}

.message-content h3,
.message-bubble h3,
.reasoning-content h3 {
    font-size: 1.3em;
    margin: 16px 0;
    font-weight: 600;
    color: #2c3e50;
}

.message-content h4,
.message-bubble h4,
.reasoning-content h4 {
    font-size: 1.1em;
    margin: 16px 0;
    font-weight: 600;
    color: #2c3e50;
}

.message-content p,
.message-bubble p,
.reasoning-content p {
    margin: 2px 0 16px;
    line-height: 1.8;
}

.message-content ul,
.message-bubble ul,
.reasoning-content ul,
.message-content ol,
.message-bubble ol,
.reasoning-content ol {
    margin: 16px 0;
    padding-left: 24px;
    line-height: 1.8;
}

.message-content li,
.message-bubble li,
.reasoning-content li {
    margin: 8px 0;
}

.message-content pre,
.message-bubble pre,
.reasoning-content pre {
    background-color: #f8f9fa;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 20px;
    overflow: visible;
    margin: 20px 0;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: pre-wrap;
    word-break: break-all;
}

.message-content code,
.message-bubble code,
.reasoning-content code {
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', 'Courier New', monospace;
    font-size: 0.9em;
    padding: 2px 6px;
    background-color: #f1f3f4;
    border: 1px solid #e8eaed;
    border-radius: 4px;
    color: #d73a49;
}

.message-content pre code,
.message-bubble pre code,
.reasoning-content pre code {
    padding: 0;
    background-color: transparent;
    border: 0;
    color: inherit;
    word-break: break-all;
    white-space: pre-wrap;
}

.message-content blockquote,
.message-bubble blockquote {
    border-left: 4px solid #1976d2;
    padding: 16px 20px;
    margin: 20px 0;
    background-color: #f8f9ff;
    color: #495057;
    font-style: italic;
    border-radius: 0 4px 4px 0;
}

.message-content table,
.message-bubble table {
    border-collapse: collapse;
    margin: 20px 0;
    width: 100%;
    border: 2px solid #e1e4e8;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    table-layout: auto;
}

.message-content th,
.message-bubble th {
    background-color: #f6f8fa;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e1e4e8;
    padding: 12px 16px;
    text-align: left;
}

.message-content td,
.message-bubble td {
    background-color: #fff;
    border: 1px solid #e1e4e8;
    padding: 12px 16px;
}

.message-content tr:nth-child(even) td,
.message-bubble tr:nth-child(even) td {
    background-color: #f9f9f9;
}

.message-content .hljs,
.message-bubble .hljs {
    background: #f8f9fa !important;
    line-height: 1.6;
}

.message-content a,
.message-bubble a {
    color: #1976d2;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.2s ease;
    word-break: break-all;
}

.message-content a:hover,
.message-bubble a:hover {
    border-bottom: 1px solid #1976d2;
}

.streaming-temp {
    opacity: 0.7;
    font-style: italic;
    color: #666;
}

/* Math */
.message-content .math-block,
.message-bubble .math-block {
    margin: 0;
    text-align: center;
    overflow-x: auto;
    padding: 0;
}

.message-content .math-inline,
.message-bubble .math-inline {
    display: inline;
    padding: 2px 4px;
}

.message-content .math-error,
.message-bubble .math-error {
    color: #d73a49;
    font-family: monospace;
    background-color: #ffeaea;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #ffcdd2;
}

.math-placeholder {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 0.9em;
    cursor: help;
}

/* Version Switcher Styles */
.version-pager {
    display: inline-flex;
    align-items: center;
    border-radius: 12px;
    padding: 2px;
    margin-right: 8px;
    color: #666;
    height: 24px;
    flex-shrink: 0;
    margin-top: 0;
}

.version-btn {
    cursor: pointer;
    padding: 0 4px;
    font-size: 14px;
    line-height: 1;
    transition: all 0.2s;
    color: #666;
    /* Default enabled color */
}

.version-btn:hover {
    color: #2563EB;
    /* Ceramic Blue on hover */
    font-weight: bold;
}

.version-btn.disabled {
    cursor: not-allowed;
    color: #E0E0E0;
    /* Very light gray for disabled */
    pointer-events: none;
    opacity: 0.5;
}

.version-count {
    margin: 0 4px;
    font-weight: 600;
    font-size: 13px;
    user-select: none;
}

.command-user {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.command-user-text {
    overflow-wrap: break-word;
}

/* Response Footer */
.response-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    margin-top: 8px;
    border-top: 1px solid #f0f0f0;
    background-color: #fafafa;
    border-radius: 0 0 12px 12px;
}

.command-card.active .response-footer {
    background-color: #f7f2e8;
    border-top-color: #e9e0d0;
}

.command-card-content .response-footer {
    margin: 12px -16px -12px -16px;
    /* Negative margin to span full width */
    padding: 8px 16px;
}

.editor-content {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.editor-content.is-card-switching {
    animation: editorCardSwitch 0.2s ease;
}

@keyframes editorCardSwitch {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    45% {
        opacity: 0.08;
        transform: translateY(6px);
    }

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

.footer-left,
.footer-center,
.footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-center {
    flex: 1;
    justify-content: center;
}

.footer-btn {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #666;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 12px;
}

.footer-btn:hover {
    background-color: #e0e0e0;
    color: #333;
}

.regenerate-response-btn .layui-icon {
    font-size: 16px;
}

.copy-response-btn {
    color: #999;
}

.copy-response-btn:hover {
    color: #2563EB;
}

.ai-version-btn {
    cursor: pointer;
    padding: 0 4px;
    font-size: 12px;
    line-height: 1;
    transition: all 0.2s;
}

.ai-version-btn:hover {
    color: #2563EB;
    font-weight: bold;
}

.ai-version-btn.disabled {
    cursor: not-allowed;
    color: #999;
    pointer-events: none;
}

/* Model Info in Footer */
.footer-model-info {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 12px;
    padding-right: 12px;
    border-right: 1px solid #e0e0e0;
}

.footer-model-logo {
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.footer-model-name {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}
/* DS随心转 AI聊天页面 - 输入区域样式 */

/* 输入区域通用样式 */
.chat-input-container {
    z-index: 10;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.02);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.02);
    padding: 6px;
    background: #ffffff;
}

.chat-input-container:focus-within {
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.08), 0 4px 8px rgba(37, 99, 235, 0.04);
    transform: translateY(-2px);
}

/* 输入框包装器通用样式 */
.input-wrapper {
    background: white;
    border-radius: 12px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    border: 2px solid transparent;
}

/* 文件拖拽悬停状态 */
.input-wrapper.dragging {
    border-color: #3b82f6;
    border-style: dashed;
    background-color: rgba(59, 130, 246, 0.05);
}

/* 输入操作区域通用样式 */
.input-actions {
    display: flex;
    flex-direction: column;
    padding: 16px 16px 0;
    gap: 12px;
}

.message-input-wrap {
    position: relative;
    width: 100%;
}

/* 输入选项区域通用样式 */
.input-options {
    padding: 6px 16px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.input-options .deep-thinking-btn {
    margin-right: 0;
}

.input-options .upload-btn,
.input-options .send-btn {
    margin-left: 8px;
}

.input-options .model-select { order: 1; }
.input-options .deep-thinking-btn { order: 2; }
.input-options .prompt-entry-btn { order: 3; margin-left: 8px; margin-right: auto; }
.input-options .upload-btn { order: 4; }
.input-options .send-btn { order: 5; }

/* ================================
   指令入口按钮
================================ */
.prompt-entry-btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
    height: 32px;
    border: 1px solid rgba(77, 107, 254, 0.28);
    border-radius: 999px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F3F6FF 100%);
    color: #2F3B8F;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.2px;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
    font-family: var(--prompt-font-sans);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 1px 2px rgba(23, 48, 171, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}

.prompt-entry-btn:hover {
    border-color: rgba(77, 107, 254, 0.45);
    background: linear-gradient(135deg, #FFFFFF 0%, #EEF3FF 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(77, 107, 254, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.prompt-entry-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(77, 107, 254, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.prompt-entry-btn:focus-visible {
    outline: none;
    border-color: rgba(77, 107, 254, 0.55);
    box-shadow: 0 0 0 2px rgba(77, 107, 254, 0.18), 0 1px 2px rgba(23, 48, 171, 0.08);
}

.prompt-entry-btn i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #FFFFFF 0%, #E6ECFF 40%, #CDD9FF 100%);
    font-size: 12px;
    line-height: 1;
    font-style: normal;
    color: #4D6BFE;
    transition: transform 0.16s ease;
}

.prompt-entry-btn:hover i {
    transform: scale(1.04);
}

.prompt-entry-btn>span {
    font-size: 13px;
    line-height: 1;
}

/* === 位置相关的特定样式 === */

/* 初始状态：输入框在欢迎内容中 */
.chat-welcome .chat-input-container {
    position: relative;
    width: 100%;
    transform: none;
}

/* 遮罩层：防止消息穿透输入框 */
.chat-input-backdrop {
    position: sticky;
    bottom: 0;
    background: transparent;
    z-index: 10;
    padding: 10px;
    pointer-events: none;
    margin-top: auto;
}

/* 对话状态：输入框在底部 */
.chat-input-container.bottom-fixed {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    background: white;
    z-index: 100;
    border-radius: 20px;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
}

.chat-input-container.bottom-fixed .input-wrapper {
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.chat-input-container.bottom-fixed .input-wrapper:focus-within {
    box-shadow: none;
}

.chat-input-container.bottom-fixed .input-actions {
    padding: 10px 16px;
}

.chat-input-container.bottom-fixed .input-options {
    padding: 0 10px;
}

.message-input {
    width: 100%;
    display: block;
    box-sizing: border-box;
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-size: 14px;
    line-height: 1.5;
    font-family: inherit;
    background: transparent;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 0;
    min-height: calc(1.5em * 3);
    max-height: calc(1.5em * 10);
    overflow-y: hidden;
    padding-right: 34px;
    transition: height 0.15s ease;
}

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

.input-expand-btn {
    position: absolute;
    top: 0;
    right: 0;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #9CA3AF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.input-expand-btn:hover {
    background: #F3F4F6;
    color: #2563EB;
}

.input-expand-btn .layui-icon {
    font-size: 16px;
}

.send-btn {
    width: 33px;
    height: 33px;
    border: 1px solid #1D4ED8;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.32);
}

.send-btn:disabled {
    background: #D1D5DB;
    border-color: #D1D5DB;
    color: #F9FAFB;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.send-btn .iconfont {
    font-size: 20px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 流式响应时的发送按钮 (Stop btn) */
.send-btn.streaming {
    position: relative;
}

.send-btn.streaming .iconfont {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: inline-block;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 2px;
    margin: 0;
}

.send-btn.streaming .iconfont::before {
    display: none;
}

/* 文件上传按钮 */
.upload-btn {
    width: 30px;
    height: 33px;
    border: none;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 8px;
    position: relative;
    color: #4b5563;
    /* Default dark mode friendly */
}

.upload-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(208, 212, 209, 0.4);
    color: #667eea;
}

.upload-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.upload-btn .layui-icon {
    font-size: 18px;
}

/* 上传按钮等待动画 */
.upload-btn.uploading {
    animation: uploadPulse 1.5s ease-in-out infinite;
}

.upload-btn.uploading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: uploadLoading 1.5s linear infinite;
}

@keyframes uploadPulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

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

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

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

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

/* 已上传文件显示区域 */
.uploaded-files {
    position: relative;
    z-index: 10;
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 24px;
}

.uploaded-file {
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #28a745;
    animation: fadeIn 0.3s ease;
    cursor: pointer;
    position: relative;
}

.uploaded-file .remove-file {
    margin: 0;
    padding: 0;
    position: absolute;
    top: -6px;
    right: -6px;
    display: none;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.uploaded-file:hover .remove-file {
    display: flex;
}

.uploaded-file svg {
    width: 26px;
    height: 26px;
}

.uploaded-file .file-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 深度思考按钮 */
.deep-thinking-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    background: #ffffff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.deep-thinking-btn:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.deep-thinking-btn.active {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1d4ed8;
}

.deep-thinking-btn .layui-icon {
    font-size: 16px;
}

.deep-thinking-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: #f1f5f9;
    color: #64748b;
    border-color: #e2e8f0;
}

/* 模型选择框 */
.model-select {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    background: #ffffff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    min-width: 100px;
    height: 32px;
}

.model-select:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.model-select:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.input-options .model-select {
    margin-right: 8px;
}

/* 头部快捷功能区 */
.header-quick-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.quick-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #d1d5da;
    color: #1a73e8;
}

.quick-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.quick-action-btn i {
    font-size: 16px;
}

/* Dark Mode Support for Input Area */
@media (prefers-color-scheme: dark) {
    .message-input {
        color: #0d0e0e;
        background: transparent;
    }

    .message-input::placeholder {
        color: #b0b3b8;
    }

    .chat-input-backdrop {
        background-color: transparent;
    }
}

.input-tips {
    color: #999;
}
/* DS随心转 AI聊天页面 - 组件与模态框样式 */

/* 自定义确认弹窗按钮样式 - 让右侧确定按钮高亮 */
.layui-layer-btn .layui-layer-btn0 {
    background-color: #f0f0f0 !important;
    color: #666 !important;
    border-color: #d0d0d0 !important;
}

.layui-layer-btn .layui-layer-btn0:hover {
    background-color: #e0e0e0 !important;
    color: #333 !important;
}

.layui-layer-btn .layui-layer-btn1 {
    background-color: #1976d2 !important;
    color: white !important;
    border-color: #1976d2 !important;
}

.layui-layer-btn .layui-layer-btn1:hover {
    background-color: #1565c0 !important;
}

/* 登录模态窗口样式 */
#loginModal,
#wechatGroupModal {
    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;
    background-color: rgba(0, 0, 0, 0.5) !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-modal-content,
#loginModal .login-modal-content,
#wechatGroupModal .login-modal-content {
    background: white !important;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
    animation: modalFadeIn 0.3s ease-out;
    position: relative !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
}

/* 微信群二维码模态窗口特殊样式 */
#wechatGroupModal .login-modal-content.wechat-group-modal {
    max-width: 380px;
}

#wechatGroupModal .login-modal-body {
    background: #fafbfc;
}

#wechatGroupModal img {
    transition: transform 0.3s ease;
}

#wechatGroupModal img:hover {
    transform: scale(1.02);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

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

.login-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.login-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.login-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.login-modal-body {
    padding: 24px;
}

/* Login Tabs */
.login-type-tabs {
    display: flex;
    margin-bottom: 24px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 4px;
}

.login-type-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.login-type-tab.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.login-type-tab:hover:not(.active) {
    color: #333;
}

/* Login Form */
.login-form {
    animation: formFadeIn 0.3s ease-out;
}

@keyframes formFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.verify-code-group {
    display: flex;
    gap: 12px;
}

.verify-code-group .form-input {
    flex: 1;
}

.login-set-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 20px;
}

.login-set-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.login-set-submit-btn:active {
    transform: translateY(0);
}

/* Set Password */
.set-password-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #e8f4fd;
    border: 1px solid #b3d8ff;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #1890ff;
    font-size: 14px;
}

.set-password-tip i {
    font-size: 16px;
}

.set-password-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.login-form .back-login-btn {
    padding: 14px 24px;
    background: #f5f5f5;
    color: #666;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    flex: 0 0 auto;
}

.login-form .back-login-btn:hover {
    background: #e8e8e8;
}

.set-password-actions .login-set-submit-btn {
    flex: 1;
    margin-bottom: 0;
}

.login-tips {
    text-align: center;
    font-size: 12px;
    color: #999;
    line-height: 1.5;
}

.login-tips a {
    color: #667eea;
    text-decoration: none;
}

.login-tips a:hover {
    text-decoration: underline;
}

/* Password Input */
.password-input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-input-group .form-input {
    width: 100%;
    padding-right: 50px;
    box-sizing: border-box;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle-btn:hover {
    color: #667eea;
    background-color: rgba(102, 126, 234, 0.1);
}

.password-toggle-btn i {
    font-size: 16px;
}

/* Login footer actions */
.login-actions {
    text-align: center;
    margin: 20px auto;
}

.set-password-link-btn {
    background: none;
    border: none;
    color: #667eea;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.set-password-link-btn:hover {
    background-color: rgba(102, 126, 234, 0.1);
    text-decoration: none;
}

/* 双11活动弹窗样式 */
#double11PromoModal {
    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;
    background-color: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(5px);
    display: none;
}

.double11-promo-content {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90%;
    max-width: 420px;
    background: white !important;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 100000 !important;
    animation: double11ModalSlideIn 0.4s ease-out;
    overflow: hidden;
}

@keyframes double11ModalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.double11-promo-close {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    z-index: 100001 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease !important;
}

.double11-promo-close:hover {
    background: white !important;
    transform: scale(1.1) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

.double11-promo-close .layui-icon {
    font-size: 18px !important;
    color: #666 !important;
}

.double11-promo-link {
    display: block !important;
    text-decoration: none !important;
    color: inherit !important;
    transition: transform 0.2s ease !important;
}

.double11-promo-link:hover {
    transform: scale(1.02) !important;
    text-decoration: none !important;
    color: inherit !important;
}

.double11-promo-image {
    width: 100% !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    background: #fff !important;
}

.double11-promo-image img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    border-radius: 12px !important;
    transition: transform 0.3s ease !important;
}

.double11-promo-image img:hover {
    transform: scale(1.02) !important;
}

/* Tooltip Styles */
.upload-btn {
    position: relative;
}

.upload-btn .tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    margin-bottom: 8px;
    z-index: 1000;
}

.upload-btn .tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
}

.upload-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

.upload-btn.uploading .tooltip {
    display: none;
}

.message-tools .tool-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    animation: tooltipFadeIn 0.3s ease-out;
    margin-bottom: 8px;
}

.message-tools .tool-btn[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    margin-bottom: 4px;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 编辑提问面板样式 */
.edit-question-content {
    position: relative;
    padding: 24px;
}

.edit-question-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    cursor: pointer;
    background: transparent;
    border: none;
    color: #9CA3AF;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.edit-question-close:hover {
    background: #F3F4F6;
    color: #4B5563;
}

.edit-question-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 700;
    color: #2563EB;
    font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 12px;
}

.edit-question-textarea {
    width: 100%;
    height: 200px;
    padding: 12px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
    resize: none;
    outline: none;
    font-family: inherit;
    background: #FFFFFF;
    transition: all 0.2s ease;
    line-height: 1.6;
    color: #2B2B2B;
}

.edit-question-textarea:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.edit-question-actions {
    margin-top: 20px;
    text-align: right;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* 输入框扩展编辑模态窗口 */
#chatInputExpandModal {
    position: fixed;
    inset: 0;
    z-index: 2100;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(2px);
}

.chat-input-expand-modal-content {
    width: min(860px, 92vw);
    margin: 6vh auto 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 16px 50px rgba(15, 23, 42, 0.22);
    overflow: hidden;
}

.chat-input-expand-header {
    background: #FAF9F6;
}

.chat-input-expand-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-input-expand-title .layui-icon {
    font-size: 18px;
    color: #2563EB;
}

.chat-input-expand-close.panel-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 20px;
}

.chat-input-expand-body {
    padding: 16px 18px 10px;
}

.chat-input-expand-textarea {
    width: 100%;
    height: min(58vh, 560px);
    border: 1px solid #D1D5DB;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.7;
    outline: none;
    resize: vertical;
    color: #1F2937;
}

.chat-input-expand-textarea:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.chat-input-expand-actions {
    padding: 12px 18px 18px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}/* DS随心转 AI聊天页面 - 移动端适配样式 */

/* 响应式设计: max-width: 1200px */
@media (max-width: 1200px) {
    .chat-sidebar.expanded {
        width: 16vw;
        min-width: 250px;
        max-width: 300px;
    }

    .editor-panel {
        min-width: 350px;
    }

    .chat-main {
        min-width: 320px;
    }
}

/* 响应式设计: max-width: 1024px */
@media (max-width: 1024px) {
    .chat-sidebar.expanded {
        width: 18vw;
        min-width: 240px;
        max-width: 280px;
    }

    .chat-sidebar.collapsed {
        width: 50px;
        min-width: 50px;
    }

    .editor-panel {
        min-width: 320px;
    }

    .chat-main {
        min-width: 280px;
    }
}

/* 响应式设计: max-width: 768px (Mobile Tablet) */
@media (max-width: 768px) {
    .chat-container {
        flex-direction: column;
    }

    .chat-sidebar {
        width: 100%;
        min-width: 100vw;
        height: auto;
        position: relative;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }

    .chat-sidebar.mobile-hidden {
        display: none;
    }

    .chat-user-profile {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        margin: 10px 20px;
    }

    .chat-session-area {
        padding-bottom: 20px;
    }

    .chat-main {
        flex: 1;
        min-width: 100vw;
        height: 60vh;
        /* Approximate */
    }

    /* Editor Panel Mobile */
    .editor-panel {
        width: 100vw;
        min-width: 100vw;
        height: 40vh;
        border-left: none;
        border-top: 1px solid #e8e8e8;
    }

    .sidebar-toggle-btn {
        display: none;
    }

    /* Input Area Mobile */
    .chat-input-backdrop {
        left: 0;
        position: fixed;
        bottom: 0;
        background: white;
    }

    .chat-input-container.bottom-fixed {
        width: 90%;
        left: 5%;
    }

    /* Welcome & Message Mobile */
    .welcome-content h1 {
        font-size: 24px;
    }

    .welcome-content p {
        font-size: 14px;
    }

    .message-content {
        max-width: 85%;
    }

    .command-timeline-status {
        max-width: 100%;
        margin: 12px auto 6px;
        padding: 0 10px 0 46px;
    }

    .command-timeline {
        --timeline-axis-x: 22px;
        --timeline-content-offset: 46px;
        padding: 12px 10px 150px var(--timeline-content-offset);
        max-width: 100%;
        border-radius: 14px;
    }

    .command-card {
        padding: 12px 14px;
    }

    .command-card::before {
        top: 18px;
    }

    .command-card::after {
        top: 20px;
    }

    /* Command Card Actions Mobile */
    .command-card-actions {
        display: flex !important;
        opacity: 0.8;
    }

    .command-card:hover .command-card-actions {
        opacity: 1;
    }

    /* AI Logo Mobile */
    .ai-message-logo {
        width: 28px;
        height: 28px;
        top: -1px;
        left: -1px;
    }

    .ai-message-logo img {
        width: 20px;
        height: 20px;
    }

    .message.ai-message .message-content {
        padding-left: 36px;
    }

    /* Tool Buttons Mobile */
    .message-tools {
        flex-wrap: wrap;
        gap: 6px;
    }

    .message-tools .tool-btn {
        font-size: 11px;
        padding: 5px 8px;
        min-width: 70px;
    }

    /* Reasoning Header Mobile */
    .reasoning-header {
        padding: 10px 12px !important;
    }

    /* Restore Editor Modal Mobile */
    #restoreEditorModal .restore-editor-modal-content {
        width: 95%;
        max-width: 400px;
        border-radius: 14px;
    }

    .restore-editor-modal-header {
        padding: 18px 16px 14px;
        gap: 12px;
    }

    .restore-editor-modal-title-group {
        gap: 6px;
    }

    .restore-editor-modal-header h3 {
        font-size: 20px;
    }

    .restore-editor-modal-title-icon {
        font-size: 19px;
    }

    .restore-editor-modal-body {
        padding: 20px 16px 18px;
    }

    .restore-editor-icon {
        width: 62px;
        height: 62px;
        border-radius: 14px;
        margin-bottom: 14px;
    }

    .restore-editor-icon .layui-icon {
        font-size: 32px !important;
    }

    .restore-editor-message {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .restore-editor-submessage {
        font-size: 13px;
        margin-bottom: 18px;
    }

    .restore-editor-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .restore-editor-btn {
        width: 100%;
        min-width: auto;
        padding: 11px 18px;
        font-size: 14px;
    }

    #chatInputExpandModal .chat-input-expand-modal-content {
        width: 94vw;
        margin-top: 4vh;
        border-radius: 12px;
    }

    #chatInputExpandModal .chat-input-expand-header {
        padding: 14px 14px;
    }

    #chatInputExpandModal .chat-input-expand-body {
        padding: 12px 14px 8px;
    }

    #chatInputExpandModal .chat-input-expand-textarea {
        height: 52vh;
    }

    #chatInputExpandModal .chat-input-expand-actions {
        padding: 10px 14px 14px;
        gap: 8px;
    }
}

/* 响应式设计: max-width: 480px (Phone) */
@media (max-width: 480px) {
    .chat-nav {
        padding: 15px;
    }

    .new-chat-btn {
        margin: 15px;
        padding: 10px 14px;
    }

    .session-list {
        padding: 0 15px 15px;
    }

    .chat-messages {
        margin: 15px;
        margin-bottom: 0;
        padding: 15px;
    }

    .input-actions {
        padding: 12px;
    }

    .chat-input-container.bottom-fixed .input-actions {
        padding: 12px 15px;
    }

    .message-avatar img {
        width: 32px;
        height: 32px;
    }

    .message-bubble {
        padding: 10px 14px;
        font-size: 13px;
    }

    /* Login Modal Mobile */
    .login-modal-content {
        width: 95%;
        margin: 20px;
    }

    .login-modal-header,
    .login-modal-body {
        padding: 20px;
    }

    .verify-code-group {
        flex-direction: column;
        gap: 12px;
    }

    .send-code-btn {
        min-width: auto;
    }

    .password-input-group .form-input {
        padding-right: 45px;
    }

    .password-toggle-btn {
        right: 8px;
        padding: 6px;
    }

    .password-toggle-btn i {
        font-size: 14px;
    }

    /* Promo Modal Mobile */
    #double11PromoModal {
        padding: 20px !important;
    }

    .double11-promo-content {
        width: 95% !important;
        max-width: 380px !important;
        margin: 0 !important;
    }

    .double11-promo-close {
        width: 32px !important;
        height: 32px !important;
        top: 12px !important;
        right: 12px !important;
    }

    .double11-promo-close .layui-icon {
        font-size: 16px !important;
    }
}

/* 响应式设计: max-width: 360px */
@media (max-width: 360px) {
    .double11-promo-content {
        width: 98% !important;
    }
}
