/* Reset & body */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 14px;
  line-height: 1.7;
  min-height: 100vh;
}

/* Scanline overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ======= GHOSTTY-STYLE TITLE BAR ======= */
.titlebar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 14px;
  -webkit-app-region: drag;
}

.titlebar-dots {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
}

.titlebar-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
}
.titlebar-dots span:nth-child(1) { background: var(--red); }
.titlebar-dots span:nth-child(2) { background: var(--yellow); }
.titlebar-dots span:nth-child(3) { background: var(--green); }

.titlebar-title {
  flex: 1;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 0.3px;
  user-select: none;
  margin-right: 47px;
}

/* Main terminal area */
.terminal {
  padding: 40px 24px 56px;
}

/* Command lines */
.cmd {
  margin-bottom: 40px;
  opacity: 0;
  animation: typeIn 0.4s ease forwards;
}

.prompt {
  color: var(--prompt);
  user-select: none;
}

.prompt .path { color: var(--cyan); }
.prompt .arrow { color: var(--green); }

.cmd-input { color: var(--text); }
.cmd-input .keyword { color: var(--magenta); }
.cmd-input .func { color: var(--yellow); }
.cmd-input .string { color: var(--green); }
.cmd-input .comment { color: var(--text-dim); font-style: italic; }
.cmd-input .number { color: var(--orange); }
.cmd-input .builtin { color: var(--cyan); }
.cmd-input .decorator { color: var(--orange); }

/* Cursor blink */
.cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--cursor);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

/* ======= TMUX STATUS BAR ======= */
.tmux-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 12px;
  z-index: 100;
}

.tmux-left {
  display: flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0;
}

.tmux-indicator {
  background: var(--tmux-accent);
  color: var(--bg);
  font-weight: 700;
  padding: 0 14px;
  height: 28px;
  line-height: 28px;
  font-size: 11px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.tmux-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 2px;
  overflow: hidden;
}

.tmux-window {
  color: var(--text-dim);
  padding: 0 10px;
  height: 28px;
  line-height: 28px;
  font-size: 12px;
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}

.tmux-window:hover {
  color: var(--text);
}

.tmux-window.active {
  color: var(--text);
}

.tmux-right {
  display: flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0;
}

.tmux-session {
  background: var(--tmux-accent);
  color: var(--bg);
  font-weight: 500;
  padding: 0 14px;
  height: 28px;
  line-height: 28px;
  font-size: 11px;
  white-space: nowrap;
}

/* AI disclosure banner */
.ai-banner {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 6px 24px;
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  letter-spacing: 0.3px;
}

.ai-banner .tag {
  color: var(--yellow);
  font-weight: 500;
}

.ai-banner a {
  color: var(--cyan);
  text-decoration: none;
}

.ai-banner a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Animations */
@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes typeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* Responsive — shared */
@media (max-width: 640px) {
  body { font-size: 12px; }
  .titlebar { padding: 0 12px; height: 34px; }
  .titlebar-title { margin-right: 40px; font-size: 11px; }
  .tmux-indicator { padding: 0 10px; font-size: 10px; }
  .tmux-session { padding: 0 10px; font-size: 10px; }
  .tmux-window { padding: 0 6px; font-size: 11px; }
}
