/* Script Jitsu — minimal, fast, dojo-dark UI */

:root{
  --bg:#0b0f1a;
  --panel:#111829;
  --panel2:#0f1626;
  --text:#e7edf7;
  --muted:#a9b4c7;
  --border:#24304a;
  --accent:#7c5cff;
  --accent2:#22c55e;
  --warn:#f59e0b;
  --bad:#ef4444;
  --good:#22c55e;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--sans);
  background: radial-gradient(1200px 700px at 15% 0%, rgba(124,92,255,.25), transparent 55%),
              radial-gradient(900px 600px at 95% 10%, rgba(34,197,94,.18), transparent 50%),
              var(--bg);
  color:var(--text);
}

a{color:inherit;text-decoration:none}
code{font-family:var(--mono); font-size:.95em}

.topbar{
  position:sticky; top:0; z-index:10;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid rgba(255,255,255,.05);
  backdrop-filter: blur(10px);
  background: rgba(11,15,26,.75);
}

.brand{display:flex; gap:12px; align-items:center}
.logo{
  width:42px;height:42px;border-radius:12px;
  display:grid;place-items:center;
  background: linear-gradient(135deg, rgba(124,92,255,.35), rgba(34,197,94,.20));
  border:1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
  font-size:22px;
}
.title{font-weight:800; letter-spacing:.2px; font-size:18px}
.subtitle{color:var(--muted); font-size:12px; margin-top:2px}

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

.layout{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap:16px;
  padding:16px;
  max-width: 1280px;
  margin: 0 auto;
}

@media (max-width: 980px){
  .layout{grid-template-columns:1fr}
  .sidebar{order:2}
}

.panel{
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  padding:14px;
  box-shadow: var(--shadow);
}

.panel h2{
  margin:0 0 10px 0;
  font-size:14px;
  letter-spacing:.2px;
  color: rgba(231,237,247,.92);
}

.footer{opacity:.9}

.small{font-size:12px}
.muted{color:var(--muted)}
.mono{font-family:var(--mono)}

.belt-list{
  list-style:none;
  padding:0; margin:0;
  display:flex; flex-direction:column; gap:8px;
}
.belt{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
  padding:10px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(17,24,41,.6);
}
.belt button{
  all:unset;
  cursor:pointer;
  display:flex; align-items:center; gap:10px;
  width:100%;
}
.belt__dot{
  width:10px;height:10px;border-radius:999px;
  background: rgba(255,255,255,.25);
  border:1px solid rgba(255,255,255,.12);
}
.belt[data-state="current"]{border-color: rgba(124,92,255,.6)}
.belt[data-state="current"] .belt__dot{background: var(--accent)}
.belt[data-state="locked"]{opacity:.55}
.belt[data-state="complete"]{border-color: rgba(34,197,94,.55)}
.belt[data-state="complete"] .belt__dot{background: var(--accent2)}
.belt__name{font-weight:700; font-size:13px}
.belt__count{font-family:var(--mono); color:rgba(231,237,247,.8); font-size:12px}

.progress{margin-top:12px}
.progress__row{display:flex; justify-content:space-between; align-items:center; margin-bottom:8px}
.progress__bar{
  height:10px;
  border-radius:999px;
  background: rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.08);
  overflow:hidden;
}
.progress__fill{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, rgba(124,92,255,.95), rgba(34,197,94,.95));
}

.tips{margin:0; padding-left:18px; color:rgba(231,237,247,.88)}
.tips li{margin:8px 0; font-size:13px}

.lesson{padding:16px}
.lesson__header{display:flex; justify-content:space-between; align-items:flex-start; gap:12px}
.lesson__nav{display:flex; gap:10px}

.pill{
  display:inline-flex; align-items:center; gap:8px;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(17,24,41,.55);
  color: rgba(231,237,247,.9);
  width: fit-content;
}
h1{margin:10px 0 0 0; font-size:22px}
.prompt{
  margin-top:12px;
  padding:14px;
  border-radius:14px;
  border:1px dashed rgba(255,255,255,.12);
  background: rgba(15,22,38,.55);
  color: rgba(231,237,247,.92);
  line-height:1.5;
}
.prompt h3{margin:0 0 8px 0; font-size:14px}
.prompt ul{margin:8px 0 0 0; padding-left:18px}
.prompt li{margin:6px 0}
.prompt pre{
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.08);
  padding:10px;
  border-radius:12px;
  overflow:auto;
  font-family: var(--mono);
  font-size: 12.5px;
}

.editor-wrap{margin-top:12px; overflow:hidden}
.editor-toolbar{
  display:flex; justify-content:space-between; align-items:center;
  padding:10px 10px;
  border:1px solid rgba(255,255,255,.08);
  border-bottom:none;
  border-radius:14px 14px 0 0;
  background: rgba(17,24,41,.55);
}
.editor{
  width:100%;
  min-height: 260px;
  resize: vertical;
  padding:12px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:0 0 14px 14px;
  background: rgba(0,0,0,.25);
  color: rgba(231,237,247,.95);
  font-family: var(--mono);
  font-size: 13px;
  line-height:1.45;
  outline:none;
}

