/* 全局样式 */
:root {
    --primary-color: #007AFF;
    --background-color: #F5F5F7;
    --card-background: #FFFFFF;
    --text-color: #1D1D1F;
    --border-radius: 12px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #86868B;
    font-size: 1.1rem;
}

/* 上传区域样式 */
.upload-area {
    margin-bottom: 3rem;
}

.drop-zone {
    background: var(--card-background);
    border: 2px dashed #DEDEDE;
    border-radius: var(--border-radius);
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.drop-zone:hover {
    border-color: var(--primary-color);
    background: #F5F5F7;
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.upload-button {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    margin: 1rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-button:hover {
    background: #0056b3;
}

.file-hint {
    color: #86868B;
    font-size: 0.9rem;
}

/* 预览区域样式 */
.preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.preview-section {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

/* 文件预览样式 */
.file-list-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.file-preview-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.preview-content {
    margin: 1rem 0;
    border: 1px solid #DEDEDE;
    border-radius: 4px;
    height: 300px;
    overflow: auto;
}

.word-content {
    padding: 1rem;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.pdf-preview-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #86868B;
}

/* 进度条样式 */
.progress-bar {
    width: 100%;
    height: 4px;
    background: #DEDEDE;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

/* 文件信息样式 */
.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-name {
    flex: 1;
    font-weight: 500;
}

.file-size {
    color: #86868B;
}

.status {
    color: var(--primary-color);
}

.error .status {
    color: #FF3B30;
}

/* 下载按钮样式 */
.download-button {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 0.5rem;
}

.download-button:hover {
    background: #0056b3;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .preview-container {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 1rem;
    }
}