:root{
  --bg1: #070A12;
  --bg2: #0B1020;
  --card: rgba(255,255,255,0.05);
  --stroke: rgba(255,255,255,0.08);
  --text: rgba(255,255,255,0.88);
  --muted: rgba(255,255,255,0.55);
  --purple: #8B5CF6;
  --purple2: #A78BFA;
  --ok: #22c55e;
  --err: #ef4444;
  --warn: #f59e0b;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: radial-gradient(1200px 600px at 20% 10%, rgba(139,92,246,0.20), transparent 60%),
              radial-gradient(900px 500px at 85% 20%, rgba(167,139,250,0.12), transparent 60%),
              linear-gradient(180deg, var(--bg2), var(--bg1));
  background-attachment: fixed; /* ✅ bikin rata, ga belang */
  min-height: 100vh;
}

.wrap{
  width: min(980px, 92vw);
  margin: 28px auto 60px;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding: 14px 16px;
  border:1px solid var(--stroke);
  border-radius: 16px;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(10px);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
}
.brand .dot{
  width:10px;height:10px;border-radius:50%;
  background: var(--purple);
  box-shadow: 0 0 0 6px rgba(139,92,246,0.15);
}
.brand h1{
  font-size: 18px;
  margin:0;
  line-height: 1.1;
}
.brand p{
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.right{
  display:flex;
  align-items:center;
  gap:10px;
}

.pill{
  display:flex;
  align-items:center;
  gap:8px;
  padding: 8px 12px;
  border-radius: 999px;
  border:1px solid var(--stroke);
  background: rgba(0,0,0,0.18);
  font-size: 13px;
  color: var(--muted);
}

.led{
  width:10px;height:10px;border-radius:50%;
}
.led-ok{ background: var(--ok); box-shadow: 0 0 0 6px rgba(34,197,94,0.12); }
.led-err{ background: var(--err); box-shadow: 0 0 0 6px rgba(239,68,68,0.12); }
.led-warn{ background: var(--warn); box-shadow: 0 0 0 6px rgba(245,158,11,0.12); }

.btn{
  cursor:pointer;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 600;
  transition: transform .06s ease, background .2s ease;
}
.btn:active{ transform: scale(0.98); }
.btn.primary{
  border-color: rgba(139,92,246,0.35);
  background: linear-gradient(180deg, rgba(139,92,246,0.35), rgba(139,92,246,0.18));
}
.btn.ghost{
  background: rgba(0,0,0,0.18);
}

.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:16px;
  margin-top: 16px;
}

.card{
  border:1px solid var(--stroke);
  background: rgba(0,0,0,0.20);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 16px;
}

.card h2{
  margin:0 0 8px;
  font-size: 16px;
}

.muted{ color: var(--muted); font-size: 13px; }

.row{
  display:grid;
  gap:10px;
}

@media (min-width: 860px){
  .row.two{ grid-template-columns: 1fr 1fr; }
  .row.three{ grid-template-columns: 1fr 1fr 1fr; }
}

.input{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  outline: none;
}
.input:focus{
  border-color: rgba(167,139,250,0.55);
  box-shadow: 0 0 0 4px rgba(139,92,246,0.12);
}

.actions{
  display:flex;
  gap:10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.msg{
  display:none;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border:1px dashed rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.22);
  color: var(--muted);
}
.msg.show{ display:block; }
.msg.err{ border-color: rgba(239,68,68,0.35); color: rgba(255,255,255,0.85); }
.msg.ok{ border-color: rgba(34,197,94,0.35); color: rgba(255,255,255,0.85); }

.hidden{ display:none !important; }

/* ===== TERMINAL ===== */
.terminal-wrap{
  margin-top: 10px;
  border:1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  overflow: hidden;

  /* ✅ biar merata + linux feel */
  background: #121316;
}

.term-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap:10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);

  /* ✅ header terminal agak terang dikit */
  background: #1b1d22;
}

.term-title{
  display:flex;
  align-items:center;
  gap:10px;
  color: var(--muted);
  font-size: 13px;
}

.term-dots{ display:flex; gap:7px; }
.term-dots span{
  width:10px;height:10px;border-radius:50%;
  display:inline-block;
  opacity:0.9;
}
.term-dots span:nth-child(1){ background:#ff5f56; }
.term-dots span:nth-child(2){ background:#ffbd2e; }
.term-dots span:nth-child(3){ background:#27c93f; }

/* ✅ tombol Copy/Raw ke kanan */
.term-actions{
  display:flex;
  align-items:center;
  gap:10px;
  margin-left:auto;
  justify-content:flex-end;
}

/* ✅ terminal area benar2 abu & rata */
#terminal{
  padding: 12px;
  /* FIX: jangan dipotong */
  max-height: none;        /* dulu 460px */
  height: auto;
  overflow: visible;       /* dulu auto */
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255,255,255,0.88);
}

/* scrollbar (optional, tapi bikin kerasa “terminal”) */
#terminal::-webkit-scrollbar{ width: 10px; }
#terminal::-webkit-scrollbar-track{ background: rgba(255,255,255,0.04); }
#terminal::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.18);
  border-radius: 10px;
}
#terminal::-webkit-scrollbar-thumb:hover{
  background: rgba(255,255,255,0.26);
}

.term-line{
  white-space: pre-wrap;
  word-break: break-word;
}
.hidden{display:none!important;}
/* highlight */
.term-line.hl-ok{ color: rgba(34,197,94,0.95); }
.term-line.hl-err{ color: rgba(239,68,68,0.95); }
.term-line.hl-warn{ color: rgba(245,158,11,0.95); }
.term-line.dim{ color: rgba(255,255,255,0.55); }