/* ArchiveForum Cyber Lab — theme layer only. CyberChef core UI and editors stay intact. */
:root, :root.classic, :root.dark {
  color-scheme: dark;
  --primary-font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --primary-font-colour: #dce8f6;
  --primary-font-size: 14px;
  --primary-line-height: 1.45;
  --fixed-width-font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --fixed-width-font-colour: #e5f5ff;
  --subtext-font-colour: #8ba2bb;
  --primary-background-colour: #091625;
  --secondary-background-colour: #0d1e31;
  --primary-border-colour: #29425d;
  --secondary-border-colour: #1c334b;
  --title-colour: #eff7ff;
  --title-background-colour: #122941;
  --banner-font-colour: #d9e8f7;
  --banner-bg-colour: #09172a;
  --banner-url-colour: #72e6dd;
  --category-list-font-colour: #b3cce4;
  --op-list-operation-font-colour: #cceaf5;
  --op-list-operation-bg-colour: #102b42;
  --op-list-operation-border-colour: #244b66;
  --rec-list-operation-font-colour: #d2fff5;
  --rec-list-operation-bg-colour: #103b3a;
  --rec-list-operation-border-colour: #1d6863;
  --selected-operation-font-color: #fff0c7;
  --selected-operation-bg-colour: #4b3a1b;
  --selected-operation-border-colour: #80642e;
  --breakpoint-font-colour: #ffd6d6;
  --breakpoint-bg-colour: #51222c;
  --breakpoint-border-colour: #85414b;
  --disabled-font-colour: #71839a;
  --disabled-bg-colour: #17283d;
  --disabled-border-colour: #2a3b50;
  --fc-operation-font-colour: #d3fff7;
  --fc-operation-bg-colour: #123f3b;
  --fc-operation-border-colour: #246b62;
  --fc-breakpoint-operation-font-colour: #ffe0e3;
  --fc-breakpoint-operation-bg-colour: #51242d;
  --fc-breakpoint-operation-border-colour: #87414b;
  --arg-font-colour: #dce8f6;
  --arg-background: #0c1a2c;
  --arg-border-colour: #2a4360;
  --arg-disabled-background: #17283d;
  --arg-label-colour: #72e3dc;
  --btn-default-font-colour: #dce8f6;
  --btn-default-bg-colour: #152a43;
  --btn-default-border-colour: #34506f;
  --btn-default-hover-font-colour: #fff;
  --btn-default-hover-bg-colour: #1b3856;
  --btn-default-hover-border-colour: #4c7394;
  --btn-success-font-colour: #041c23;
  --btn-success-bg-colour: #62e3d2;
  --btn-success-border-colour: #62e3d2;
  --btn-success-hover-font-colour: #041c23;
  --btn-success-hover-bg-colour: #8af4e7;
  --btn-success-hover-border-colour: #8af4e7;
  --scrollbar-track: #091625;
  --scrollbar-thumb: #2b4968;
  --scrollbar-hover: #477394;
  --drop-file-border-colour: #5be1d5;
  --table-border-colour: #2b4561;
  --popover-background: #10233a;
  --popover-border-colour: #35516f;
  --code-background: #142941;
  --code-font-colour: #a4f1e8;
  --input-highlight-colour: #5be1d5;
  --input-border-colour: #46627f;
}