.split{
  margin-top:12px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
@media (max-width: 980px){
  .split{grid-template-columns:1fr}
}

.console{
  margin:0;
  padding:12px;
  min-height: 160px;
  background: rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  overflow:auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height:1.45;
}

.test-list{
  list-style:none;
  padding:0; margin:0;
  display:flex; flex-direction:column; gap:8px;
}
.test{
  display:flex; gap:10px; align-items:flex-start;
  padding:10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(17,24,41,.5);
}
.test__icon{width:18px; height:18px; display:grid; place-items:center; margin-top:1px}
.test__text{font-size:13px; color: rgba(231,237,247,.9)}
.test[data-state="pass"]{border-color: rgba(34,197,94,.55)}
.test[data-state="fail"]{border-color: rgba(239,68,68,.55)}
.test[data-state="pass"] .test__icon{color: var(--good)}
.test[data-state="fail"] .test__icon{color: var(--bad)}

.badge{
  margin-top:12px;
  display:flex; justify-content:space-between; align-items:center; gap:12px;
}
.badge__left{display:flex; gap:12px; align-items:center}
.badge__icon{
  width:42px;height:42px;border-radius:14px;
  display:grid; place-items:center;
  background: rgba(124,92,255,.18);
  border:1px solid rgba(255,255,255,.10);
  font-size:20px;
}
.badge__title{font-weight:800}
.badge__right{display:flex; gap:10px; align-items:center}

.btn{
  appearance:none;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(231,237,247,.95);
  padding:9px 12px;
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
  font-size:13px;
}
.btn:hover{border-color: rgba(255,255,255,.28)}
.btn:active{transform: translateY(1px)}
.btn.primary{
  border-color: rgba(124,92,255,.55);
  background: rgba(124,92,255,.18);
}
.btn.ghost{
  background: transparent;
  border-color: rgba(255,255,255,.10);
}
.btn:disabled{opacity:.5; cursor:not-allowed}

.dialog{
  border:none;
  background: transparent;
  padding: 0;
}
.dialog::backdrop{
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(3px);
}
.dialog__card{
  width:min(720px, 92vw);
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(17,24,41,.92);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.dialog__header{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.dialog__body{padding:14px; color: rgba(231,237,247,.92); line-height:1.55}
.dialog__footer{padding:14px; border-top:1px solid rgba(255,255,255,.08); display:flex; justify-content:flex-end}

.sandbox{position:absolute; width:0; height:0; border:0; opacity:0; pointer-events:none}

/* --- Game overlays & onboarding --- */
.overlay{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  z-index: 999;
  padding: 18px;
}
.overlay--show{ display:flex; }
.overlay__card{
  width: min(560px, 94vw);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(17,24,41,.94);
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  padding: 22px;
  text-align: center;
}
.overlay__hero{
  font-size: 44px;
  width: 72px; height: 72px;
  display: grid; place-items:center;
  margin: 0 auto 10px auto;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(135deg, rgba(124,92,255,.25), rgba(34,197,94,.15));
}
.overlay__title{ margin: 6px 0 8px 0; font-size: 22px; }
.overlay__text{ margin: 0 0 14px 0; color: rgba(231,237,247,.88); line-height: 1.55; }
.overlay__steps{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 16px 0;
}
@media (max-width: 520px){ .overlay__steps{ grid-template-columns: 1fr; } }
.step{
  text-align: left;
  display:flex; gap:10px; align-items:center;
  padding:10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
}
.step__num{
  width: 26px; height:26px; border-radius: 10px;
  display:grid; place-items:center;
  font-weight:900;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(124,92,255,.18);
}
.overlay__actions{ display:flex; justify-content:center; gap:10px; margin: 10px 0 10px 0; flex-wrap:wrap; }

.coach{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 998;
  display:none;
}
.coach--show{ display:block; }

.coach__bubble{
  position: absolute;
  width: min(420px, 92vw);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(17,24,41,.96);
  box-shadow: 0 24px 70px rgba(0,0,0,.6);
  padding: 14px;
  pointer-events: auto;
}
.coach__title{ font-weight: 900; letter-spacing:.2px; margin-bottom: 6px; }
.coach__text{ color: rgba(231,237,247,.9); line-height:1.5; }
.coach__actions{ display:flex; gap:10px; justify-content:flex-end; margin-top: 10px; flex-wrap:wrap; }
.coach__progress{ margin-top: 8px; text-align:left; }

.coach-highlight{
  position: relative;
  z-index: 997;
  outline: 2px solid rgba(124,92,255,.95);
  box-shadow: 0 0 0 6px rgba(124,92,255,.18), 0 0 40px rgba(124,92,255,.35);
  border-radius: 16px;
}


.step--btn{
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.step--btn:hover{
  background: rgba(124,92,255,.12);
}
