:root{--theme-primary: #6366f1;--theme-primaryHover: #4f46e5;--theme-secondary: #6b7280;--theme-secondaryHover: #4b5563;--theme-background: #1a1a1a;--theme-surface: #1f2937;--theme-surfaceHover: #374151;--theme-text: #f9fafb;--theme-textSecondary: #d1d5db;--theme-border: #374151;--theme-borderFocus: #6366f1;--theme-success: #10b981;--theme-successHover: #059669;--theme-danger: #ef4444;--theme-dangerHover: #dc2626;--theme-warning: #f59e0b;--theme-warningHover: #d97706;--theme-input: #2b2b2b;--theme-inputFocus: #4b4b4b;--theme-zeroValue: #7d7d7d}body{font-family:Inter,sans-serif;background-color:var(--theme-background);color:var(--theme-text)}.theme-toggle-btn{display:flex;align-items:center;gap:.5rem;padding:.5rem 1rem;background-color:var(--theme-surface);color:var(--theme-text);border:1px solid var(--theme-border);border-radius:.5rem;cursor:pointer;transition:all .2s ease;font-size:.875rem;font-weight:500}.theme-toggle-btn:hover{background-color:var(--theme-surfaceHover);border-color:var(--theme-primary);transform:translateY(-1px);box-shadow:0 4px 12px #00000026}.theme-icon{font-size:1rem}.theme-text{font-size:.875rem}.app-toolbar{position:relative}.toolbar-actions .jump-to-index-input:focus{outline:none;border-color:var(--theme-borderFocus);box-shadow:0 0 0 2px var(--theme-borderFocus)}.jump-to-index-btn:hover,.file-open-btn:hover,.file-save-btn:hover{filter:brightness(1.1)}.file-save-btn:hover{background-color:var(--theme-successHover)!important}.file-open-btn:hover{background-color:var(--theme-secondaryHover)!important}.keyboard-shortcuts-details summary::-webkit-details-marker,.keyboard-shortcuts-details summary::marker{display:none}.keyboard-shortcuts-details .details-marker{transition:transform .2s ease}.keyboard-shortcuts-details[open] .details-marker{transform:rotate(-180deg)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.tab-content{display:none}.tab-content.active{display:block}.tab-button{padding:.5rem 1rem;border-radius:.5rem;cursor:pointer;transition:all .2s ease;font-size:.875rem;font-weight:500;border:2px solid transparent;position:relative}.tab-button:hover{background-color:var(--theme-surfaceHover);border-color:var(--theme-primary);transform:translateY(-1px);box-shadow:0 4px 12px #00000026}.tab-button.active{border-color:var(--theme-primary);box-shadow:0 0 0 2px var(--theme-primary);background-color:var(--theme-primary);color:#fff!important}.tab-button.active:hover{background-color:var(--theme-primaryHover);border-color:var(--theme-primaryHover)}.input-cell{font-family:Courier New,Courier,monospace;text-align:center;background-color:var(--theme-input);border:1px solid var(--theme-border);border-radius:4px;color:var(--theme-text);height:32px;transition:all .2s ease;outline:none}.input-cell:focus,.input-cell.highlight{background-color:var(--theme-inputFocus);border-color:var(--theme-borderFocus);box-shadow:0 0 0 2px var(--theme-borderFocus)}.input-cell.all-selected{background-color:var(--theme-primary);color:#fff;border-color:var(--theme-primary)}.context-menu{position:fixed;background-color:var(--theme-surface);border:1px solid var(--theme-border);border-radius:.5rem;box-shadow:0 10px 25px #0003;z-index:1000;min-width:150px;padding:.5rem 0;display:block}.context-menu-item{padding:.5rem 1rem;color:var(--theme-text);cursor:pointer;transition:background-color .2s ease;display:flex;align-items:center;gap:.5rem}.context-menu-item:hover{background-color:var(--theme-surfaceHover)}.context-menu-item.disabled{color:var(--theme-textSecondary);cursor:not-allowed}.context-menu-item.disabled:hover{background-color:transparent}.context-menu-separator{height:1px;background-color:var(--theme-border);margin:.25rem 0}.input-cell.ascii-cell{width:24px;min-width:24px;max-width:24px}.input-cell.hex-cell{width:32px;min-width:32px;max-width:32px}.input-cell.decimal-cell{width:40px;min-width:40px;max-width:40px}.input-cell.binary-cell{width:90px;min-width:90px;max-width:90px}.grid-container{display:grid;gap:4px;width:100%;max-width:1200px;margin:0 auto}.grid-container.hex-grid{grid-template-columns:repeat(auto-fit,minmax(32px,max-content))}.grid-container.ascii-grid{grid-template-columns:repeat(auto-fit,minmax(24px,max-content))}.grid-container.decimal-grid{grid-template-columns:repeat(auto-fit,minmax(40px,max-content))}.grid-container.binary-grid{grid-template-columns:repeat(auto-fit,minmax(90px,max-content))}.theme-light{--theme-background: #ffffff;--theme-surface: #f9fafb;--theme-surfaceHover: #f3f4f6;--theme-text: #111827;--theme-textSecondary: #6b7280;--theme-border: #e5e7eb;--theme-input: #ffffff;--theme-inputFocus: #f0f9ff}.theme-dark{--theme-background: #1a1a1a;--theme-surface: #1f2937;--theme-surfaceHover: #374151;--theme-text: #f9fafb;--theme-textSecondary: #d1d5db;--theme-border: #374151;--theme-input: #2b2b2b;--theme-inputFocus: #4b4b4b}.theme-light .tab-button:not(.active){background-color:#f8fafc!important;color:#475569!important;border-color:#e2e8f0!important}.theme-light .tab-button:not(.active):hover{background-color:#f1f5f9!important;color:#334155!important;border-color:#cbd5e1!important}.theme-dark .tab-button:not(.active){background-color:#111827!important;color:#6b7280!important;border-color:#374151!important}.theme-dark .tab-button:not(.active):hover{background-color:#1f2937!important;color:#9ca3af!important;border-color:#4b5563!important}.control-char{background-color:#fef3c7;color:#92400e;padding:1px 3px;border-radius:3px;font-size:.75em;font-weight:600;font-family:Courier New,monospace;border:1px solid #f59e0b}.theme-dark .control-char{background-color:#451a03;color:#fbbf24;border-color:#f59e0b}.extended-char{background-color:#dbeafe;color:#1e40af;padding:1px 3px;border-radius:3px;font-size:.8em;font-weight:500;font-family:Courier New,monospace;border:1px solid #3b82f6}.theme-dark .extended-char{background-color:#1e3a8a;color:#93c5fd;border-color:#3b82f6}.null-char{background-color:#f3f4f6;color:#6b7280;padding:1px 3px;border-radius:3px;font-size:.75em;font-weight:600;font-family:Courier New,monospace;border:1px solid #9ca3af}.theme-dark .null-char{background-color:#374151;color:#9ca3af;border-color:#6b7280}.ascii-input{font-family:Courier New,monospace;font-weight:500}.char-tooltip{position:relative;cursor:help}.char-tooltip:after{content:attr(data-tooltip);position:absolute;bottom:125%;left:50%;transform:translate(-50%);background-color:#1f2937;color:#fff;padding:4px 8px;border-radius:4px;font-size:.75rem;white-space:nowrap;opacity:0;visibility:hidden;transition:opacity .2s,visibility .2s;z-index:1000}.char-tooltip:hover:after{opacity:1;visibility:visible}#four-in-one-ascii,#four-in-one-hex,#four-in-one-decimal,#four-in-one-binary{resize:both;min-height:15rem;min-width:100%;max-width:100%;border-radius:1rem}#four-in-one-ascii::-webkit-resizer,#four-in-one-hex::-webkit-resizer,#four-in-one-decimal::-webkit-resizer,#four-in-one-binary::-webkit-resizer{background:var(--theme-border);border-radius:0 0 .25rem;border:1px solid var(--theme-border)}#four-in-one-ascii,#four-in-one-hex,#four-in-one-decimal,#four-in-one-binary{scrollbar-width:thin;scrollbar-color:var(--theme-border) transparent}@media (max-width: 768px){#four-in-one-ascii,#four-in-one-hex,#four-in-one-decimal,#four-in-one-binary{min-height:6rem}}#ascii-table-body tr{transition:background-color .2s ease}#ascii-table-body tr:hover{background-color:var(--theme-surfaceHover)!important}#ascii-table-body td{transition:all .2s ease;font-weight:600;font-size:.95rem}#ascii-table-body td.decimal-cell{color:var(--theme-text);font-weight:700;font-size:1rem;background-color:#3b82f633!important}.theme-dark #ascii-table-body td.decimal-cell{background-color:#3b82f640!important}table thead th{font-weight:700;font-size:.9rem;letter-spacing:.5px}table thead th.dec-header{background-color:#ffffff26!important}.overflow-auto::-webkit-scrollbar{width:8px;height:8px}.overflow-auto::-webkit-scrollbar-track{background:var(--theme-surface);border-radius:4px}.overflow-auto::-webkit-scrollbar-thumb{background:var(--theme-border);border-radius:4px}.overflow-auto::-webkit-scrollbar-thumb:hover{background:var(--theme-primary)}.overflow-auto{scrollbar-width:thin;scrollbar-color:var(--theme-border) var(--theme-surface)}@media (max-width: 768px){.grid-container{max-width:100%;gap:2px}.input-cell.ascii-cell{width:20px;min-width:20px;max-width:20px;font-size:.75rem}.input-cell.hex-cell{width:28px;min-width:28px;max-width:28px;font-size:.75rem}.input-cell.decimal-cell{width:36px;min-width:36px;max-width:36px;font-size:.75rem}.input-cell.binary-cell{width:80px;min-width:80px;max-width:80px;font-size:.7rem}}@media (max-width: 480px){.grid-container{gap:1px}.input-cell.ascii-cell{width:18px;min-width:18px;max-width:18px;font-size:.7rem}.input-cell.hex-cell{width:24px;min-width:24px;max-width:24px;font-size:.7rem}.input-cell.decimal-cell{width:32px;min-width:32px;max-width:32px;font-size:.7rem}.input-cell.binary-cell{width:70px;min-width:70px;max-width:70px;font-size:.65rem}}.input-cell.cr-character{background-color:#ffc10733!important;border:2px solid #ffc107!important;color:#ff8f00!important;font-weight:700!important}.input-cell.lf-character{background-color:#4caf5033!important;border:2px solid #4caf50!important;color:#2e7d32!important;font-weight:700!important}.input-cell.crlf-character{background-color:#9c27b033!important;border:2px solid #9c27b0!important;color:#6a1b9a!important;font-weight:700!important}.hex-cell.cr-character{background-color:#ffc1074d!important;border:2px solid #ffc107!important;color:#ff8f00!important;font-weight:700!important}.hex-cell.lf-character{background-color:#4caf504d!important;border:2px solid #4caf50!important;color:#2e7d32!important;font-weight:700!important}.table-cell.cr-character{background-color:#ffc10733!important;border-color:#ffc107!important;color:#ff8f00!important}.table-cell.lf-character{background-color:#4caf5033!important;border-color:#4caf50!important;color:#2e7d32!important}.position-indicator{font-family:Courier New,monospace;font-size:.875rem;font-weight:600;color:var(--theme-textSecondary);background-color:var(--theme-surface);padding:.25rem .5rem;border-radius:.25rem;border:1px solid var(--theme-border);white-space:nowrap}#ptp-modal{animation:fadeIn .2s ease-out}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}#ptp-upload-area{transition:all .2s ease;cursor:pointer}#ptp-upload-area:hover{border-color:var(--theme-primary)!important;background-color:var(--theme-surfaceHover)!important}.ptp-block-card{transition:all .2s ease}.ptp-block-card:hover{box-shadow:0 4px 12px #0000001a;transform:translateY(-2px)}.ptp-edit-btn,.ptp-add-btn{transition:all .2s ease;cursor:pointer}.ptp-edit-btn:hover{background-color:var(--theme-primaryHover)!important;transform:translateY(-1px);box-shadow:0 2px 8px #0003}.ptp-add-btn:hover{background-color:var(--theme-successHover)!important;transform:translateY(-1px);box-shadow:0 2px 8px #0003}.ptp-block-card:hover{background-color:var(--theme-surfaceHover)!important;transform:translateY(-1px);box-shadow:0 2px 8px #0000001a}.ptp-block-card.selected{border-color:var(--theme-primary)!important;background-color:var(--theme-surfaceHover)!important}#ptp-textareas-container textarea{resize:both;min-height:16rem;min-width:100%;max-width:100%;font-family:Courier New,monospace}#ptp-blocks-list{scrollbar-width:thin;scrollbar-color:var(--theme-border) var(--theme-surface)}#ptp-blocks-list::-webkit-scrollbar{width:8px}#ptp-blocks-list::-webkit-scrollbar-track{background:var(--theme-surface);border-radius:4px}#ptp-blocks-list::-webkit-scrollbar-thumb{background:var(--theme-border);border-radius:4px}#ptp-blocks-list::-webkit-scrollbar-thumb:hover{background:var(--theme-primary)}@media (max-width: 1024px){#ptp-main-content,#ptp-textareas-container{grid-template-columns:1fr!important}}@media (max-width: 768px){.app-toolbar{flex-direction:column;align-items:stretch}.toolbar-actions{flex-wrap:wrap;justify-content:flex-start}.jump-to-index-input{min-width:4rem}}.settings-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:2000;display:flex;align-items:center;justify-content:center;padding:1rem;opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s ease}.settings-modal.is-open{opacity:1;visibility:visible}.settings-modal-overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:#00000080;cursor:pointer}.settings-modal-box{position:relative;width:100%;max-width:24rem;border-radius:.75rem;box-shadow:0 25px 50px -12px #00000040}.settings-modal-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.25rem;border-bottom:1px solid var(--theme-border)}.settings-modal-title{margin:0;font-size:1.25rem;font-weight:600}.settings-modal-close{background:none;border:none;font-size:1.5rem;line-height:1;cursor:pointer;padding:.25rem;border-radius:.25rem;transition:background-color .2s}.settings-modal-close:hover{background-color:var(--theme-surfaceHover)}.settings-modal-body{padding:1.25rem}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem 0}.settings-row:not(:last-child){border-bottom:1px solid var(--theme-border)}.settings-label{font-size:.875rem;flex:1}.settings-switch{position:relative;display:inline-block;width:2.75rem;height:1.5rem;flex-shrink:0}.settings-switch-input{opacity:0;width:0;height:0}.settings-switch-slider{position:absolute;cursor:pointer;top:0;right:0;bottom:0;left:0;background-color:var(--theme-border);border-radius:1.5rem;transition:background-color .2s ease,box-shadow .2s ease}.settings-switch-slider:before{content:"";position:absolute;height:1.25rem;width:1.25rem;left:.125rem;bottom:.125rem;background-color:#fff;border-radius:50%;transition:transform .2s ease;box-shadow:0 1px 3px #0003}.settings-switch-input:checked+.settings-switch-slider{background-color:var(--theme-primary)}.settings-switch-input:checked+.settings-switch-slider:before{transform:translate(1.25rem)}.settings-switch-input:focus-visible+.settings-switch-slider{outline:2px solid var(--theme-primary);outline-offset:2px}.settings-switch-input:active+.settings-switch-slider:before{width:1.5rem}.settings-btn:hover{background-color:var(--theme-surfaceHover)!important}.settings-btn:active{transform:scale(.98)}
