/* =========================================
   CSS重置和基础样式
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 颜色变量 */
    --primary-color: #3370FF;
    --primary-hover: #2856CC;
    --primary-light: rgba(51, 112, 255, 0.10);
    --primary-border: rgba(51, 112, 255, 0.40);
    --background-color: #EEF1F4;
    --sidebar-bg: #E7ECF4;
    --white: #FFFFFF;
    --black: #000000;
    --text-primary: #333333;
    --text-secondary: #646A73;
    --text-muted: #909399;
    --border-color: #DCDFE6;
    --border-light: #E9EEF5;
    --hover-bg: #F5F7FA;
    
    /* 尺寸变量 */
    --container-max-width: 768px;
    --sidebar-width: 281px;
    --button-height: 36px;
    --button-height-lg: 44px;
    --input-height: 44px;
    
    /* 间距变量 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 20px;
    --spacing-2xl: 24px;
    
    /* 圆角变量 */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 10px;
    --radius-2xl: 12px;
    --radius-full: 40px;
    
    /* 动画变量 */
    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
    --transition-slow: 0.5s;
}

body {
    font-family: "Noto Sans CJK SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
    background: var(--background-color);
    height: 100vh;
    overflow: hidden;
    line-height: 1.5;
    color: var(--text-primary);
}

/* =========================================
   通用工具类
   ========================================= */
.flex {
    display: flex;
}

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

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================================
   主容器布局
   ========================================= */
.container {
    width: 100vw;
    height: 100vh;
    display: flex;
    background: var(--background-color);
    position: relative;
    transition: all var(--transition-normal) ease;
    overflow: hidden;
}

/* =========================================
   侧边栏组件
   ========================================= */
.sidebar-toggle-btn {
    position: fixed;
    top: var(--spacing-md);
    left: var(--spacing-lg);
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: all var(--transition-normal) ease;
}

