* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #f5f7fa;
    min-height: 100vh;
    color: #2c3e50;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

header {
    background: linear-gradient(to right, #0056B3, #1e5799);
    color: white;
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

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

.logo-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.logo-text h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.logo-text p {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 5px;
}

.main-content {
    display: flex;
    min-height: 70vh;
}

.file-manager {
    width: 300px;
    background: #f8fafd;
    border-right: 1px solid #e1e8f0;
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.file-manager h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e1e8f0;
    font-weight: 600;
}

.file-list {
    flex-grow: 1;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    position: relative;
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background: #e6f0ff;
}

.file-item.active {
    background: #d2e3ff;
    border-left: 4px solid #0056B3;
}

.file-item i {
    font-size: 24px;
    color: #e74c3c;
    margin-right: 15px;
}

.file-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.file-info p {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.upload-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.upload-title {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 600;
    color: #0056B3;
}

.upload-title i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.upload-area {
    border: 2px dashed #3498db;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafd;
}

.upload-area:hover {
    background: #e8f4ff;
    border-color: #0056B3;
}

.upload-icon {
    font-size: 48px;
    color: #3498db;
    margin-bottom: 15px;
}

.upload-text h3 {
    margin-bottom: 10px;
}

.upload-text p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

#file-input {
    display: none;
}

.upload-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #0056B3;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background: #004494;
    transform: translateY(-2px);
}

.viewer-section {
    flex-grow: 1;
    padding: 30px;
    background: #f0f5ff;
    display: flex;
    flex-direction: column;
}

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

.file-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
}

.page-info {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 8px 20px;
    border-radius: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    font-weight: 500;
    color: #0056B3;
}

.return-home-btn {
    text-align: center;
    margin: 20px 0;
}

.home-button {
    display: inline-block;
    padding: 12px 25px;
    background: #0056B3;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.home-button:hover {
    background: #004494;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.simple-footer {
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid #e1e8f0;
}

.pdf-container {
    flex-grow: 1;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

#pdf-viewer {
    width: 100%;
    height: 100%;
    overflow: auto;
    padding: 20px;
}

.watermark {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0.03;
    font-size: 140px;
    font-weight: bold;
    color: #0056B3;
    transform: rotate(-30deg);
}

#overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 86, 179, 0.2);
    border-radius: 50%;
    border-top-color: #0056B3;
    animation: spin 1s linear infinite;
}

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

.pdf-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.control-btn {
    padding: 12px 25px;
    background: #0056B3;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.control-btn:hover {
    background: #004494;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.control-btn:disabled {
    background: #b0c4de;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.file-size {
    font-size: 0.8rem;
    background: #e0eafc;
    color: #2c3e50;
    padding: 3px 8px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 5px;
}

.no-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #7f8c8d;
}

.no-file i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #bdc3c7;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
}

.footer {
    background-color: #303133;
    color: #fff;
    text-align: center;
    padding: 20px;
}

@media (max-width: 900px) {
    .main-content {
        flex-direction: column;
    }
    
    .file-manager {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e1e8f0;
    }
    
    header {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .logo {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .pdf-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .control-btn {
        width: 100%;
        justify-content: center;
    }
    
    .viewer-header {
        flex-direction: column;
        gap: 15px;
    }
}

.actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.action-btn {
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    border: none;
    background: #f0f7ff;
    color: #0056B3;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #e1eeff;
}

/* 新增功能1：文件删除按钮 */
.delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
}

.file-item:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background: rgba(231, 76, 60, 0.2);
    transform: scale(1.1);
}

/* 新增功能2：文件搜索 */
.search-box {
    margin-bottom: 15px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    outline: none;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
}

/* 秘塔AI产业分析功能样式 */
.mita-ai-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.mita-ai-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e1e8f0;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.mita-ai-section h2 i {
    margin-right: 10px;
    color: #0056B3;
}

.mita-ai-container {
    display: flex;
    gap: 30px;
}

.mita-ai-input {
    width: 300px;
    background: #f8fafd;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.mita-ai-result {
    flex-grow: 1;
    background: #f0f5ff;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

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

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    outline: none;
}

.analyze-btn {
    width: 100%;
    padding: 12px;
    background: #0056B3;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.analyze-btn:hover {
    background: #004494;
    transform: translateY(-2px);
}

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

.result-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

.export-btn {
    padding: 8px 15px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.export-btn:hover {
    background: #219653;
}

.export-btn:disabled {
    background: #a3e0be;
    cursor: not-allowed;
}

.loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    display: none;
}

.loading-indicator p {
    margin-top: 15px;
    color: #0056B3;
    font-weight: 500;
}

.result-content {
    flex-grow: 1;
    background: white;
    border-radius: 8px;
    padding: 20px;
    overflow-y: auto;
    line-height: 1.6;
}

.placeholder-text {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
    text-align: center;
}

.placeholder-text i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #bdc3c7;
}

/* 分析结果样式优化 */
.analysis-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e1e8f0;
}

.analysis-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 5px;
}

.analysis-content {
    font-size: 15px;
    line-height: 1.7;
}

.analysis-content h1 {
    font-size: 1.8rem;
    color: #0056B3;
    margin: 25px 0 15px;
}

.analysis-content h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin: 20px 0 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e1e8f0;
}

.analysis-content h3 {
    font-size: 1.3rem;
    color: #34495e;
    margin: 18px 0 12px;
}

.analysis-content h4 {
    font-size: 1.1rem;
    color: #34495e;
    margin: 15px 0 10px;
}

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

.analysis-content ul, 
.analysis-content ol {
    margin: 15px 0;
    padding-left: 25px;
}

.analysis-content li {
    margin-bottom: 8px;
}

.analysis-content strong {
    color: #2c3e50;
    font-weight: 600;
}

.analysis-content em {
    font-style: italic;
}

.analysis-content a {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px dotted #3498db;
}

.analysis-content a:hover {
    color: #2980b9;
    border-bottom: 1px solid #2980b9;
}

.analysis-content pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
    border: 1px solid #e1e8f0;
}

.analysis-content code {
    font-family: 'Courier New', Courier, monospace;
    background: #f1f2f6;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.9em;
}

.analysis-content pre code {
    background: transparent;
    padding: 0;
}

.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #e74c3c;
    text-align: center;
}

.error-message i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.error-message small {
    margin-top: 10px;
    color: #7f8c8d;
    font-size: 0.85rem;
}

@media (max-width: 900px) {
    .mita-ai-container {
        flex-direction: column;
    }
    
    .mita-ai-input {
        width: 100%;
    }
}
