/*
 * Главная dev.prolink.uz — один большой терминал (18 октября 2026).
 *
 * Просьба владельца: «просто по центру большой терминал под шапкой, там
 * печатается функционал сайта; тёмный, как PowerShell». Окно — как Windows
 * Terminal: тёмная полоса с вкладкой «PowerShell» и кнопками окна справа,
 * почти чёрный экран, цвета PowerShell: имя команды жёлтым, ключи серым.
 * Печатает terminal.js. Фон с бегущими символами остаётся (решение
 * владельца) — окно непрозрачное, текст на «дожде» не лежит.
 *
 * Шрифты свои (CSP запрещает сторонние): Cascadia Mono — если она есть в
 * системе (Windows), иначе JetBrains Mono / IBM Plex Mono из /assets/fonts.
 */

@font-face {
  font-family: 'Plex Mono';
  src: url('/assets/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('/assets/fonts/ibm-plex-mono-cyrillic-400-normal.woff2') format('woff2');
  font-weight: 400; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('/assets/fonts/ibm-plex-mono-latin-600-normal.woff2') format('woff2');
  font-weight: 600; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('/assets/fonts/ibm-plex-mono-cyrillic-600-normal.woff2') format('woff2');
  font-weight: 600; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JB Mono';
  src: url('/assets/fonts/jetbrains-mono-latin-800-normal.woff2') format('woff2');
  font-weight: 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JB Mono';
  src: url('/assets/fonts/jetbrains-mono-cyrillic-800-normal.woff2') format('woff2');
  font-weight: 800; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

.matrix-page {
  --ps-bg:    #0c0c0c;   /* экран Windows Terminal */
  --ps-bar:   #1f1f1f;   /* полоса вкладок */
  --ps-tab:   #0c0c0c;
  --ps-text:  #cccccc;
  --ps-dim:   #767676;
  --ps-yel:   #f9f1a5;   /* имя команды, как в PowerShell */
  --ps-grn:   #16c60c;
  --ps-cyan:  #61d6d6;
  --ps-gold:  #c19c00;
  --ps-line:  #2d2d2d;
  --ps-font: 'Cascadia Mono', 'Cascadia Code', 'Plex Mono', ui-monospace, Menlo, Consolas, monospace;
}

.ps-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1100px;
  padding-top: clamp(20px, 5vh, 56px);
  position: relative;
  z-index: 1;
}

.ps { width: 100%; display: flex; flex-direction: column; align-items: center }

/* ── Окно ── */
.ps__win {
  width: 100%;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  overflow: hidden;
  background: var(--ps-bg);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .95), 0 0 0 1px rgba(0, 0, 0, .6), 0 0 80px -20px rgba(22, 198, 12, .18);
  cursor: text;
}
.ps__bar {
  display: flex;
  align-items: stretch;
  height: 40px;
  background: var(--ps-bar);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 12.5px;
  color: #e6e6e6;
  user-select: none;
  -webkit-user-select: none;
}
.ps__tab {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 6px 0 0 8px;
  padding: 0 10px 0 12px;
  min-width: 180px;
  border-radius: 7px 7px 0 0;
  background: var(--ps-tab);
}
.ps__icon {
  display: grid;
  place-items: center;
  width: 16px;
  height: 14px;
  border-radius: 2px;
  background: #2671be;
  color: #fff;
  font: 700 8.5px/1 var(--ps-font);
  font-style: normal;
}
.ps__x { margin-left: auto; color: #9a9a9a; font-weight: 400; font-size: 14px }
.ps__plus { display: grid; place-items: center; width: 34px; color: #bdbdbd; font-size: 16px }
.ps__grow { flex: 1 }
.ps__ctl { display: grid; place-items: center; width: 46px; color: #d6d6d6; font-size: 13px }
.ps__ctl--close:hover { background: #c42b1c; color: #fff }

.ps__screen {
  height: clamp(380px, 62vh, 620px);
  padding: 14px 18px 18px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #444 transparent;
  color: var(--ps-text);
  font-family: var(--ps-font);
  font-size: 15px;
  line-height: 1.55;
  outline: none;
}
.ps-line { white-space: pre-wrap; word-break: break-word; min-height: 1.55em }
.ps-prompt { color: var(--ps-text) }
.ps-cmd { color: var(--ps-yel) }
.ps-arg { color: var(--ps-dim) }
.ps-val { color: var(--ps-text) }
.ps-dim, .ps-d { color: var(--ps-dim) }
.ps-g { color: var(--ps-grn) }
.ps-y { color: var(--ps-gold) }
.ps-c { color: var(--ps-cyan) }

/* Курсор Windows Terminal — заливка на всю клетку */
.ps-cursor {
  display: inline-block;
  width: .6em;
  height: 1.15em;
  margin-left: 1px;
  vertical-align: -.2em;
  background: var(--ps-text);
}
.ps-cursor.is-blink { animation: blink 1.06s steps(1) infinite }

.ps__hint { margin: 12px 0 0; padding: 3px 10px; border-radius: 4px; background: rgba(0, 0, 0, .8); color: #9fbfa8; font-size: 12.5px; text-align: center }

/* ── Кнопки ── */
.ps__acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px }
.ps-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 20px;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  background: #1a1a1a;
  color: #e6e6e6 !important;
  font-family: var(--ps-font);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: border-color .12s, background .12s;
}
.ps-btn:hover { border-color: #6a6a6a; background: #222 }
.ps-btn--go { background: #16c60c; border-color: #16c60c; color: #041a03 !important }
.ps-btn--go:hover { background: #3be032; border-color: #3be032 }
.ps-btn:focus-visible { outline: 2px solid var(--ps-yel); outline-offset: 3px }

/* ── Текст для программ чтения с экрана и для страницы без JavaScript ── */
.ps-static { width: 100%; margin-top: 16px; padding: 16px 18px; border: 1px solid var(--ps-line); border-radius: 8px; background: var(--ps-bg); color: var(--ps-text); font-family: var(--ps-font); font-size: 14.5px; line-height: 1.6 }
.ps-static p { margin: 0 0 8px }
.ps-static ul { margin: 0; padding-left: 2ch }
.js .ps-static,
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
html:not(.js) .ps__win, html:not(.js) .ps__hint { display: none }

/* ── Подвал ── */
.ps-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  margin-top: 34px;
  padding: 8px 14px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .78);
  font-size: 12.5px;
}
.ps-foot a { color: #9fbfa8; text-decoration: none; padding: 4px 0 }
.ps-foot a:hover { color: #fff }

/* ── Экран «только на компьютере» (mobile.html) ── */
.ps__win--static { cursor: default }
/* Здесь окно — обычный текст, а не печать terminal.js: показывается и без JavaScript */
html:not(.js) .ps__win.ps__win--static, html:not(.js) .ps__hint.ps__hint--static { display: block }
.ps__screen.ps__screen--auto { height: auto; overflow: visible }
.ps__screen.ps__screen--auto .ps-line { margin: 0; font-size: inherit; font-weight: 400 }
.ps-err { color: #e74856 }
.ps-url { font-weight: 600 }

/* ── Узкий экран ── */
@media (max-width: 640px) {
  .ps__screen { height: clamp(360px, 64vh, 560px); padding: 10px 12px 14px; font-size: 13px }
  .ps__tab { min-width: 0 }
  .ps__plus { display: none }
  .ps__ctl { width: 34px }
  .ps__acts .ps-btn { flex: 1 1 100% }
}
@media (max-width: 360px) {
  .ps__screen { font-size: 12.5px }
  .ps__ctl:not(.ps__ctl--close) { display: none }
}
@media (prefers-reduced-motion: reduce) {
  .ps-cursor.is-blink { animation: none }
}
