/* Darkfuscator — halloween workspace skin.
   Pumpkin orange + deep purple on near-black. DM Sans for text, mono for code. */

:root {
  --bg: #0b0709;
  --side: #140b0f;
  --panel: #170e13;
  --panel-strong: #221419;
  --border: #3a2028;
  --border-soft: #2a181f;
  --text: #f7f0ec;
  --text-dim: #b8a4a4;
  --text-faint: #8a7577;
  --orange: #ff7a1a;
  --orange2: #ffb347;
  --purple: #7c3aed;
  --purple2: #9333ea;
  --green: #8ac926;
  --red: #fb7185;
  --yellow: #facc15;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(124, 58, 237, 0.10), transparent 60%),
    radial-gradient(700px 360px at -10% 110%, rgba(255, 122, 26, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }

/* ------------------------------------------------------------------ shell */
.app { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 92px;
  background: var(--side);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 10px;
  gap: 6px;
  z-index: 20;
}

.brand-mark {
  width: 52px; height: 52px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--orange), #c2410c 55%, var(--purple));
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.5px;
  color: #14070a;
  margin-bottom: 14px;
  box-shadow: 0 0 0 1px rgba(255, 179, 71, 0.28), 0 0 26px rgba(255, 122, 26, 0.30);
}

.side-btn {
  width: 68px;
  padding: 9px 0 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-faint);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: 0.15s;
}
.side-btn svg { width: 19px; height: 19px; }
.side-btn:hover, .side-btn.active { background: var(--panel-strong); color: var(--text); }
.side-btn.active {
  box-shadow: inset 3px 0 0 var(--orange);
  color: var(--orange2);
}

.sidebar-foot { margin-top: auto; text-align: center; }
.ver-chip {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--orange2);
  border: 1px solid var(--border);
  background: rgba(255, 122, 26, 0.07);
  border-radius: 999px;
  padding: 3px 9px;
  display: inline-block;
}
.foot-note { font-size: 10px; color: var(--text-faint); margin-top: 10px; line-height: 1.5; }

.main { flex: 1; min-width: 0; margin-left: 92px; padding: 30px 36px 60px; max-width: 1220px; }

.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--orange2); margin: 0 0 4px; }
.page-title { font-size: 24px; font-weight: 700; margin: 0 0 6px; }
.page-desc { font-size: 13.5px; color: var(--text-dim); margin: 0; max-width: 640px; line-height: 1.55; }

.top-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--text-dim);
  font-size: 12px;
}

/* ---------------------------------------------------------------- buttons */
.btn {
  border: 1px solid var(--border);
  background: var(--panel-strong);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: 0.15s;
}
.btn:hover { border-color: #57303b; transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--orange), #e85d04);
  border-color: var(--orange);
  color: #17080a;
  box-shadow: 0 0 22px rgba(255, 122, 26, 0.30);
}
.btn.primary:hover { background: linear-gradient(135deg, var(--orange2), var(--orange)); }
.btn.purple {
  background: linear-gradient(135deg, var(--purple), var(--purple2));
  border-color: var(--purple);
  box-shadow: 0 0 22px rgba(124, 58, 237, 0.28);
}
.btn.big { padding: 12px 22px; font-size: 14.5px; }

