:root{
  --bg:#0b1020;
  --card:#0f1733;
  --card2:#0d1530;
  --text:#e7ecff;
  --muted:#9aa7d6;
  --accent:#5ee4ff;
  --accent2:#8b5cff;
  --border:rgba(255,255,255,.10);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius:16px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: radial-gradient(1200px 900px at 20% 10%, rgba(94,228,255,.12), transparent 55%),
              radial-gradient(900px 700px at 80% 10%, rgba(139,92,255,.12), transparent 55%),
              var(--bg);
  color:var(--text);
}

.wrap{max-width:1200px;margin:0 auto;padding:28px 18px 32px}

.header{margin-bottom:18px}
.title{font-size:28px;font-weight:800;letter-spacing:.2px}
.subtitle{margin-top:6px;color:var(--muted)}

.panel{
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:18px;
}

.selectors{
  display:grid;
  grid-template-columns: 1fr auto 1fr 220px auto;
  gap:14px;
  align-items:end;
  margin-bottom:14px;
}

.sel, .digits{
  background: rgba(255,255,255,.02);
  border:1px solid var(--border);
  border-radius: 14px;
  padding:12px;
}

label{display:block;font-size:12px;color:var(--muted);margin-bottom:8px}
select, input{
  width:100%;
  padding:10px 12px;
  border-radius: 12px;
  border:1px solid var(--border);
  background: rgba(8, 12, 26, .8);
  color: var(--text);
  outline:none;
}

.zoneRow{margin-top:10px;display:flex;gap:10px;align-items:center}
.zoneRow select{width:120px}
.zoneLabel{flex:1}

.swap{display:flex;align-items:center;justify-content:center}
#swapBtn{
  width:48px;height:48px;border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  cursor:pointer;
  font-size:18px;
}
#swapBtn:hover{border-color: rgba(94,228,255,.35)}

.actions{display:flex;gap:10px;align-items:end;justify-content:flex-end}
button{
  border-radius:14px;
  border:1px solid var(--border);
  padding:12px 14px;
  background: rgba(255,255,255,.03);
  color: var(--text);
  cursor:pointer;
  font-weight:700;
}
button:hover{border-color: rgba(94,228,255,.35)}
button.primary{
  background: linear-gradient(135deg, rgba(94,228,255,.22), rgba(139,92,255,.18));
  border-color: rgba(94,228,255,.35);
}
button.ghost{opacity:.85}

.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
}

.box{
  background: rgba(255,255,255,.02);
  border:1px solid var(--border);
  border-radius: 14px;
  padding:12px;
  min-height:420px;
  display:flex;
  flex-direction:column;
}
.boxHead{font-weight:800;margin:2px 0 10px}
textarea{
  flex:1;
  width:100%;
  resize:vertical;
  min-height:340px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(8, 12, 26, .75);
  color: var(--text);
  padding:12px;
  outline:none;
  line-height:1.35;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:13px;
}
.hint{margin-top:10px;color:var(--muted);font-size:12px}
.footer{
  margin-top:14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  color:var(--muted);
  font-size:12px;
}
.muted{opacity:.85}

@media (max-width: 980px){
  .selectors{grid-template-columns: 1fr; }
  .swap{display:none}
  .actions{justify-content:flex-start}
  .grid{grid-template-columns: 1fr;}
  .box{min-height:360px}
}
