:root {
  --bg-main:#0f0f12;
  --bg-panel:#1a1a21;
  --bg-box:#101014;
  --txt-main:#fff;
  --txt-dim:#9ca3af;
  --accent:#7b5cff;
  --border:#2a2a33;
  --radius-xl:1rem;
  --radius-lg:0.75rem;
  --radius-md:0.5rem;
  --shadow-card:0 20px 40px rgba(0,0,0,0.6);
  --font-stack: system-ui, -apple-system, BlinkMacSystemFont, "Inter", "Roboto", "Segoe UI", sans-serif;
}

*{box-sizing:border-box;}
body{
  margin:0;
  background:var(--bg-main);
  color:var(--txt-main);
  font-family:var(--font-stack);
  line-height:1.45;
}

.topbar{
  background:#141418;
  border-bottom:1px solid var(--border);
  padding:1rem 1.25rem;
  box-shadow:var(--shadow-card);
  position:sticky;
  top:0;
  z-index:20;
}
.brand{
  display:flex;
  gap:1rem;
  align-items:center;
}
.logo-circle{
  background:var(--accent);
  color:#000;
  font-weight:600;
  font-size:0.9rem;
  height:40px;
  width:40px;
  border-radius:var(--radius-lg);
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 10px 24px rgba(123,92,255,0.6);
}
.brand-text h1{
  font-size:1rem;
  margin:0;
  font-weight:600;
  color:#fff;
}
.brand-text .version{
  color:var(--accent);
  font-weight:500;
}
.brand-text .tagline{
  margin:0.25rem 0 0;
  color:var(--txt-dim);
  font-size:0.8rem;
  font-weight:400;
}

/* 2-col layout */
.layout.two-col{
  display:grid;
  grid-template-columns: minmax(260px,1fr) minmax(320px,2fr);
  gap:1rem;
  padding:1rem;
  max-width:1200px;
  margin-inline:auto;
}

.panel{
  background:var(--bg-panel);
  border:1px solid var(--border);
  border-radius:var(--radius-xl);
  padding:1rem 1rem 1.5rem;
  box-shadow:var(--shadow-card);
  display:flex;
  flex-direction:column;
  min-height:75vh;
}
.panel h2{
  margin:0 0 1rem;
  font-size:1rem;
  font-weight:600;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.field{
  display:flex;
  flex-direction:column;
  margin-bottom:0.75rem;
}
.field span{
  font-size:0.8rem;
  font-weight:500;
  color:var(--txt-dim);
  margin-bottom:0.4rem;
}
.field input,
.field select{
  background:var(--bg-box);
  color:var(--txt-main);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:0.6rem 0.7rem;
  font-size:0.9rem;
  width:100%;
  outline:none;
}
.field input:focus,
.field select:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(123,92,255,0.3);
}

.btn-row{
  display:flex;
  flex-wrap:wrap;
  gap:0.5rem;
  margin:1rem 0;
}
.btn{
  cursor:pointer;
  border-radius:var(--radius-md);
  border:1px solid transparent;
  font-size:0.85rem;
  line-height:1.2rem;
  font-weight:500;
  padding:0.6rem 0.9rem;
}
.btn.primary{
  background:var(--accent);
  color:#000;
  border-color:var(--accent);
  box-shadow:0 15px 30px rgba(123,92,255,0.5);
}
.btn.secondary{
  background:var(--bg-box);
  color:#fff;
  border:1px solid var(--border);
}

.info-block{
  background:var(--bg-box);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:0.75rem 0.9rem;
  font-size:0.75rem;
  color:var(--txt-dim);
  line-height:1.4;
}
.info-block ul{
  padding-left:1rem;
  margin:0.5rem 0 0;
}

.outputBox{
  background:#0d0d11;
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  flex:1;
  padding:1rem;
  font-size:0.8rem;
  color:var(--txt-main);
  line-height:1.5;
  white-space:pre-wrap;
  overflow-y:auto;
  min-height:60vh;
  outline:none;
  max-height:80vh;
}

@media(max-width:900px){
  .layout.two-col{
    grid-template-columns:1fr;
  }
  .panel{
    min-height:auto;
  }
  .outputBox{
    min-height:40vh;
    max-height:none;
  }
}
