﻿
:root{
  --bg:#0b0b0b;
  --panel:#121212;
  --panel-soft:#161616;
  --border:#2a2a2a;

  --accent:#3b82f6;
  --accent-rgb:59,130,246;
  --accent-soft:rgba(var(--accent-rgb),.18);

  --text:#f2f2f2;
  --text-sub:#9a9a9a;
}

body.theme-idle{
  --accent:#f0a500;
  --accent-rgb:240,165,0;
  --accent-soft:rgba(var(--accent-rgb),.18);
}
body.theme-vr{
  --accent:#8b5cf6;
  --accent-rgb:139,92,246;
  --accent-soft:rgba(var(--accent-rgb),.18);
}
body.theme-slashco{
  --accent:#e54848;
  --accent-rgb:229,72,72;
  --accent-soft:rgba(var(--accent-rgb),.18);
}
body.theme-ton{
  --accent:#22d3ee;
  --accent-rgb:34,211,238;
  --accent-soft:rgba(var(--accent-rgb),.18);
}




*{
  scrollbar-width: thin;                 
  scrollbar-color: rgba(255,255,255,.22) transparent;
}

::-webkit-scrollbar{
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track{
  background: transparent;
}
::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.18);
  border: 2px solid transparent;
  background-clip: content-box;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover{
  background: rgba(255,255,255,.28);
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-corner{
  background: transparent;
}


textarea{
  scrollbar-gutter: stable both-edges;
}

*{margin:0;padding:0;box-sizing:border-box}
body{
  --radius: 8px;
  --border: 4px;
  --height: 48px;
  --speed: 0.25s;
  min-height:100vh;
  background-color:#191a1a;
  color:var(--text);
  font-family:"SF Pro Text","SF Pro Icons","AOS Icons","Helvetica Neue",Helvetica,Arial,sans-serif,system-ui;
  display:grid;
  place-items:center;
  align-content:center;
  padding:20px;
}

.page{ display:none; width:100%; }
.page.active{ display:block; }

.page-switch{ margin-bottom:18px; }

.container{
  width:100%;
  max-width:720px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:22px;
  box-shadow:0 30px 80px rgba(0,0,0,.85);
  padding:26px 22px;
  transition:border-color .5s cubic-bezier(0.23, 1, 0.320, 1), box-shadow .5s cubic-bezier(0.23, 1, 0.320, 1);
}
.container:hover{
  border-color:var(--accent);
  box-shadow:0 30px 80px rgba(0,0,0,.85), 0 0 0 1px rgba(var(--accent-rgb),.85), 0 0 20px rgba(var(--accent-rgb),.28);
}

.header{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  margin-bottom:18px;
}
.header h1{
  font-size:20px;
  font-weight:800;
  color:var(--accent);
  line-height:1.2;
}
.header .sub{
  font-size:12px;
  color:var(--text-sub);
  line-height:1.5;
  text-align:right;
  max-width:340px;
}

.page-nav{
  display:flex;
  gap:6px;
  background:var(--panel-soft);
  padding:6px;
  border-radius:14px;
  margin-bottom:18px;
}
.page-link{
  flex:1;
  text-decoration:none;
  border:1px solid transparent;
  background:transparent;
  color:var(--text-sub);
  font-size:13px;
  font-weight:800;
  padding:10px 0;
  border-radius:10px;
  text-align:center;
  transition:all .2s ease;
}
.page-link.active{
  background:var(--accent-soft);
  color:var(--accent);
}
.page-link:hover{ border-color:rgba(var(--accent-rgb),.55); }

.tabs{
  height: var(--height);
  width: 100%;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: hsl(0 0% 0%);
  border-radius: var(--radius);
  position: relative;
  border: var(--border) solid hsl(0 0% 0%);
  margin-bottom: 18px;
}
.tabs{
  --ease: linear(
    0,
    0.1641 3.52%,
    0.311 7.18%,
    0.4413 10.99%,
    0.5553 14.96%,
    0.6539 19.12%,
    0.738 23.5%,
    0.8086 28.15%,
    0.8662 33.12%,
    0.9078 37.92%,
    0.9405 43.12%,
    0.965 48.84%,
    0.9821 55.28%,
    0.992 61.97%,
    0.9976 70.09%,
    1
  );
}
.tabs > .input,
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0, 0, 0, 0);
  white-space:nowrap;
  border-width:0;
}
.tabs:has(:checked:nth-of-type(1)){ --active:0; }
.tabs:has(:checked:nth-of-type(2)){ --active:1; }
.tabs:has(:checked:nth-of-type(3)){ --active:2; }
.tabs:has(:checked:nth-of-type(4)){ --active:3; }
.tabs :checked + .label{ --highlight:1; }
.tabs:has(.input:nth-of-type(2)){ --count:2; }
.tabs:has(.input:nth-of-type(3)){ --count:3; }
.tabs:has(.input:nth-of-type(4)){ --count:4; }
.tabs .label{
  position:relative;
  z-index:1;
  padding:0 clamp(10px, 10px + 10px, 20px);
  cursor:pointer;
  text-align:center;
  height:100%;
  display:grid;
  border-radius:calc(var(--radius) - var(--border));
  place-items:center;
  color:#fff;
  transition:background, color;
  transition-duration:0.25s;
  transition-timing-function:var(--ease, ease);
}
.input:not(:checked) + .label:hover{
  --highlight:0.35;
  background:hsl(0 0% 20%);
}
.tabs::after{
  pointer-events:none;
  content:"";
  width:calc(100% / var(--count));
  height:100%;
  background:var(--accent);
  position:absolute;
  z-index:0;
  border-radius:calc(var(--radius) - var(--border));
  mix-blend-mode:normal;
  translate:calc(var(--active, 0) * 100%) 0;
  transition:translate, outline-color;
  transition-duration:var(--speed);
  transition-timing-function:var(--ease, ease);
  outline:2px solid transparent;
}
.tabs:has(:focus-visible)::after{ outline-color:red; }

