  * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        body {
            background: #e6e9ef;
            font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
            padding: 30px 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .app {
            max-width: 1100px;
            width: 100%;
            background: white;
            border-radius: 32px;
            box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.25);
            padding: 28px 30px 40px;
        }
        h1 {
            font-weight: 500;
            font-size: 1.9rem;
            letter-spacing: -0.3px;
            color: #1f2a3a;
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
            margin-bottom: 8px;
        }
        .sub {
            color: #4a5a72;
            margin-bottom: 28px;
            border-left: 4px solid #3b82f6;
            padding-left: 16px;
            background: #f8faff;
            border-radius: 0 12px 12px 0;
            line-height: 1.6;
            font-weight: 400;
        }
        .sub strong {
            background: #eef3fe;
            padding: 2px 10px;
            border-radius: 20px;
            font-weight: 500;
        }
        .sub .highlight {
            background: #dbeafe;
            color: #1e40af;
            padding: 2px 12px;
            border-radius: 20px;
            font-weight: 500;
        }
        .toolbar {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 16px 24px;
            background: #f2f5fc;
            padding: 16px 22px;
            border-radius: 60px;
            margin-bottom: 30px;
            backdrop-filter: blur(2px);
        }
        .toolbar .btn {
            background: white;
            border: none;
            padding: 10px 24px;
            border-radius: 40px;
            font-weight: 500;
            font-size: 0.95rem;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
            display: inline-flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            transition: 0.15s ease;
            border: 1px solid #d0d9e8;
            color: #1f2a3a;
        }
        .toolbar .btn-primary {
            background: #1f2a3a;
            border: 1px solid #1f2a3a;
            color: white;
            box-shadow: 0 4px 8px rgba(28, 40, 60, 0.15);
        }
        .toolbar .btn-primary:hover {
            background: #2b3a4f;
            transform: scale(1.01);
        }
        .toolbar .btn-outline {
            background: transparent;
            border: 1px dashed #8094b0;
        }
        .toolbar .btn-outline:hover {
            background: #eef3fe;
            border-color: #3b82f6;
        }
        .toolbar .btn-danger {
            background: #fee2e2;
            border: 1px solid #fca5a5;
            color: #991b1b;
        }
        .toolbar .btn-danger:hover {
            background: #fecaca;
        }
        .toolbar .btn-success {
            background: #dcfce7;
            border: 1px solid #86efac;
            color: #166534;
        }
        .toolbar .btn-success:hover {
            background: #bbf7d0;
        }
        .toolbar .badge {
            background: #dce3ef;
            padding: 4px 14px;
            border-radius: 30px;
            font-size: 0.85rem;
            color: #1f2a3a;
            margin-left: 4px;
        }
        .upload-area {
            border: 2px dashed #c7d2e1;
            border-radius: 28px;
            padding: 32px 20px;
            text-align: center;
            color: #3d506c;
            background: #fafcff;
            transition: 0.2s;
            margin-bottom: 28px;
        }
        .upload-area.dragover {
            background: #eef4fe;
            border-color: #3b82f6;
        }
        .upload-area input[type="file"] {
            display: none;
        }
        .upload-label {
            display: inline-block;
            background: #eef2f9;
            padding: 14px 36px;
            border-radius: 50px;
            font-weight: 500;
            cursor: pointer;
            transition: 0.15s;
            border: 1px solid #cdd9ea;
        }
        .upload-label:hover {
            background: #e2eaf9;
            border-color: #8094b0;
        }
        .hint-text {
            font-size: 0.9rem;
            margin-top: 14px;
            opacity: 0.8;
        }
        .hint-text .tag {
            display: inline-block;
            background: #dce3ef;
            padding: 2px 12px;
            border-radius: 30px;
            margin: 0 4px;
            font-size: 0.8rem;
            font-weight: 500;
        }
        .file-list {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin: 12px 0 8px;
        }
        .file-tag {
            background: #eef2f9;
            border: 1px solid #d0d9e8;
            border-radius: 30px;
            padding: 6px 16px;
            font-size: 0.85rem;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        .file-tag .remove {
            cursor: pointer;
            color: #991b1b;
            font-weight: 600;
            font-size: 1.1rem;
            line-height: 1;
        }
        .file-tag .remove:hover {
            color: #dc2626;
        }
        .file-tag .pages-info {
            color: #6b7f9c;
            font-size: 0.75rem;
        }

        .preview-area {
            margin-top: 32px;
            border-top: 2px solid #dfe7f2;
            padding-top: 24px;
        }
        .preview-area .section-title {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }
        .preview-area .section-title h3 {
            font-weight: 500;
            color: #1f2a3a;
        }

        .preview-grid {
            display: flex;
            flex-direction: column;
            gap: 30px;
            background: #f2f6fd;
            padding: 24px;
            border-radius: 28px;
            box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.02);
            min-height: 150px;
        }

        .preview-page {
            background: white;
            border-radius: 16px;
            padding: 16px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .preview-page .preview-slot {
            background: #fafcff;
            border-radius: 12px;
            padding: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid #eef2f7;
            min-height: 80px;
            flex: 1;
        }

        .preview-page .preview-slot .page-number {
            color: #1f2a3a;
            font-size: 0.9rem;
            font-weight: 500;
        }
        .preview-page .preview-slot .page-number .sub {
            color: #6b7f9c;
            font-weight: 400;
            font-size: 0.8rem;
            border: none;
            padding: 0;
            margin: 0;
            background: none;
        }

        .preview-page .preview-slot .placeholder {
            color: #8b9bb5;
            font-size: 0.9rem;
            padding: 20px 0;
        }

        .preview-divider {
            text-align: center;
            color: #b0c0d4;
            font-size: 0.8rem;
            padding: 4px 0;
            letter-spacing: 4px;
            user-select: none;
        }

        .action-bar {
            display: flex;
            justify-content: flex-end;
            gap: 16px;
            margin-top: 28px;
            flex-wrap: wrap;
        }
        .btn-print {
            background: #1f2a3a;
            border: none;
            padding: 14px 42px;
            border-radius: 60px;
            color: white;
            font-weight: 600;
            font-size: 1.1rem;
            box-shadow: 0 8px 18px rgba(28, 40, 60, 0.2);
            cursor: pointer;
            transition: 0.15s;
            display: flex;
            align-items: center;
            gap: 12px;
            border: 1px solid #2a3a50;
        }
        .btn-print:hover {
            background: #2a3a4f;
            transform: scale(1.01);
        }
        .btn-print:disabled {
            opacity: 0.5;
            pointer-events: none;
            filter: grayscale(0.3);
        }
        .btn-clear {
            background: transparent;
            border: 1px solid #c7d2e1;
            padding: 14px 28px;
            border-radius: 60px;
            color: #2f405b;
            font-weight: 500;
            cursor: pointer;
            transition: 0.1s;
        }
        .btn-clear:hover {
            background: #f0f4fe;
            border-color: #8094b0;
        }

        .toast {
            position: fixed;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            background: #1f2a3a;
            color: white;
            padding: 14px 32px;
            border-radius: 60px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
            font-weight: 500;
            font-size: 0.95rem;
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
            z-index: 999;
        }
        .toast.show {
            opacity: 1;
        }

        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.4);
            backdrop-filter: blur(4px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }
        .loading-overlay.active {
            display: flex;
        }
        .loading-box {
            background: white;
            border-radius: 24px;
            padding: 40px 50px;
            text-align: center;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            max-width: 400px;
        }
        .loading-box .spinner {
            width: 48px;
            height: 48px;
            border: 4px solid #e6e9ef;
            border-top: 4px solid #3b82f6;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin: 0 auto 16px;
        }
        .loading-box p {
            color: #1f2a3a;
            font-weight: 500;
            font-size: 1rem;
        }
        .loading-box .sub-text {
            color: #6b7f9c;
            font-size: 0.85rem;
            font-weight: 400;
            margin-top: 6px;
        }
        .loading-box .progress {
            margin-top: 12px;
            color: #3b82f6;
            font-size: 0.9rem;
            font-weight: 500;
        }
        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }
            100% {
                transform: rotate(360deg);
            }
        }

        .footer-info {
            margin-top: 20px;
            color: #63758f;
            font-size: 0.85rem;
            text-align: center;
        }

        /* PDF 预览区 */
        .pdf-preview-section {
            margin-top: 24px;
            border-top: 2px solid #dfe7f2;
            padding-top: 24px;
        }
        .pdf-preview-section .section-title {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }
        .pdf-preview-section .section-title h3 {
            font-weight: 500;
            color: #1f2a3a;
        }
        .pdf-preview-section .section-title .hint {
            color: #6b7f9c;
            font-size: 0.85rem;
        }
        .pdf-viewer-wrap {
            background: #f2f6fd;
            border-radius: 28px;
            padding: 16px;
            box-shadow: inset 0 2px 6px rgba(0,0,0,0.02);
            min-height: 300px;
            display: flex;
            flex-direction: column;
        }
        .pdf-viewer-wrap iframe {
            width: 100%;
            height: 600px;
            border: none;
            border-radius: 16px;
            background: white;
        }
        .pdf-viewer-wrap .placeholder {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #8b9bb5;
            font-size: 1rem;
            min-height: 300px;
        }
        .pdf-action-bar {
            display: flex;
            justify-content: flex-end;
            gap: 12px;
            margin-top: 16px;
            flex-wrap: wrap;
        }