/* DevAurora X Obfuscator — theme v14 (base: Clyde Protection layout) */
:root {
  --bg-body: #101014;
  --bg-panel: #1b1b21;
  --bg-editor: #131318;
  --border-panel: #2a2a31;
  --border-light: #3a3a44;
  --border-dark: #0c0c0f;
  --text-main: #e3e3e6;
  --text-muted: #9b9ba3;
  --aqua: #50f5f5;
  --aqua-glow: rgba(80, 245, 245, 0.35);
  --aqua-dim: #2ea8a8;
  --gold: #d99139;
  --danger: #ff5050;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-body);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(80, 245, 245, 0.06), transparent),
    linear-gradient(180deg, #101014 0%, #0d0d11 100%);
  color: var(--text-main);
  font-family: 'JetBrains Mono', 'Tahoma', monospace;
  line-height: 1.5;
  padding: 20px;
  min-height: 100vh;
}

.hidden { display: none !important; }
.accent { color: var(--aqua); }
.dim { color: var(--text-muted); }

/* ================= KEY GATE ================= */
.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 60% 40% at 50% 30%, rgba(80, 245, 245, 0.08), transparent),
    #0c0c0f;
}
.gate-box {
  width: min(400px, 92vw);
  padding: 36px 32px;
  background: linear-gradient(180deg, #1b1b21 0%, #14141a 100%);
  border: 1px solid var(--border-panel);
  border-radius: 14px;
  box-shadow: 0 0 60px rgba(80, 245, 245, 0.08), 0 24px 48px rgba(0, 0, 0, 0.6);
  text-align: center;
}
.gate-logo { margin-bottom: 10px; }
.gate-logo .glyph {
  font-size: 40px;
  color: var(--aqua);
  text-shadow: 0 0 24px var(--aqua-glow);
}
.gate-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
}
.gate-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin: 6px 0 22px;
}
.gate-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-editor);
  border: 1px solid var(--border-panel);
  border-radius: 8px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  text-align: center;
  letter-spacing: 1px;
  outline: none;
  transition: border-color 0.15s;
}
.gate-input:focus {
  border-color: var(--aqua-dim);
  box-shadow: 0 0 0 3px rgba(80, 245, 245, 0.1);
}
.gate-btn {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  background: linear-gradient(180deg, #23c5c5 0%, #178585 100%);
  border: 1px solid #2ea8a8;
  border-radius: 8px;
  color: #061212;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: filter 0.15s;
}
.gate-btn:hover { filter: brightness(1.12); }
.gate-err {
  color: var(--danger);
  font-size: 11px;
  margin-top: 10px;
  min-height: 16px;
}
.gate-foot {
  margin-top: 18px;
  font-size: 11px;
  color: var(--text-muted);
}
.gate-foot a { color: var(--aqua-dim); text-decoration: none; }
.gate-foot a:hover { text-decoration: underline; }

/* ================= LAYOUT ================= */
.web-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.web-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border-panel);
  padding-bottom: 16px;
  margin-bottom: 4px;
}
.brand-title {
  font-size: 24px;
  font-weight: bold;
  color: #ffffff;
  letter-spacing: -0.5px;
  text-shadow: 0 0 18px rgba(80, 245, 245, 0.25);
}
.brand-tag {
  font-size: 11px;
  color: var(--aqua);
  border: 1px solid var(--aqua-dim);
  border-radius: 4px;
  padding: 2px 6px;
  vertical-align: middle;
  margin-left: 8px;
  letter-spacing: 2px;
}
.brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.header-badges { display: flex; gap: 8px; }

