:root {
  --bg: #0f1621;
  --fg: #e6f0ff;
  --mut: #a8bed6;
  --acc: #2ad4ff;
  --card: #141d2c;
  --line: #23324a;
  --acc2: #FD5A32;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 system-ui, -apple-system, Segoe UI, Roboto;
}

a {
  color: var(--acc);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}
a:hover {
  color: var(--acc);
  text-decoration-color: transparent;
  background: linear-gradient(90deg, var(--acc) 0%, var(--acc2) 100%) bottom/100% 2px no-repeat;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 16px; }

.top {
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  background: #0f1621;
  position: sticky;
  top: 0;
  z-index: 50;
}

.top .inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 14px;
}

.logo { display: flex; align-items: center; }
.logo img { display: block; height: 64px; }

.mainnav {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: flex-start;
  align-items: center;
}
.mainnav a { padding: 6px 8px; border-radius: 8px; white-space: nowrap; }

.usernav { display: flex; gap: 8px; align-items: center; }
.usernav a { padding: 6px 8px; border-radius: 8px; border: 1px solid transparent; }
.usernav a:hover { border-color: var(--line); }
.usernav .call {
  background: var(--acc);
  color: #002;
  padding: 6px 10px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg);
  padding: 6px 8px;
  border-radius: 8px;
  margin-left: auto;
}
.nav-toggle svg rect { fill: var(--fg); }

.mobilemenu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 20px rgba(0,0,0,.25);
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  padding: 10px 14px 14px;
}
.mobilemenu a {
  display: block;
  padding: 10px 6px;
  border-radius: 8px;
  border: 1px solid transparent;
}
.mobilemenu a:hover { border-color: var(--line); }
.mobilemenu .call {
  background: var(--acc);
  color: #002;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
}
.mobilemenu hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 8px 0;
}
body.navopen .mobilemenu {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 900px) {
  .mainnav { display: none; }
  .usernav { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

.hero { padding: 18px 0; text-align: center; }
.trust { color: var(--mut); margin-top: 8px; }

.card {
  background: var(--card);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--fg);
}

.card.accent-top { position: relative; overflow: hidden; }
.card.accent-top::before {
  content:'';
  position:absolute;
  inset:0 0 auto 0;
  height:3px;
  background: linear-gradient(90deg, var(--acc2), rgba(253,90,50,.5) 60%, transparent);
}

.foot {
  border-top: 1px solid var(--line);
  padding: 20px 16px;
  text-align: center;
  color: var(--mut);
}

.btn {
  display: inline-block;
  background: var(--acc);
  color: #002;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.05); }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--acc);
  color: var(--acc);
}
.btn.alt {
  background: var(--acc2);
  color: #001018;
}
.btn.alt:hover { box-shadow: 0 0 0 2px rgba(253,90,50,.15) inset; }

.cta-row { display:flex; gap:10px; flex-wrap:wrap; justify-content:center; margin: 14px 0; }

.h2 { font-size: 1.1rem; margin: 6px 0; }

.helpbox {
  background: rgba(12, 21, 36, 0.5);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0;
}

.warn {
  border-color: rgba(253, 90, 50, 0.45);
  background: rgba(253, 90, 50, 0.08);
  color: #ffd7cc;
}

/* Main tool layout: controls left, previews right */
.toolgrid{
  display:grid;
  grid-template-columns: minmax(420px, 1.25fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: start;
}

/* Stack the preview panels */
.previewstack{
  display:flex;
  flex-direction: column;
  gap: 12px;
}

/* Preview panels */
.previewpanel{
  background: rgba(12, 21, 36, 0.5);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.panel-head{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.panel-body{
  max-height: 320px;   /* keeps input/output in view */
  overflow: auto;
  padding-right: 4px;
}

/* In the right column, make lists single-column for clarity */
.previewpanel .filelist,
.previewpanel .outlist{
  grid-template-columns: 1fr;
}

/* Mobile: stack previews under controls */
@media (max-width: 980px){
  .toolgrid{ grid-template-columns: 1fr; }
  .panel-body{ max-height: none; }
}

/* Improve preview image fit (no cropping) */
.thumb{
  height: 170px;
  object-fit: contain;
  padding: 6px;
  background: #0b1220;
}


.grid2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.aside-sticky { position: sticky; top: 84px; align-self: start; }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

label { display:block; margin: 10px 0; }

input, select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1220;
  color: var(--fg);
}

.small { font-size: .9rem; }
.muted { color: var(--mut); }

.checkline { display:flex; align-items:center; gap:8px; cursor:pointer; }
input[type='checkbox'] { width: auto; accent-color: var(--acc); }

.divider {
  height: 1px;
  margin: 18px 0;
  background: linear-gradient(90deg, transparent, var(--acc2), transparent);
}

.bul li {
  position: relative;
  list-style: none;
  padding-left: 18px;
  margin: 8px 0;
}
.bul li::before {
  content: '';
  position: absolute;
  left: 0.5px;
  top: 0.68em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acc2);
  box-shadow: 0 0 6px rgba(253, 90, 50, 0.45);
}

.pill, .pilltool {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.8;
  color: var(--mut);
}
.pilltool.act {
  border-color: var(--acc);
  color: var(--fg);
}

.dropzone {
  border: 2px dashed rgba(42, 212, 255, 0.45);
  border-radius: 14px;
  padding: 18px;
  background: rgba(10, 18, 32, 0.45);
  text-align: center;
  cursor: pointer;
}
.dropzone:focus-visible {
  outline: 2px solid transparent;
  box-shadow: 0 0 0 2px rgba(42, 212, 255, 0.35), 0 0 0 4px rgba(253, 90, 50, 0.25);
}
.dropzone.dragover {
  border-color: var(--acc);
  box-shadow: 0 0 0 2px rgba(42, 212, 255, 0.18);
}
.dz-title { font-weight: 800; font-size: 1.1rem; }
.dz-sub { color: var(--mut); margin-top: 4px; }
.dz-note { max-width: 520px; margin: 0 auto; }

.filelist, .outlist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.fcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  overflow: hidden;
}
.thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.08);
  background: #0b1220;
}
.meta { margin-top: 8px; color: var(--mut); font-size: .9rem; }
.fname { color: var(--fg); font-weight: 700; margin-top: 6px; }

.row { display:flex; align-items:center; gap:10px; }
.row input[type="range"] { flex: 1; }
