/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f2f2f7;
    color: #1c1c1e;
    line-height: 1.6;
}

/* 容器样式 */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1c1c1e;
    margin-bottom: 8px;
}

header p {
    font-size: 16px;
    color: #8e8e93;
}

/* 卡片样式 */
.upload-card, .config-card, .export-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.upload-card:hover, .config-card:hover, .export-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 标题样式 */
h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1c1c1e;
    margin-bottom: 20px;
}

/* 上传区域样式 */
.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: 2px dashed #c7c7cc;
    border-radius: 12px;
    background-color: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: #007aff;
    background-color: #f0f7ff;
}

.upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #8e8e93;
    transition: color 0.3s ease;
}

.upload-btn:hover {
    color: #007aff;
}

.upload-btn svg {
    margin-bottom: 12px;
}

.upload-btn span {
    font-size: 16px;
    text-align: center;
}

/* 文件信息样式 */
.file-info {
    margin-top: 16px;
    padding: 12px 16px;
    background-color: #f0f0f5;
    border-radius: 8px;
    font-size: 14px;
    color: #3c3c43;
    width: 100%;
    text-align: left;
}

/* 按钮样式 */
.action-buttons {
    display: flex;
    justify-content: flex-end;
}

.cancel-btn, .split-btn, .export-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-btn {
    background-color: #ffffff;
    color: #ff3b30;
    border: 1px solid #ff3b30;
}

.cancel-btn:hover:not(:disabled) {
    background-color: #ff3b30;
    color: #ffffff;
}

.cancel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.split-btn, .export-btn {
    background-color: #007aff;
    color: #ffffff;
    width: 100%;
}

.split-btn:hover, .export-btn:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 122, 255, 0.3);
}

.split-btn:active, .export-btn:active {
    transform: translateY(0);
}

/* 配置区域样式 */
.config-item {
    margin-bottom: 20px;
}

.config-item label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #1c1c1e;
}

.config-item input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #c7c7cc;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    background-color: #ffffff;
}

.config-item input:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

/* 文件统计信息样式 */
.file-stats {
    background-color: #f0f0f5;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.file-stats p {
    margin-bottom: 8px;
    font-size: 14px;
    color: #3c3c43;
}

.file-stats p:last-child {
    margin-bottom: 0;
}

.file-stats span {
    font-weight: 600;
    color: #007aff;
}

/* 导出区域样式 */
.split-result {
    margin-bottom: 20px;
}

.split-result p {
    font-size: 16px;
    margin-bottom: 16px;
    color: #3c3c43;
}

.split-result span {
    font-weight: 600;
    color: #34c759;
}

/* 文件列表样式 */
.file-list {
    background-color: #f0f0f5;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.file-item {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e5ea;
    font-size: 14px;
    color: #3c3c43;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item .file-name {
    font-weight: 500;
}

.file-item .file-size {
    font-size: 12px;
    color: #8e8e93;
}

/* 页脚样式 */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e5e5ea;
    font-size: 14px;
    color: #8e8e93;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .container {
        padding: 16px;
    }
    
    .upload-card, .config-card, .export-card {
        padding: 20px;
    }
    
    header h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    .upload-area {
        padding: 30px 16px;
    }
    
    .upload-btn span {
        font-size: 14px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.upload-section, .config-section, .export-section {
    animation: fadeIn 0.3s ease-out;
}

/* 加载状态 */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}