/* 
 * DeepSeek 聊天页面样式表
 * ====================== 
 */

:root {
    /* 颜色 */
    --primary-color: #0055FF;        /* 主色调：深蓝 */
    --primary-hover: #0044CC;
    --secondary-color: #00B3FF;      /* 辅助色：浅蓝 */
    --dark-blue: #002B80;
    --light-blue: #EBF3FF;
    --tax-highlight: #E6F7FF;        /* 财税高亮背景 */
    --tax-accent: #00A3E0;           /* 财税强调色 */
    --gray-light: #F8FAFC;
    --gray-medium: #E2E8F0;
    --gray-text: #64748B;            /* 灰色文字 */
    --dark-text: #1E293B;
    --white: #FFFFFF;
    --success: #00C48C;
    --warning: #FFB800;
    --error: #FF3B3B;
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    --font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    --font-mono: 'Consolas', 'Source Code Pro', monospace;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --sidebar-width: 280px;          /* 侧边栏宽度 */
    --sidebar-collapsed-width: 0px;  /* 侧边栏折叠时的宽度 */
}

/* 基础样式 */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.5;
    color: var(--dark-text);
    background-color: var(--gray-light);
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

/* 文字Logo样式 */
.text-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* 标准属性作为渐变文本的替代方案 */
    color: transparent; 
    letter-spacing: -0.5px;
    display: block;
}

.sidebar-header .text-logo {
    text-align: center;
    margin: 0 auto;
}

/* 应用容器 */
.app-container {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--gray-medium);
    height: 100%;
    flex-shrink: 0;
    transition: width 0.3s ease;
    overflow: hidden;
    z-index: 20;
}

/* 侧边栏折叠状态 */
.app-container.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

/* 侧边栏折叠按钮 */
.sidebar-toggle {
    position: absolute;
    left: calc(var(--sidebar-width) - 16px);
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background-color: var(--white);
    border: 1px solid var(--gray-medium);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 30;
    transition: left 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.app-container.sidebar-collapsed .sidebar-toggle {
    left: -16px;
}

.app-container.sidebar-collapsed .sidebar-toggle .icon-chevron-left {
    transform: rotate(180deg);
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-medium);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.logo {
    height: 40px;
}

.new-chat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: var(--border-radius-md);
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.new-chat-btn:hover {
    background-color: var(--primary-hover);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.history-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-text);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: var(--border-radius-md);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    flex-wrap: wrap;
}

.history-item:hover {
    background-color: var(--gray-light);
}

.history-item.active {
    background-color: var(--light-blue);
}

.history-icon {
    margin-right: 0.75rem;
    color: var(--gray-text);
}

.history-item.active .history-icon {
    color: var(--primary-color);
}

.history-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-date {
    font-size: 0.75rem;
    color: var(--gray-text);
    margin-left: auto;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--gray-medium);
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

/* 用户头像样式 */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #666;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.user-avatar img, .user-avatar svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background-color: var(--white);
    transition: margin-left 0.3s ease;
}

.app-container.sidebar-collapsed .main-content {
    margin-left: 0;
}

.chat-header {
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--gray-medium);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--white);
    z-index: 10;
}

.chat-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--dark-blue);
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* 聊天消息区域 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message-container {
    display: flex;
    gap: 1rem;
    max-width: 80%;
}

.message-container.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-container.ai-message {
    align-self: flex-start;
}

.message-container.system-message {
    align-self: center;
    max-width: 800px;
    width: 100%;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-blue);
}

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

.message-avatar svg {
    width: 100%;
    height: 100%;
}

.message-content {
    background-color: var(--gray-light);
    padding: 1rem;
    border-radius: var(--border-radius-lg);
    position: relative;
    flex: 1;
}

.message-container.user-message .message-content {
    background-color: var(--light-blue);
    color: var(--dark-text);
}

.message-container.ai-message .message-content {
    background-color: var(--white);
    border: 1px solid var(--gray-medium);
}

