/* 设计文本生成组件样式 */
.chapter-card, .content-card, .history-card {
    height: calc(100vh - 180px);
}

.chapter-tree {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.custom-tree-node {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-right: 10px;
}

.generated-tag {
    color: #67c23a;
    font-weight: bold;
}

.param-section {
    margin-bottom: 20px;
}

.content-display {
    margin-top: 20px;
    padding: 20px;
    background: #f5f7fa;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.markdown-content {
    line-height: 1.8;
    color: #606266;
}

.markdown-content p {
    margin-bottom: 15px;
}

.markdown-content code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.history-summary {
    font-size: 12px;
    color: #909399;
    margin: 10px 0;
    line-height: 1.6;
}

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

/* AI对话助手组件样式 */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px - 50px); /* 减去header和底部状态栏高度 */
    background: #f5f7fa;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 30px 30px 80px 30px; /* 底部增加额外padding，避免被状态栏遮挡 */
    background: white;
}

.welcome-message {
    text-align: center;
    padding: 80px 20px;
    color: #909399;
}

.welcome-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.welcome-message h3 {
    color: #303133;
    margin-bottom: 10px;
}

.message-item {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    animation: fadeIn 0.3s ease;
}

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

.message-item.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    background: #f5f7fa;
}

.message-avatar .avatar-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: inline-block;
}

.message-content {
    flex: 1;
    max-width: 70%;
}

.message-item.user .message-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.message-header {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.message-role {
    font-weight: 600;
    color: #303133;
    font-size: 14px;
}

.message-time {
    font-size: 12px;
    color: #909399;
}

.message-text {
    background: #f5f7fa;
    padding: 15px;
    border-radius: 8px;
    line-height: 1.6;
    color: #606266;
}

.message-item.user .message-text {
    background: #667eea;
    color: white;
}

.message-text code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.message-text pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 10px 0;
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 15px;
    background: #f5f7fa;
    border-radius: 8px;
    width: 60px;
}

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

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

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

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

.chat-input-area {
    background: white;
    padding: 20px 30px;
    border-top: 1px solid #e4e7ed;
}

.input-toolbar {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.input-container {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.input-container .el-textarea {
    flex: 1;
}

.send-button {
    height: 80px;
}

/* 图片生成组件样式 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.image-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.15);
}

.generated-image {
    width: 100%;
    height: 250px;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.generated-image .el-image__inner {
    cursor: pointer !important;
}

.image-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 250px;
    background: #f5f7fa;
    color: #909399;
    font-size: 48px;
}

.image-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    pointer-events: auto;
}

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

.image-actions .el-button {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    pointer-events: auto;
}

.image-info {
    padding: 10px;
    background: white;
    text-align: center;
}

.image-time {
    font-size: 12px;
    color: #909399;
}

/* 液态玻璃主题 - 图片生成组件样式 */
body.skin-glassmorphism .image-info,
#app.skin-glassmorphism .image-info {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9) !important;
}

body.skin-glassmorphism .image-time,
#app.skin-glassmorphism .image-time {
    color: rgba(255, 255, 255, 0.7) !important;
}

body.skin-glassmorphism .image-error,
#app.skin-glassmorphism .image-error {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.7) !important;
}

body.skin-glassmorphism .page-view.theme-purple .image-preview-box,
#app.skin-glassmorphism .page-view.theme-purple .image-preview-box {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
}

body.skin-glassmorphism .page-view.theme-purple .no-image-hint,
#app.skin-glassmorphism .page-view.theme-purple .no-image-hint {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    padding: 8px 10px !important;
    height: 32px !important;
    line-height: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 5px !important;
    font-size: 13px !important;
    border-radius: 4px !important;
}

/* 液态玻璃主题 - 设计图片生成界面的空状态 */
body.skin-glassmorphism .page-view.theme-purple .empty-state,
#app.skin-glassmorphism .page-view.theme-purple .empty-state {
    background: transparent !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

body.skin-glassmorphism .page-view.theme-purple .empty-state-icon,
#app.skin-glassmorphism .page-view.theme-purple .empty-state-icon {
    color: rgba(255, 255, 255, 0.7) !important;
}

body.skin-glassmorphism .page-view.theme-purple .empty-state-text,
#app.skin-glassmorphism .page-view.theme-purple .empty-state-text {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* 液态玻璃主题 - 设计图片生成界面的进度条 */
body.skin-glassmorphism .page-view.theme-purple .generation-progress,
#app.skin-glassmorphism .page-view.theme-purple .generation-progress {
    background: transparent !important;
}

