.ai-assistant-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    height: 800px;
    display: flex;
    flex-direction: column;
}

.ai-assistant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #343a40;
    color: white;
    border-radius: 8px 8px 0 0;
}

.ai-assistant-header h5 {
    margin: 0;
    font-size: 16px;
}

.ai-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #ffffff;
}

.user-message,
.ai-message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.user-message {
    align-items: flex-end;
}

.ai-message {
    align-items: flex-start;
}

.user-message .message-content {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border-radius: 15px 15px 0 15px;
    max-width: 85%;
    word-wrap: break-word;
}

.ai-message .message-content {
    background-color: #f1f3f5;
    color: #495057;
    padding: 10px 15px;
    border-radius: 15px 15px 15px 0;
    max-width: 85%;
    word-wrap: break-word;
    border: 1px solid #e9ecef;
}

.message-time {
    font-size: 11px;
    color: #6c757d;
    margin-top: 5px;
}

.ai-chat-input-container {
    padding: 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

#ai-chat-input {
    resize: none;
    border-radius: 5px;
}

#ai-chat-send {
    transition: all 0.2s;
}

#ai-chat-send:hover {
    transform: translateY(-1px);
}

/* 加载动画 */
.loading-indicator {
    display: flex;
    align-items: center;
    padding: 10px 15px;
}

.loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #6c757d;
    margin: 0 3px;
    animation: loading 1.4s infinite ease-in-out;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loading {
    0%, 60%, 100% {
        transform: scale(0);
    }
    30% {
        transform: scale(1);
    }
}

.file-name-display {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

.pdf-controls {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

#pageInput {
    width: 80px;
}

.pdf-disclaimer {
    margin-top: 20px;
}

.pdf-disclaimer .alert {
    border-radius: 8px;
    border-left: 4px solid;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pdf-disclaimer .alert-info {
    border-left-color: #17a2b8;
    background-color: #f8f9fa;
}

.pdf-disclaimer .alert-warning {
    border-left-color: #ffc107;
    background-color: #fff8e1;
}

.pdf-disclaimer .alert-heading {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #495057;
}

.pdf-disclaimer .alert p {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.pdf-disclaimer .alert ul {
    font-size: 13px;
    margin-left: 20px;
    margin-bottom: 0;
}

.pdf-disclaimer .alert li {
    margin-bottom: 4px;
}

/* 评论功能样式 */
.comments-container {
    background-color: transparent;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #dee2e6;
    height: auto;
    min-height: 200px;
    overflow-y: auto;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.comment-form-container {
    background-color: rgba(212, 197, 169, 0.3);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #8B4513;
}

.comment-item {
    background-color: rgba(212, 197, 169, 0.3);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #8B4513;
    transition: box-shadow 0.2s ease-in-out;
}

.comment-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 评论操作区样式 - 新增 */
.comment-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-votes {
    display: flex;
    gap: 5px;
}

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

.comment-author {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.comment-time {
    font-size: 12px;
    color: #6c757d;
}

.comment-content {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.comment-actions {
    display: flex;
    gap: 15px;
    font-size: 13px;
    align-items: center;
}

.comment-votes {
    display: flex;
    gap: 5px;
}

.vote-btn {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    padding: 3px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    font-size: 12px;
    flex-shrink: 0; /* 确保按钮不会在移动设备上被压缩 */
}

.vote-btn:hover {
    background-color: #f8f9fa;
}

.vote-btn.active.vote-up {
    background-color: #e6f7ff;
    border-color: #91d5ff;
    color: #1890ff;
}

.vote-btn.active.vote-down {
    background-color: #fff2f0;
    border-color: #ffccc7;
    color: #ff4d4f;
}

.vote-icon {
    font-size: 14px;
}

.vote-count {
    font-weight: 500;
}

.comment-actions a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s;
}

.comment-actions a:hover {
    color: #007bff;
}

.comment-reply {
    margin-left: 20px;
    margin-top: 10px;
    padding-left: 15px;
    border-left: 3px solid #007bff;
}

.reply-form {
    background-color: rgba(212, 197, 169, 0.2);
    padding: 10px;
    border-radius: 4px;
    margin-top: 8px;
    border: 1px solid #8B4513;
}

.comments-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.comments-pagination .page-btn {
    padding: 4px 8px;
    border: 1px solid #8B4513;
    background-color: rgba(212, 197, 169, 0.3);
    color: #2a1c11;
    text-decoration: none;
    border-radius: 3px;
    font-size: 13px;
    transition: all 0.2s;
}

.comments-pagination .page-btn:hover {
    background-color: rgba(212, 197, 169, 0.5);
    color: #2a1c11;
    text-decoration: none;
}

.comments-pagination .page-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.comments-pagination .page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.no-comments {
    text-align: center;
    color: #6c757d;
    padding: 20px;
    font-size: 14px;
}

.login-prompt {
    background-color: rgba(212, 197, 169, 0.2);
    border: 1px solid #8B4513;
    color: #2a1c11;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.login-prompt a {
    color: #007bff !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

.login-prompt a:hover {
    color: #0056b3 !important;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .comments-container {
        height: auto;
        margin-top: 20px;
    }
}

/* 切换按钮样式 */
#toggle-ai-assistant-btn {
    transition: all 0.3s ease;
}

#toggle-ai-assistant-btn:hover {
    background-color: rgba(139, 69, 19, 0.1);
    border-color: #8B4513;
    color: #8B4513;
}

/* 过渡动画 */
#pdf-viewer-col,
#comments-col {
    transition: all 0.3s ease;
}