* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 40px 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 32px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.upload-section {
    margin-bottom: 30px;
}

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

.upload-area:hover, .upload-area.dragover {
    border-color: #667eea;
    background: #f0f0ff;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.upload-area p {
    color: #333;
    font-size: 18px;
    margin-bottom: 8px;
}

.upload-hint {
    color: #999 !important;
    font-size: 14px !important;
}

#fileInput {
    display: none;
}

.file-list-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.file-count {
    font-size: 14px;
    color: #667eea;
    font-weight: 500;
    margin-left: 10px;
}

.file-list {
    list-style: none;
    margin-bottom: 25px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: move;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.file-item:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.file-item.dragging {
    opacity: 0.5;
}

.file-icon {
    font-size: 24px;
    margin-right: 12px;
}

.file-name {
    flex: 1;
    color: #333;
    font-size: 14px;
    word-break: break-all;
}

.file-remove {
    background: #ff4757;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

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

.options {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.options label {
    color: #333;
    font-weight: 500;
}

.options select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

.options select:focus {
    border-color: #667eea;
}

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

.btn {
    padding: 14px 35px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
}

.btn-merge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-merge:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-clear {
    background: #f1f2f6;
    color: #666;
}

.btn-clear:hover {
    background: #e1e2e6;
}

.btn-download {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(17, 153, 142, 0.4);
}

.progress-section {
    margin-top: 30px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.result-section {
    margin-top: 30px;
    text-align: center;
}

.success-msg {
    color: #11998e;
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 600;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 30px;
}

.footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: white;
    text-decoration: underline;
}
