        /* Base styles for the body and overall layout */
        body {
            font-family: "Inter", sans-serif; /* Using Inter for clean readability */
            background-color: #f0f9ff; /* Light blue background */
            display: flex;
            flex-direction: column; /* Stack header, main, footer vertically */
            min-height: 100vh; /* Full viewport height */
            color: #1a202c; /* Dark text for contrast */
            transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition for dark mode */
        }

        /* Dark mode specific body styles */
        html.dark body {
            background-color: #1a202c; /* Dark background */
            color: #e2e8f0; /* Light text */
        }

        /* Header styles */
        header {
            background-color: #ffffff;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            padding: 1rem 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap; /* Allow items to wrap on smaller screens */
            position: relative; /* Needed for absolute positioning of dropdown */
            z-index: 100; /* Ensure header is above other content */
            transition: background-color 0.3s ease, box-shadow 0.3s ease;
        }
        html.dark header {
            background-color: #2d3748; /* Darker header */
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        }

        .logo-section {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        .logo-icon {
            /* Simple SVG icon for the logo */
            width: 32px;
            height: 32px;
            color: #4f46e5; /* Indigo color for the logo */
        }
        html.dark .logo-icon {
            color: #9f7aea; /* Lighter indigo for dark mode */
        }
        .site-name {
            font-size: 1.75rem; /* Larger site name */
            font-weight: 800; /* Extra bold */
            color: #1a202c;
        }
        html.dark .site-name {
            color: #e2e8f0; /* Light text for dark mode */
        }

        /* Settings Dropdown Button */
        .settings-button {
            background-color: transparent;
            border: none;
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 0.5rem;
            transition: background-color 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .settings-button:hover {
            background-color: #f3f4f6;
        }
        html.dark .settings-button:hover {
            background-color: #4a5568;
        }
        .settings-icon {
            width: 24px;
            height: 24px;
            color: #4a5568; /* Grayish blue for icon */
        }
        html.dark .settings-icon {
            color: #cbd5e0; /* Lighter icon for dark mode */
        }

        /* Dropdown Menu */
        .dropdown-menu {
            position: absolute;
            top: 100%; /* Position below the header */
            right: 1rem; /* Align to the right of the header */
            background-color: #ffffff;
            border-radius: 0.75rem;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
            min-width: 200px;
            padding: 0.75rem;
            z-index: 1000; /* Ensure dropdown is on top */
            display: none; /* Hidden by default */
            flex-direction: column;
            gap: 0.5rem;
            border: 1px solid #e2e8f0;
            transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
        }
        html.dark .dropdown-menu {
            background-color: #2d3748; /* Darker dropdown background */
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
            border-color: #4a5568;
        }
        .dropdown-menu.show {
            display: flex; /* Show when 'show' class is present */
        }
        .dropdown-menu a,
        .dropdown-menu button {
            display: block;
            width: 100%;
            padding: 0.75rem 1rem;
            border-radius: 0.5rem;
            text-align: left;
            text-decoration: none;
            color: #4a5568;
            font-weight: 500;
            transition: background-color 0.2s, color 0.2s;
            background-color: transparent; /* Ensure buttons have transparent background initially */
            border: none; /* Remove button border */
            cursor: pointer;
        }
        html.dark .dropdown-menu a,
        html.dark .dropdown-menu button {
            color: #cbd5e0; /* Light text for dark mode links/buttons */
        }
        .dropdown-menu a:hover,
        .dropdown-menu button:hover {
            background-color: #f0f4f8; /* Light hover background */
            color: #4f46e5;
        }
        html.dark .dropdown-menu a:hover,
        html.dark .dropdown-menu button:hover {
            background-color: #4a5568; /* Darker hover background */
            color: #9f7aea;
        }

        /* Main content container */
        .main-content {
            flex-grow: 1; /* Allows main content to take available space */
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 2rem;
            background-image: linear-gradient(to bottom right, #e0e7ff, #c3dafe); /* Subtle gradient */
            transition: background-image 0.3s ease;
        }
        html.dark .main-content {
            background-image: linear-gradient(to bottom right, #2d3748, #1a202c); /* Darker gradient */
        }

        .container {
            background-color: #ffffff;
            border-radius: 1.5rem; /* More rounded corners */
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15); /* More pronounced shadow */
            padding: 2.5rem; /* Increased padding */
            width: 100%;
            max-width: 700px; /* Slightly wider container */
            border: 1px solid #e2e8f0; /* Subtle border */
            position: relative; /* For back button positioning */
            transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
        }
        html.dark .container {
            background-color: #4a5568; /* Darker container background */
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
            border-color: #6366f1;
        }
        html.dark .container h1,
        html.dark .container p,
        html.dark .container label {
            color: #e2e8f0; /* Light text for dark mode */
        }

        .drop-area {
            border: 3px dashed #93c5fd; /* Blue dashed border */
            background-color: #eff6ff; /* Lighter blue background */
            border-radius: 1rem;
            padding: 2rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        .drop-area.hover {
            background-color: #dbeafe; /* Even lighter blue on hover */
            border-color: #60a5fa; /* Darker blue on hover */
        }
        html.dark .drop-area {
            background-color: #334155;
            border-color: #6366f1;
        }
        html.dark .drop-area.hover {
            background-color: #4a5568;
            border-color: #7c3aed;
        }
        html.dark .drop-area p {
            color: #e2e8f0;
        }

        .pdf-info-box {
            background-color: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 0.75rem;
            padding: 1.5rem;
            margin-top: 1.5rem;
            text-align: left;
            transition: background-color 0.3s ease, border-color 0.3s ease;
        }
        html.dark .pdf-info-box {
            background-color: #334155;
            border-color: #4a5568;
        }
        html.dark .pdf-info-box p {
            color: #e2e8f0;
        }
        html.dark .pdf-info-box strong {
            color: #cbd5e0;
        }

        .button-primary {
            background-image: linear-gradient(to right, #4f46e5, #7c3aed); /* Stronger gradient */
            color: white;
            padding: 0.85rem 1.75rem; /* Slightly larger padding */
            border-radius: 0.75rem;
            font-weight: 600;
            transition: all 0.2s ease-in-out;
            box-shadow: 0 5px 15px rgba(79, 70, 229, 0.4); /* Enhanced shadow */
            border: none; /* Remove default border */
        }
        .button-primary:hover {
            transform: translateY(-3px); /* More pronounced lift */
            box-shadow: 0 8px 20px rgba(79, 70, 229, 0.5);
        }
        .button-primary:active {
            transform: translateY(-1px);
            box-shadow: 0 3px 10px rgba(79, 70, 229, 0.3);
        }
        .button-secondary {
            background-color: #e2e8f0;
            color: #4a5568;
            padding: 0.85rem 1.75rem;
            border-radius: 0.75rem;
            font-weight: 600;
            transition: all 0.2s ease-in-out;
            border: none; /* Remove default border */
        }
        .button-secondary:hover {
            background-color: #cbd5e0;
            transform: translateY(-2px);
            box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        }
        .button-secondary:active {
            transform: translateY(-1px);
            box-shadow: 0 2px 5px rgba(0,0,0,0.08);
        }
        html.dark .button-secondary {
            background-color: #6366f1; /* Darker secondary button */
            color: #e2e8f0;
        }
        html.dark .button-secondary:hover {
            background-color: #4f46e5;
            box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        }

        .message-box {
            background-color: #fffbeb;
            border: 1px solid #fcd34d;
            color: #b45309;
            padding: 0.75rem;
            border-radius: 0.5rem;
            text-align: center;
            font-size: 0.95rem;
            transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
        }
        html.dark .message-box {
            background-color: #334155;
            border-color: #94a3b8;
            color: #e2e8f0;
        }
        .message-box.error {
            background-color: #fee2e2;
            border-color: #fca5a5;
            color: #dc2626;
        }
        html.dark .message-box.error {
            background-color: #b91c1c;
            border-color: #ef4444;
            color: #fee2e2;
        }
        .message-box.success {
            background-color: #d1fae5;
            border-color: #6ee7b7;
            color: #065f46;
        }
        html.dark .message-box.success {
            background-color: #166534;
            border-color: #22c55e;
            color: #d1fae5;
        }

        /* Loading Spinner */
        .spinner {
            border: 4px solid rgba(0, 0, 0, 0.1);
            border-left-color: #6366f1; /* Primary color for spinner */
            border-radius: 50%;
            width: 24px;
            height: 24px;
            animation: spin 1s linear infinite;
            display: none; /* Hidden by default */
        }
        html.dark .spinner {
            border-color: rgba(255, 255, 255, 0.3);
            border-left-color: #9f7aea;
        }

        .spinner.show {
            display: block;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Instructions section styling */
        .instructions details {
            background-color: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 0.75rem;
            padding: 1rem 1.5rem;
            margin-bottom: 1.5rem;
            box-shadow: 0 4px 10px rgba(0,0,0,0.05);
            transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
        }
        html.dark .instructions details {
            background-color: #334155;
            border-color: #4a5568;
            box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        }
        .instructions summary {
            font-weight: 700;
            cursor: pointer;
            outline: none;
            color: #4f46e5; /* Primary color for summary */
            font-size: 1.125rem; /* text-lg */
            padding: 0.5rem 0;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        html.dark .instructions summary {
            color: #9f7aea;
        }
        .instructions summary::-webkit-details-marker {
            display: none; /* Hide default marker */
        }
        .instructions summary::after {
            content: '▼'; /* Custom arrow icon */
            font-size: 0.8em;
            transition: transform 0.2s;
        }
        .instructions details[open] summary::after {
            transform: rotate(180deg);
        }
        .instructions ul {
            list-style: decimal;
            padding-left: 1.5rem;
            margin-top: 1rem;
            color: #4a5568;
            line-height: 1.6;
        }
        html.dark .instructions ul {
            color: #cbd5e0;
        }
        .instructions li {
            margin-bottom: 0.5rem;
        }
        .instructions strong {
            color: #1a202c;
        }
        html.dark .instructions strong {
            color: #e2e8f0;
        }

        /* Input styling */
        input[type="file"],
        input[type="range"],
        input[type="text"],
        input[type="number"],
        select {
            padding: 0.75rem 1rem;
            border: 1px solid #cbd5e0;
            border-radius: 0.625rem;
            background-color: #ffffff;
            transition: all 0.2s ease-in-out;
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
        }
        input[type="file"]:focus,
        input[type="range"]:focus,
        input[type="text"]:focus,
        input[type="number"]:focus,
        select:focus {
            border-color: #6366f1;
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
            outline: none;
        }
        html.dark input[type="file"],
        html.dark input[type="range"],
        html.dark input[type="text"],
        html.dark input[type="number"],
        html.dark select {
            background-color: #2d3748;
            border-color: #4a5568;
            color: #e2e8f0;
        }
        html.dark input[type="file"]:focus,
        html.dark input[type="range"]:focus,
        html.dark input[type="text"]:focus,
        html.dark input[type="number"]:focus,
        html.dark select:focus {
            border-color: #9f7aea;
            box-shadow: 0 0 0 3px rgba(159, 122, 234, 0.3);
        }
        /* Specific styling for checkbox */
        input[type="checkbox"] {
            width: 1.25rem;
            height: 1.25rem;
            border-radius: 0.375rem; /* rounded-md */
            border: 1px solid #cbd5e0;
            background-color: #ffffff;
            cursor: pointer;
            transition: all 0.2s ease-in-out;
        }
        input[type="checkbox"]:checked {
            background-color: #4f46e5;
            border-color: #4f46e5;
        }
        input[type="checkbox"]:focus {
            outline: none;
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
        }
        html.dark input[type="checkbox"] {
            background-color: #2d3748;
            border-color: #4a5568;
        }
        html.dark input[type="checkbox"]:checked {
            background-color: #9f7aea;
            border-color: #9f7aea;
        }

        /* Back Button */
        .back-button-top {
            position: absolute;
            top: 2rem;
            left: 2rem;
            display: inline-flex;
            align-items: center;
            background-color: #f3f4f6;
            color: #4b5563;
            padding: 0.75rem 1.25rem;
            border-radius: 0.75rem;
            font-weight: 600;
            text-decoration: none;
            transition: all 0.2s ease-in-out;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }
        .back-button-top:hover {
            background-color: #e5e7eb;
            transform: translateX(-5px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        .back-button-top svg {
            margin-right: 0.5rem;
        }
        html.dark .back-button-top {
            background-color: #6366f1;
            color: #e2e8f0;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        }
        html.dark .back-button-top:hover {
            background-color: #4f46e5;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        }
        html.dark .back-button-top svg {
            color: #e2e8f0;
        }

        /* Progress Bar */
        .progress-bar-container {
            width: 100%;
            background-color: #e0e7ff;
            border-radius: 0.5rem;
            height: 1rem;
            overflow: hidden;
            margin-top: 1.5rem;
            transition: background-color 0.3s ease;
        }
        html.dark .progress-bar-container {
            background-color: #4a5568;
        }
        .progress-bar {
            height: 100%;
            width: 0%;
            background-color: #2563eb; /* Blue progress bar */
            border-radius: 0.5rem;
            transition: width 0.3s ease-in-out;
        }
        html.dark .progress-bar {
            background-color: #9f7aea;
        }


        /* Responsive adjustments */
        @media (max-width: 768px) {
            header {
                flex-direction: row; /* Keep logo and settings button on one line */
                justify-content: space-between;
                align-items: center;
                padding: 1rem;
            }
            .logo-section {
                flex-grow: 1; /* Allow logo to take space */
            }
            .dropdown-menu {
                right: 0.5rem; /* Adjust position for smaller screens */
                min-width: 180px;
            }
            .container {
                padding: 1.5rem;
                border-radius: 1rem;
            }
            .site-name {
                font-size: 1.5rem;
            }
            .back-button-top {
                top: 1rem;
                left: 1rem;
                padding: 0.6rem 1rem;
                font-size: 0.9rem;
            }
            .back-button-top svg {
                width: 18px;
                height: 18px;
            }
        }
    