body.skin-glassmorphism .page-view.theme-purple .progress-text,
#app.skin-glassmorphism .page-view.theme-purple .progress-text {
    color: rgba(255, 255, 255, 0.9) !important;
}

.generation-progress {
    margin-top: 30px;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    color: #606266;
    font-size: 14px;
}

.slider-hint {
    font-size: 12px;
    color: #909399;
    margin-top: 5px;
    display: block;
}

/* 意见反馈模块样式 */
.public-feedback-card {
    height: calc(100vh - 220px);
    display: flex;
    flex-direction: column;
}

.card-title-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-trigger {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.search-trigger:hover {
    transform: scale(1.1);
}

.public-feedback-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.public-feedback-scroll {
    max-height: 100%;
    padding-right: 6px;
}

.public-feedback-item {
    border: 1px solid #ebeef5;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fafafa;
    transition: all 0.2s ease;
}

.public-feedback-item:hover {
    background: #f0f7ff;
    border-color: #409eff;
}

.public-feedback-item.skeleton {
    box-shadow: none;
    border: none;
    padding: 12px 0;
    background: transparent;
}

.public-feedback-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.public-feedback-meta .meta-left {
    display: flex;
    gap: 12px;
    align-items: baseline;
}

.public-feedback-meta .nickname {
    font-weight: 600;
    color: #303133;
}

.public-feedback-meta .publish-time {
    font-size: 12px;
    color: #909399;
}

.public-feedback-content {
    font-size: 14px;
    line-height: 1.6;
    color: #4a4a4a;
    margin-bottom: 12px;
    word-break: break-word;
}

.public-feedback-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #909399;
    margin-bottom: 8px;
}

.public-feedback-actions {
    display: flex;
    justify-content: flex-end;
}

.public-feedback-footer {
    padding-top: 10px;
    border-top: 1px solid #ebeef5;
    display: flex;
    justify-content: center;
}

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

.detail-nickname {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-meta .name {
    font-weight: 600;
    color: #303133;
}

.detail-meta .time {
    font-size: 12px;
    color: #909399;
}

.detail-content {
    font-size: 15px;
    line-height: 1.7;
    color: #303133;
    white-space: pre-wrap;
}

.detail-stats {
    margin-top: 12px;
    display: flex;
    gap: 18px;
    font-size: 12px;
    color: #909399;
}

.dialog-footer {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

/* 知识库查询组件样式 */
.search-history {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    padding: 12px;
    margin-bottom: 10px;
    background: #f5f7fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: #e4e7ed;
    transform: translateX(5px);
}

/* 液态玻璃主题 - 搜索历史项背景 */
body.skin-glassmorphism .history-item,
#app.skin-glassmorphism .history-item {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.skin-glassmorphism .history-item:hover,
#app.skin-glassmorphism .history-item:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

.history-query {
    font-size: 14px;
    color: #303133;
    margin-bottom: 5px;
    font-weight: 500;
}

.history-time {
    font-size: 12px;
    color: #909399;
}

.results-list {
    margin-top: 20px;
}

.result-title {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.result-page {
    font-size: 14px;
    color: #606266;
}

.result-content {
    padding: 15px;
    background: #f5f7fa;
    border-radius: 8px;
    line-height: 1.8;
    color: #606266;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: none;
    overflow: visible;
}

/* 知识库搜索结果样式 */
.result-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.result-item:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border-color: #FFC107;
}

/* 液态玻璃主题 - 搜索结果项背景 */
body.skin-glassmorphism .result-item,
#app.skin-glassmorphism .result-item {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

body.skin-glassmorphism .result-item:hover,
#app.skin-glassmorphism .result-item:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.result-index {
    font-size: 14px;
    font-weight: bold;
    color: #303133;
}

.result-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.result-source {
    font-size: 12px;
    color: #909399;
}

.result-content {
    padding: 12px;
    background: #f5f7fa;
    border-radius: 6px;
    line-height: 1.8;
    color: #606266;
    font-size: 13px;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: none;
    overflow: visible;
}

/* 液态玻璃主题 - 结果内容背景 */
body.skin-glassmorphism .result-content,
#app.skin-glassmorphism .result-content {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9) !important;
}

/* 统计信息网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 10px;
}

/* 排行榜样式 */
.stat-item {
    text-align: center;
    padding: 15px;
    background: #f5f7fa;
    border-radius: 8px;
}

/* 液态玻璃主题 - 统计信息背景 */
body.skin-glassmorphism .stat-item,
#app.skin-glassmorphism .stat-item {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9) !important;
}

