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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.container {
    max-width: 800px;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 32px;
}

header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.subtitle {
    color: #666;
    font-size: 14px;
}

.upload-section {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.upload-box {
    flex: 1;
    background: #fff;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.upload-box:hover {
    border-color: #999;
}

.upload-box.highlight {
    border-color: #4a90d9;
    background: #f0f6ff;
}

.upload-box.attached {
    border-color: #4caf50;
    border-style: solid;
    background: #f6fdf6;
}

.upload-label {
    font-weight: 600;
    font-size: 14px;
    color: #444;
    margin-bottom: 12px;
}

.upload-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.upload-hint {
    font-size: 12px;
    color: #888;
    word-break: break-all;
}

.upload-hint.filename {
    color: #2e7d32;
    font-weight: 500;
}

.options-section {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.options-spacer {
    flex: 1;
}

.options-section label {
    font-size: 14px;
    font-weight: 500;
    color: #444;
}

.options-section select {
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}

.merge-btn {
    width: 100%;
    padding: 14px;
    background: #4a90d9;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.merge-btn:hover:not(:disabled) {
    background: #3a7bc8;
}

.merge-btn:disabled {
    background: #b0b0b0;
    cursor: not-allowed;
}

.merge-btn.processing {
    background: #e0a800;
}

.status {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.status.info {
    background: #e3f2fd;
    color: #1565c0;
}

.status.error {
    background: #fce4ec;
    color: #c62828;
}

.status.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.progress {
    margin-top: 12px;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #4a90d9;
    width: 0%;
    transition: width 0.3s;
    animation: indeterminate 1.5s infinite;
}

@keyframes indeterminate {
    0% { width: 0%; margin-left: 0%; }
    50% { width: 40%; margin-left: 30%; }
    100% { width: 0%; margin-left: 100%; }
}

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

.result a {
    color: #4a90d9;
    text-decoration: none;
    font-weight: 500;
}

.result a:hover {
    text-decoration: underline;
}

.hidden {
    display: none;
}

@media (max-width: 600px) {
    .upload-section {
        flex-direction: column;
    }
}
