/* Фірмовий стиль: зелений термінал — той самий, що в MuzViz / TMP */
:root {
  --bg: #050805;
  --panel: #0d1a0d;
  --fg: #33ff66;
  --dim: #1f9944;
  --warn: #ffcc33;
  --err: #ff5544;
  --glow: 0 0 5px rgba(51, 255, 102, .55);
  --glow-warn: 0 0 5px rgba(255, 204, 51, .5);
  --wrap: 1240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg);
  color: var(--fg);
  font-family: "SF Mono", Menlo, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
  text-shadow: var(--glow);
}
a { color: var(--fg); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 1px dashed var(--fg); outline-offset: 2px; }
::selection { background: var(--fg); color: var(--bg); text-shadow: none; }
.dim { color: var(--dim); text-shadow: none; }
.blink { animation: blink 1.2s step-end infinite; }
@keyframes blink { 50% { opacity: .25; } }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; }

/* ───────── шапка ───────── */
.frame {
  border: 1px solid var(--fg);
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.frame b { letter-spacing: .05em; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 28px; height: 28px; border: 1px solid var(--dim); display: block; }

.seg { display: flex; border: 1px solid var(--dim); }
.seg button, .seg a {
  all: unset;
  cursor: pointer;
  padding: 5px 14px;
  font-size: 12px;
  color: var(--dim);
  text-shadow: none;
  white-space: nowrap;
}
.seg button:hover, .seg a:hover { color: var(--fg); text-shadow: var(--glow); }
.seg .on { background: var(--fg); color: var(--bg) !important; font-weight: bold; text-shadow: none !important; }
.menu { overflow-x: auto; scrollbar-width: none; }
.menu::-webkit-scrollbar { display: none; }
.menu a { flex: 1; text-align: center; text-transform: uppercase; letter-spacing: .05em; }

main { flex: 1; outline: none; }

/* ───────── блоки ───────── */
.card { border: 1px solid var(--dim); padding: 12px; }
.card h2, .h2 { font-size: 13px; margin-bottom: 10px; color: var(--fg); text-transform: uppercase; }
.card h2::before, .h2::before { content: "╔═ "; color: var(--dim); text-shadow: none; }
.card h2::after, .h2::after { content: " ═╗"; color: var(--dim); text-shadow: none; }
.field-label {
  display: block;
  margin-bottom: 4px;
  color: var(--dim);
  text-shadow: none;
  font-size: 11px;
  text-transform: uppercase;
}
.stack { display: flex; flex-direction: column; gap: 14px; }

.btn {
  all: unset;
  box-sizing: border-box;
  display: block;
  text-align: center;
  cursor: pointer;
  background: var(--fg);
  color: var(--bg);
  font: inherit;
  font-weight: bold;
  padding: 10px 16px;
  letter-spacing: .05em;
  text-shadow: none;
}
.btn:hover { box-shadow: var(--glow); }
.btn.warn { background: var(--warn); }
.btn.ghost {
  background: transparent;
  color: var(--dim);
  border: 1px solid var(--dim);
  font-weight: normal;
}
.btn.ghost:hover { color: var(--fg); border-color: var(--fg); text-shadow: var(--glow); }

/* ───────── головна ───────── */
.hero { display: grid; grid-template-columns: 1fr 340px; gap: 14px; align-items: stretch; }
.hero-text { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 20px; }
.boot { color: var(--dim); text-shadow: none; white-space: pre-wrap; min-height: 6em; font: inherit; }
.hero h1 { font-size: clamp(26px, 4.5vw, 44px); line-height: 1.1; letter-spacing: .04em; text-transform: uppercase; }
.hero .lead { max-width: 52ch; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-art {
  border: 1px solid var(--fg);
  box-shadow: var(--glow);
  background: #000;
  aspect-ratio: 1;
  overflow: hidden;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; display: block; }

.sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.section-tile { display: flex; flex-direction: column; gap: 6px; text-decoration: none; }
.section-tile h2 { margin-bottom: 2px; }
.section-tile:hover { border-color: var(--fg); box-shadow: var(--glow); }
.section-tile .count { margin-top: auto; padding-top: 6px; border-top: 1px dashed var(--dim); }

/* ───────── каталог ───────── */
.crumbs { color: var(--dim); text-shadow: none; }
.crumbs a { color: var(--fg); text-shadow: var(--glow); }
.page-head { display: flex; flex-direction: column; gap: 4px; }
.page-title { font-size: 22px; letter-spacing: .05em; text-transform: uppercase; }

.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; }
.search { flex: 1; max-width: 360px; min-width: 200px; }
input[type=search] {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--dim);
  color: var(--fg);
  font: inherit;
  padding: 6px 8px;
  text-shadow: var(--glow);
  border-radius: 0;
  -webkit-appearance: none;
}
input::placeholder { color: var(--dim); text-shadow: none; }
.empty { color: var(--dim); text-shadow: none; padding: 30px 0; text-align: center; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.item { display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.item:hover { border-color: var(--fg); box-shadow: var(--glow); }
.item:hover .screen { border-color: var(--fg); }
.item h2 { margin-bottom: 0; }
.item p { color: var(--dim); text-shadow: none; flex: 1; }
.item:hover p { color: var(--fg); text-shadow: var(--glow); }
.meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12px; }

/* Превʼю-«екран»: картинка або заглушка */
.screen {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--dim);
  overflow: hidden;
}
.screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.screen .glyph { font-size: 54px; line-height: 1; text-shadow: 0 0 12px rgba(51, 255, 102, .7); }
.screen .file { position: absolute; left: 8px; bottom: 5px; font-size: 11px; color: var(--dim); text-shadow: none; }
.screen.big { aspect-ratio: 21 / 8; border-color: var(--fg); box-shadow: var(--glow); }
.screen.big .glyph { font-size: 96px; }

