* { margin: 0; padding: 0; box-sizing: border-box; -webkit-text-size-adjust: none; }

html {
  height: 100%;
  background: url('/wingman/prototype/assets/images/desktop-background.jpg') center center / cover no-repeat fixed;
}

:root {
  --font: ui-monospace, 'SF Mono', 'Menlo', 'JetBrains Mono', monospace;
  --bg:       #0d1117;
  --bg-bar:   #161b22;
  --border:   rgba(255,255,255,0.07);
  --text:     #c9d1d9;
  --green:    #3fb950;
  --red:      #f85149;
  --yellow:   #d29922;
  --blue:     #58a6ff;
  --teal:     #39d0c8;
  --orange:   #ffa657;
  --purple:   #d2a8ff;
  --dim:      #6e7681;
  --vdim:     #30363d;
}

body {
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 500;
  background: transparent;
  position: fixed;
  inset: 0;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Window ──────────────────────────────────────────────── */
.window {
  position: absolute;
  inset: 40px;
  border-radius: 10px;
  background: var(--bg);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 0 0 1px rgba(0,0,0,0.5) inset,
    0 24px 64px rgba(0,0,0,0.75);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Title bar ───────────────────────────────────────────── */
.titlebar {
  flex-shrink: 0;
  height: 44px;
  background: var(--bg-bar);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 18px;
  user-select: none;
  position: relative;
}

.traffic-lights {
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot-red    { background: #ff5f57; }
#dot-red    { cursor: pointer; }
.dot-yellow { background: #ffbd2e; }
.dot-green  { background: #27c93f; }

.title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--dim);
  letter-spacing: 0;
  transition: color 0.4s ease;
}

/* ── Terminal ────────────────────────────────────────────── */
.terminal {
  flex: 1;
  overflow-y: auto;
  padding: 28px 36px 20px;
  font-size: inherit;
  line-height: 1.8;
  color: var(--text);
  scroll-behavior: smooth;
}

.terminal::-webkit-scrollbar { width: 5px; }
.terminal::-webkit-scrollbar-track { background: transparent; }
.terminal::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
}

/* ── Lines ───────────────────────────────────────────────── */
.line {
  display: block;
  white-space: pre-wrap;
  word-break: break-all;
  animation: lineIn 0.14s ease forwards;
  opacity: 0;
}

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

/* ── Prompt ──────────────────────────────────────────────── */
.prompt-line {
  display: none;
  align-items: center;
  gap: 0;
  margin-top: 2px;
}

.ps1 {
  color: var(--green);
  margin-right: 0.6ch;
}

.cursor {
  display: inline-block;
  width: 0.6ch;
  height: 1.2em;
  background: var(--text);
  vertical-align: text-bottom;
  animation: blink 1.1s step-end infinite;
}

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

/* ── Hidden mobile keyboard input ───────────────────────── */
#mobile-input {
  position: fixed;
  top: 0; left: 0;
  width: 1px; height: 1px;
  opacity: 0;
  border: none; outline: none; padding: 0;
  pointer-events: none;
  font-size: 16px; /* prevents iOS auto-zoom on focus */
  color: transparent;
  background: transparent;
}

/* ── Replay ──────────────────────────────────────────────── */
.replay-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--vdim);
  border-radius: 6px;
  color: var(--dim);
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  animation: lineIn 0.3s ease forwards;
  opacity: 0;
}

.replay-btn:hover {
  border-color: rgba(255,255,255,0.2);
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

/* ── Responsive scaling ──────────────────────────────────── */
@media screen and (min-width: 1200px) {
  .window { inset: 40px; }
}

@media screen and (max-width: 1199px) {
  .window {
    inset: auto;
    top: 50%;
    left: 50%;
    width: 1200px;
    height: 720px;
    transform: translate(-50%, -50%);
    transform-origin: center center;
  }
}
