/* ytbuch — хакерска тема: тъмен терминал, зелен фосфор, моноширинен шрифт.
   Без външни шрифтове и зависимости; scanlines и glow са чист CSS. */

:root {
  --bg: #070b10;
  --panel: #0b1118;
  --panel-bar: #0e1620;
  --line: #17342a;
  --line-soft: #132019;
  --green: #00ff9c;
  --green-dim: #37c987;
  --text: #c9e8d9;
  --heading: #eafff3;
  --muted: #7d9c8f;
  --shadow-glow: 0 0 26px rgba(0, 255, 156, 0.12);
  --wrap: 1120px;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", "Fira Code",
    Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--mono);
  background:
    radial-gradient(900px 420px at 80% -5%, rgba(0, 255, 156, 0.07), transparent 70%),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15.5px;
}

/* Фини сканиращи линии върху цялата страница */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.14) 0 1px,
    transparent 1px 3px
  );
  opacity: 0.4;
}

::selection { background: var(--green); color: #04120b; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: #8affd4; text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.6em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); color: var(--heading); }
h2 { font-size: clamp(1.25rem, 2.6vw, 1.7rem); color: var(--heading); }
h3 { font-size: 1rem; color: var(--green); }

p { margin: 0 0 1em; }

.prompt { color: var(--green); }
.comment { color: var(--muted); }
.glow { color: var(--green); text-shadow: 0 0 18px rgba(0, 255, 156, 0.45); }
.ok { color: var(--green-dim); }

/* Хедър */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7, 11, 16, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand {
  color: var(--heading);
  font-weight: 700;
  font-size: 1.1rem;
}

.brand:hover { text-decoration: none; color: var(--green); }

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.nav a { color: var(--muted); font-size: 0.92rem; }
.nav a:hover { color: var(--green); text-decoration: none; }

.nav-cta {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--green) !important;
}

.nav-cta:hover { border-color: var(--green); box-shadow: var(--shadow-glow); }

/* Hero */

.hero { border-bottom: 1px solid var(--line-soft); }

.hero-inner {
  padding: 72px 24px 56px;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.hero .comment { margin-bottom: 20px; }

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto 30px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 38px;
}

.badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.badges li {
  color: var(--green-dim);
  font-size: 0.85rem;
}

/* Бутони */

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.98rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--green);
  color: #04120b;
}

.btn-primary:hover {
  background: #5cffc4;
  color: #04120b;
  box-shadow: var(--shadow-glow);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--green);
  background: rgba(0, 255, 156, 0.04);
}

.btn-ghost:hover { border-color: var(--green); box-shadow: var(--shadow-glow); }

/* Терминални прозорци */

.term {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), var(--shadow-glow);
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: var(--panel-bar);
  border-bottom: 1px solid var(--line-soft);
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #1e3a2d;
  border: 1px solid #2b5340;
}

.term-title {
  margin-left: 10px;
  color: var(--muted);
  font-size: 0.8rem;
}

.term-body { padding: 18px 20px; }
.term-body p { margin: 0 0 6px; }
.term-body p:last-child { margin-bottom: 0; }

.cmd { color: var(--heading); }
.out { color: var(--text); }
.out.ok { color: var(--green-dim); }

.term-body code {
  background: #10231b;
  border: 1px solid var(--line-soft);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--green);
}

.term-body a { text-decoration: underline; }

.cursor {
  color: var(--green);
  animation: blink 1.1s steps(1) infinite;
}

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

/* Конфигурационният „файл“ */

.conf .key { color: var(--green); }
.conf .val { color: var(--text); }
.conf .bool { color: #ff7b72; }
.conf .comment { color: var(--muted); }
.conf p { white-space: pre-wrap; }

/* Секции */

.section {
  padding: 64px 0;
  border-bottom: 1px solid var(--line-soft);
}

.section-lead {
  color: var(--muted);
  margin-bottom: 32px;
  white-space: pre-line;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 20px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.card h3 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 0.98rem;
}

.card h3 .ok { font-size: 0.78rem; flex-shrink: 0; }

.card p { color: var(--muted); margin: 0; font-size: 0.92rem; }

.note { color: var(--muted); margin-top: 18px; }

.license-actions { justify-content: flex-start; margin-bottom: 0; }

/* Копиране на командите */

.copy {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--green-dim);
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 3px 10px;
  cursor: pointer;
}

.copy:hover { border-color: var(--green); color: var(--green); }

/* Футър */

.site-footer { padding: 24px 0; }

.footer-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-row p { margin: 0; }

/* Адаптивност */

@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .header-row { flex-direction: column; align-items: flex-start; padding: 12px 0; }
  .hero-inner { padding: 48px 24px 40px; }
  .grid { grid-template-columns: 1fr; }
  .section { padding: 46px 0; }
  .term-body { padding: 14px; font-size: 0.86rem; }
}

/* Достъпност: без анимации при reduced motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
  .card, .btn { transition: none; }
  .card:hover { transform: none; }
  body::after { display: none; }
}