.file-btn {
  border: 1px solid var(--border);
  background: var(--panel-strong);
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.file-btn:hover { border-color: #57303b; }
.file-btn input { display: none; }

/* ------------------------------------------------------------------ cards */
.card {
  background: linear-gradient(180deg, var(--panel), #120a0e);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 18px;
}
.card.hero {
  background:
    radial-gradient(420px 260px at 20% -30%, rgba(255, 122, 26, 0.16), transparent 65%),
    radial-gradient(420px 260px at 90% 130%, rgba(124, 58, 237, 0.16), transparent 65%),
    linear-gradient(180deg, var(--panel), #120a0e);
}
.hero h2 { margin: 0 0 8px; font-size: 26px; }
.hero p { margin: 0 0 18px; color: var(--text-dim); font-size: 14px; line-height: 1.6; max-width: 640px; }

.card-title { font-size: 15px; font-weight: 650; margin: 0 0 14px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 900px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.bignum { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: rgba(0,0,0,0.2); }
.bignum b { display: block; font-size: 22px; color: var(--orange2); }
.bignum span { font-size: 11.5px; color: var(--text-faint); }

.feature .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 900px) { .feature .grid { grid-template-columns: 1fr; } }
.cell { border: 1px solid var(--border-soft); border-radius: 12px; padding: 14px; background: rgba(0,0,0,0.18); }
.cell h3 { margin: 0 0 6px; font-size: 13.5px; font-weight: 650; color: var(--orange2); }
.cell p { margin: 0; font-size: 12.5px; color: var(--text-dim); line-height: 1.55; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step { display: flex; gap: 10px; align-items: flex-start; }
.step .n {
  flex: 0 0 auto;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.step p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }

.foot-line { font-size: 11.5px; color: var(--text-faint); line-height: 1.6; }
.foot-line .spooky { color: var(--orange2); }

/* ------------------------------------------------------------- obfuscator */
.panes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .panes { grid-template-columns: 1fr; } }

.pane {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pane.dragover { border-color: var(--orange2); }
.pane-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border-soft); }
.pane-title { font-size: 12px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-dim); }
.meta { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }

.pane textarea {
  flex: 1;
  min-height: 320px;
  width: 100%;
  border: 0;
  outline: none;
  resize: vertical;
  background: transparent;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre;
  overflow: auto;
}
.pane textarea::placeholder { color: var(--text-faint); }

.pane-foot { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--border-soft); flex-wrap: wrap; }

.action-row { display: flex; align-items: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; }

.status { font-size: 13px; color: var(--text-dim); }
.status.ok { color: #c9f0d2; }
.status.warn { color: #f0e3b8; }
.status.err { color: #f0bcbc; }

.verified { font-family: var(--mono); font-size: 10.5px; color: #9fd9ab; border: 1px solid rgba(160, 220, 170, 0.25); border-radius: 999px; padding: 3px 10px; }

.error { border: 1px solid rgba(240, 188, 188, 0.3); background: rgba(240, 188, 188, 0.06); border-radius: 10px; padding: 14px 16px; margin-top: 14px; }
.error h4 { margin: 0 0 8px; font-size: 13px; color: #f0bcbc; }
.error pre { margin: 0; white-space: pre-wrap; font-family: var(--mono); font-size: 11.5px; color: var(--text-dim); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { border: 1px solid var(--border-soft); border-radius: 10px; padding: 10px 12px; background: rgba(0, 0, 0, 0.2); }
.stat-k { display: block; font-size: 10px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-faint); margin-bottom: 4px; }
.stat-v { font-family: var(--mono); font-size: 13px; color: var(--text); word-break: break-all; }

/* --------------------------------------------------------------- settings */
.settings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 18px; }
@media (max-width: 900px) { .settings-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .settings-grid { grid-template-columns: 1fr; } }

.field label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-faint); margin-bottom: 5px; }
.field select, .field input[type="text"], .field input[type="number"] {
  width: 100%;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
}
.field select:focus, .field input:focus { border-color: var(--orange); }
.field .hint { font-size: 10.5px; color: var(--text-faint); margin-top: 4px; line-height: 1.45; }

.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.switch-row .sw-label { font-size: 13px; font-weight: 600; }
.switch-row .sw-sub { font-size: 10.5px; color: var(--text-faint); line-height: 1.4; }
.switch {
  position: relative;
  width: 42px; height: 23px;
  border: 0;
  border-radius: 999px;
  background: #3a2028;
  cursor: pointer;
  flex: 0 0 auto;
}
.switch::after {
  content: "";
  position: absolute;
  width: 17px; height: 17px;
  left: 3px; top: 3px;
  border-radius: 50%;
  background: #f7f0ec;
  transition: 0.15s;
}
.switch.on { background: var(--orange); }
.switch.on::after { transform: translateX(19px); }

/* API docs page */
.code-block {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.65;
  background: #0d080b;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 14px 16px;
  color: #e8d9c8;
  overflow-x: auto;
  white-space: pre;
  margin: 12px 0 4px;
}
.code-block .c { color: var(--text-faint); }
.code-block .k { color: var(--orange2); }
.code-inline {
  font-family: var(--mono);
  font-size: 12px;
  background: #241318;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 1.5px 7px;
  color: var(--orange2);
}
.doc-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 12px; }
.doc-table th, .doc-table td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
.doc-table th { color: var(--orange2); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.doc-table td:first-child { font-family: var(--mono); font-size: 12px; color: var(--text); white-space: nowrap; }
.doc-table td { color: var(--text-dim); }
.key-out {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  flex-wrap: wrap;
}
.key-out code {
  font-family: var(--mono);
  font-size: 13px;
  background: #241318;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  color: var(--green);
  word-break: break-all;
}
