        /* --- ESTILOS GENERALES --- */
        :root {
            --primary-color: #00c897;
            --secondary-color: #1d2d44;
            --accent-color: #f48c06;
            --history-button-color: #007bff;
            --history-button-accent: #0056b3;
            --print-button-color: #3a7bd5;
            --print-button-accent: #3a60d5;
            --text-color: #ffffff;
            --border-radius: 6px;
            --shadow-color: rgba(0, 0, 0, 0.2);
            --input-height: 40px;
            --file-input-height: 32px;
            --background-gradient: linear-gradient(135deg, #1d2d44 0%, #0a1a30 100%);
            --container-bg: rgba(29, 45, 68, 0.95);
            --preview-bg: rgba(255, 255, 255, 0.05);
            --input-bg: rgba(255, 255, 255, 0.1);
        }

        [data-theme="day"] {
            --primary-color: #00a381;
            --secondary-color: #ffffff;
            --accent-color: #e26a00;
            --text-color: #0f172a;
            --background-gradient: linear-gradient(135deg, #ffffff 0%, #eaf0f8 55%, #dbe7f8 100%);
            --container-bg: rgba(255, 255, 255, 0.98);
            --preview-bg: rgba(15, 23, 42, 0.04);
            --input-bg: rgba(15, 23, 42, 0.08);
            --shadow-color: rgba(2, 6, 23, 0.18);
        }

        [data-theme="day"] body {
            color: var(--text-color);
        }

        [data-theme="day"] .container {
            border: 1px solid rgba(15, 23, 42, 0.14);
            box-shadow: 0 12px 30px rgba(2, 6, 23, 0.16);
        }

        [data-theme="day"] .preview-area {
            border: 1px solid rgba(15, 23, 42, 0.14);
            box-shadow: 0 8px 20px rgba(2, 6, 23, 0.08);
        }

        [data-theme="day"] canvas {
            background: rgba(255, 255, 255, 0.9);
            border: 1px solid rgba(0, 163, 129, 0.55);
            box-shadow: 0 12px 24px rgba(2, 6, 23, 0.12);
        }

        [data-theme="day"] input,
        [data-theme="day"] select {
            border: 1px solid rgba(15, 23, 42, 0.18);
        }

        [data-theme="day"] #patentHistoryWindow,
        [data-theme="day"] #settingsWindow,
        [data-theme="day"] .modal-content {
            border: 1px solid rgba(15, 23, 42, 0.14);
        }

        @font-face {
            font-family: 'FE-FONT';
            src: url('./FE-FONT.woff2') format('woff2'),
                url('./FE-FONT.ttf') format('truetype');
            font-weight: normal;
            font-style: normal;
        }

        @keyframes pulse {

            0%,
            100% {
                opacity: 1;
                transform: scale(1);
            }

            50% {
                opacity: .5;
                transform: scale(1.1);
            }
        }

        body {
            font-family: 'Poppins', sans-serif;
            max-width: 1000px;
            margin: 0 auto;
            padding: 10px;
            background: var(--background-gradient);
            color: var(--text-color);
            min-height: 100vh;
            -webkit-font-smoothing: antialiased;
            font-size: 14px;
            transition: background 0.25s ease, color 0.25s ease;
        }

        .container {
            background: var(--container-bg);
            padding: 15px;
            border-radius: 14px;
            box-shadow: 0 10px 28px var(--shadow-color);
            border: 1px solid rgba(255, 255, 255, 0.14);
        }

        h1 {
            color: var(--text-color);
            font-size: 1.05rem;
            text-align: center;
            margin-bottom: 0.6rem;
            font-weight: 700;
            font-family: 'Montserrat', sans-serif;
            letter-spacing: 0.6px;
            opacity: 0.92;
        }

        .preview-area {
            border: 1px solid rgba(255, 255, 255, 0.18);
            padding: 12px;
            margin: 8px 0;
            background: var(--preview-bg);
            border-radius: 14px;
            transition: box-shadow 0.18s ease, border-color 0.18s ease;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
        }

        .preview-area:hover {
            box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
            border-color: rgba(0, 200, 151, 0.5);
        }

        canvas {
            max-width: 100%;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 14px;
            border: 1px solid rgba(0, 200, 151, 0.6);
            box-shadow: 0 14px 26px rgba(0, 0, 0, 0.22);
        }

        .input-group {
            margin-bottom: 10px;
            max-width: 400px;
            margin-left: auto;
            margin-right: auto;
            display: flex;
            flex-direction: column;
            gap: 8px;
            align-items: center;
        }

        .logo-controls {
            display: flex;
            flex-direction: row;
            gap: 8px;
            margin-bottom: 8px;
            max-width: 400px;
            justify-content: center;
        }

        .logo-controls>div {
            flex: 1;
            min-width: 120px;
        }

        .font-controls {
            display: flex;
            flex-direction: row;
            gap: 8px;
            margin: 8px auto;
            max-width: 400px;
            align-items: center;
            justify-content: center;
        }

        .font-controls>div {
            flex: 1;
            min-width: 100px;
        }

        .font-size-buttons {
            display: flex;
            flex-direction: column;
            gap: 6px;
            align-items: center;
            min-width: 96px;
            justify-content: center;
        }

        .font-size-buttons button {
            width: 40px;
            height: 40px;
            font-size: 1.2rem;
            border-radius: 12px;
            background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
            color: var(--text-color);
            border: none;
            cursor: pointer;
            transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
        }

        .font-size-buttons button:hover {
            transform: translateY(-1px);
            box-shadow: 0 3px 8px var(--shadow-color);
        }

        .font-size-buttons label {
            font-size: 0.85rem;
            margin: 0;
            color: var(--text-color);
            font-weight: 600;
            font-family: 'Poppins', sans-serif;
            line-height: 1.1;
            text-align: center;
        }

        .font-size-buttons .button-group {
            display: flex;
            flex-direction: row;
            gap: 4px;
            align-items: center;
        }

        #fontSizeValue {
            font-size: 0.9rem;
            color: var(--text-color);
            font-weight: 600;
            font-family: 'Poppins', sans-serif;
            min-width: 30px;
            text-align: center;
        }

        .new-patent-input {
            max-width: 240px;
            padding: 10px;
            border: 1px solid rgba(255, 255, 255, 0.22);
            border-radius: 14px;
            background: rgba(0, 0, 0, 0.12);
            box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
        }

        .new-patent-input label {
            font-size: 1rem;
            margin-bottom: 4px;
            text-align: center;
            display: block;
        }

        #textInput {
            font-family: 'Poppins', sans-serif;
            font-size: 1.3rem;
            text-align: center;
            height: 35px;
            width: 100%;
            padding: 4px;
            border: none;
            background: transparent;
            color: var(--text-color);
            letter-spacing: 0.1em;
            text-transform: uppercase;
        }

        #textInput:focus {
            font-size: 1.35rem;
        }

        .mode-buttons {
            display: flex;
            gap: 6px;
            justify-content: center;
            margin: 8px 0;
        }

        .mode-button {
            width: 60px;
            height: 30px;
            font-size: 0.8rem;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.08);
            color: var(--text-color);
            border: 1px solid rgba(255, 255, 255, 0.18);
            cursor: pointer;
            transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease, border-color 0.15s ease;
            font-family: 'Poppins', sans-serif;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
        }

        .mode-button.active {
            background: var(--primary-color);
            border: 1px solid rgba(0, 0, 0, 0.18);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
        }

        .mode-button:hover:not(.active) {
            background: rgba(255, 255, 255, 0.2);
        }

        .toggle-button,
        .width-button {
            height: 30px;
            font-size: 0.8rem;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.08);
            color: var(--text-color);
            border: 1px solid rgba(255, 255, 255, 0.18);
            cursor: pointer;
            transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease, border-color 0.15s ease;
            font-family: 'Poppins', sans-serif;
        }

        .toggle-button {
            width: 90px;
        }

        .toggle-button.active,
        .width-button.active {
            background: var(--primary-color);
            border: 1px solid rgba(0, 0, 0, 0.18);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
        }

        .toggle-button:hover:not(.active),
        .width-button:hover:not(.active) {
            background: rgba(255, 255, 255, 0.2);
        }

        .format-controls {
            display: flex;
            gap: 4px;
            justify-content: center;
            align-items: center;
            margin: 6px 0;
            flex-wrap: nowrap;
            white-space: nowrap;
        }

        .format-controls button {
            width: auto;
            margin: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        #formatPanel {
            display: none;
            align-items: center;
            gap: 4px;
            max-width: 100%;
            overflow: hidden;
            min-width: 0;
        }

        .format-controls label {
            font-size: 0.85rem;
            margin: 0;
            white-space: nowrap;
            flex: 0 0 auto;
        }

        .format-controls select {
            width: auto;
            max-width: 130px;
            min-width: 105px;
            flex: 0 1 auto;
            height: 30px;
            font-size: 0.85rem;
            padding: 0 6px;
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
        }

        .format-type-select {
            width: 80px;
            height: 30px;
            padding: 0 6px;
            font-size: 0.75rem;
            border-radius: var(--border-radius);
            background: var(--secondary-color);
            color: #000000;
            border: 1px solid rgba(255, 255, 255, 0.2);
            font-family: 'Poppins', sans-serif;
            transition: all 0.2s ease;
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            background: var(--secondary-color) url('data:image/svg+xml;utf8,<svg fill="%23000000" height="16" viewBox="0 0 24 24" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 5px center;
            background-size: 14px;
        }

        .format-type-select:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 1px rgba(0, 200, 151, 0.3);
            outline: none;
            background: var(--secondary-color) url('data:image/svg+xml;utf8,<svg fill="%23000000" height="16" viewBox="0 0 24 24" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 5px center;
        }

        .format-type-select option {
            background: var(--secondary-color);
            color: #000000;
        }

        .share-button {
            background: linear-gradient(45deg, #28a745, #218838);
            color: var(--text-color);
            padding: 10px 16px;
            border: none;
            border-radius: var(--border-radius);
            cursor: pointer;
            font-size: 1rem;
            font-weight: 600;
            transition: all 0.2s ease;
            box-shadow: 0 2px 8px var(--shadow-color);
            width: 200px;
            margin: 8px auto;
            display: none;
            font-family: 'Poppins', sans-serif;
        }

        .share-button.active {
            display: block;
        }

        .share-button:hover {
            transform: translateY(-1px);
            box-shadow: 0 3px 10px var(--shadow-color);
        }

        .settings-button {
            background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
            color: var(--text-color);
            padding: 10px 16px;
            border: none;
            border-radius: var(--border-radius);
            cursor: pointer;
            font-size: 1rem;
            font-weight: 600;
            transition: all 0.2s ease;
            box-shadow: 0 2px 8px var(--shadow-color);
            width: 200px;
            margin: 8px auto;
            display: block;
            font-family: 'Poppins', sans-serif;
        }

        .settings-button:hover {
            transform: translateY(-1px);
            box-shadow: 0 3px 10px var(--shadow-color);
        }

        /* Nuevo estilo para el botón de ayuda */
        .help-button {
            background: linear-gradient(45deg, #4a90e2, #357abd);
            color: var(--text-color);
            padding: 6px 12px;
            border: none;
            border-radius: var(--border-radius);
            cursor: pointer;
            font-size: 0.8rem;
            font-weight: 600;
            transition: all 0.2s ease;
            box-shadow: 0 2px 8px var(--shadow-color);
            width: 160px;
            margin: 5px auto;
            display: block;
            font-family: 'Poppins', sans-serif;
            text-decoration: none;
            text-align: center;
        }

        .help-button:hover {
            transform: translateY(-1px);
            box-shadow: 0 3px 10px var(--shadow-color);
        }

        #printerStatus {
            display: none;
            width: 100%;
            max-width: 400px;
            margin: 8px auto 0 auto;
            padding: 8px 10px;
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            background: rgba(0, 0, 0, 0.18);
            font-family: 'Poppins', sans-serif;
            font-size: 0.85rem;
            font-weight: 600;
            text-align: center;
            letter-spacing: 0.01em;
        }

        .printer-name-display {
            color: var(--primary-color);
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            justify-content: flex-end;
            max-width: 55%;
            padding: 6px 10px;
            border-radius: 999px;
            border: 1px solid rgba(0, 200, 151, 0.45);
            background: rgba(0, 200, 151, 0.12);
            letter-spacing: 0.01em;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        @media (max-width: 480px) {
            body {
                padding: 8px;
            }

            h1 {
                font-size: 1.2rem;
            }

            .container {
                padding: 10px;
                margin: 4px;
            }

            .preview-area {
                padding: 8px;
            }

            #textInput {
                font-size: 1.3rem;
                height: 32px;
            }

            :root {
                --input-height: 35px;
                --file-input-height: 30px;
            }

            .logo-controls {
                flex-direction: column;
                gap: 6px;
            }

            .font-controls {
                flex-direction: row;
                gap: 6px;
                flex-wrap: nowrap;
                justify-content: center;
            }

            .font-controls>div {
                min-width: 80px;
                flex: 0 1 auto;
            }

            .font-size-buttons {
                flex-direction: column;
                min-width: 70px;
                align-items: center;
                gap: 4px;
            }

            .font-size-buttons label {
                margin-right: 0;
                margin-bottom: 2px;
            }

            .font-size-buttons .button-group {
                justify-content: center;
                width: 100%;
            }

            .font-size-buttons button {
                width: 40px;
                height: 40px;
                font-size: 1.2rem;
            }

            .mode-button {
                width: 55px;
                height: 28px;
                font-size: 0.75rem;
            }

            .toggle-button {
                width: 85px;
                height: 28px;
                font-size: 0.75rem;
            }

            .format-type-select {
                width: 75px;
                height: 28px;
                font-size: 0.7rem;
                background-size: 12px;
            }

            .format-controls {
                gap: 4px;
                max-width: 100%;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                justify-content: flex-start;
            }

            #formatPanel {
                max-width: 100%;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                min-width: 0;
                gap: 4px;
            }

            #formatPanel label {
                font-size: 0.75rem;
                margin: 0;
                white-space: nowrap;
                flex: 0 0 auto;
            }

            .format-controls select {
                min-width: 92px;
                max-width: 110px;
                height: 28px;
                font-size: 0.75rem;
                padding: 0 4px;
                text-overflow: ellipsis;
                overflow: hidden;
                white-space: nowrap;
            }

            .new-patent-input {
                max-width: 180px;
            }

            .controls-container {
                flex-direction: column;
                gap: 8px;
                padding: 8px;
            }

            .control-group {
                width: 100%;
                max-width: 250px;
            }

            .help-button {
                width: 140px;
                font-size: 0.75rem;
            }

            .privacy-link {
                width: 140px;
            }
        }

        @media (max-width: 768px) {
            .container {
                padding: 12px;
                margin: 8px;
            }

            h1 {
                font-size: 1.4rem;
            }

            .logo-controls {
                flex-direction: column;
                gap: 8px;
                max-width: 100%;
            }

            .font-controls {
                flex-direction: row;
                gap: 8px;
                flex-wrap: nowrap;
                max-width: 100%;
            }

            .input-group {
                max-width: 100%;
            }

            .new-patent-input {
                max-width: 200px;
            }

            #textInput {
                font-size: 1.3rem;
                height: 36px;
            }
        }

        @media screen and (-webkit-min-device-pixel-ratio: 0) {
            #textInput {
                font-size: 14px !important;
            }

            #textInput:focus {
                font-size: 1.35rem !important;
            }
        }

        .controls-container {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin: 8px auto;
            background: var(--preview-bg);
            padding: 8px;
            border-radius: 14px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            max-width: 400px;
            align-items: center;
        }

        .control-group {
            width: 100%;
            max-width: 250px;
            text-align: center;
            padding: 0 12px;
            box-sizing: border-box;
        }

        .control-group label {
            font-size: 0.85rem;
            margin-bottom: 4px;
            color: var(--text-color);
            font-weight: 600;
        }

        label {
            font-weight: 600;
            color: var(--text-color);
            font-size: 0.9rem;
            font-family: 'Poppins', sans-serif;
        }

        input,
        select {
            width: 100%;
            height: var(--input-height);
            padding: 6px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: var(--border-radius);
            font-size: 0.9rem;
            transition: all 0.2s ease;
            background: var(--input-bg);
            color: var(--text-color);
            font-family: 'Poppins', sans-serif;
        }

        select:not(.format-type-select) {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            background: var(--input-bg) url('data:image/svg+xml;utf8,<svg fill="%23ffffff" height="16" viewBox="0 0 24 24" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 6px center;
            background-size: 14px;
        }

        select:not(.format-type-select):focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 1px rgba(0, 200, 151, 0.3);
            outline: none;
            background: var(--input-bg) url('data:image/svg+xml;utf8,<svg fill="%23ffffff" height="16" viewBox="0 0 24 24" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 6px center;
        }

        select:not(.format-type-select) option {
            background: var(--container-bg);
            color: var(--text-color);
        }

        input[type="range"] {
            height: 5px;
            accent-color: var(--accent-color);
            -webkit-appearance: none;
            appearance: none;
            width: calc(100% - 12px);
            margin: 0 6px;
            background: rgba(255, 255, 255, 0.18);
            border-radius: 999px;
            vertical-align: middle;
        }

        input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 16px;
            height: 16px;
            background: var(--accent-color);
            border-radius: 50%;
            border: 2px solid rgba(0, 0, 0, 0.18);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.22);
        }

        input[type="range"]::-moz-range-thumb {
            width: 16px;
            height: 16px;
            background: var(--accent-color);
            border-radius: 50%;
            border: 2px solid rgba(0, 0, 0, 0.18);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.22);
        }

        input:focus,
        select:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 1px rgba(0, 200, 151, 0.3);
            outline: none;
        }

        .file-input-wrapper {
            margin-bottom: 6px;
        }

        input[type="file"] {
            height: var(--file-input-height);
            padding: 4px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: var(--border-radius);
            font-size: 0.85rem;
            background: var(--input-bg);
            color: var(--text-color);
            font-family: 'Poppins', sans-serif;
        }

        input[type="file"]::-webkit-file-upload-button,
        input[type="file"]::file-selector-button {
            height: 100%;
            background: var(--primary-color);
            color: var(--text-color);
            border: none;
            padding: 4px 10px;
            border-radius: 5px;
            font-weight: 600;
            font-size: 0.85rem;
            transition: background 0.2s ease;
            font-family: 'Poppins', sans-serif;
        }

        input[type="file"]::-webkit-file-upload-button:hover,
        input[type="file"]::file-selector-button:hover {
            background: var(--accent-color);
        }

        button {
            background: var(--primary-color);
            color: var(--text-color);
            padding: 10px 16px;
            border: none;
            border-radius: 12px;
            cursor: pointer;
            font-size: 1rem;
            font-weight: 600;
            transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease, opacity 0.15s ease;
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.22);
            width: 200px;
            margin: 8px auto;
            display: block;
            font-family: 'Poppins', sans-serif;
        }

        #printButton {
            background: linear-gradient(45deg, var(--print-button-color), var(--print-button-accent));
        }

        button.history-button {
            background: linear-gradient(45deg, var(--history-button-color), var(--history-button-accent));
        }

        button.danger-button {
            background: linear-gradient(45deg, #dc3545, #bd2130);
            font-size: 0.8rem;
            width: 90px;
            margin: 0;
        }

        button:hover {
            transform: translateY(-1px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.26);
        }

        button:active {
            transform: translateY(0px);
            box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
        }

        button:focus-visible,
        input:focus-visible,
        select:focus-visible,

        .header-logo {
            display: block;
            margin: 0 auto 12px auto;
            max-width: 150px;
            height: auto;
        }

        .header-logo-link {
            display: block;
            width: fit-content;
            margin: 0 auto;
            text-decoration: none;
            border-radius: 12px;
        }

        #patentHistoryWindow,
        #settingsWindow,
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1000;
        }

        #patentHistoryWindow,
        #settingsWindow,
        .modal-content {
            background: var(--container-bg);
            border-radius: var(--border-radius);
            box-shadow: 0 8px 20px var(--shadow-color);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        #patentHistoryWindow,
        #settingsWindow {
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 90%;
            max-width: 320px;
            height: auto;
            max-height: 80vh;
            padding: 20px;
            overflow-y: auto;
        }

        #settingsWindow {
            background: var(--secondary-color);
        }

        #patentHistoryWindow {
            background: var(--secondary-color);
        }

        .modal-overlay {
            background: rgba(0, 0, 0, 0.7);
            align-items: center;
            justify-content: center;
        }

        .modal-content {
            padding: 20px;
            text-align: center;
            width: 90%;
            max-width: 300px;
        }

        /* Nuevo Modal de Guardar Impresora */
        .small-text {
            font-size: 0.8rem;
            color: #ccc;
            margin-top: 5px;
        }

        .modal-content h2 {
            margin-top: 0;
            margin-bottom: 15px;
        }

        .modal-content input[type="number"] {
            width: 100%;
            text-align: center;
            font-size: 1.8rem;
            color: var(--text-color);
            background-color: var(--input-bg);
            height: 56px;
            padding: 10px 12px;
        }

        .copies-stepper {
            display: grid;
            grid-template-columns: 56px 1fr 56px;
            gap: 10px;
            align-items: center;
        }

        .copies-stepper button {
            width: 56px;
            height: 56px;
            margin: 0;
            padding: 0;
            font-size: 1.6rem;
            line-height: 1;
            border-radius: 14px;
        }

        #copiesInput {
            margin: 0;
            width: 100%;
        }

        #copiesInput::-webkit-outer-spin-button,
        #copiesInput::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        #copiesInput {
            appearance: textfield;
            -moz-appearance: textfield;
        }

        .modal-buttons {
            display: flex;
            gap: 10px;
            margin-top: 20px;
        }

        .modal-buttons button {
            flex: 1;
            margin: 0;
        }

        #patentHistoryWindow::-webkit-scrollbar,
        #settingsWindow::-webkit-scrollbar {
            width: 8px;
        }

        #patentHistoryWindow::-webkit-scrollbar-thumb,
        #settingsWindow::-webkit-scrollbar-thumb {
            background: var(--primary-color);
            border-radius: 4px;
        }

        #patentHistoryWindow::-webkit-scrollbar-track,
        #settingsWindow::-webkit-scrollbar-track {
            background: var(--input-bg);
        }

        #patentHistoryWindow h2,
        #settingsWindow h2,
        .modal-content h2 {
            font-size: 1.2rem;
            margin-bottom: 15px;
            text-align: center;
            color: var(--text-color);
        }

        #patentList {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        #patentList li {
            padding: 8px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.9rem;
            color: var(--text-color);
        }

        #patentList li:last-child {
            border-bottom: none;
        }

        .close-button {
            background: var(--accent-color);
            padding: 8px 16px;
            margin-top: 15px;
            width: 100px;
            font-size: 0.9rem;
        }

        .settings-option {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: center;
            padding: 12px 5px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            font-size: 0.9rem;
            color: var(--text-color);
        }

        #advancedOptionsContainer {
            border-top: 1px solid var(--accent-color);
            margin-top: 10px;
            padding-top: 10px;
        }

        .settings-option:last-of-type {
            border-bottom: none;
        }

        .settings-option label {
            margin-bottom: 8px;
            flex-basis: 100%;
        }

        .settings-option button {
            width: 90px;
            height: 30px;
            font-size: 0.8rem;
            margin: 0;
        }

        .settings-option .slider-container {
            display: flex;
            align-items: center;
            width: 100%;
            gap: 10px;
        }

        .settings-option input[type="range"] {
            flex: 1;
        }

        .store-link {
            display: block;
            text-align: center;
            margin-top: 15px;
            color: #007bff;
            text-decoration: none;
            font-size: 1.1rem;
            font-weight: 600;
            transition: color 0.2s ease;
        }

        .store-link:hover {
            color: var(--accent-color);
        }

        .width-buttons {
            display: flex;
            gap: 10px;
            width: 100%;
        }

        .width-button {
            flex: 1;
            border: 1px solid var(--primary-color);
            background: transparent;
        }

        .width-button.active {
            background: rgba(0, 200, 151, 0.18);
            border: 1px solid rgba(0, 200, 151, 0.9);
            color: var(--primary-color);
            box-shadow: none;
        }

        .privacy-link {
            display: block;
            width: 160px;
            margin: 10px auto 6px auto;
            text-align: center;
            font-family: 'Poppins', sans-serif;
            font-size: 0.72rem;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.85);
            text-decoration: underline;
            opacity: 0.9;
        }

        .privacy-link:hover {
            opacity: 1;
        }

        .supplies-link {
            display: block;
            width: 160px;
            margin: 6px auto 0 auto;
            text-align: center;
            font-family: 'Poppins', sans-serif;
            font-size: 0.75rem;
            font-weight: 700;
            color: rgba(255, 255, 255, 0.92);
            text-decoration: none;
            opacity: 0.95;
        }

        .supplies-link:hover {
            opacity: 1;
            text-decoration: underline;
        }

        .history-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            position: sticky;
            top: 0;
            background: var(--secondary-color);
            padding-bottom: 10px;
            margin-bottom: 10px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        }

        .history-header-text h2 {
            margin: 0;
        }

        .history-count {
            font-size: 0.85rem;
            opacity: 0.85;
            margin-top: 3px;
        }

        .history-actions {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .history-share-all {
            width: auto;
            margin: 0;
            padding: 8px 12px;
            font-size: 0.85rem;
            background: linear-gradient(45deg, var(--history-button-color), var(--history-button-accent));
        }

        .history-share-menu {
            position: relative;
            display: inline-flex;
            align-items: center;
        }

        .history-share-dropdown {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            display: none;
            min-width: 170px;
            background: var(--container-bg);
            border: 1px solid rgba(255, 255, 255, 0.14);
            border-radius: 12px;
            box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
            padding: 8px;
            z-index: 2000;
        }

        .history-share-dropdown {
            display: none;
            flex-direction: column;
            gap: 8px;
        }

        .history-share-dropdown .history-share-option {
            width: 100%;
            margin: 0;
            padding: 10px 12px;
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.14);
            color: rgba(255, 255, 255, 0.98);
            font-size: 0.9rem;
            font-weight: 700;
            letter-spacing: 0.01em;
            box-shadow: none;
            transform: none;
            transition: filter 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
        }

        .history-share-dropdown .history-share-option:hover {
            filter: brightness(1.07);
            box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
        }

        .history-share-dropdown .history-share-option:active {
            transform: translateY(1px);
            filter: brightness(0.98);
        }

        .history-share-dropdown .history-share-day {
            background: linear-gradient(45deg, #00c897, #2dd4bf);
        }

        .history-share-dropdown .history-share-week {
            background: linear-gradient(45deg, #3a7bd5, #5b8def);
        }

        .history-share-dropdown .history-share-month {
            background: linear-gradient(45deg, #f48c06, #ffb703);
        }

        .history-close-x {
            width: 36px;
            height: 36px;
            margin: 0;
            padding: 0;
            font-size: 1.4rem;
            line-height: 1;
            background: rgba(255, 255, 255, 0.12);
            color: #ff4d4f;
        }

        .history-close-x:hover {
            background: rgba(255, 77, 79, 0.18);
        }

        .history-list {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .history-card {
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 10px;
            padding: 12px;
            background: rgba(255, 255, 255, 0.06);
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .history-card:active {
            transform: scale(0.99);
        }

        .history-card-main {
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-width: 0;
        }

        .history-plate {
            font-family: 'Montserrat', sans-serif;
            font-weight: 700;
            font-size: 1.1rem;
            letter-spacing: 1px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .history-meta {
            font-size: 0.8rem;
            opacity: 0.85;
        }

        .history-card-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        .history-copy {
            width: auto;
            margin: 0;
            padding: 8px 10px;
            font-size: 0.85rem;
            background: rgba(255, 255, 255, 0.12);
        }

        .history-empty {
            padding: 20px 10px;
            text-align: center;
        }

        .history-empty-title {
            font-size: 1.05rem;
            font-weight: 700;
            margin-bottom: 6px;
        }

        .history-empty-subtitle {
            font-size: 0.9rem;
            opacity: 0.85;
            margin-bottom: 14px;
        }

        .settings-header {
            position: sticky;
            top: 0;
            z-index: 2;
            background: var(--secondary-color);
            padding-bottom: 10px;
            margin-bottom: 10px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        }

        .settings-header-top {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .settings-header h2 {
            margin: 0;
            text-align: left;
        }

        .settings-substatus {
            margin-top: 4px;
            font-size: 0.85rem;
            opacity: 0.85;
            text-align: left;
        }

        .settings-actions {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .settings-reset-all {
            width: auto;
            margin: 0;
            padding: 8px 12px;
            font-size: 0.85rem;
            background: rgba(255, 255, 255, 0.12);
        }

        .settings-close-x {
            width: 36px;
            height: 36px;
            margin: 0;
            padding: 0;
            font-size: 1.4rem;
            line-height: 1;
            background: rgba(255, 255, 255, 0.12);
            color: #ff4d4f;
        }

        .settings-close-x:hover {
            background: rgba(255, 77, 79, 0.18);
        }

        .settings-section {
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            padding: 10px;
            margin-bottom: 12px;
            background: rgba(255, 255, 255, 0.04);
        }

        .settings-section-title {
            font-weight: 700;
            font-size: 0.9rem;
            opacity: 0.95;
            margin-bottom: 6px;
        }

        .settings-option.compact {
            padding: 10px 0;
        }

        .settings-status-pill {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 999px;
            font-size: 0.8rem;
            background: rgba(255, 255, 255, 0.12);
        }

        #settingsToast {
            position: sticky;
            bottom: 0;
            margin-top: 10px;
            display: none;
            text-align: center;
            padding: 10px;
            border-radius: 10px;
            background: rgba(0, 0, 0, 0.25);
            border: 1px solid rgba(255, 255, 255, 0.12);
            font-weight: 600;
        }

        .footer-links {
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            justify-content: center;
            gap: 3px;
            width: 100%;
            max-width: 520px;
            margin: 10px auto 0 auto;
            padding: 0 2px;
        }

        .footer-link-button {
            display: block;
            width: auto;
            flex: 1 1 0;
            min-width: 0;
            padding: 6px 5px;
            border-radius: 12px;
            font-family: 'Poppins', sans-serif;
            font-size: 0.68rem;
            font-weight: 700;
            text-align: center;
            text-decoration: none;
            letter-spacing: 0.01em;
            border: 1px solid rgba(0, 200, 151, 0.45);
            background: rgba(0, 200, 151, 0.14);
            color: rgba(255, 255, 255, 0.95);
            box-shadow: 0 2px 8px var(--shadow-color);
            transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, opacity 0.15s ease;
            white-space: nowrap;
        }

        .footer-link-button:hover {
            transform: translateY(-1px);
            box-shadow: 0 3px 10px var(--shadow-color);
            background: rgba(0, 200, 151, 0.18);
        }

        .footer-link-button.help {
            flex: 0.85 1 0;
            padding: 6px 4px;
            background: rgba(0, 200, 151, 0.14);
            border: 1px solid rgba(0, 200, 151, 0.45);
            color: rgba(255, 255, 255, 0.95);
        }

        .footer-link-button.supplies {
            flex: 0.95 1 0;
            padding: 6px 4px;
            background: rgba(0, 200, 151, 0.14);
            border: 1px solid rgba(0, 200, 151, 0.45);
            color: rgba(255, 255, 255, 0.95);
        }

        .footer-link-button.privacy {
            flex: 1.3 1 0;
            background: rgba(0, 200, 151, 0.14);
            border: 1px solid rgba(0, 200, 151, 0.45);
            color: rgba(255, 255, 255, 0.95);
        }

        #splash-screen {
            position: fixed;
            inset: 0;
            z-index: 99999;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #1d2d44;
            transition: opacity 260ms ease;
        }

        #splash-screen.hidden {
            opacity: 0;
            pointer-events: none;
        }

        #splash-screen img {
            width: min(520px, 86vw);
            height: auto;
            max-height: 86vh;
            object-fit: contain;
        }