/*
  Anthracite themed console-style UI for polesovsky.at
  - Keep styles simple and focused
  - Provide modern, accessible defaults
  - Responsive out of the box
*/

:root {
  --bg: #121212; /* deep anthracite */
  --bg-elev: #1a1a1a; /* slightly lighter for surfaces */
  --text: #e6e6e6; /* high-contrast text */
  --muted: #a0a0a0; /* secondary text */
  --accent: #4ad295; /* green-ish accent */
  --accent-2: #7aa7ff; /* soft blue for selection/links */
  --error: #ff6b6b; /* error color */
  --shadow: rgba(0, 0, 0, 0.5);
  --radius: 10px;
  --mono: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  --sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji';
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: radial-gradient(1200px 800px at 50% -10%, #1b1b1b, var(--bg));
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  min-height: 100dvh;
  padding: 24px;
  padding-bottom: 84px; /* space for fixed footer so input is not covered */
  display: flex;
  align-items: center;
  justify-content: center;
}

.terminal {
  width: 100%;
  max-width: 960px;
  background: var(--bg-elev);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.terminal__titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, #202020, #171717);
}

.titlebar__dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.6);
}
.dot--red { background: #ff5f56; }
.dot--yellow { background: #ffbd2e; }
.dot--green { background: #27c93f; }

.titlebar__title {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
}

.spacer { width: 0; height: 0; }

.titlebar__lang {
  margin-left: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
}
.titlebar__lang:hover {
  background: rgba(255,255,255,0.1);
}

.terminal__output {
  font-family: var(--mono);
  padding: 18px 16px 8px 16px;
  height: min(60vh, 520px);
  overflow: auto;
  line-height: 1.6;
  /* Match scrollbar to terminal theme (Firefox) */
  scrollbar-width: thin;
  scrollbar-color: #2a2a2a #161616;
}

/* Match scrollbar to terminal theme (WebKit: Chrome, Edge, Safari) */
.terminal__output::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.terminal__output::-webkit-scrollbar-track {
  background: #161616;
  border-radius: var(--radius);
}
.terminal__output::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: var(--radius);
  border: 2px solid #161616;
}
.terminal__output::-webkit-scrollbar-thumb:hover {
  background: #3a3a3a;
}

.terminal__output .echo {
  color: var(--accent-2);
}

.terminal__output .error {
  color: var(--error);
}

.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 16px;
  align-items: baseline;
  font-family: var(--mono);
}
.kv__key {
  color: var(--muted);
}
.kv__value {
  color: var(--text);
}

.terminal__inputrow {
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 12px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.prompt {
  font-family: var(--mono);
  color: var(--accent);
  white-space: nowrap;
}

.terminal__inputrow input[type="text"] {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--text);
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
}

.terminal__inputrow input::placeholder {
  color: #6f7b7b;
}

.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(32,32,32,0.7), rgba(18,18,18,0.95));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  z-index: 100;
}

.footer__inner {
  font-size: 13px;
  color: var(--muted);
}

.footer__link {
  color: var(--muted);
  text-decoration: none;
}
.footer__link:hover {
  color: var(--text);
  text-decoration: underline;
}

/* Accessibility helpers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Small screens */
@media (max-width: 480px) {
  .kv { grid-template-columns: 110px 1fr; }
}