.container.sidebar-visible .sidebar-toggle-btn {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.sidebar-toggle-btn:hover {
    background: transparent;
}

.toggle-icon {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

/* 侧边栏样式 */
.sidebar {
    width: 0px;
    /* 默认隐藏，对应Grid的0px */
    min-width: 0px;
    height: 100vh;
    background: #E7ECF4;
    border-right: 1px solid #DCDFE6;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
    z-index: 998;
    overflow: hidden;
    /* 确保内容不显示 */
}

.container.sidebar-visible .sidebar {
    width: 281px;
    min-width: 281px;
}

.sidebar.hidden {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
}

/* 侧边栏头部 */
.sidebar-header {
    width: 100%;
    height: 100px;
    background: #E7ECF4;
    padding: 16px 18px;
    box-sizing: border-box;
    position: relative;
}

/* 侧边栏关闭按钮样式 */
.sidebar-close-btn {
    position: absolute;
    top: 12px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.container.sidebar-visible .sidebar-close-btn {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.container.sidebar-visible .sidebar-toggle-btn {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.sidebar-close-btn:hover {
    background: transparent;
}

.close-icon {
    color: #666;
    width: 16px;
    height: 16px;
}

.brand-section {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.brand-icon {
    width: 32px;
    height: 32px;
    margin-right: 9px;
    object-fit: contain;
}

.brand-text {
    color: black;
    font-size: 15px;
    font-weight: 700;
}

.new-chat-btn {
    width: 100%;
    max-width: 244px;
    height: 32px;
    background: rgba(51, 112, 255, 0.10);
    border: 1px solid rgba(51, 112, 255, 0.40);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-bottom: 0;
}

.new-chat-content {
    display: flex;
    align-items: center;
}

.new-chat-icon {
    width: 14px;
    height: 14px;
    margin-right: 6px;
    color: #3370FF;
}

.new-chat-text {
    color: #3370FF;
    font-size: 14px;
    font-weight: 400;
}

/* 历史记录区域 */
.history-section {
    flex: 1;
    background: #E7ECF4;
    padding: 0 18px 8px 18px;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    /* margin-bottom: 8px; */
}

.history-title {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.history-icon-placeholder {
    display: none;
}

/* .history-icon-placeholder {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    background: #646A73;
    border-radius: 4px;
    position: relative;
} */

/* .history-icon-placeholder::before {
    content: "📋";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
} */

.history-text {
    color: #646A73;
    font-size: 14px;
    font-weight: 400;
}

.history-menu {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin-right: 10px;
}

.history-menu-icon {
    width: 16px;
    height: 16px;
    color: #000000;
}

/* .history-menu:hover .history-menu-icon {
    color: #ff4d4f;
} */

.history-content {
    text-align: center;
    /* padding-top: 200px; */
}

.no-history-text {
    color: #909399;
    font-size: 14px;
    font-weight: 400;
}

/* 用户头像区域 */
.user-section {
    width: 100%;
    height: 72px;
    background: #E7ECF4;
    padding: 16px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    cursor: pointer;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: #3370FF;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.user-login-text {
    color: #333;
    font-size: 14px;
    font-weight: 400;
    margin-left: 12px;
}

/* 登录弹窗样式 */
.login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.login-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.login-modal-content {
    position: relative;
    width: 400px;
    max-width: 90vw;
    background: white;
    border-radius: 16px;
    box-shadow: 0px 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.login-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 20px;
    border-bottom: 1px solid #DCDFE6;
}

.login-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.login-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    color: #666;
    transition: all 0.2s;
}

.login-close:hover {
    background: #F5F7FA;
    color: #333;
}

.login-form {
    padding: 24px;
}



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

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

.form-input {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #DCDFE6;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #FAFBFC;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #3370FF;
    background: white;
    box-shadow: 0 0 0 3px rgba(51, 112, 255, 0.1);
}

.form-input::placeholder {
    color: rgba(144, 147, 153, 0.60);
}

.login-btn {
    width: 100%;
    height: 44px;
    background: #3370FF;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.login-btn:hover {
    background: #2856CC;
}

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

.trial-btn {
    width: 100%;
    height: 44px;
    background: rgba(51, 112, 255, 0.1);
    color: #3370FF;
    border: 1px solid rgba(51, 112, 255, 0.3);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
}

.trial-btn:hover {
    background: rgba(51, 112, 255, 0.15);
    border-color: rgba(51, 112, 255, 0.5);
}

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

/* 页底样式 */
.footer {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    padding: 0 20px;
}

.footer-text {
    font-size: 13px;
    color: #CCCCCC;
    line-height: 1.5;
}

.database-link {
    color: #CCCCCC;
    /* font-weight: bold; */
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.database-link:hover {
    color: #3370FF;
    border-bottom: 1px solid #3370FF;
}


/* 响应式设计 */
@media (max-width: 480px) {
    .login-modal-content {
        width: 95vw;
        margin: 0 auto;
    }

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



    .login-form {
        padding: 20px;
    }

    .login-title {
        font-size: 18px;
    }
}

/* =========================================
   主要内容区域
   ========================================= */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    transition: all var(--transition-normal) ease;
    width: 100vw;
    margin-left: 0;
}

.main-content.expanded {
    width: 100vw;
    margin-left: 0;
}

.chat-container {
    width: 100%;
    max-width: 768px;
    height: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.chat-title {
    text-align: center;
    margin-bottom: 40px;
}

/* 标题动画容器 */
.title-animation-container {
    display: inline-block;
    text-align: center;
    overflow: hidden;
}

/* 单个字符样式 */
.char {
    display: inline-block;
    opacity: 0;
    transform: translateX(-100px);
    animation: slideInFromLeft 0.1s ease-out forwards;
    font-size: 32px;
    font-weight: 600;
    color: black;
}

/* 提示词模式标题 */
.prompt-mode-title {
    text-align: center;
    margin-bottom: 40px;
}

/* 由左到右滑动动画 */
@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100px);
    }

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

.chat-title-text {
    color: black;
    font-size: 32px;
    font-weight: 600;
}

.chat-input-wrapper {
    width: 100%;
    max-width: 768px;
    min-height: 126px;
    position: relative;
}

.chat-input-container {
    width: 100%;
    min-height: 126px; /* 最小高度 */
    background: white;
    box-shadow: 0px 5px 16px -4px rgba(0, 0, 0, 0.07);
    border-radius: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    padding-bottom: 50px; /* 为按钮区域预留空间 */
}

.chat-input {
    width: calc(100% - 0px);
    min-height: 98px;
    max-height: none;
    border: none;
    outline: none;
    background: transparent;
    padding: 14px;
    /* 增加底部内边距为按钮预留空间 */
    font-family: "Noto Sans CJK SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    resize: none;
    overflow-y: visible;
    line-height: 1.5;
    box-sizing: border-box;
}

/* .chat-input:focus {
    border: 1px solid #3370FF;
} */

.chat-input::placeholder {
    color: rgba(144, 147, 153, 0.60);
    font-size: 16px;
    font-weight: 500;
}

.cube-button-wrapper {
    position: absolute;
    left: 17px;
    bottom: 14px;
}

.cube-button {
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid #E9EEF5;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cube-button:hover {
    background: #EEF1F4;
}

.cube-button-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* 按钮Tooltip样式 */
.cube-button-wrapper::before {
    content: '选择模型';
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1001;
}

.cube-button-wrapper::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1001;
}

.cube-button-wrapper:hover::before,
.cube-button-wrapper:hover::after {
    opacity: 1;
}

/* 深度思考模式按钮 */
.think-button::before {
    content: var(--tooltip-text, '开启深度思考模式');
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1001;
}

.think-button::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1001;
}

.think-button:hover::before,
.think-button:hover::after {
    opacity: 1;
}


.think-button {
    position: absolute;
    /* left: 60px; */
    left: 17px;
    bottom: 14px;
    width: 110px;
    height: 36px;
    background: transparent;
    border: 1px solid #E9EEF5;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 10px;
    transition: all 0.2s;
}

.think-button:hover {
    background: #EEF1F4;
}

.think-button.active {
    border-color: rgba(51, 112, 255, 0.40);
    background: rgba(51, 112, 255, 0.10);
}

.think-button.active .think-button-text {
    color: #3370FF;
}

.think-button-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.think-button-text {
    color: #000;
    font-size: 14px;
    font-weight: 400;
}

/* 联网搜索按钮 */
.search-button::before {
    content: var(--tooltip-text, '开启联网搜索模式');
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1001;
}

.search-button::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1001;
}

.search-button:hover::before,
.search-button:hover::after {
    opacity: 1;
}

.search-button {
    position: absolute;
    left: 134px;
    bottom: 14px;
    width: 110px;
    height: 36px;
    background: transparent;
    border: 1px solid #E9EEF5;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 10px;
    transition: all 0.2s;
}

.search-button:hover {
    background: #EEF1F4;
}

.search-button.active {
    border-color: rgba(51, 112, 255, 0.40);
    background: rgba(51, 112, 255, 0.10);
}

.search-button.active .search-button-text {
    color: #3370FF;
}

.search-button-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.search-button-text {
    color: #000;
    font-size: 14px;
    font-weight: 400;
}

/* 下拉菜单样式 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 140px;
    background: white;
    border: 1px solid #E9EEF5;
    border-radius: 8px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    margin-top: 4px;
    overflow: hidden;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s;
    border-bottom: 1px solid #F5F7FA;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: #F5F7FA;
}

.dropdown-item.active {
    background: rgba(51, 112, 255, 0.1);
}

.dropdown-text {
    font-size: 14px;
    color: #333;
}

.dropdown-check {
    color: #3370FF;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s;
}

.dropdown-item.active .dropdown-check {
    opacity: 1;
}


/* 语音按钮样式 */
.voice-button {
    position: absolute;
    right: 70px;
    bottom: 14px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.voice-button:hover {
    background: #EEF1F4;
}

.voice-button.recording {
    background: #FF4D4F !important;
    animation: pulse 1.5s infinite;
}

.voice-button.recording:hover {
    background: #FF7875 !important;
}

.voice-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}


/* 语音按钮Tooltip样式 */
.voice-button::before {
    content: '语音输入';
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1001;
}

.voice-button::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1001;
}

.voice-button:hover::before,
.voice-button:hover::after {
    opacity: 1;
}

/* 文件按钮样式 */
.file-button {
    position: absolute;
    right: 106px;
    bottom: 14px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.file-button:hover {
    background: #EEF1F4;
}

.file-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* 文件按钮Tooltip样式 */
.file-button::before {
    content: '支持文件上传（最多3个，每个大小在100MB以内），接受PDF、DOC、TXT等格式';
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1001;
}

.file-button::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1001;
}

.file-button:hover::before,
.file-button:hover::after {
    opacity: 1;
}

.button-separator {
    position: absolute;
    right: 60px;
    bottom: 18px;
    width: 1px;
    height: 20px;
    background: #E9EEF5;
}

.send-button {
    position: absolute;
    right: 17px;
    bottom: 14px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: #3370FF; */
    border-radius: 8px;
    transition: background-color 0.2s;
}

/* .send-button:hover {
    background: #2856CC;
} */

.send-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* 推荐按钮容器 */
.recommend-buttons-container {
    width: 100%;
    max-width: 768px;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

/* 推荐按钮样式 */
.recommend-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 40px;
    background: #FFFFFF;
    border: 1px solid transparent;
    border-radius: 40px;
    cursor: pointer;
    padding: 0 15px;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 400;
    color: #000;
}

/* 提示词列表容器 */
.prompt-list-container {
    width: 100%;
    max-width: 768px;
    margin-top: 29px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    display: none; /* 默认隐藏 */
}

/* 提示词项目 */
.prompt-item {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.prompt-item-content {
    display: flex;
    align-items: center;
    flex: 1;
}

/* 提示词图标 */
.prompt-icon {
    width: 16px;
    height: 16px;
    margin-right: 10px;
    flex-shrink: 0;
}

/* 提示词右侧引用图标 */
.prompt-quote-icon {
    width: 20px;
    height: 20px;
    opacity: 0.5;
    margin-left: 10px;
    flex-shrink: 0;
    transition: all 0.2s;
}

.prompt-item:hover {
    background-color: transparent;
}

.prompt-item:hover .prompt-text {
    color: #3370FF;
}

.prompt-item:hover .prompt-icon {
    filter: brightness(0) saturate(100%) invert(33%) sepia(98%) saturate(1032%) hue-rotate(202deg) brightness(96%) contrast(101%);
}

.prompt-item:hover .prompt-quote-icon {
     filter: brightness(0) saturate(100%) invert(33%) sepia(98%) saturate(1032%) hue-rotate(202deg) brightness(96%) contrast(101%);
}

.prompt-text {
    font-size: 15px;
    color: #333;
    font-weight: 400;
    line-height: 1.4;
    transition: color 0.2s;
    flex: 1;
}

/* 提示词分隔线 */
.prompt-separator {
    height: 0.5px;
    background: #E1E6ED;
    margin: 0;
}

/* 宣传区域 */
.promotion-container {
    width: 100%;
    max-width: 768px;
    height: 150px;
    margin-top: 30px;
}

.promotion-images {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    gap: 15px;
}

.promotion-link {
    flex: 1;
    text-decoration: none;
    display: block;
}

.promotion-image {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: contain;
    background: #f5f7fa;
}

/* 推荐按钮选中状态样式 */
.recommend-button.selected {
    background-color: rgba(51, 112, 255, 0.10);
    border-color: rgba(51, 112, 255, 0.40);
}

.recommend-button.selected .recommend-button-icon {
    filter: brightness(0) saturate(100%) invert(33%) sepia(98%) saturate(1032%) hue-rotate(202deg) brightness(96%) contrast(101%);
}

.recommend-button.selected .recommend-button-text {
    color: rgb(51, 112, 255);
}

.recommend-button-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.recommend-button-text {
    color: #000;
    font-size: 14px;
    font-weight: 400;
}

.recommend-button:hover {
    background: rgba(51, 112, 255, 0.10);
    border-color: rgba(51, 112, 255, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        /* 移动端改为flex列布局 */
    }

    .sidebar {
        width: 100%;
        min-width: auto;
        height: 100vh;
        position: fixed;
        top: 0;
        left: -100%;
        z-index: 998;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
    }

    .container.sidebar-visible .sidebar {
        left: 0;
        width: 100%;
        min-width: auto;
    }

    .sidebar-toggle-btn {
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 999;
    }

    .container.sidebar-visible .sidebar-toggle-btn {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .sidebar-header {
        height: auto;
        padding: 12px 16px;
    }

    .history-section {
        display: block;
        flex: 1;
    }

    .user-section {
        height: auto;
        padding: 12px 16px;
    }

    .main-content {
        width: 100vw !important;
        padding: 60px 15px 20px 15px;
    }

    .chat-container {
        max-width: 100%;
        padding: 0 10px;
    }

    .chat-title-text {
        font-size: 24px;
    }
    
    /* 移动端侧边栏头部padding调整 */
    .sidebar-header {
        padding: 16px 20px;
    }
    
    /* 移动端新建对话按钮使用全宽度 */
    .new-chat-btn {
        max-width: none;
        width: 100%;
    }
    
    /* 移动端标题字体大小设置 */
    .char {
        font-size: 24px !important;
    }
    .prompt-mode-title .char {
        font-size: 24px !important;
    }
    
    /* 隐藏指定元素 */
    .sidebar-toggle-btn,
    .mini-program-btn {
        display: none !important;
    }
    
    /* 移动端显示输入框 */
    .chat-input-wrapper {
        display: block !important;
    }
    
    /* 移动端二维码弹窗适配 */
    .qr-modal-content {
        width: 90%;
        max-width: 300px;
    }
    
    .qr-code {
        width: 100%;
        height: auto;
        max-width: 250px;
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .sidebar-toggle-btn {
        top: 10px;
        left: 10px;
        width: 36px;
        height: 36px;
    }

    .sidebar {
        padding: 0;
    }

    .sidebar-header {
        padding: 10px 12px;
    }

    .user-section {
        padding: 10px 12px;
    }
    
    /* 移动端新建对话按钮使用全宽度 */
    .new-chat-btn {
        max-width: none;
        width: 100%;
    }
    
    /* 移动端标题字体大小设置 */
    .char {
        font-size: 24px !important;
    }
    .prompt-mode-title .char {
        font-size: 24px !important;
    }
    
    /* 隐藏指定元素 */
    .sidebar-toggle-btn,
    .mini-program-btn {
        display: none !important;
    }
    
    /* 移动端显示输入框 */
    .chat-input-wrapper {
        display: block !important;
    }
    
    /* 移动端推荐按钮和提示词列表优化 */
    .recommend-buttons-container {
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 20px;
    }
    
    .recommend-button {
        min-width: 90px;
        height: 36px;
        font-size: 12px;
        padding: 0 10px;
    }
    
    /* 移动端提示词列表优化 */
    .prompt-list-container {
        margin-top: 20px;
    }
    
    .prompt-item {
        height: auto;
        min-height: 50px;
        padding: 12px 15px;
    }
    
    .prompt-text {
        font-size: 14px;
        line-height: 1.3;
    }
    
    /* 移动端宣传区域优化 */
    .promotion-container {
        height: 120px;
        margin-top: 20px;
    }
    
    .promotion-images {
        gap: 10px;
    }

    .main-content {
        padding: 50px 10px 15px 10px;
    }

    .chat-title-text {
        font-size: 20px;
    }

    .chat-input-wrapper {
        height: 100px;
    }

    .chat-input-container {
        height: 100px;
    }

    .chat-title {
        margin-bottom: 30px;
    }


}

/* Toast提示样式 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 12px;
    border-radius: 12px;
    z-index: 9999; /* 提高z-index值确保在最上层 */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    max-width: 80%;
    text-align: center;
    font-size: 13px;
    pointer-events: none; /* 防止阻止用户交互 */
}

.toast.show {
    opacity: 1;
}

/* 错误类型的Toast样式 */
.toast.toast-error {
    background-color: rgba(0, 0, 0, 0.7); /* 红色背景 */
    /* border: 1px solid rgba(255, 59, 48, 0.3); */
}

/* 右上角按钮容器 */
.top-right-buttons {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 二维码弹窗样式 */
.qr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.qr-modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    /* 阻止内容区域的事件冒泡到遮罩层 */
    pointer-events: none;
}

.qr-code {
    width: 300px;
    height: 300px;
}

/* 登录按钮样式 */
.login-btn-top {
    width: 80px;
    height: 36px;
    background-color: #3370FF;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-btn-top:hover {
    background-color: #2856CC;
    /* 悬停效果 */
}

/* 社科AI小程序按钮样式 */
.mini-program-btn {
    width: auto;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0 12px;
}

.mini-program-btn:hover {
    border-color: rgba(51, 112, 255, 0.40);
    background: rgba(51, 112, 255, 0.10);
}

.mini-program-btn:hover .mini-program-icon {
    filter: brightness(0) saturate(100%) invert(33%) sepia(98%) saturate(1032%) hue-rotate(202deg) brightness(96%) contrast(101%);
}

.mini-program-btn:hover .mini-program-text {
    color: #3370FF;
}

.mini-program-icon {
    width: 20px;
    height: 20px;
    transition: all 0.3s;
}

.mini-program-text {
    font-size: 15px;
    color: #333;
    margin-left: 4px;
    font-weight: 400;
    transition: all 0.3s;
}

/* 附件列表样式 */
.attachment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px 16px 0 16px;
    max-height: 120px;
    overflow-y: auto;
}

.attachment-item {
    display: flex;
    align-items: center;
    background: #F5F7FA;
    border-radius: 8px;
    padding: 8px;
    position: relative;
    width: 170px; /* 固定宽度 */
    border: 1px solid #E4E7ED;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.attachment-item:hover {
    background: #EEF1F4;
    border-color: #D0D5DD;
}

.attachment-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    margin-right: 8px;
    flex-shrink: 0;
}

.attachment-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.attachment-name {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.attachment-size {
    font-size: 11px;
    color: #909399;
    margin-top: 2px;
    line-height: 1.2;
}

.attachment-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    border: none;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0;
}

.attachment-item:hover .attachment-delete {
    opacity: 1;
    background: rgba(255, 77, 79, 0.8);
}

.attachment-delete:hover {
    background: #ff4d4f !important;
    transform: scale(1.1);
}

.attachment-separator {
    height: 1px;
    background: #E9EEF5;
    /* margin: 10px 0 0 0; */
    display: none;
}

/* 隐藏联网搜索按钮 */
.search-button {
    display: none !important;
}
