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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
}

header h1 i {
    margin-right: 15px;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
    font-weight: 300;
}

/* Main Content */
main {
    padding: 40px;
}

section {
    margin-bottom: 30px;
}

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

.section-header h2 {
    color: #667eea;
    font-size: 1.5em;
}

.section-header h2 i {
    margin-right: 10px;
}

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

.file-count {
    background: #667eea;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
}

.file-list-info {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.file-list-info p {
    margin: 0;
    color: #856404;
    font-size: 0.9em;
}

.upload-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 40px;
    text-align: center;
    background: #f8f9ff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #764ba2;
    background: #f0f2ff;
    transform: translateY(-2px);
}

.upload-area.drag-over {
    border-color: #764ba2;
    background: #e8ebff;
    transform: scale(1.02);
}

.upload-area i {
    font-size: 4em;
    color: #667eea;
    margin-bottom: 20px;
}

.upload-area h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5em;
}

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

/* Buttons */
button {
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', sans-serif;
}

button i {
    margin-right: 8px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-merge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    padding: 18px;
    font-size: 1.2em;
    font-weight: 600;
}

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

.btn-download {
    background: #28a745;
    color: white;
    flex: 1;
    margin-right: 10px;
}

.btn-download:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.btn-preview {
    background: #17a2b8;
    color: white;
    flex: 1;
}

.btn-preview:hover {
    background: #138496;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(23, 162, 184, 0.4);
}

.btn-download-all {
    background: #ff9800;
    color: white;
    flex: 1;
    margin-right: 10px;
}

.btn-download-all:hover {
    background: #f57c00;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4);
}

.btn-cancel {
    background: #dc3545;
    color: white;
    width: 100%;
    padding: 18px;
    font-size: 1.2em;
    font-weight: 600;
    margin-top: 10px;
}

.btn-cancel:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(220, 53, 69, 0.5);
}

/* File List */
.file-list {
    display: grid;
    gap: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #f8f9ff;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.file-item:hover {
    background: #f0f2ff;
    transform: translateX(5px);
}

.file-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.file-info i {
    font-size: 1.5em;
    color: #667eea;
    margin-right: 15px;
}

.file-details {
    flex: 1;
}

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

.file-size {
    font-size: 0.9em;
    color: #666;
}

.btn-remove {
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    font-size: 0.9em;
}

.btn-remove:hover {
    background: #c82333;
}

/* Options */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.option-item {
    padding: 20px;
    background: #f8f9ff;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.option-item:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.option-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    margin-bottom: 8px;
}

.option-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.option-item small {
    display: block;
    color: #666;
    font-size: 0.85em;
    line-height: 1.4;
}

.option-highlight {
    background: #e8f5e9 !important;
    border-color: #4caf50 !important;
}

.option-highlight:hover {
    border-color: #4caf50 !important;
    background: #c8e6c9 !important;
}

.option-highlight label {
    color: #2e7d32;
}

/* Result Section */
.result-info {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.result-info p {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.result-info p:last-child {
    margin-bottom: 0;
}

.result-info strong {
    color: #667eea;
    margin-right: 10px;
}

.split-files-list {
    margin-top: 20px;
    padding: 20px;
    background: #fff3cd;
    border-radius: 10px;
    border: 2px solid #ffc107;
}

.split-files-list h3 {
    color: #856404;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.split-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
}

.split-file-item:last-child {
    margin-bottom: 0;
}

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

.split-file-info i {
    color: #667eea;
    font-size: 1.2em;
}

.split-file-name {
    font-weight: 600;
    color: #333;
}

.split-file-size {
    color: #666;
    font-size: 0.9em;
    margin-left: 15px;
}

.split-file-actions {
    display: flex;
    gap: 10px;
}

.btn-download-single {
    background: #28a745;
    color: white;
    padding: 8px 16px;
    font-size: 0.9em;
}

.btn-download-single:hover {
    background: #218838;
}

.btn-preview-single {
    background: #17a2b8;
    color: white;
    padding: 8px 16px;
    font-size: 0.9em;
}

.btn-preview-single:hover {
    background: #138496;
}

.result-actions {
    display: flex;
    gap: 10px;
}

/* Preview */
.preview-container {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    height: 600px;
}

.preview-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Footer */
footer {
    background: #f8f9ff;
    padding: 20px 40px;
    text-align: center;
    color: #666;
    border-top: 1px solid #e0e0e0;
}

footer i {
    margin-right: 8px;
    color: #667eea;
}

/* Action Section */
.action-section {
    text-align: center;
}

/* Progress Section */
.progress-section {
    background: #f8f9ff;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
}

.progress-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9em;
}

.progress-info {
    margin-top: 15px;
}

.progress-info p {
    margin: 5px 0;
    color: #666;
    font-size: 1em;
}

.progress-info p:first-child {
    font-weight: 600;
    color: #667eea;
    font-size: 1.1em;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    
    main {
        padding: 20px;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .upload-area i {
        font-size: 3em;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .btn-download {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

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

.file-item,
.option-item {
    animation: fadeIn 0.3s ease;
}