body.skin-glassmorphism .stat-value,
body.skin-glassmorphism .stat-label,
#app.skin-glassmorphism .stat-value,
#app.skin-glassmorphism .stat-label {
    color: rgba(255, 255, 255, 0.9) !important;
}

.stat-label {
    font-size: 13px;
    color: #909399;
    margin-top: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #FFC107;
}

/* 知识库文件列表样式 */
.file-list-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f5f5f5;
    border-bottom: 2px solid #e0e0e0;
    font-weight: 600;
    color: #333;
}

/* 液态玻璃主题 - 文件列表头背景 */
body.skin-glassmorphism .file-list-header,
#app.skin-glassmorphism .file-list-header {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: 5px;
}

.file-list {
    max-height: 500px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s;
}

.file-item:hover {
    background: #fafafa;
}

/* 文件操作按钮样式 */
.file-item .el-button.is-circle {
    width: 32px;
    height: 32px;
    font-size: 16px;
    padding: 0;
}

.file-item .el-button.is-circle:hover {
    transform: scale(1.1);
    transition: transform 0.2s;
}

/* 已嵌入文件弹出框样式 */
.embedded-files-popover {
    max-height: 400px;
    overflow-y: auto;
}

.embedded-file-item-compact {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 6px;
    background: #f5f5f5;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s;
}

.embedded-file-item-compact:last-child {
    margin-bottom: 0;
}

.embedded-file-item-compact:hover {
    background: #fff;
    border-color: #FFC107;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.embedded-file-item-compact .file-icon {
    font-size: 16px;
    margin-right: 8px;
    flex-shrink: 0;
}

.embedded-file-item-compact .file-name {
    flex: 1;
    font-size: 13px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 8px;
}

/* AI对话知识库引用样式 */
.message-references {
    margin-top: 12px;
    padding: 10px;
    background: #f9f9f9;
    border-left: 3px solid #FFC107;
    border-radius: 4px;
}

.references-header {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

.references-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reference-item {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.reference-item:hover {
    background: #fff8e1;
    border-color: #FFC107;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.2);
}

.reference-icon {
    margin-right: 4px;
    font-size: 14px;
}

.reference-name {
    color: #333;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reference-similarity {
    margin-left: 6px;
    font-size: 11px;
    color: #FFC107;
    font-weight: 600;
}

/* 悬浮AI对话球 */
.floating-chat {
    position: fixed;
    right: 30px;
    bottom: 80px;
    z-index: 999;
}

.floating-ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    border: 3px solid #667eea;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    position: relative;
    animation: float 3s ease-in-out infinite;
}

.floating-ball:hover {
    transform: scale(1.1);
    border-color: #764ba2;
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.5);
}

.floating-ball.active {
    border-color: #764ba2;
    background: #f5f0ff;
}

.floating-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    /* filter: brightness(0) invert(1); 移除滤镜，显示原始logo颜色 */
}

.unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f56c6c;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 悬浮对话框 */
.floating-chat-dialog {
    position: fixed;
    right: 30px;
    bottom: 150px;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-dialog-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-dialog-title {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 15px;
}

.chat-dialog-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.chat-dialog-footer {
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

/* 简易消息样式 */
.welcome-msg {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.chat-msg {
    display: flex;
    margin-bottom: 15px;
    gap: 10px;
}

.chat-msg.user {
    flex-direction: row-reverse;
}

.chat-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.mini-avatar-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.chat-msg-content {
    max-width: 70%;
    display: flex;
    flex-direction: column;
}

.chat-msg.user .chat-msg-content {
    align-items: flex-end;
}

.chat-msg-text {
    background: white;
    padding: 10px 15px;
    border-radius: 12px;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 13px;
}

.chat-msg.user .chat-msg-text {
    background: #667eea;
    color: white;
}

.chat-msg-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    padding: 0 5px;
}

.typing-dots {
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    display: flex;
    gap: 5px;
}

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

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

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

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

/* 悬浮对话框显示动画（使用CSS过渡） */
.floating-chat-dialog {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 悬浮对话框内的代码和公式样式 */
.chat-msg-text code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 12px;
}

.chat-msg.user .chat-msg-text code {
    background: rgba(255, 255, 255, 0.3);
}

.chat-msg-text strong {
    font-weight: 600;
}

/* 悬浮对话 - 快速选项按钮 */
.quick-options {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.quick-option {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f0f0;
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-option:hover {
    background: #e8e8e8;
    border-color: #d0d0d0;
}

.quick-option.active {
    background: #667eea;
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    transform: scale(1.05);
}

/* 悬浮对话 - 紧凑引用样式 */
.mini-references {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.mini-ref-tag {
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    color: #666;
    cursor: pointer;
}

.mini-ref-tag:hover {
    background: rgba(255, 193, 7, 0.25);
    border-color: #FFC107;
}

/* AI对话消息内容样式优化 */
.message-text {
    line-height: 1.6;
    color: #333;
}

.message-text h1 {
    font-size: 1.5rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
    margin: 1rem 0 0.8rem 0;
}

.message-text h2 {
    font-size: 1.3rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.4rem;
    margin: 0.8rem 0 0.6rem 0;
}

.message-text h3 {
    font-size: 1.1rem;
    color: #34495e;
    margin: 0.6rem 0 0.4rem 0;
    font-weight: 600;
}

.message-text strong {
    font-weight: 600;
    color: #2c3e50;
}

/* AI消息版本控制 */
.message-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.message-controls .el-button.is-circle {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-controls .el-button.is-circle .el-icon {
    margin: 0 !important;
}

.version-indicator {
    font-size: 12px;
    color: #666;
    padding: 0 8px;
    font-weight: 500;
}

.message-text em {
    font-style: italic;
    color: #555;
}

.message-text code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    color: #e74c3c;
}

.message-text pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #3498db;
    overflow-x: auto;
    margin: 0.8rem 0;
}

.message-text pre code {
    background: none;
    padding: 0;
    color: #333;
    font-size: 0.85rem;
}

.message-text ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.message-text ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.message-text li {
    margin: 0.3rem 0;
}

/* 数学公式样式 */
.math-inline {
    display: inline-block;
    margin: 0 2px;
}

.math-block {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #9b59b6;
    margin: 1rem 0;
    text-align: center;
    overflow-x: auto;
}

/* 技术内容特殊样式 */
.message-text .formula-container {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #3498db;
    margin: 1rem 0;
}

.message-text .condition {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    margin: 0.5rem 0;
    background: #ecf0f1;
    border-radius: 6px;
}

.message-text .condition.warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.message-text .note-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem;
    margin: 0.3rem 0;
    background: #f8f9fa;
    border-radius: 4px;
}

.message-text .reference {
    font-size: 0.8rem;
    color: #7f8c8d;
    font-style: italic;
    margin-top: 0.5rem;
}

.stat-unit {
    font-size: 14px;
    color: #606266;
    margin-top: 5px;
}

/* 液态玻璃主题 - 统计单位 */
body.skin-glassmorphism .stat-unit,
#app.skin-glassmorphism .stat-unit {
    color: rgba(255, 255, 255, 0.8) !important;
}

.rank-badge {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    font-weight: bold;
    color: white;
    text-align: center;
}

.rank-1 {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.5);
}

.rank-2 {
    background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 100%);
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.5);
}

.rank-3 {
    background: linear-gradient(135deg, #CD7F32 0%, #B8733B 100%);
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.5);
}

/* 液态玻璃主题 - 排名徽章 */
body.skin-glassmorphism .rank-badge,
body.skin-glassmorphism .rank-1,
body.skin-glassmorphism .rank-2,
body.skin-glassmorphism .rank-3,
#app.skin-glassmorphism .rank-badge,
#app.skin-glassmorphism .rank-1,
#app.skin-glassmorphism .rank-2,
#app.skin-glassmorphism .rank-3 {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 1) !important;
}

/* 液态玻璃主题 - 前三名特殊样式 */
body.skin-glassmorphism .rank-1,
#app.skin-glassmorphism .rank-1 {
    background: rgba(255, 215, 0, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(0, 0, 0, 0.2), 0 0 20px rgba(255, 215, 0, 0.2);
}

body.skin-glassmorphism .rank-2,
#app.skin-glassmorphism .rank-2 {
    background: rgba(192, 192, 192, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(0, 0, 0, 0.2);
}

body.skin-glassmorphism .rank-3,
#app.skin-glassmorphism .rank-3 {
    background: rgba(205, 127, 50, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(0, 0, 0, 0.2);
}

/* 反馈表单样式 */
.result-area {
    margin-top: 20px;
}

.result-content {
    padding: 20px;
    background: #f5f7fa;
    border-radius: 8px;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .chapter-card, .content-card, .history-card {
        height: auto;
        margin-bottom: 20px;
    }

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

    .image-grid {
        grid-template-columns: 1fr;
    }

    .send-button {
        height: auto;
    }
}