.tab-container{
  display:flex;
  gap:6px;
  background:var(--panel-soft);
  padding:6px;
  border-radius:14px;
  margin-bottom:18px;
}
.tab-btn{
  flex:1;
  border:none;
  background:transparent;
  color:var(--text-sub);
  font-size:14px;
  font-weight:800;
  padding:10px 0;
  border-radius:10px;
  cursor:pointer;
  transition:all .2s ease;
}
.tab-btn.active{
  background:var(--accent-soft);
  color:var(--accent);
}

.lang-toggle{
  display:flex;
  gap:4px;
  background:var(--panel-soft);
  border:1px solid var(--border);
  border-radius:999px;
  padding:4px;
}
.lang-toggle button{
  border:none;
  background:transparent;
  color:var(--text-sub);
  font-size:12px;
  padding:6px 12px;
  border-radius:999px;
  cursor:pointer;
  font-weight:800;
  transition:all .2s ease;
}
.lang-toggle button.active{
  background:var(--accent-soft);
  color:var(--accent);
}

.content-section{display:none}
.content-section.active{display:block}

.hidden{display:none !important}

.input-label{
  font-size:12px;
  color:var(--text-sub);
  margin-bottom:6px;
  font-weight:700;
}

input, textarea{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--panel-soft);
  color:var(--text);
  font-size:14px;
  font-family:Consolas, ui-monospace, SFMono-Regular, Menlo, Monaco, "Liberation Mono", "Courier New", monospace;
  margin-bottom:14px;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
input[type=number]{appearance:textfield;-moz-appearance:textfield}
textarea{min-height:110px; resize:vertical;}
input:focus, textarea:focus{
  outline:none;
  border-color:var(--accent);
  box-shadow:0 0 0 2px rgba(var(--accent-rgb),.35);
}

.kv{
  background:var(--panel-soft);
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px;
  margin-bottom:14px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
}
.kv .k{font-size:12px;color:var(--text-sub);font-weight:700}
.kv .v{
  font-size:12px;
  color:var(--text);
  font-family:Consolas,monospace;
  opacity:.95;
  word-break:break-all;
}

.result-box{
  background:var(--panel-soft);
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px;
  margin-bottom:14px;
}
.result-label{
  font-size:12px;
  color:var(--text-sub);
  margin-bottom:8px;
  font-weight:700;
}
.result-row{
  display:flex;
  align-items:center;
  gap:10px;
}
.result-value{
  flex:1;
  padding:8px 10px;
  border-radius:10px;
  background:rgba(var(--accent-rgb),.10);
  color:var(--accent);
  font-family:Consolas,monospace;
  font-weight:800;
  word-break:break-all;
  min-height:38px;
  display:flex;
  align-items:center;
  overflow-wrap:break-word;
  white-space:normal;
}

.hint{
  font-size:12px;
  color:var(--text-sub);
  line-height:1.55;
}
.hint code{color:var(--text);}
.small{ font-size:12px; color:var(--text-sub); line-height:1.55; }

.btn{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--panel-soft);
  color:var(--text);
  font-size:14px;
  font-weight:900;
  cursor:pointer;
  transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
  margin-bottom:14px;
}
.btn:hover{
  border-color:rgba(var(--accent-rgb),.55);
  box-shadow:0 0 0 2px rgba(var(--accent-rgb),.10);
}
.btn:active{ transform:scale(.99); }
.theme-idle .page[data-page="idle"] .btn{
  background:rgba(var(--accent-rgb),.18);
  border-color:rgba(var(--accent-rgb),.70);
  color:var(--accent);
}
.theme-idle .page[data-page="idle"] .btn:hover{
  background:rgba(var(--accent-rgb),.26);
  box-shadow:0 0 0 2px rgba(var(--accent-rgb),.18);
}
.status-box{ white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-word; }
.row{ display:flex; gap:12px; flex-wrap:wrap; }
.col{ flex:1 1 240px; }