.web-badge {
  padding: 4px 8px;
  font-size: 10px;
  font-weight: bold;
  border-radius: 4px;
  border: 1px solid var(--border-panel);
  user-select: none;
}
.badge-primary {
  background: linear-gradient(to bottom, #1d3a3a 0%, #12262a 100%);
  color: var(--aqua);
  border-color: var(--aqua-dim);
}
.badge-accent {
  background: linear-gradient(to bottom, #2a2a31 0%, #1c1c22 100%);
  color: var(--text-main);
}
.badge-gold {
  background: linear-gradient(to bottom, #3a2c17 0%, #241c0e 100%);
  color: var(--gold);
  border-color: #6b5326;
}

/* metrics */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.metric-card {
  background: linear-gradient(180deg, var(--bg-panel) 0%, #16161c 100%);
  border: 1px solid var(--border-panel);
  border-radius: 8px;
  padding: 12px 16px;
}
.metric-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}
.metric-val {
  font-size: 20px;
  font-weight: bold;
  color: var(--aqua);
  margin-top: 2px;
  text-shadow: 0 0 12px rgba(80, 245, 245, 0.3);
}

/* workspace */
.workspace-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1.2fr;
  gap: 12px;
  min-height: 520px;
}

.web-panel {
  background: linear-gradient(180deg, var(--bg-panel) 0%, #16161b 100%);
  border: 1px solid var(--border-panel);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.panel-header {
  background: linear-gradient(180deg, #232329 0%, #1b1b21 100%);
  border-bottom: 1px solid var(--border-panel);
  padding: 8px 14px;
}
.panel-title {
  font-size: 11px;
  font-weight: bold;
  color: var(--aqua);
  letter-spacing: 1px;
}
.panel-body { flex: 1; position: relative; }

textarea {
  width: 100%;
  height: 100%;
  min-height: 420px;
  background: var(--bg-editor);
  border: none;
  color: var(--text-main);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 12px;
  resize: none;
  outline: none;
}
#output-editor { color: #9beaea; }

/* options */
.controls-panel { display: flex; flex-direction: column; }
.panel-scroll-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.web-fieldset {
  border: 1px solid var(--border-panel);
  border-radius: 8px;
  padding: 10px 12px;
}
.web-legend {
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 0 6px;
}
.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 4px;
}
.checkbox-wrapper input[type="checkbox"] {
  accent-color: var(--aqua);
  margin-top: 3px;
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.checkbox-wrapper label { cursor: pointer; flex: 1; }
.option-title {
  display: block;
  font-size: 12px;
  font-weight: bold;
  color: var(--text-main);
}
.opt-tag {
  font-size: 9px;
  color: var(--gold);
  border: 1px solid #6b5326;
  border-radius: 3px;
  padding: 0 4px;
  margin-left: 4px;
  vertical-align: middle;
}
.option-desc {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}
.select-group { padding: 7px 4px; }
.select-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.seed-input {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-editor);
  border: 1px solid var(--border-panel);
  border-radius: 6px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 12px;
  outline: none;
}
.seed-input:focus { border-color: var(--aqua-dim); }
.target-note {
  font-size: 10px;
  color: var(--aqua-dim);
  line-height: 1.5;
}

/* buttons */
.button-footer {
  padding: 10px;
  border-top: 1px solid var(--border-panel);
  display: flex;
  gap: 8px;
}
.glassy-button-blue,
.glassy-button-silver {
  flex: 1;
  padding: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid;
  transition: filter 0.15s, box-shadow 0.15s;
}
.glassy-button-blue {
  background: linear-gradient(180deg, #23c5c5 0%, #14707a 100%);
  border-color: var(--aqua-dim);
  color: #061212;
  letter-spacing: 1px;
}
.glassy-button-blue:hover:not(:disabled) {
  filter: brightness(1.15);
  box-shadow: 0 0 22px rgba(80, 245, 245, 0.35);
}
.glassy-button-silver {
  background: linear-gradient(180deg, #2e2e35 0%, #222228 100%);
  border-color: var(--border-light);
  color: var(--text-main);
}
.glassy-button-silver:hover:not(:disabled) { filter: brightness(1.2); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-loader {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(6, 18, 18, 0.35);
  border-top-color: #061212;
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* console */
.web-console {
  background: var(--bg-editor);
  border: 1px solid var(--border-panel);
  border-radius: 10px;
  overflow: hidden;
}
.console-header {
  background: linear-gradient(180deg, #232329 0%, #1b1b21 100%);
  border-bottom: 1px solid var(--border-panel);
  padding: 8px 14px;
}
.console-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1px;
}
.console-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3a3a44;
}
.console-indicator.green { background: #3ddc84; box-shadow: 0 0 8px #3ddc84; }
.console-indicator.red { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.console-indicator.yellow { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.console-header-title { color: var(--aqua); }
.console-body {
  max-height: 220px;
  overflow-y: auto;
  padding: 10px 14px;
  font-size: 11px;
}
.console-line { padding: 1px 0; word-break: break-all; }
.line-system { color: var(--text-muted); }
.line-ok { color: #3ddc84; }
.line-err { color: var(--danger); }
.line-warn { color: var(--gold); }
.line-info { color: var(--aqua-dim); }

/* footer */
.web-footer {
  display: flex;
  justify-content: space-between;
  padding: 10px 4px;
  font-size: 10px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-panel);
}
.web-footer a { color: var(--aqua-dim); text-decoration: none; }
.web-footer a:hover { text-decoration: underline; }

/* responsive */
@media (max-width: 1100px) {
  .workspace-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .web-header { flex-direction: column; gap: 10px; }
}
