/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #2c3e50;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 10px;
    flex: 5;
    width: 83.33%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
    color: #3498db;
    animation: float 3s ease-in-out infinite;
}

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

.header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    font-weight: 700;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 上传区域 */
.upload-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.upload-area {
    border: 3px dashed #3498db;
    border-radius: 15px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: linear-gradient(45deg, #f8f9fa 25%, transparent 25%, transparent 75%, #f8f9fa 75%, #f8f9fa),
                linear-gradient(45deg, #f8f9fa 25%, transparent 25%, transparent 75%, #f8f9fa 75%, #f8f9fa);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.3rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.upload-area {
    border: 3px dashed #3498db;
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f8f9fa;
}

.upload-area:hover {
    border-color: #2980b9;
    background: #e3f2fd;
}

.upload-area.dragover {
    border-color: #27ae60;
    background: #e8f5e8;
}

.upload-icon {
    font-size: 3rem;
    color: #3498db;
    margin-bottom: 20px;
}

.upload-area h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.upload-area p {
    color: #7f8c8d;
    margin-bottom: 20px;
}

.select-btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.file-preview {
    margin-top: 20px;
}

.file-preview h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.file-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 10px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

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

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2px;
}

.file-type {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.file-size {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.remove-file {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.remove-file:hover {
    background: #c0392b;
}

.upload-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.upload-btn {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

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

.cancel-btn {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cancel-btn:hover {
    background: #7f8c8d;
}

.upload-area:hover {
    border-color: #2980b9;
    background: #e3f2fd;
    background-color: rgba(52, 152, 219, 0.05);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #27ae60;
    background-color: rgba(39, 174, 96, 0.1);
    transform: scale(1.02);
}

.upload-icon {
    margin-bottom: 20px;
}

.upload-icon i {
    font-size: 4rem;
    color: #3498db;
    animation: pulse 2s ease-in-out infinite;
}

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

.upload-area h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.upload-area p {
    color: #7f8c8d;
    margin-bottom: 30px;
}

.upload-btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

/* 文件信息 */
.file-info {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(45deg, #e8f4f8, #d1e7f0);
    border-radius: 15px;
    border-left: 5px solid #3498db;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-details i {
    font-size: 2rem;
    color: #3498db;
}

.file-text {
    flex: 1;
}

.file-name {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.file-size {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.remove-btn {
    background: #e74c3c;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: #c0392b;
    transform: rotate(90deg);
}

/* 提交按钮 */
.submit-btn {
    margin-top: 30px;
    width: 100%;
    background: linear-gradient(45deg, #27ae60, #229954);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
}

.submit-btn:disabled {
    background: linear-gradient(45deg, #bdc3c7, #95a5a6);
    cursor: not-allowed;
    box-shadow: none;
}

.submit-btn.loading {
    background: linear-gradient(45deg, #f39c12, #e67e22);
}

/* 预览区域 */
.preview-section {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.98);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.preview-section h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
}

.preview-section h4 i {
    color: #3498db;
}

.preview-container {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

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

.preview-label {
    color: #495057;
    font-weight: 600;
    font-size: 0.9rem;
}

.toggle-preview-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.toggle-preview-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.toggle-preview-btn.expanded {
    background: #27ae60;
}

.toggle-preview-btn.expanded:hover {
    background: #229954;
}

.preview-content {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #dee2e6;
    max-height: 300px;
    overflow-y: auto;
    transition: max-height 0.3s ease;
}

.preview-content.expanded {
    max-height: 600px;
}

.preview-content::-webkit-scrollbar {
    width: 8px;
}

.preview-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.preview-content::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 10px;
}

.preview-content::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

#previewText {
    margin: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #2c3e50;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.preview-stats {
    display: flex;
    gap: 20px;
    padding: 15px;
    background: linear-gradient(45deg, #e8f4f8, #d1e7f0);
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #495057;
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-item i {
    color: #3498db;
}

.stat-item span {
    color: #2c3e50;
    font-weight: 600;
}

/* 导入按钮 */
.import-btn {
    width: 100%;
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.import-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.import-btn:disabled {
    background: linear-gradient(45deg, #bdc3c7, #95a5a6);
    cursor: not-allowed;
    box-shadow: none;
}

.import-btn.loading {
    background: linear-gradient(45deg, #f39c12, #e67e22);
}

.import-btn.success {
    background: linear-gradient(45deg, #27ae60, #229954);
}

/* 结果区域 */
.result-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.result-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
}

.result-card {
    padding: 30px;
    border-radius: 15px;
    text-align: center;
}

.result-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
}

.result-status.success {
    color: #27ae60;
}

.result-status.error {
    color: #e74c3c;
}

.result-status i {
    font-size: 2rem;
}

.result-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: left;
    border-left: 4px solid #3498db;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
}

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

.result-label {
    font-weight: 600;
    color: #2c3e50;
}

.result-value {
    color: #7f8c8d;
}

/* 信息区域 */
.info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.info-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.info-card h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
}

.info-card h4 i {
    color: #3498db;
}

.info-card ul {
    list-style: none;
    padding-left: 0;
}

.info-card li {
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-card li:before {
    content: "�?;
    color: #27ae60;
    font-weight: bold;
}

.info-card li:last-child {
    border-bottom: none;
}

.webhook-info {
    grid-column: span 2;
}

#webhookStatus {
    color: #27ae60;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.webhook-url {
    color: #3498db;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 10px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    word-break: break-all;
}

.webhook-url i {
    color: #3498db;
    flex-shrink: 0;
}

#webhookUrl {
    color: #2980b9;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
}

.webhook-note {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* 底部样式 */
.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.footer p {
    color: #7f8c8d;
}

/* 响应式设�?*/
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header {
        padding: 20px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .upload-section,
    .result-section {
        padding: 25px;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .info-section {
        grid-template-columns: 1fr;
    }

    .webhook-info {
        grid-column: span 1;
    }

    .file-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .remove-btn {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .upload-area h3 {
        font-size: 1.2rem;
    }

    .upload-area {
        padding: 30px 15px;
    }

    .upload-icon i {
        font-size: 3rem;
    }

    .preview-section {
        padding: 20px;
    }

    .preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .toggle-preview-btn {
        align-self: flex-end;
    }

    .preview-stats {
        flex-direction: column;
        gap: 10px;
    }

    .webhook-url {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 淡入动画 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* ==================== AI问答界面新样�?==================== */

/* 头部样式更新 */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.import-btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.import-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* 快速导入按钮样式 */
.quick-import-btn {
    width: 16.67%;
    height: 50px;
    min-width: 120px;
    border-radius: 25px;
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    outline: none;
    user-select: none;
    flex: 1;
}

.quick-import-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    background: linear-gradient(45deg, #2980b9, #3498db);
}

.quick-import-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

.quick-import-btn.loading {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    animation: pulse 1.5s ease-in-out infinite;
}

.quick-import-btn.success {
    background: linear-gradient(45deg, #27ae60, #229954);
}


@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
/* 聊天区域 */
.chat-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    margin-bottom: 30px;
    max-width: 1200px;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    min-height: 80vh;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 75vh;
    min-height: 600px;
}

/* 聊天消息区域 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    margin-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: #bdc3c7 #f1f1f1;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

/* 欢迎消息 */
.welcome-message {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
}

/* 消息样式 */
.message {
    display: flex;
    margin-bottom: 20px;
    animation: messageSlide 0.3s ease-out;
}

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

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

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

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 12px;
    flex-shrink: 0;
}

.ai-message .message-avatar {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
}

.user-message .message-avatar {
    background: linear-gradient(45deg, #27ae60, #229954);
    color: white;
    margin-right: 0;
    margin-left: 12px;
    order: 2;
}

.message-content {
    max-width: 70%;
    padding: 15px 20px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.ai-message .message-content {
    background: white;
    color: #2c3e50;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 4px;
}

.user-message .message-content {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border-bottom-right-radius: 4px;
}

/* 输入区域 */
.chat-input-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.input-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.question-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.question-input:focus {
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.question-input:disabled {
    background: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.7;
}

.send-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.send-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.send-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    box-shadow: none;
}

.send-btn.loading {
    background: linear-gradient(45deg, #f39c12, #e67e22);
}

.input-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.char-count {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.tips {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 功能卡片区域 */
.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.feature-card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.2rem;
}

.feature-card h3 i {
    color: #3498db;
}

.feature-card p {
    color: #7f8c8d;
    line-height: 1.6;
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.import-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    width: 90%;
    max-width: 900px;
    height: 80vh;
    max-height: 700px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.import-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    border-radius: 20px 20px 0 0;
}

.modal-header h3 {
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
}

.modal-header h3 i {
    color: #3498db;
}

.modal-close-btn {
    background: #e74c3c;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.modal-close-btn:hover {
    background: #c0392b;
    transform: rotate(90deg);
}

.modal-body {
    height: calc(100% - 70px);
    padding: 0;
    border-radius: 0 0 20px 20px;
    overflow: hidden;
}

.import-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

/* 加载遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.loading-spinner p {
    font-size: 1.2rem;
    font-weight: 500;
}

/* 打字效果 */
.typing-indicator {
    display: inline-block;
}

.typing-indicator::after {
    content: '|';
    animation: blink 1s infinite;
    color: #3498db;
    font-weight: bold;
}

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

/* 响应式设�?*/
@media (max-width: 768px) {
    .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    width: 100%;
        flex-direction: column;
        gap: 15px;
    }

    .chat-container {
        height: 500px;
    }

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

    .features-section {
        grid-template-columns: 1fr;
    }

    .import-modal {
        width: 95%;
        height: 90vh;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .chat-container {
        height: 400px;
    }

    .chat-section {
        padding: 20px;
    }

    .message-content {
        max-width: 90%;
        font-size: 0.9rem;
    }

    .input-wrapper {
        flex-direction: column;
        gap: 10px;
    }

    .send-btn {
        width: 100%;
        height: 45px;
        border-radius: 25px;
    }

    .input-info {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}