.badge { font-weight: bold; letter-spacing: .05em; }
.badge.free { color: var(--fg); }
.badge.paid, .badge.mix { color: var(--warn); text-shadow: var(--glow-warn); }
.status { color: var(--dim); text-shadow: none; }
.status::before { content: "● "; }
.status.live::before { color: var(--fg); text-shadow: var(--glow); }
.status.beta::before { color: var(--warn); }
.status.soon::before { color: var(--dim); }

/* ───────── сторінка проекту ───────── */
.detail { display: grid; grid-template-columns: 1fr 320px; gap: 14px; align-items: start; }
.detail-main { display: flex; flex-direction: column; gap: 14px; }
.detail-main p + p { margin-top: 8px; }
.detail-main .lead { font-size: 14px; }
.features { list-style: none; }
.features li { padding: 5px 0 5px 18px; position: relative; border-bottom: 1px dashed var(--dim); }
.features li:last-child { border-bottom: none; }
.features li::before { content: ">"; position: absolute; left: 0; color: var(--dim); text-shadow: none; }
.detail-side { position: sticky; top: 16px; }
.access { font-weight: bold; margin-bottom: 6px; }
.access.paid, .access.mix { color: var(--warn); text-shadow: var(--glow-warn); }
.side-note { color: var(--dim); text-shadow: none; margin-bottom: 10px; }
.link { display: block; padding: 5px 0; border-bottom: 1px dashed var(--dim); text-decoration: none; }
.link:last-child { border-bottom: none; }
.link:hover { padding-left: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { padding: 1px 8px; font-size: 12px; border: 1px dashed var(--dim); color: var(--dim); text-shadow: none; }

.notfound { padding: 60px 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.notfound pre { font: inherit; font-size: 16px; color: var(--err); text-shadow: 0 0 5px rgba(255, 85, 68, .5); }

footer { padding: 6px 0 4px; text-align: center; color: var(--dim); text-shadow: none; font-size: 12px; }

/* ───────── шапка: кабінет ───────── */
.frame-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pick-btn {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  border: 1px solid var(--dim);
  color: var(--dim);
  padding: 4px 10px;
  text-shadow: none;
  white-space: nowrap;
}
.pick-btn:hover { border-color: var(--fg); color: var(--fg); text-shadow: var(--glow); }
.pick-btn.on { background: var(--fg); border-color: var(--fg); color: var(--bg); font-weight: bold; }

/* ───────── замовлення ───────── */
.cta { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
       border-color: var(--warn); }
.cta h2 { color: var(--warn); text-shadow: var(--glow-warn); }
.cta p { max-width: 70ch; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: block; }
.form input[type=text], .form textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--dim);
  color: var(--fg);
  font: inherit;
  padding: 6px 8px;
  text-shadow: var(--glow);
  border-radius: 0;
  resize: vertical;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--fg); }
.steps { list-style: none; display: flex; flex-direction: column; }
.steps li { display: flex; flex-direction: column; padding: 7px 0; border-bottom: 1px dashed var(--dim); }
.steps li:last-child { border-bottom: none; }

/* ───────── кабінет ───────── */
.warnbox { border: 1px solid var(--warn); color: var(--warn); padding: 8px 10px; font-size: 12px;
           text-shadow: var(--glow-warn); }
.warnbox b { display: block; margin-bottom: 2px; }
.mine { display: flex; flex-direction: column; gap: 10px; }
.mine h2 { margin-bottom: 0; }
.bar { height: 10px; background: var(--panel); border: 1px solid var(--dim); }
.bar i { display: block; height: 100%; background: var(--fg); box-shadow: var(--glow); }
.modules { list-style: none; }
.modules li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--dim); }
.modules li:last-child { border-bottom: none; }
.mine .btn.ghost { cursor: default; }
.mine.add { align-items: center; justify-content: center; text-decoration: none; border-style: dashed;
            color: var(--dim); text-shadow: none; min-height: 200px; }
.mine.add .glyph { font-size: 48px; line-height: 1; }
.mine.add:hover { color: var(--fg); border-color: var(--fg); text-shadow: var(--glow); }

/* ───────── вхід ───────── */
.login-card { max-width: 420px; }
.form input[type=password] {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--dim);
  color: var(--fg);
  font: inherit;
  padding: 6px 8px;
  text-shadow: var(--glow);
  border-radius: 0;
}
.form input[type=password]:focus { outline: none; border-color: var(--fg); }
.form .err { color: var(--err); text-shadow: 0 0 5px rgba(255, 85, 68, .5); }
.btn:disabled { opacity: .5; cursor: wait; }
.cabinet-user { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ───────── вузькі екрани ───────── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 300px; width: 100%; justify-self: center; }
  .detail { grid-template-columns: 1fr; }
  .detail-side { position: static; }
}
@media (max-width: 640px) {
  body { padding: 12px 16px; }
  .frame { padding: 8px 10px; }
  .menu { justify-content: flex-start; }
  .menu a { flex: none; padding: 5px 10px; }
  .search { max-width: none; }
  .toolbar .seg { width: 100%; }
  .toolbar .seg button { flex: 1; text-align: center; padding: 5px 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .blink { animation: none; }
}
