        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
            background: #f0f4fa;
            color: #1a2c3e;
            line-height: 1.5;
        }

        .site-header {
            background: rgba(255,255,255,0.96);
            backdrop-filter: blur(12px);
            border-bottom: 1px solid rgba(0,0,0,0.05);
            position: sticky;
            top: 0;
            z-index: 100;
        }
        .header-container {
            max-width: 1280px;
            margin: 0 auto;
            padding: 0.75rem 1.5rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 0.75rem;
        }
        .logo {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            text-decoration: none;
            font-weight: 700;
            font-size: 1.125rem;
            color: #1a2c3e;
        }
        .logo-mark {
            background: linear-gradient(135deg, #2c5a7a, #3b82b6);
            width: 32px;
            height: 32px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 700;
            font-size: 0.9rem;
        }
        .nav {
            display: flex;
            gap: 1.25rem;
            flex-wrap: wrap;
        }
        .nav a {
            color: #4a627a;
            text-decoration: none;
            font-size: 0.8rem;
            font-weight: 500;
            transition: color 0.2s;
        }
        .nav a:hover, .nav a.active {
            color: #3b82b6;
        }

        .main {
            max-width: 1280px;
            margin: 0 auto;
            padding: 1.5rem;
        }

        .hero {
            margin-bottom: 2rem;
            padding: 1rem 0;
        }
        .hero h1 {
            font-size: 2rem;
            font-weight: 700;
            letter-spacing: -0.02em;
            color: #1a2c3e;
            margin-bottom: 0.5rem;
        }
        .hero p {
            color: #4a627a;
            font-size: 0.95rem;
            max-width: 560px;
        }

        .tool-container {
            background: white;
            border-radius: 2rem;
            box-shadow: 0 20px 35px -12px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.02);
            overflow: hidden;
        }

        .upload-zone {
            padding: 2.5rem 1.5rem;
            text-align: center;
            background: linear-gradient(145deg, #ffffff, #fafcff);
            border-bottom: 1px solid #e6edf4;
            cursor: pointer;
            transition: all 0.2s;
        }
        .upload-zone:hover {
            background: #ffffff;
        }
        .upload-zone.drag-over {
            background: #eef4fc;
        }
        .upload-icon {
            margin-bottom: 1rem;
        }
        .upload-text {
            font-weight: 600;
            font-size: 1rem;
            margin-bottom: 0.25rem;
            color: #3b82b6;
        }
        .upload-hint {
            font-size: 0.75rem;
            color: #6b85a0;
        }

        .workspace {
            display: none;
        }
        .workspace.active {
            display: block;
        }

        .merger-layout {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
            padding: 1.5rem;
        }

        /* File list area */
        .files-section {
            background: #fafdff;
            border-radius: 1.25rem;
            border: 1px solid #e6edf4;
            overflow: hidden;
        }
        .section-header {
            padding: 1rem 1.25rem;
            background: white;
            border-bottom: 1px solid #e6edf4;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 0.75rem;
        }
        .section-title {
            font-weight: 600;
            font-size: 0.9rem;
            color: #1a2c3e;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .file-count {
            background: #eef4fc;
            padding: 0.2rem 0.6rem;
            border-radius: 2rem;
            font-size: 0.7rem;
            font-weight: 500;
            color: #3b82b6;
        }
        .action-buttons-header {
            display: flex;
            gap: 0.5rem;
        }
        .btn-icon {
            background: none;
            border: 1px solid #d4e0ec;
            padding: 0.4rem 0.8rem;
            border-radius: 2rem;
            font-size: 0.7rem;
            cursor: pointer;
            transition: all 0.2s;
            font-family: inherit;
        }
        .btn-icon:hover {
            background: #f0f4fa;
            border-color: #3b82b6;
        }

        /* File list */
        .file-list {
            padding: 0.5rem;
            max-height: 400px;
            overflow-y: auto;
        }
        .file-item {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 0.75rem;
            margin: 0.25rem 0;
            background: white;
            border-radius: 0.75rem;
            border: 1px solid #e6edf4;
            cursor: move;
            transition: all 0.2s;
        }
        .file-item:hover {
            border-color: #3b82b6;
            box-shadow: 0 2px 8px rgba(59,130,182,0.1);
        }
        .file-item.dragging {
            opacity: 0.5;
        }
        .drag-handle {
            cursor: grab;
            color: #9aaebf;
            font-size: 1.1rem;
        }
        .file-preview {
            width: 32px;
            height: 40px;
            background: #f0f4fa;
            border-radius: 0.4rem;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
        }
        .file-info {
            flex: 1;
        }
        .file-name {
            font-size: 0.8rem;
            font-weight: 500;
            color: #1a2c3e;
            word-break: break-all;
        }
        .file-meta {
            font-size: 0.65rem;
            color: #6b85a0;
            margin-top: 0.2rem;
        }
        .remove-file {
            background: none;
            border: none;
            font-size: 1.2rem;
            cursor: pointer;
            color: #9aaebf;
            padding: 0.2rem 0.5rem;
            border-radius: 0.5rem;
            transition: all 0.2s;
        }
        .remove-file:hover {
            color: #b91c1c;
            background: #fef2f2;
        }
        .empty-state {
            text-align: center;
            padding: 3rem;
            color: #9aaebf;
            font-size: 0.8rem;
        }

        /* Options section */
        .options-section {
            background: #fafdff;
            border-radius: 1.25rem;
            border: 1px solid #e6edf4;
            padding: 1.25rem;
            display: flex;
            flex-wrap: wrap;
            gap: 1.5rem;
            align-items: flex-end;
        }
        .option-group {
            flex: 1;
            min-width: 180px;
        }
        .option-label {
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: #6b85a0;
            margin-bottom: 0.5rem;
        }
        .filename-input {
            width: 100%;
            padding: 0.6rem 0.8rem;
            border: 1px solid #d4e0ec;
            border-radius: 3rem;
            font-size: 0.8rem;
            font-family: inherit;
            background: white;
        }
        .btn-primary {
            background: #3b82b6;
            color: white;
            padding: 0.6rem 1.5rem;
            border: none;
            border-radius: 3rem;
            font-weight: 600;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }
        .btn-primary:hover:not(:disabled) {
            background: #2c5a7a;
            transform: translateY(-1px);
        }
        .btn-primary:disabled {
            opacity: 0.6;
            cursor: wait;
        }
        .btn-secondary {
            background: #f0f4fa;
            color: #4a627a;
            padding: 0.6rem 1.2rem;
            border: 1px solid #d4e0ec;
            border-radius: 3rem;
            font-weight: 500;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        .btn-secondary:hover {
            background: #e2eaf1;
        }

        /* Progress area */
        .progress-area {
            border-top: 1px solid #e6edf4;
            padding: 1.5rem;
            background: #fafdff;
            display: none;
        }
        .progress-area.active {
            display: block;
        }
        .progress-bar {
            height: 6px;
            background: #e2eaf1;
            border-radius: 3px;
            overflow: hidden;
        }
        .progress-fill {
            background: #3b82b6;
            width: 0%;
            height: 100%;
            transition: width 0.25s;
        }
        .progress-message {
            font-size: 0.75rem;
            text-align: center;
            margin-top: 0.75rem;
            color: #4a627a;
        }

        /* Result area */
        .result-area {
            border-top: 1px solid #e6edf4;
            padding: 1.5rem;
            text-align: center;
            background: #eef4fc;
            display: none;
        }
        .result-area.active {
            display: block;
        }
        .result-icon {
            font-size: 2rem;
        }
        .result-title {
            font-weight: 600;
            margin: 0.5rem 0;
        }
        .result-stats {
            display: flex;
            justify-content: center;
            gap: 1rem;
            margin: 1rem 0;
            flex-wrap: wrap;
        }
        .result-stat {
            background: white;
            padding: 0.5rem 1rem;
            border-radius: 2rem;
        }

        /* Error area */
        .error-area {
            border-top: 1px solid #fee2e2;
            padding: 1.5rem;
            text-align: center;
            background: #fef6f5;
            display: none;
        }
        .error-area.active {
            display: block;
        }
        .error-title {
            font-weight: 600;
        }
        .error-message {
            font-size: 0.75rem;
            margin: 0.5rem 0;
        }

        /* Knowledge section */
        .knowledge-section {
            margin-top: 2.5rem;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 1.25rem;
        }
        .knowledge-card {
            background: white;
            border-radius: 1.25rem;
            padding: 1.2rem;
            border: 1px solid #e6edf4;
        }
        .knowledge-card h3 {
            font-size: 0.9rem;
            font-weight: 600;
            margin-bottom: 0.6rem;
            color: #2c5a7a;
        }
        .knowledge-card p {
            font-size: 0.8rem;
            color: #4a627a;
            line-height: 1.5;
        }

        .footer-note {
            margin-top: 2rem;
            padding-top: 1rem;
            border-top: 1px solid #dce5ef;
            font-size: 0.7rem;
            text-align: center;
            color: #6b85a0;
        }
        .toast {
            position: fixed;
            bottom: 1rem;
            right: 1rem;
            background: #1a2c3e;
            color: white;
            padding: 0.5rem 1rem;
            border-radius: 2rem;
            font-size: 0.75rem;
            transform: translateX(400px);
            transition: transform 0.2s;
            z-index: 200;
        }
        .spinner {
            width: 14px;
            height: 14px;
            border: 2px solid rgba(255,255,255,0.3);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 0.6s linear infinite;
            display: inline-block;
        }
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        .hidden {
            display: none;
        }

        #footerSpan {
            margin-left: 1rem;
        }

        .footerLink {
            color: #3b82b6;
            text-decoration: none;
        }

        #downloadBtn {
            width: auto;
            padding: 0.6rem 2rem;
        }

        #newMergeBtn {
            margin-top: 0.75rem;
        }

        #mergeSpinner {
            display: none;
        }

        #pageLayout {
            appearance: auto;
        }

        #fileInput {
            display: none;
        }