/* spuric.ai wrapper v2 — Matrix console vibe */
/* Keep it light + readable, with a clean "panel" so users don't bounce. */

:root{
  --bg: #000;
  --panel: rgba(8, 12, 10, 0.92);
  --panel2: rgba(0,0,0,0.35);
  --border: rgba(68, 255, 134, 0.45);
  --border2: rgba(170, 255, 210, 0.35);
  --text: rgba(245, 255, 250, 0.92);
  --muted: rgba(245, 255, 250, 0.70);
  --accent: rgba(44, 255, 122, 0.92);
  --accent2: rgba(183, 255, 217, 0.95);
  --danger: rgba(255, 90, 90, 0.92);
  --shadow: 0 12px 48px rgba(0,0,0,0.55);
  --radius: 16px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  overflow:hidden;
}

#matrix{
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
  display:block;
}

.ui{
  position:relative;
  z-index:2;
  height:100%;
  padding: 22px;
  display:flex;
  flex-direction:column;
  gap: 16px;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
}

.brand .sig{
  font-weight:800;
  letter-spacing: 0.08em;
  color: var(--accent2);
  text-transform: lowercase;
}
.brand .sub{
  margin-top:2px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.controls{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
}

.btn{
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--text);
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 10px 12px;
  border-radius: 999px;
  cursor:pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, opacity 120ms ease;
  user-select:none;
  display:inline-flex;
  align-items:center;
  gap: 10px;
}
.btn:active{ transform: scale(0.98); }
.btn:hover{ border-color: rgba(68,255,134,0.70); }
.btn[disabled]{ opacity:0.45; cursor:not-allowed; transform:none; }

.btn-ghost{
  background: rgba(0,0,0,0.25);
}

.btn-primary{
  background: rgba(10, 28, 18, 0.75);
  border-color: rgba(68,255,134,0.70);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25) inset, 0 10px 30px rgba(0,0,0,0.25);
}

.dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.20);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.35) inset;
}

.panel{
  flex:1;
  width: min(980px, 100%);
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 14px;
  display:flex;
  flex-direction:column;
  min-height: 520px;
  backdrop-filter: blur(10px);
}

.panel-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 12px;
}
.title{
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--accent2);
  text-transform: uppercase;
  font-weight: 800;
}
.status{
  font-size: 12px;
  color: rgba(44,255,122,0.80);
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.console{
  margin-top: 14px;
  flex:1;
  overflow:auto;
  border: 1px solid rgba(68,255,134,0.25);
  border-radius: 12px;
  padding: 14px 14px;
  background: rgba(0,0,0,0.35);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25) inset;
  line-height: 1.35;
  font-size: 14px;
}
.console::-webkit-scrollbar{ height: 10px; width: 10px; }
.console::-webkit-scrollbar-thumb{ background: rgba(68,255,134,0.25); border-radius: 999px; }

.line{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  padding: 2px 0;
}
.prompt{
  color: rgba(183,255,217,0.95);
  min-width: 95px;
  text-transform: lowercase;
}
.msg{
  color: rgba(245,255,250,0.90);
  flex:1;
}

.muted{ color: var(--muted); }
.ok{ color: rgba(183,255,217,0.95); }
.warn{ color: rgba(255, 210, 120, 0.95); }
.bad{ color: rgba(255, 90, 90, 0.92); }
.hl{ color: rgba(44,255,122,0.92); font-weight: 800; }

.divider{
  height: 1px;
  background: rgba(68,255,134,0.20);
  margin: 14px 0;
}

.actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hint{
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  font-size: 11px;
  color: rgba(245,255,250,0.60);
  width: min(980px, 100%);
  margin: 0 auto;
  padding-bottom: 6px;
}


.footlinks{
  display:flex;
  gap:14px;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
}
.footlinks a{
  color: rgba(93,255,132,0.9);
  text-decoration:none;
  border-bottom: 1px solid rgba(93,255,132,0.18);
  padding-bottom:2px;
}
.footlinks a:hover{
  border-bottom-color: rgba(93,255,132,0.55);
}
/* Phase 2 modal */
.modal{
  position: fixed;
  inset: 0;
  display:none;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,0.58);
  z-index: 10;
  padding: 18px;
}
.modal.show{ display:flex; }

.modal-card{
  width: min(920px, 100%);
  background: rgba(8,12,10,0.96);
  border: 1px solid rgba(255,90,90,0.45);
  border-radius: var(--radius);
  box-shadow: 0 14px 70px rgba(0,0,0,0.65);
  padding: 18px;
}

.modal-title{
  font-weight: 900;
  letter-spacing: 0.10em;
  color: rgba(255,90,90,0.92);
  text-transform: uppercase;
  font-size: 14px;
}
.modal-sub{
  margin-top: 6px;
  color: rgba(245,255,250,0.75);
  font-size: 12px;
}
.modal-console{
  margin-top: 14px;
  border: 1px solid rgba(255,90,90,0.25);
  border-radius: 12px;
  padding: 14px;
  background: rgba(0,0,0,0.35);
  min-height: 260px;
  max-height: 48vh;
  overflow:auto;
  font-size: 13px;
  line-height: 1.35;
}
.modal-actions{
  margin-top: 14px;
  display:flex;
  justify-content:flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.tiny{
  margin-top: 10px;
  font-size: 11px;
  color: rgba(245,255,250,0.55);
}

@media (max-width: 720px){
  body{ overflow:hidden; }
  .panel{ min-height: 520px; }
  .prompt{ min-width: 70px; }
}


/* Permission Gate */
.gate{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.78);
  z-index: 9999;
  padding: 20px;
}
.gate.show{ display: flex; }
.gateCard{
  width: min(720px, 100%);
  border: 1px solid rgba(44,255,122,0.55);
  background: rgba(5,10,7,0.92);
  box-shadow: 0 0 24px rgba(44,255,122,0.14);
  border-radius: 16px;
  padding: 18px 18px 16px;
}
.gateTitle{
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(183,255,217,0.95);
  margin-bottom: 10px;
}
.gateText{
  color: rgba(230,255,240,0.88);
  line-height: 1.5;
  margin-bottom: 14px;
}
.gateBtns{
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.gateNote{
  font-size: 12px;
  color: rgba(230,255,240,0.65);
}
.btn.primary{
  border-color: rgba(183,255,217,0.75);
  box-shadow: 0 0 14px rgba(44,255,122,0.10);
}
