/* ─── layout.css — Terminal wrapper, titlebar, body, scrollbar & responsive ─── */

/* ─────────────────────────────────────────────
   Terminal wrapper
───────────────────────────────────────────── */
.terminal-wrapper {
  display: flex;
  flex-direction: column;
  width: 80vw;
  height: 80vh;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow:
    0 0 0 1px rgba(57, 255, 133, 0.06),
    0 20px 60px rgba(0, 0, 0, 0.7),
    0 0 80px rgba(57, 255, 133, 0.04);
  overflow: hidden;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  animation: terminalBoot 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes terminalBoot {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─────────────────────────────────────────────
   Title bar
───────────────────────────────────────────── */
.terminal-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--titlebar-h);
  padding: 0 14px;
  background: var(--bg-titlebar);
  border-bottom: 1px solid var(--border);
  user-select: none;
  flex-shrink: 0;
}

.titlebar-dots { display: flex; gap: 7px; align-items: center; }

.dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  opacity: 0.9;
  transition: opacity 0.2s;
}
.dot:hover { opacity: 1; }
.dot-red    { background: var(--red); box-shadow: 0 0 6px var(--red); }
.dot-yellow { background: var(--orange); box-shadow: 0 0 6px var(--orange); }
.dot-green  { background: var(--green); box-shadow: 0 0 6px var(--green); }

.titlebar-title {
  font-size: 12px;
  color: var(--gray);
  letter-spacing: 0.05em;
}

/* Mode toggle button */
.mode-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--gray);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  user-select: none;
}
.mode-toggle:hover {
  color: var(--green);
  border-color: var(--green);
  background: var(--card-bg);
}
.mode-toggle .mode-icon { font-size: 13px; line-height: 1; }
.mode-toggle .mode-label { font-size: 10.5px; }

/* ─────────────────────────────────────────────
   Terminal body
───────────────────────────────────────────── */
.terminal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-terminal);
  overflow: hidden;
  padding: 16px 20px;
}

/* Output area — scrollable */
#output-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 8px;
  scroll-behavior: smooth;
}

#output-area::-webkit-scrollbar {
  width: 4px;
}
#output-area::-webkit-scrollbar-track { background: transparent; }
#output-area::-webkit-scrollbar-thumb {
  background: var(--green-dim);
  border-radius: 4px;
  opacity: 0.4;
}

/* ─────────────────────────────────────────────
   Responsive
───────────────────────────────────────────── */
/* ── Tablet ───────────────────── */
@media (max-width: 900px) and (min-width: 601px) {
  .terminal-wrapper {
    width: 80vw;
    height: 75vh;
  }
}

/* ── Mobile — fullscreen ─────── */
@media (max-width: 600px) {
  html { font-size: 12px; }
  .terminal-wrapper {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
  .ascii-art { font-size: 8px; }
}
