@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-cyrillic-400-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-cyrillic-700-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2190-21FF, U+2200-22FF;
}

:root {
  --bg: #0d0f12;
  --window-bg: #15181d;
  --border: #272c34;
  --fg: #cdd3dc;
  --muted: #6b7280;
  --accent: #7fd6a0;
  --radius: 8px;
  --font: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.window {
  width: 560px;
  max-width: 100%;
  height: 340px;
  max-height: calc(100dvh - 32px);
  background: var(--window-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.titlebar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: #11141a;
  border-bottom: 1px solid var(--border);
  user-select: none;
}

.dots {
  display: inline-flex;
  gap: 6px;
}
.dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--border);
  display: block;
}

.title {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.screen {
  flex: 1 1 auto;
  padding: 14px 16px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  outline: none;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.screen::-webkit-scrollbar { width: 8px; }
.screen::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 8px;
}

.line { min-height: 1.5em; }
.prompt { color: var(--accent); }
.accent { color: var(--accent); }
.muted { color: var(--muted); }

.cursor {
  display: inline-block;
  width: 0.6ch;
  height: 1.1em;
  vertical-align: text-bottom;
  background: var(--accent);
  margin-left: 1px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
  .screen { scroll-behavior: auto; }
}

.offscreen {
  position: fixed;
  top: -1000px;
  left: -1000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  border: 0;
  padding: 0;
}

@media (max-width: 420px) {
  body { padding: 10px; }
  .window { height: 70dvh; }
  .screen { font-size: 13px; }
}
