/* Glassmorphism macOS Terminal-style UI */
html, body {
  height: 100%;
  margin: 0;
}
body {
  display: block;
  background: radial-gradient(circle at 20% 20%, #07101a 0%, #050611 50%, #030307 100%);
  font-family: Menlo, Monaco, 'Courier New', monospace;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100vh;
  overflow: hidden; /* page scroll disabled; terminal scrolls internally */
}

/* Terminal window: frosted glass panel */
.terminal-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(980px, 94%);
  max-height: calc(100vh - 48px);

  /* glass background */
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);

  /* frosted effect */
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);

  box-shadow: 0 30px 60px rgba(2,6,23,0.6), inset 0 1px 0 rgba(255,255,255,0.02);
  overflow: hidden;
  color: #e6ffea; /* softer terminal green */
}

/* decorative border glow (pseudo element) */
.terminal-window::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 1px; /* creates a subtle inner gradient border */
  background: linear-gradient(90deg, rgba(88,166,255,0.06), rgba(57,255,20,0.03));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  pointer-events: none;
}

.titlebar {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.traffic { display:flex; gap:8px; align-items:center; }
.dot { width:12px; height:12px; border-radius:50%; box-shadow: inset 0 -1px rgba(0,0,0,0.35); }
.dot.red { background:#ff5f56; }
.dot.yellow { background:#ffbd2e; }
.dot.green { background:#27c93f; }

.title { color: rgba(230,230,230,0.9); font-size:13px; font-weight:600; }

/* terminal-content is scrollable */
.terminal-content {
  padding: 18px 20px 36px;
  max-height: calc(100vh - 42px - 48px); /* titlebar + outer gap */
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}

/* custom scrollbar for WebKit */
.terminal-content::-webkit-scrollbar { width: 10px; }
.terminal-content::-webkit-scrollbar-track { background: transparent; }
.terminal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,0.12);
}

.ascii-name {
  font-family: Menlo, Monaco, 'Courier New', monospace;
  white-space: pre;
  font-size: 12.5px;
  line-height: 0.95;
  color: #88baff;
  margin: 0 0 10px 0;
  padding: 0;
  text-align: center;
  transform: skewX(-4deg);
}

#console {
  width: 100%;
  box-sizing: border-box;
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.45;
  color: #c6ffd5; /* light green/tint for readability */
  background: transparent;
  padding: 12px 6px 20px 6px;
}

#console a { color: #9ecbff; text-decoration: underline; }

/* subtle terminal cursor */
#console::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 1em;
  background: #9ef08b;
  margin-left: 6px;
  vertical-align: middle;
  animation: blink 1s steps(2) infinite;
  box-shadow: 0 0 10px rgba(158,240,139,0.14);
}

@keyframes blink { 50% { opacity: 0; } }

/* responsive */
@media (max-width: 640px) {
  .terminal-window { width: 98%; max-height: calc(100vh - 32px); }
  .ascii-name { font-size: 10.5px; }
  .title { font-size: 12px; }
}
