*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root{
  --bg:     #07090f;
  --tbg:    rgba(5,8,15,0.88);
  --border: rgba(0,255,120,0.14);
  --green:  #00ff88;
  --cyan:   #00e5ff;
  --blue:   #5baeff;
  --yellow: #ffd55c;
  --white:  #ddeeff;
  --mid:    #6a90a8;
  --dim:    #3a5060;
  --mono:   'JetBrains Mono', monospace;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
}

#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

/* centering wrapper */
.stage {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* the terminal box */
.terminal {
  width: 100%;
  max-width: 820px;
  height: calc(100vh - 48px);
  max-height: 680px;
  display: flex;
  flex-direction: column;
  background: var(--tbg);
  border: 1px solid var(--border);
  border-radius: 12px;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow:
    0 0 0 1px rgba(0,255,120,0.04),
    0 0 60px rgba(0,255,120,0.07),
    0 40px 100px rgba(0,0,0,0.7);
  overflow: hidden;
}

/* title bar */
.tbar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 18px;
  flex-shrink: 0;
  background: rgba(0,0,0,0.4);
  border-bottom: 1px solid var(--border);
  user-select: none;
}

.btn-r, .btn-y, .btn-g {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.btn-r { background: #ff5f57; }
.btn-y { background: #ffbd2e; }
.btn-g { background: #28ca41; }

.ttitle {
  font-size: .72rem;
  color: var(--dim);
  margin-left: 8px;
  letter-spacing: .05em;
}

/* scrollable body */
.tbody {
  flex: 1;
  overflow-y: auto;
  padding: 24px 30px 60px;
  font-size: .86rem;
  line-height: 2;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,255,120,.12) transparent;
}
.tbody::-webkit-scrollbar { width: 3px; }
.tbody::-webkit-scrollbar-thumb {
  background: rgba(0,255,120,.15);
  border-radius: 2px;
}

/* blinking cursor */
.cur {
  display: inline-block;
  width: 8px;
  height: .9em;
  background: var(--green);
  vertical-align: text-bottom;
  animation: blink .9s step-end infinite;
  margin-left: 1px;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* output colors */
.g  { color: var(--green);  }
.c  { color: var(--cyan);   }
.b  { color: var(--blue);   }
.y  { color: var(--yellow); }
.w  { color: var(--white);  }
.md { color: var(--mid);    }
.dm { color: var(--dim);    }

@media (max-width: 580px) {
  .stage { padding: 12px; }
  .tbody { padding: 16px 16px 50px; font-size: .78rem; }
}