.message-container.system-message .message-content {
    background-color: var(--tax-highlight);
    border-left: 4px solid var(--tax-accent);
    padding: 1.5rem;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.message-author {
    font-weight: 600;
}

.message-time {
    font-size: 0.75rem;
    color: var(--gray-text);
}

.message-text {
    line-height: 1.6;
}

.message-text p {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

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

.message-text ul, .message-text ol {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.message-text li {
    margin-bottom: 0.5rem;
}

.message-text strong {
    font-weight: 600;
    color: var(--dark-blue);
}

.message-text a {
    color: var(--primary-color);
    text-decoration: none;
}

.message-text a:hover {
    text-decoration: underline;
}

.message-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* 聊天输入容器 */
.chat-input-container {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-top: 1px solid var(--gray-medium);
    position: relative;
    background-color: var(--white);
}

/* 聊天输入框 */
.chat-input {
    flex: 1;
    border: 1px solid var(--gray-medium);
    border-radius: var(--border-radius-md);
    padding: 0.75rem 1rem;
    resize: none;
    font-family: var(--font-family);
    font-size: 1rem;
    background-color: var(--white);
    outline: none;
    transition: var(--transition);
    max-height: 150px;
    overflow-y: auto;
}

/* 右侧按钮组 */
.input-action-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
}

/* 发送按钮 */
.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.chat-footer {
    padding: 1rem 2rem;
    background-color: var(--gray-light);
    border-top: 1px solid var(--gray-medium);
    text-align: center;
}

.disclaimer {
    font-size: 0.75rem;
    color: var(--gray-text);
    margin-bottom: 0.5rem;
}

.copyright {
    font-size: 0.75rem;
    color: var(--gray-text);
    margin: 0;
}

.icp-info {
    margin-top: 10px;
    text-align: center;
}

.icp-info p {
    font-size: 0.75rem;
    color: var(--gray-text);
    margin: 3px 0;
}

.icp-info a {
    color: var(--gray-text);
    text-decoration: none;
}

.icp-info a:hover {
    text-decoration: underline;
}

/* 财税专业样式 */
.tax-code {
    font-family: var(--font-mono);
    background-color: var(--tax-highlight);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    color: var(--dark-blue);
    font-size: 0.9rem;
}

.tax-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.tax-table th {
    background-color: var(--light-blue);
    text-align: left;
    padding: 0.75rem;
    font-weight: 600;
}

.tax-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--gray-medium);
}

.tax-note {
    background-color: var(--tax-highlight);
    border-left: 4px solid var(--tax-accent);
    padding: 1rem;
    margin: 1rem 0;
}

/* 功能列表样式 */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-list li {
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.6;
}

.feature-list li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0.5rem;
}

.feature-list li strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* 建议chips优化 */
.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.suggestion-chip {
    background-color: var(--light-blue);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 系统消息容器优化 */
.message-container.system-message {
    margin-bottom: 2rem;
}

.message-container.system-message .message-content {
    background-color: var(--light-blue);
    border: 1px solid rgba(0, 85, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 85, 255, 0.05);
}

/* 加载动画 */
.typing-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 1rem 0;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--gray-text);
    display: inline-block;
    animation: blink 1.4s infinite both;
}

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

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

@keyframes blink {
    0% {
        opacity: 0.5;
    }
    30% {
        opacity: 1;
    }
    60%, 100% {
        opacity: 0.5;
    }
}

/* Toast 样式 */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-size: 0.875rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    visibility: visible;
}

