:root { font-family: Arial, Helvetica, sans-serif; color: #0e1d39; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 97% 0%, #ffead6a8, transparent 43%), radial-gradient(ellipse at 0% 100%, #ffe8d4a6, transparent 44%), #f8f6f3; font-size: 12px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .48; }
button:focus-visible, a:focus-visible { outline: 2px solid #ff8a16; outline-offset: 3px; }
[hidden] { display: none !important; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
select:disabled { cursor: not-allowed; opacity: 1; color: #52647d; appearance: none; background: #e9edf2; }
.paste-dialog { width: min(480px, calc(100% - 32px)); }
.paste-dialog .paste-content { height: 130px; margin-top: 6px; }
.paste-dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 16px; }
.paste-dialog-actions button { padding: 0 16px; }
.icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.topbar { height: 44px; background: linear-gradient(110deg, #152b47, #0d203b); color: #f5f7fc; }
.nav-inner { max-width: 1148px; margin: auto; height: 100%; display: flex; align-items: center; gap: 26px; }
.brand { display: flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; }
.brand svg { width: 30px; height: 29px; fill: none; stroke: #ff8500; stroke-width: 2.5; }
.brand span { font-size: 21px; font-weight: 800; letter-spacing: 4px; }
.nav-divider { height: 23px; width: 1px; background: #c6ceda; margin-left: -2px; }
.utility-label { display: flex; align-items: center; gap: 13px; font-size: 13px; }
.code-mark { font-family: monospace; font-size: 20px; }
.help-button { display: flex; align-items: center; gap: 10px; margin-left: auto; background: none; border: 0; color: inherit; font-size: 13px; padding: 6px 0; }
.tool-container { max-width: 1148px; margin: 0 auto; padding-bottom: 13px; }
.page-heading { height: 75px; display: flex; align-items: center; justify-content: space-between; padding: 0 3px; }
h1 { font-size: 25px; letter-spacing: -.7px; margin: 0 0 2px; line-height: 1.2; font-weight: 750; }
.page-heading p { font-size: 15px; color: #3b536f; margin: 0; }
.aes-badge { color: #b93600; border: 1px solid #ed5c21; border-radius: 8px; padding: 5px 13px; font-size: 14px; font-weight: bold; box-shadow: inset 0 0 0 2px #fff; background: #fff7ed; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.crypto-card { border: 1px solid white; border-radius: 16px; padding: 4px; background: linear-gradient(135deg, #fff, #f9fafc); box-shadow: 0 5px 10px #182b4126, 0 0 0 1px #edeef2; min-width: 0; }
.panel-heading { display: flex; align-items: center; gap: 19px; border-radius: 10px; background: linear-gradient(110deg, #fff5e9, #fff1e8b3); padding: 7px 15px; height: 57px; }
.decrypt .panel-heading { background: linear-gradient(110deg, #edf2f7, #e4ebf4); }
.panel-icon { width: 51px; height: 43px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(#fff0d8, #ffd7b3); color: #c34a00; box-shadow: inset 0 1px 2px #e3b88955; }
.panel-icon .icon { width: 31px; height: 31px; stroke-width: 1.9; }
.decrypt .panel-icon { color: #0d2340; background: linear-gradient(#e9eff5, #c4cfdd); box-shadow: inset 0 1px 2px #a7b8ce66; }
h2 { font-size: 21px; letter-spacing: -.5px; margin: 0 0 3px; line-height: 1.1; }
.panel-heading p { font-size: 12.5px; color: #104365; margin: 0; }
.reset-button { display: flex; align-items: center; gap: 7px; border: 0; background: none; margin-left: auto; font-weight: 600; padding: 5px; color: #143352; }
.panel-body { padding: 10px 20px 17px; }
.section-label { display: flex; align-items: center; gap: 10px; height: 18px; margin-bottom: 5px; }
.section-label span { color: #bd3f00; background: #ffecd0; font-weight: bold; border-radius: 5px; padding: 2px 6px; font-size: 11px; }
.section-label strong { font-size: 10px; letter-spacing: .6px; color: #3b4d65; }
.section-label::after { content: ''; height: 1px; background: #bfc9d6; flex: 1; }
.label-row { display: flex; align-items: center; justify-content: space-between; min-height: 20px; margin-bottom: 3px; gap: 6px; }
label { font-weight: 700; font-size: 12px; display: block; }
input, textarea, select { color: #13233c; width: 100%; border: 1px solid #b8c6da; border-radius: 5px; background: linear-gradient(120deg, #f8f9fa, #eef1f5); box-shadow: inset 0 1px 2px #233e5c08; padding: 4px 11px; outline: none; }
input, select { height: 26px; }
input:focus, textarea:focus, select:focus { border-color: #698cad; box-shadow: 0 0 0 2px #7599c022; }
textarea { display: block; height: 51px; min-height: 51px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #52647d; opacity: 1; }
.field-meta { color: #405572; font-size: 11px; line-height: 14px; }
.character-count { margin-top: 3px; }
.configuration-label { margin-top: 10px; margin-bottom: 6px; }
.mode-row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.mode-row label { margin-bottom: 4px; }
.key-label { margin-top: 9px; }
.key-label label { display: flex; align-items: center; gap: 10px; }
.encoding-badge, .optional-badge { background: #e1e6ec; border-radius: 10px; padding: 2px 10px; font-size: 10px; font-weight: normal; line-height: 1.2; }
.encoding-badge { color: #143456; font-weight: 600; padding: 2px 9px; }
.key-input-wrap { position: relative; }
.key-input-wrap input { padding-right: 38px; }
.toggle-key { position: absolute; right: 4px; top: 0; height: 26px; width: 28px; border: 0; background: none; display: grid; place-items: center; }
.key-meta { display: flex; justify-content: space-between; margin-top: 3px; }
.iv-label { margin-top: 9px; }
.optional-badge { margin-left: 9px; display: inline-block; }
.iv-size { font-size: 11px; color: #213c5c; white-space: nowrap; }
.compatibility-note { display: flex; align-items: center; gap: 8px; background: linear-gradient(100deg, #fff2d1, #ffebc0); border: 1px solid #ffdda1; border-radius: 6px; color: #ac3400; height: 27px; padding: 4px 9px; margin: 8px 0; font-size: 11px; }
.action-row { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); gap: 14px; }
.primary-action, .clear-button { display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 6px; height: 32px; }
.primary-action { border: 0; background: linear-gradient(#ff941d, #f36b00); color: white; font-weight: 700; font-size: 14px; box-shadow: 0 4px 8px #a4582429; }
.decrypt .primary-action { background: linear-gradient(#203e5b, #0a1b32); }
.primary-action:hover { filter: brightness(1.06); }
.clear-button { border: 1px solid #b6c4d8; background: linear-gradient(#fff, #f0f3f7); font-weight: 600; padding: 0 14px; }
.result-label { margin-top: 18px; margin-bottom: 7px; }
.result-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 5px; min-height: 21px; }
h3 { margin: 0; font-size: 13px; letter-spacing: -.2px; }
.result-status { border-radius: 10px; background: #e4e7eb; font-size: 10px; white-space: nowrap; padding: 2px 9px; display: flex; align-items: center; gap: 5px; }
.result-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #798592; }
.result-status.ready::before { background: #228554; }
.result-actions { display: flex; gap: 10px; margin-left: auto; }
.mini-button { height: 20px; border: 1px solid #b6c4d8; border-radius: 5px; background: linear-gradient(#fff, #f3f5f8); display: flex; align-items: center; justify-content: center; gap: 5px; padding: 1px 10px; font-size: 10px; white-space: nowrap; }
.mini-button .icon { width: 13px; height: 13px; }
.result-actions .mini-button { height: 22px; padding: 2px 8px; }
.result-actions button:disabled { background: #e8ebef; border-color: #d4dbe4; }
.output-box { border: 1px solid #b8c6da; background: linear-gradient(120deg, #f6f8fa, #eef1f5); border-radius: 5px; min-height: 53px; padding: 12px 19px; display: flex; align-items: center; }
.result-placeholder { display: flex; align-items: center; gap: 12px; color: #536783; font-size: 12px; }
.result-placeholder .icon { color: #9aabc1; width: 25px; height: 25px; }
.result-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 180px; overflow: auto; font-size: 12px; width: 100%; }
.copy-status:empty { display: none; }
.copy-status { color: #405572; margin: 6px 0 0; font-size: 11px; }
.error-message { color: #b42318; margin: 8px 0 0; }
dialog { border: 1px solid #b8c6da; border-radius: 14px; max-width: 480px; padding: 25px; color: #13233c; line-height: 1.6; }
dialog::backdrop { background: #0d203b88; }
@media (min-width: 1000px) { .crypto-card { min-height: 621px; } }
@media (max-width: 1190px) { .nav-inner, .tool-container { margin-left: 24px; margin-right: 24px; } .panel-heading { gap: 12px; } .panel-body { padding-left: 15px; padding-right: 15px; } .result-heading { flex-wrap: wrap; gap: 6px; } }
@media (max-width: 850px) { .tool-grid { grid-template-columns: 1fr; } .tool-container { max-width: 620px; margin: auto; padding: 0 16px 20px; } .nav-inner { margin: 0 16px; gap: 15px; } .page-heading { height: 90px; } h1 { font-size: 22px; } .page-heading p { font-size: 13px; } .panel-body { padding: 14px 20px 18px; } }
@media (max-width: 440px) { .utility-label { font-size: 10px; gap: 6px; } .brand span { font-size: 17px; letter-spacing: 2px; } .nav-inner { gap: 10px; } .code-mark { font-size: 15px; } .help-button { font-size: 11px; gap: 4px; } .panel-heading { gap: 10px; padding: 7px 9px; } .panel-heading p { font-size: 10px; } h2 { font-size: 19px; } .panel-icon { width: 38px; } .panel-body { padding: 12px; } .mode-row { gap: 14px; } .optional-badge { margin-left: 3px; padding: 2px 5px; } .iv-size { font-size: 10px; } .aes-badge { padding: 5px 8px; } h1 { font-size: 20px; } }
/* Align the desktop vertical rhythm with the supplied reference. */
@media (min-width: 1000px) {
    .panel-body { padding-top: 9px; }
    .configuration-label { margin-top: 8px; }
    .key-label, .iv-label { margin-top: 8px; }
    .result-label { margin-top: 14px; }
    .result-heading { margin-bottom: 4px; }
}

/* Tabbed workspace: configuration on the left, output on the right. */
body { font-size: 14px; }
.topbar { height: 45px; }
.nav-inner { max-width: 1244px; }
.tool-container { max-width: 1268px; padding-bottom: 27px; }
.page-heading { height: 78px; padding: 0 11px; }
h1 { font-size: 28px; }
.page-heading p { font-size: 16px; }
.utility-label { font-size: 14px; }
.operation-tabs { display: flex; width: 442px; max-width: calc(100% - 22px); height: 42px; margin: 0 0px 15px; border: 1px solid #aabbd0; border-radius: 9px; background: linear-gradient(#fff, #eef1f6); }
.operation-tabs button { display: flex; align-items: center; justify-content: center; gap: 12px; flex: 1; border: 0; border-radius: 8px; background: none; font-size: 16px; font-weight: 700; color: #18304e; }
.operation-tabs .icon { width: 26px; height: 26px; }
.operation-tabs [aria-selected="true"] { color: white; background: linear-gradient(#ff8a00, #fa6400); box-shadow: 0 5px 10px #f7780020; margin: -1px; }
.operation-panel { display: grid; grid-template-columns: minmax(0, 1.09fr) minmax(0, 1fr); gap: 14px; }
.crypto-card { min-height: 0; border-radius: 14px; padding: 4px 6px; }
.panel-heading { height: 57px; padding: 7px 18px; gap: 20px; }
.panel-heading p { font-size: 14px; }
h2 { font-size: 22px; }
.panel-body { padding: 11px 19px 13px; }
.section-label { margin-bottom: 5px; }
.section-label strong { font-size: 12px; }
.section-label span { font-size: 12px; }
label { font-size: 14px; }
.label-row { min-height: 20px; margin-bottom: 4px; }
input, select { height: 29px; padding: 4px 14px; }
textarea { height: 52px; min-height: 52px; padding: 4px 12px; }
.field-meta { font-size: 12px; line-height: 15px; }
.character-count { margin-top: 4px; }
.configuration-label { margin-top: 11px; margin-bottom: 6px; }
.mode-row { gap: 36px; }
.key-label { margin-top: 10px; }
.key-meta { margin-top: 2px; }
.iv-label { margin-top: 10px; }
.iv-size { font-size: 12px; }
.toggle-key { height: 29px; }
.optional-badge, .encoding-badge { font-size: 11px; }
.compatibility-note { height: 32px; font-size: 13px; margin: 9px 0 14px; }
.primary-action, .clear-button { height: 38px; font-size: 16px; }
.primary-action .icon { width: 22px; height: 22px; }
.action-row { grid-template-columns: minmax(0,2.6fr) minmax(0,1fr); gap: 16px; }
.input-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.input-actions .mini-button { height: 21px; font-size: 11px; }
.result { min-width: 0; border-radius: 14px; padding: 15px 14px 18px; background: linear-gradient(135deg, #fff, #fafbfd); border: 1px solid #e5e6e8; box-shadow: 0 3px 5px #182b4126; display: flex; flex-direction: column; }
.result-heading { min-height: 28px; margin-bottom: 17px; gap: 14px; flex-wrap: wrap; }
h3 { font-size: 19px; letter-spacing: -.5px; }
.result-status { font-size: 11px; padding: 3px 10px; }
.result-actions { gap: 10px; }
.result-actions .mini-button { font-size: 12px; height: 28px; padding: 3px 10px; }
.result-actions .icon { width: 16px; height: 16px; }
.output-box { flex: 1; min-height: 360px; background: linear-gradient(120deg, #12253e, #13253c); border-radius: 10px; border-color: #c8d0da; color: #f1f5fa; padding: 24px; align-items: stretch; }
.result-placeholder { flex: 1; justify-content: center; flex-direction: column; font-size: 16px; color: #f1f5fa; gap: 15px; text-align: center; }
.result-placeholder .icon { width: 53px; height: 53px; color: #839db9; }
.result-text { max-height: 450px; font: 14px/1.6 Consolas, monospace; user-select: text; }
.output-format { display: flex; align-items: center; gap: 10px; border-radius: 8px; padding: 10px 12px; margin-top: 14px; background: #e8edf3; color: #304763; font-size: 14px; }
.output-format strong { color: #0e1d39; }
.copy-status { font-size: 12px; }
@media (max-width: 1300px) { .nav-inner { margin: 0 32px; } .tool-container { margin: 0 24px; } .result-heading { gap: 8px; } h3 { font-size: 17px; } .result-actions { gap: 6px; } }
@media (max-width: 1050px) { .result-actions { width: 100%; margin-left: 0; } .panel-heading { gap: 12px; } .panel-heading p { font-size: 12px; } }
@media (max-width: 850px) { .operation-panel { grid-template-columns: 1fr; } .tool-container { max-width: 660px; margin: auto; padding: 0 16px 24px; } .page-heading { height: 100px; padding: 0; } .operation-tabs { margin-left: 0; max-width: 100%; } .result-actions { width: auto; margin-left: auto; } .output-box { min-height: 280px; } .nav-inner { margin: 0 16px; gap: 14px; } h1 { font-size: 24px; } .page-heading p { font-size: 14px; } }
@media (max-width: 480px) { .utility-label { font-size: 11px; } .brand span { font-size: 17px; } .nav-divider { display: none; } .nav-inner { gap: 12px; } .panel-body { padding: 12px 10px; } .panel-heading { padding: 7px 10px; gap: 10px; } h2 { font-size: 20px; } .panel-heading p { font-size: 10px; } .reset-button { font-size: 12px; } .mode-row { gap: 16px; } label { font-size: 12px; } .compatibility-note { font-size: 11px; } .iv-size { font-size: 10px; } .result-actions { width: 100%; margin-left: 0; } .primary-action, .clear-button { font-size: 14px; } }
@media (min-width: 851px) {
    .panel-body { padding-bottom: 10px; }
    .compatibility-note { margin-bottom: 10px; }
}
