

        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            font-family: Arial, Helvetica, sans-serif;
            background: #f5f7fb;
            color: #1f2937;
        }

        .container {
            width: 100%;
            max-width: 950px;
            margin: 50px auto;
            padding: 20px;
        }

        .card {
            background: #ffffff;
            border-radius: 18px;
            padding: 35px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
        }

        h1 {
            margin: 0;
            text-align: center;
            font-size: 32px;
            color: #111827;
        }

        .subtitle {
            margin: 10px auto 30px;
            max-width: 700px;
            text-align: center;
            color: #6b7280;
            line-height: 1.6;
        }

        /* =========================================
           UPLOAD AREA
        ========================================= */

        .upload-area {
            display: block;
            padding: 50px 20px;
            text-align: center;
            border: 2px dashed #b8c0cc;
            border-radius: 15px;
            background: #fafbfc;
            cursor: pointer;
            transition: 0.2s ease;
        }

        .upload-area:hover,
        .upload-area.dragover {
            border-color: #2563eb;
            background: #eff6ff;
        }

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

        .upload-area h2 {
            margin: 0 0 8px;
            font-size: 21px;
        }

        .upload-area p {
            margin: 0;
            color: #6b7280;
        }

        #fileInput {
            display: none;
        }

        .selected-file {
            display: none;
            margin-top: 15px;
            padding: 13px 15px;
            border-radius: 10px;
            background: #f3f4f6;
            word-break: break-all;
            font-size: 14px;
        }

        /* =========================================
           BUTTONS
        ========================================= */

        .actions {
            display: flex;
            justify-content: center;
            gap: 12px;
            flex-wrap: wrap;
            margin-top: 22px;
        }

        button {
            border: 0;
            border-radius: 10px;
            padding: 13px 22px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: 0.2s ease;
        }

        button:disabled {
            opacity: 0.55;
            cursor: not-allowed;
        }

        .extract-btn {
            background: #2563eb;
            color: #ffffff;
        }

        .extract-btn:hover:not(:disabled) {
            background: #1d4ed8;
        }

        .reset-btn {
            background: #e5e7eb;
            color: #111827;
        }

        .reset-btn:hover {
            background: #d1d5db;
        }

        .download-btn {
            width: 100%;
            margin-top: 20px;
            background: #16a34a;
            color: #ffffff;
            font-size: 16px;
        }

        .download-btn:hover:not(:disabled) {
            background: #15803d;
        }

        /* =========================================
           STATUS
        ========================================= */

        .status {
            display: none;
            margin-top: 22px;
            padding: 14px 16px;
            border-radius: 10px;
            text-align: center;
            line-height: 1.5;
        }

        .status.info {
            display: block;
            background: #eff6ff;
            color: #1d4ed8;
        }

        .status.success {
            display: block;
            background: #f0fdf4;
            color: #15803d;
        }

        .status.error {
            display: block;
            background: #fef2f2;
            color: #dc2626;
        }

        /* =========================================
           PROGRESS
        ========================================= */

        .progress-container {
            display: none;
            margin-top: 20px;
        }

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

        .progress-fill {
            width: 0%;
            height: 100%;
            background: #2563eb;
            transition: width 0.2s ease;
        }

        .progress-text {
            margin-top: 8px;
            text-align: center;
            color: #6b7280;
            font-size: 13px;
        }

        /* =========================================
           STATS
        ========================================= */

        .stats {
            display: none;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
            margin-top: 25px;
        }

        .stat {
            padding: 18px;
            text-align: center;
            border-radius: 12px;
            background: #f8fafc;
        }

        .stat-number {
            font-size: 25px;
            font-weight: 700;
            color: #2563eb;
        }

        .stat-label {
            margin-top: 5px;
            color: #6b7280;
            font-size: 13px;
        }

        /* =========================================
           TREE
        ========================================= */

        .tree-section {
            display: none;
            margin-top: 30px;
        }

        .tree-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 15px;
            flex-wrap: wrap;
            margin-bottom: 12px;
        }

        .tree-header h3 {
            margin: 0;
            font-size: 20px;
        }

        .tree-actions {
            display: flex;
            gap: 8px;
        }

        .tree-action-btn {
            padding: 8px 12px;
            font-size: 13px;
            background: #eef2ff;
            color: #3730a3;
        }

        .tree-action-btn:hover {
            background: #e0e7ff;
        }

        .tree-wrapper {
            min-height: 100px;
            max-height: 500px;
            overflow: auto;
            padding: 16px;
            border: 1px solid #e5e7eb;
            border-radius: 12px;
            background: #fafafa;
        }

        .tree,
        .tree ul {
            list-style: none;
            margin: 0;
            padding: 0;
        }

        .tree ul {
            margin-left: 22px;
            padding-left: 14px;
            border-left: 1px solid #d1d5db;
        }

        .tree-node {
            margin: 2px 0;
        }

        .tree-row {
            display: flex;
            align-items: center;
            min-height: 34px;
            padding: 5px 8px;
            border-radius: 7px;
            user-select: none;
        }

        .tree-row:hover {
            background: #eef2ff;
        }

        .tree-toggle {
            width: 24px;
            height: 24px;
            margin-right: 3px;
            padding: 0;
            border: 0;
            background: transparent;
            color: #6b7280;
            font-size: 13px;
            cursor: pointer;
            flex-shrink: 0;
        }

        .tree-toggle.empty {
            cursor: default;
        }

        .tree-icon {
            width: 25px;
            margin-right: 6px;
            font-size: 18px;
            text-align: center;
            flex-shrink: 0;
        }

        .tree-name {
            overflow-wrap: anywhere;
            font-size: 14px;
            color: #374151;
        }

        .tree-folder > .tree-row .tree-name {
            font-weight: 600;
            color: #111827;
        }

        .tree-children {
            display: none;
        }

        .tree-folder.open > .tree-children {
            display: block;
        }

        .tree-folder.open > .tree-row .tree-toggle {
            transform: rotate(90deg);
        }

        .root-row {
            margin-bottom: 5px;
            padding-bottom: 10px;
            border-bottom: 1px solid #e5e7eb;
        }

        .root-row .tree-name {
            font-weight: 700;
        }

        /* =========================================
           INDIVIDUAL FILE DOWNLOAD
        ========================================= */

        .tree-file-download {
            margin-left: auto;
            width: 32px;
            height: 32px;
            padding: 0;
            border: 0;
            border-radius: 7px;
            background: transparent;
            color: #2563eb;
            font-size: 17px;
            cursor: pointer;
            opacity: 0;
            transition: 0.2s ease;
            flex-shrink: 0;
        }

        .tree-row:hover .tree-file-download {
            opacity: 1;
        }

        .tree-file-download:hover {
            background: #dbeafe;
            color: #1d4ed8;
        }

        /* =========================================
           INFO
        ========================================= */

        .info {
            margin-top: 28px;
            padding: 18px;
            border-radius: 12px;
            background: #f8fafc;
            color: #4b5563;
            font-size: 14px;
            line-height: 1.7;
        }

        .info strong {
            color: #111827;
        }

        .footer {
            margin-top: 25px;
            text-align: center;
            color: #9ca3af;
            font-size: 13px;
        }

        /* =========================================
           MOBILE
        ========================================= */

        @media (max-width: 600px) {

            .container {
                margin: 20px auto;
                padding: 12px;
            }

            .card {
                padding: 22px;
            }

            h1 {
                font-size: 26px;
            }

            .stats {
                grid-template-columns: 1fr;
            }

            .upload-area {
                padding: 35px 15px;
            }

            .tree-wrapper {
                padding: 10px;
            }

            .tree-file-download {
                opacity: 1;
            }

        }

   