.copy{
  width:42px;
  height:42px;
  border-radius:10px;
  border:1px solid var(--border);
  background:var(--panel);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:transform .18s ease, background-color .18s ease, border-color .18s ease;
  flex-shrink:0;
}
.copy svg{
  width:18px;
  height:18px;
  stroke:var(--text);
  transition:opacity .15s ease, transform .15s ease;
}
.copy.copied{
  background:var(--accent-soft);
  border-color:var(--accent);
  transform:scale(1.05);
}
.copy.copied svg{
  stroke:var(--accent);
  transform:scale(1.1);
}
.copy:active{transform:scale(.94)}

.footer{
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid var(--border);
  text-align:center;
  font-size:12px;
  color:var(--text-sub);
}

@media (max-width: 480px){
  .container{padding:22px 18px;border-radius:18px;}
  .header{flex-direction:column; align-items:flex-start;}
  .header .sub{text-align:left; max-width:none;}
}


.pill{
  min-width:72px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  color:var(--text);
  border-radius:999px;
  padding:7px 10px;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  position:relative;
  transition:transform .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
}
.pill-label{
  display:inline-block;
  transition:opacity .18s ease;
}
.pill-check{
  position:absolute;
  opacity:0;
  transition:opacity .18s ease;
}
.pill svg{
  width:14px;
  height:14px;
  stroke:currentColor;
}
.pill:hover{ border-color:rgba(var(--accent-rgb),.55); }
.pill.copied{
  background:var(--accent-soft);
  border-color:var(--accent);
  color:var(--accent);
}
.pill.copied .pill-label{ opacity:0; }
.pill.copied .pill-check{ opacity:1; }
.badge-soft{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  color:var(--text-sub);
  font-size:11px;
  font-weight:800;
}
.table{
  width:100%;
  border-collapse:collapse;
  font-size:12px;
  color:var(--text);
  font-family:Consolas, ui-monospace, SFMono-Regular, Menlo, Monaco, "Liberation Mono", "Courier New", monospace;
}
.table th, .table td{
  padding:8px 10px;
  border-bottom:1px solid rgba(255,255,255,.08);
  vertical-align:top;
  word-break:break-all;
  overflow-wrap:anywhere;
  white-space:normal;
}
.table th{
  color:var(--text-sub);
  font-weight:800;
  text-align:left;
}
.table tr:last-child td{ border-bottom:none; }


.collapse{ display:none; }
.collapse.open{ display:block; }
.result-label.row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.result-value, .kv-block, code{
  -webkit-user-select:text;
  user-select:text;
  -webkit-touch-callout: default;
}


.modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.62);
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:9999;
}
.modal-backdrop.open{ display:flex; }
.modal{
  width:min(720px, 100%);
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow:0 30px 80px rgba(0,0,0,.85);
  padding:14px;
}
.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.modal-title{
  font-size:13px;
  font-weight:900;
  color:var(--text);
}
.modal-close{
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  color:var(--text);
  border-radius:12px;
  padding:7px 10px;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}
.modal textarea{ min-height:180px; resize:vertical; }


@media (max-width: 520px){
  .container{ padding:22px 18px; border-radius:18px; }
  .tabs{ height:44px; }
  .tabs .label{ font-size:12px; }
  .result-row{ flex-direction:column; align-items:stretch; }
  .copy{ width:100%; justify-content:center; }
}


.parse-head{cursor:pointer;}
.parse-head:hover{filter:brightness(1.06);}


.kv-inline{
  width:100%;
  min-height:110px;
  resize:vertical;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--panel-soft);
  padding:12px 12px;
  color:var(--text);
  font-weight:400;
  font-family:Consolas, ui-monospace, SFMono-Regular, Menlo, Monaco, "Liberation Mono", "Courier New", monospace;
  line-height:1.35;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  word-break:break-all;
}
.kv-inline::placeholder{
  color:rgba(255,255,255,.35);
  font-weight:700;
}



.kv-block{
  width:100%;
  min-height:80px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  padding:10px 12px;
  color:var(--text);
  font-weight:800;
  font-family:Consolas, ui-monospace, SFMono-Regular, Menlo, Monaco, "Liberation Mono", "Courier New", monospace;
  line-height:1.35;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  word-break:break-all;
}


#decCipher, #encPlain{ min-height:110px !important; }


.parse-box{ padding:10px; }
.result-label.row.parse-head{
  margin:0;
  padding:0;
  min-height:32px;
}
#decParseBody.collapse{ margin-top:6px; }
#decToggleHint{ font-size:11px; }
  