/* 响应式样式 */
@media (max-width: 992px) {
    .message-container {
        max-width: 90%;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 50%;
        border-right: none;
        border-bottom: 1px solid var(--gray-medium);
        display: none; /* 在移动端默认隐藏侧边栏 */
    }
    
    .main-content {
        width: 100%;
        height: 100vh; /* 让主内容区域占满整个视口高度 */
    }
    
    .chat-header {
        padding: 1rem;
    }
    
    .chat-messages {
        padding: 1rem;
        height: calc(100vh - 180px); /* 调整聊天区域高度，留出输入框和页脚的空间 */
        max-height: none; /* 移除最大高度限制 */
    }
    
    .chat-input-container {
        padding: 1rem;
        position: relative; /* 确保输入框在正确位置 */
        bottom: 0;
    }
    
    .chat-send-btn {
        right: 1.5rem;
        bottom: 1.5rem;
    }
    
    .message-container {
        max-width: 95%;
    }
    
    /* 隐藏个人中心和设置板块 */
    .sidebar-footer {
        display: none;
    }
    
    /* 隐藏边栏折叠按钮 */
    .sidebar-toggle {
        display: none;
    }
    
    /* 优化聊天界面在移动端的显示 */
    .chat-footer {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .disclaimer {
        font-size: 0.7rem;
        margin-bottom: 0.25rem;
    }
    
    .copyright, .icp-info {
        font-size: 0.7rem;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    /* 当侧边栏显示时的样式 */
    .app-container.sidebar-visible .sidebar {
        display: block;
    }
    
    .chat-header {
        display: flex;
        align-items: center;
    }
    
    .header-actions {
        display: none; /* 在移动端隐藏头部操作按钮 */
    }
}

@media (max-width: 576px) {
    .sidebar-header {
        flex-direction: row;
        align-items: center;
    }
    
    .logo-container {
        flex: 1;
    }
    
    .new-chat-btn {
        padding: 0.5rem;
    }
    
    .message-container {
        max-width: 100%;
    }
    
    .message-actions {
        justify-content: center;
    }
    
    .chat-title {
        font-size: 1rem;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
}

/* 图标样式 */
[class^="icon-"] {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.icon-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 6h16M4 12h16M4 18h16'%3E%3C/path%3E%3C/svg%3E");
}

.icon-chat {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z'%3E%3C/path%3E%3C/svg%3E");
}

.icon-plus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 4v16m8-8H4'%3E%3C/path%3E%3C/svg%3E");
}

.icon-settings {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z'%3E%3C/path%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 12a3 3 0 11-6 0 3 3 0 016 0z'%3E%3C/path%3E%3C/svg%3E");
}

.icon-trash {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16'%3E%3C/path%3E%3C/svg%3E");
}

.icon-help {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z'%3E%3C/path%3E%3C/svg%3E");
}

.icon-share {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z'%3E%3C/path%3E%3C/svg%3E");
}

.icon-save {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4'%3E%3C/path%3E%3C/svg%3E");
}

.icon-send {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 19l9 2-9-18-9 18 9-2zm0 0v-8'%3E%3C/path%3E%3C/svg%3E");
}

.icon-thumbs-up {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M14 10h4.764a2 2 0 011.789 2.894l-3.5 7A2 2 0 0115.263 21h-4.017c-.163 0-.326-.02-.485-.06L7 20m7-10V5a2 2 0 00-2-2h-.095c-.5 0-.905.405-.905 0 .714-.211 1.412-.608 2.006L7 11v9m7-10h-2M7 20H5a2 2 0 01-2-2v-6a2 2 0 012-2h2.5'%3E%3C/path%3E%3C/svg%3E");
}

.icon-thumbs-down {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M10 14H5.236a2 2 0 01-1.789-2.894l3.5-7A2 2 0 018.736 3h4.018a2 2 0 01.485.06l3.76.94m-7 10v5a2 2 0 002 2h.096c.5 0 .905-.405.905-.904 0-.715.211-1.413.608-2.008L17 13V4m-7 10h2'%3E%3C/path%3E%3C/svg%3E");
}

.icon-copy {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z'%3E%3C/path%3E%3C/svg%3E");
}

.icon-document {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z'%3E%3C/path%3E%3C/svg%3E");
}

.icon-calculator {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 7h6m0 10v-3m-3 3h.01M9 17h.01M9 14h.01M12 14h.01M15 11h.01M12 11h.01M9 11h.01M7 21h10a2 2 0 002-2V5a2 2 0 00-2-2H7a2 2 0 00-2 2v14a2 2 0 002 2z'%3E%3C/path%3E%3C/svg%3E");
}

/* 聊天页面图标悬停效果 */
.btn-icon:hover span {
    filter: brightness(0) invert(1);
}

.action-buttons .btn-icon {
    background-color: var(--light-blue);
    color: var(--primary-color);
    border: none;
}

.action-buttons .btn-icon:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.header-actions .btn-text:hover span {
    filter: brightness(0) saturate(100%) invert(21%) sepia(92%) saturate(2957%) hue-rotate(212deg) brightness(94%) contrast(106%);
}

/* 消息操作按钮效果 */
.message-actions .btn-text:hover span {
    filter: brightness(0) saturate(100%) invert(21%) sepia(92%) saturate(2957%) hue-rotate(212deg) brightness(94%) contrast(106%);
}

/* 思考过程样式 */
.thinking-process {
    background-color: #f9f9f9;
    border-left: 3px solid var(--secondary-color);
    padding: 10px 15px;
    margin: 10px 0;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #555;
    white-space: pre-wrap;
    overflow-x: auto;
}

/* 流式输出的打字效果 */
.typing-word {
    white-space: pre-wrap;
    display: inline;
}

.typing-cursor {
    display: inline-block;
    width: 8px;
    height: 18px;
    background-color: var(--primary-color);
    margin-left: 2px;
    animation: blink 0.8s infinite;
    vertical-align: middle;
}

@keyframes blink {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* 思考中状态 */
.thinking-indicator {
    display: flex;
    align-items: center;
    margin: 8px 0;
    font-style: italic;
    color: var(--gray-text);
}

.thinking-indicator .typing-dots {
    margin-left: 8px;
}

.icon-stop {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 12a9 9 0 11-18 0 9 9 0 0118 0z'%3E%3C/path%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 10a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4z'%3E%3C/path%3E%3C/svg%3E");
}

/* 文件上传相关样式 */
.file-upload-prompt {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.file-upload-content {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--box-shadow);
}

.file-upload-content h3 {
    margin-top: 0;
    color: var(--dark-blue);
}

.upload-area {
    border: 2px dashed var(--gray-medium);
    border-radius: var(--border-radius-md);
    padding: 2rem;
    text-align: center;
    margin: 1.5rem 0;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: var(--light-blue);
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background-color: var(--light-blue);
    box-shadow: 0 0 0 4px rgba(0, 85, 255, 0.1);
}

.upload-area .icon-upload {
    font-size: 2rem;
    color: var(--gray-text);
    margin-bottom: 1rem;
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
}

.upload-area p {
    margin: 0.5rem 0;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 85, 255, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.upload-area:hover::before,
.upload-area.dragover::before {
    opacity: 1;
}

.file-types {
    font-size: 0.75rem;
    color: var(--gray-text);
    margin-top: 0.5rem;
}

.file-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--gray-medium);
    color: var(--gray-text);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 输入工具栏 */
.input-tools {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.input-tool-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-md);
    background-color: var(--white);
    border: 1px solid var(--gray-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.input-tool-btn:hover {
    border-color: var(--primary-color);
    background-color: var(--light-blue);
}

/* 文件附件样式 */
.file-attachment {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background-color: var(--light-blue);
    border-radius: var(--border-radius-md);
    margin-bottom: 1rem;
}

.file-icon {
    width: 40px;
    height: 40px;
    background-color: var(--white);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.file-size {
    font-size: 0.75rem;
    color: var(--gray-text);
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.file-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--white);
    border: 1px solid var(--gray-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.file-action-btn:hover {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: var(--white);
}

/* 添加新图标 */
.icon-chevron-left {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 19l-7-7 7-7'%3E%3C/path%3E%3C/svg%3E");
}

.icon-upload {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12'%3E%3C/path%3E%3C/svg%3E");
}

.icon-download {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10'%3E%3C/path%3E%3C/svg%3E");
}

.icon-file-upload {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z'%3E%3C/path%3E%3C/svg%3E");
}

.icon-file-excel {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z'%3E%3C/path%3E%3C/svg%3E");
}

.icon-file-word {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230066CC'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z'%3E%3C/path%3E%3C/svg%3E");
}

.gradient-text {
    background: linear-gradient(90deg, #1a5fb4, #3584e4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; /* 标准属性，用于不支持text-fill-color的浏览器 */
}

/* 报告预览样式 */
.report-preview {
    background-color: var(--secondary-bg);
    border-radius: 8px;
    padding: 16px;
    margin-top: 10px;
}

.report-preview h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--primary-text);
    font-weight: 600;
}

.report-info {
    margin-bottom: 15px;
    font-size: 14px;
}

.report-info p {
    margin: 5px 0;
}

.risk-level {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.risk-level.high {
    background-color: rgba(255, 76, 76, 0.15);
    color: #ff4c4c;
}

.risk-level.medium {
    background-color: rgba(255, 170, 0, 0.15);
    color: #ffaa00;
}

.risk-level.low {
    background-color: rgba(0, 170, 114, 0.15);
    color: #00aa72;
}

.report-thumbnail {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 15px 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    background-color: #fff;
}

.report-thumbnail img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.report-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
    justify-content: center;
}

.report-actions button {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.view-report-btn {
    background-color: var(--primary-color);
    color: white;
}

.view-report-btn:hover {
    background-color: var(--primary-color-dark);
}

.download-report-btn {
    background-color: var(--secondary-color);
    color: var(--primary-text);
}

.download-report-btn:hover {
    background-color: var(--hover-color);
}

.report-summary {
    margin-top: 15px;
}

.report-summary h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 600;
}

.report-summary ul {
    margin-top: 8px;
    padding-left: 20px;
}

.report-summary li {
    margin-bottom: 5px;
}

/* 进度条样式 */
.progress-container {
    width: 100%;
    height: 6px;
    background-color: var(--secondary-bg);
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    width: 0;
    transition: width 0.3s ease;
}

/* 报告模态框样式 */
.report-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.report-modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.report-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-modal-header h2 {
    margin: 0;
    font-weight: 600;
    color: var(--primary-text);
}

.close-modal {
    font-size: 24px;
    cursor: pointer;
    color: var(--secondary-text);
}

.close-modal:hover {
    color: var(--primary-text);
}

.report-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.report-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

/* 完整报告样式 */
.full-report {
    color: var(--primary-text);
}

.report-header {
    margin-bottom: 30px;
}

.report-header h1 {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--primary-color);
}

.report-meta {
    font-size: 14px;
    color: var(--secondary-text);
}

.report-section {
    margin-bottom: 30px;
}

.report-section h2 {
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.risk-radar-container {
    text-align: center;
    margin: 20px 0;
}

.risk-radar {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.image-caption {
    font-size: 14px;
    color: var(--secondary-text);
    text-align: center;
}

.risk-item, .recommendation, .audit-procedure {
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--secondary-bg);
    border-radius: 6px;
}

.risk-item h3, .recommendation h3, .audit-procedure h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-weight: 600;
}

.risk-details p, .recommendation p, .audit-procedure p {
    margin: 5px 0;
}

.audit-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.audit-table th, .audit-table td {
    padding: 8px 12px;
    text-align: left;
    border: 1px solid var(--border-color);
}

.audit-table th {
    background-color: var(--secondary-bg);
    font-weight: 600;
}

.audit-table tr:nth-child(even) {
    background-color: var(--hover-color);
}

.table-container {
    overflow-x: auto;
    margin: 15px 0;
}

/* 下载通知样式 */
.download-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 1.7s forwards;
}

.notification-icon {
    font-size: 18px;
    font-weight: bold;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--white);
    border: 1px solid var(--gray-medium);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    /* 当侧边栏显示时的样式 */
    .app-container.sidebar-visible .sidebar {
        display: block;
    }
    
    .chat-header {
        display: flex;
        align-items: center;
    }
    
    .header-actions {
        display: none; /* 在移动端隐藏头部操作按钮 */
    }
    
    /* 其他移动端样式 */
    .app-container {
        flex-direction: column;
    }
} 