html, body { width: 100%; height: 100%; margin: 0; background: #071222; color: #dce8f6; }
body {
  min-width: 320px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-image: radial-gradient(ellipse at 50% -20%, rgba(29,104,132,.22), transparent 58%),
                    linear-gradient(rgba(59,105,145,.035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(59,105,145,.035) 1px, transparent 1px);
  background-size: auto, 34px 34px, 34px 34px;
}
#content-wrapper { background: transparent; }

/* Top brand bar: keeps the original CyberChef content flow and IDs. */
#banner.af-banner {
  position: absolute;
  z-index: 20;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
  width: 100%;
  height: 76px;
  margin: 0;
  padding: 9px 20px;
  line-height: 1.2;
  border: 0;
  border-bottom: 1px solid rgba(105,160,198,.22);
  color: #e7f3ff;
  background: linear-gradient(105deg, rgba(7,19,35,.99), rgba(12,31,52,.98) 50%, rgba(7,19,35,.99));
  box-shadow: 0 8px 28px rgba(0,0,0,.24), 0 1px 0 rgba(92,226,215,.12);
}
#banner.af-banner::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(87,222,216,.72), rgba(80,146,221,.55), transparent);
}
.af-brand { min-width: 218px; display: inline-flex; align-items: center; gap: 11px; color: #f2f8ff !important; text-decoration: none !important; }
.af-brand:hover { color: #fff !important; text-decoration: none !important; }
.af-logo-frame {
  width: 49px; height: 49px; flex: 0 0 49px; display: grid; place-items: center; overflow: hidden;
  border: 1px solid rgba(111,218,221,.45); border-radius: 14px;
  background: linear-gradient(145deg, rgba(39,91,119,.55), rgba(10,28,48,.92));
  box-shadow: 0 0 20px rgba(48,197,195,.13), inset 0 1px rgba(255,255,255,.08);
}
.af-logo-frame img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.af-brand-copy { display: flex; flex-direction: column; gap: 4px; white-space: nowrap; }
.af-brand-copy strong { font-size: 14px; font-weight: 850; letter-spacing: .12em; line-height: 1; }
.af-brand-copy small { color: #829db8; font-size: 8px; font-weight: 750; letter-spacing: .15em; }
.af-product { flex: 1 1 auto; min-width: 190px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.af-product-kicker { display: flex; align-items: center; gap: 7px; color: #6fded8; font-size: 8px; font-weight: 800; letter-spacing: .19em; }
.af-live-dot { width: 6px; height: 6px; border-radius: 50%; background: #64e6ca; box-shadow: 0 0 10px rgba(100,230,202,.9); }
.af-product-name { color: #f4f8ff; font-size: 20px; line-height: 1.15; font-weight: 780; letter-spacing: -.035em; }
.af-version { display: inline-block; margin-left: 4px; padding: 3px 7px; vertical-align: 3px; border: 1px solid rgba(89,218,211,.28); border-radius: 6px; color: #8fe8df; background: rgba(50,157,157,.12); font-size: 9px; font-weight: 700; letter-spacing: .04em; }
.af-product-subtitle { color: #91a9c2; font-size: 9px; letter-spacing: .07em; }
.af-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 260px; }
.af-actions a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 35px; padding: 0 10px; border: 1px solid transparent; border-radius: 9px; color: #c4d7e9 !important; font-size: 11px; font-weight: 650; text-decoration: none !important; transition: .16s ease; white-space: nowrap; }
.af-actions a:hover { color: #fff !important; border-color: rgba(103,223,217,.28); background: rgba(63,142,162,.14); }
.af-actions a:focus-visible { outline: 2px solid #62e3d2; outline-offset: 2px; }
.af-actions a i { margin: 0 !important; padding: 0 !important; color: #79dcd8; font-size: 16px; }
.af-actions .af-forum-link { border-color: rgba(100,169,211,.25); background: rgba(45,93,129,.18); }
.af-local-status { display: inline-flex; align-items: center; gap: 5px; margin-right: 3px; color: #8da9c2; font-size: 9px; white-space: nowrap; }
.af-local-status i { color: #62d9c9; font-size: 14px; }
#notice-wrapper, #notice { display: none !important; }

/* Main workbench. Do not clip or overlay CyberChef's three Split.js panes. */
#workspace-wrapper {
  position: absolute;
  top: 88px;
  left: 12px;
  bottom: 12px;
  width: calc(100% - 24px);
  box-sizing: border-box;
  overflow: auto;
  border: 1px solid #263e59;
  border-radius: 13px;
  background: #091625;
  box-shadow: 0 16px 44px rgba(0,0,0,.29), 0 0 0 1px rgba(93,191,204,.035);
  scrollbar-gutter: stable;
}
#operations, #recipe, #input, #output { background: rgba(9,23,40,.99); color: #dce8f6; }
#operations, #recipe { border-right-color: #203953; }
#input { border-bottom-color: #203953; }
.gutter { background-color: #0b1a2c !important; }
.gutter.gutter-horizontal { background-image: none !important; border-left: 1px solid #1b3049; border-right: 1px solid #1b3049; width: 6px !important; }
.gutter.gutter-vertical { background-image: none !important; border-top: 1px solid #1b3049; border-bottom: 1px solid #1b3049; height: 6px !important; }
.gutter:hover { background-color: #173a51 !important; }

.title { position: relative; padding-left: 14px; border-bottom: 1px solid #243b56; color: #edf6ff; background: linear-gradient(100deg,#142b45,#10223a 70%,#12263f); letter-spacing: .015em; }
.title::before { content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(#63e0d2,#4a9ce2); box-shadow: 0 0 10px rgba(86,216,212,.32); }
.title label { color: inherit; }
.pane-controls .btn { margin-left: 3px; }
#search { margin: 8px 8px 7px; width: calc(100% - 16px); min-height: 37px; padding-left: 34px; border: 1px solid #2a4563 !important; border-radius: 8px; color: #e0edf9 !important; background-color: #0d2035 !important; background-image: none !important; box-shadow: inset 0 1px 3px rgba(0,0,0,.22); }
#search::placeholder { color: #758da8; }
#search:focus { border-color: #54cfc8 !important; box-shadow: 0 0 0 3px rgba(84,207,200,.12) !important; }
.category-title { padding: 9px 11px; border-bottom: 1px solid #203750; color: #aec8e0 !important; background: linear-gradient(90deg,#10243a,#0d1d31) !important; font-size: 11px; letter-spacing: .025em; }
#categories a { color: #9cc4e7 !important; }
#categories a:hover { color: #7ce6de !important; }
.op-list .operation { margin: 4px 7px; padding: 7px 9px; border: 1px solid #244761 !important; border-radius: 8px; color: #bfeaf4 !important; background: linear-gradient(105deg,#102b43,#102337) !important; box-shadow: 0 2px 7px rgba(0,0,0,.12); transition: border-color .15s ease,background .15s ease; }
.op-list .operation:hover { border-color: #50bfc2 !important; background: #153750 !important; }
#rec-list { padding: 9px; }
#rec-list .operation { margin: 0 0 8px; border: 1px solid #24645f !important; border-radius: 9px; color: #d1fff4 !important; background: linear-gradient(110deg,#123e3b,#102e35) !important; box-shadow: 0 5px 14px rgba(0,0,0,.14); }

/* Keep CodeMirror/CodeMirror 6 interactive; no pointer-events or selection overrides. */
#input, #output { color: #dce8f6; }
#input-text, #output-text { color: #dce8f6; background: #091625; }
.cm-editor { color: #dce8f6 !important; background: #091625 !important; }
.cm-editor .cm-content { caret-color: #65e5d9; }
.cm-editor .cm-gutters { color: #718aa5 !important; background: #0c1b2d !important; border-right: 1px solid #203953 !important; }
.cm-editor .cm-activeLineGutter, .cm-editor .cm-activeLine { background: rgba(72,151,169,.12) !important; }
.cm-editor .cm-cursor, .cm-editor .cm-dropCursor { border-left-color: #70e6db !important; }
.cm-editor .cm-selectionBackground, .cm-editor ::selection { background: rgba(57,162,184,.32) !important; }
#input-tabs-wrapper, #output-tabs-wrapper { background: #0e2035; border-color: #253e59; }
#input-tabs li, #output-tabs li { border-color: #253e59; }
#input-tabs li:hover, #output-tabs li:hover { background: #16324b !important; }

#controls { border-top: 1px solid #29435f; background: linear-gradient(100deg,#11243a,#0e2034); }
#auto-bake-label { color: #bdd0e3 !important; }
.btn, .btn.btn-primary, .btn.btn-secondary { border-radius: 8px; transition: .16s ease; }
.btn.btn-primary, .btn-primary { color: #d9f7fa !important; border-color: #2d6474 !important; background: linear-gradient(180deg,#174156,#123247) !important; box-shadow: 0 3px 9px rgba(0,0,0,.16); }
.btn.btn-primary:hover, .btn-primary:hover { border-color: #5bd9d1 !important; background: linear-gradient(180deg,#20566a,#17445a) !important; }
.btn.btn-secondary, .btn-secondary { color: #d5e4f2 !important; border-color: #34506b !important; background: #172b43 !important; }
.btn.btn-secondary:hover, .btn-secondary:hover { background: #203c59 !important; }
.btn.btn-success, .btn-success, #bake { color: #052029 !important; border: 1px solid #72eee0 !important; background: linear-gradient(135deg,#78eddf,#49c9ce) !important; box-shadow: 0 5px 18px rgba(63,211,201,.2) !important; font-weight: 800; }
.btn.btn-success:hover, .btn-success:hover, #bake:hover { background: linear-gradient(135deg,#a0f8ee,#69e0e0) !important; }
#edit-favourites { border: 1px solid #526b83; border-radius: 10px; color: #e5f1fb; background: #19334c; }

.form-control, input.form-control, textarea.form-control, select.form-control { color: #dce8f6 !important; border-color: #2b4561 !important; border-radius: 8px; background-color: #0d2035 !important; }
.form-control::placeholder { color: #7890aa; }
.form-control:focus { border-color: #58d9d0 !important; box-shadow: 0 0 0 3px rgba(88,217,208,.12) !important; }
.modal-content, .dropdown-menu, .popover { color: #dce8f6; border: 1px solid #2d4967; border-radius: 12px; background: #102239; box-shadow: 0 18px 55px rgba(0,0,0,.42); }
.modal-header, .modal-footer { border-color: #2a435e; }
.modal-title, .modal-content h5, .modal-content h6 { color: #f0f7ff; }
.dropdown-item { color: #c7d9e9; }
.dropdown-item:hover, .dropdown-item:focus { color: #fff; background: #1b3b55; }
.tooltip-inner { color: #eaf5ff; background: #17324c; }
* { scrollbar-color: #2b4968 #091625; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: #091625; }
*::-webkit-scrollbar-thumb { border: 2px solid #091625; border-radius: 20px; background: #2b4968; }

@media (max-width: 1100px) {
  .af-brand { min-width: 185px; }
  .af-actions { min-width: 235px; gap: 3px; }
  .af-local-status { display: none; }
}
@media (max-width: 760px) {
  #banner.af-banner { height: 88px; padding: 7px 10px; gap: 5px 8px; flex-wrap: wrap; align-content: center; }
  .af-brand { min-width: 0; flex: 1 1 42%; gap: 7px; }
  .af-logo-frame { width: 39px; height: 39px; flex-basis: 39px; border-radius: 11px; }
  .af-brand-copy strong { font-size: 11px; }
  .af-brand-copy small { font-size: 7px; letter-spacing: .08em; }
  .af-product { order: 3; flex: 1 1 100%; min-width: 0; flex-direction: row; justify-content: center; gap: 6px; }
  .af-product-kicker, .af-product-subtitle { display: none; }
  .af-product-name { font-size: 15px; }
  .af-actions { min-width: 0; flex: 0 1 auto; gap: 2px; }
  .af-actions a { min-height: 31px; padding: 0 7px; font-size: 10px; }
  .af-actions a i { font-size: 15px; }
  #workspace-wrapper { top: 98px; left: 6px; bottom: 6px; width: calc(100% - 12px); border-radius: 10px; }
}
@media (max-width: 430px) {
  #banner.af-banner { padding-left: 7px; padding-right: 7px; }
  .af-brand-copy small { display: none; }
  .af-actions a span { display: none; }
  .af-actions a { width: 32px; padding: 0; }
  .af-actions .af-forum-link { display: none; }
  .af-product { justify-content: flex-start; padding-left: 4px; }
  #workspace-wrapper { top: 96px; }
}


/* AF FLEX COLUMN LAYOUT FIX START */

/* Main workspace: always keep three panes on one horizontal row */
#workspace-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    overflow: auto !important;
}

/* Operations - left */
#workspace-wrapper > #operations {
    width: 20%;
    min-width: 180px;
    height: 100% !important;
    flex: 0 0 auto !important;
    float: none !important;
}

/* Recipe - center */
#workspace-wrapper > #recipe {
    width: 30%;
    min-width: 230px;
    height: 100% !important;
    flex: 0 0 auto !important;
    float: none !important;
}

/* Input / Output - right column */
#workspace-wrapper > #IO {
    width: 50%;
    min-width: 340px;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 0 0 auto !important;
    float: none !important;
    overflow: hidden !important;
}

/* Horizontal resize handles */
#workspace-wrapper > .gutter-horizontal {
    width: 4px !important;
    height: 100% !important;
    flex: 0 0 4px !important;
    float: none !important;
}

/* Input - upper right */
#workspace-wrapper > #IO > #input {
    width: 100% !important;
    height: calc(50% - 2px);
    min-height: 100px;
    flex: 0 0 auto !important;
    float: none !important;
}

/* Output - lower right */
#workspace-wrapper > #IO > #output {
    width: 100% !important;
    height: calc(50% - 2px);
    min-height: 100px;
    flex: 0 0 auto !important;
    float: none !important;
}

/* Vertical resize handle */
#workspace-wrapper > #IO > .gutter-vertical {
    height: 4px !important;
    min-height: 4px !important;
    width: 100% !important;
    flex: 0 0 4px !important;
    float: none !important;
}

.gutter-horizontal,
.gutter-vertical {
    background-color: #173a51 !important;
    background-image: none !important;
}

/* AF FLEX COLUMN LAYOUT FIX END */

