/* ============================================================
   ZH.Tech — единый стиль нижних блоков + IT-сцена
   Подключается ПОСЛЕ основного бандла, работает поверх него.
   Палитра сайта: кремовый #DEDBC8 / #E1E0CC на чёрном.
   ============================================================ */

:root {
  --zh-cream: 222, 219, 200;
  --zh-card-radius: 1.1rem;
  --zh-panel-radius: 1.4rem;
}

/* ---------- Карточки услуг (#features) ---------- */

#features .grid-cols-1 {
  gap: 0.85rem !important;
}

#features article {
  border-radius: var(--zh-card-radius) !important;
  border: 1px solid rgba(var(--zh-cream), 0.09);
  background: linear-gradient(180deg, #1d1d1b 0%, #161615 100%);
  transition:
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    translate 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

#features article:hover {
  border-color: rgba(var(--zh-cream), 0.24);
  translate: 0 -4px;
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.65);
}

/* Иконки карточек — одинаковые «чипы» */
#features article span.grid.place-items-center {
  border-radius: 0.7rem;
  background: rgba(var(--zh-cream), 0.09);
  border: 1px solid rgba(var(--zh-cream), 0.1);
}

#features article img[src*='enterprise-automation'] {
  border-radius: 0.7rem;
  background: rgba(var(--zh-cream), 0.09);
  border: 1px solid rgba(var(--zh-cream), 0.1);
  padding: 0.45rem;
  object-fit: contain;
}

/* ---------- Блок RustDesk ---------- */

#rustdesk > div {
  border-radius: var(--zh-panel-radius) !important;
  border: 1px solid rgba(var(--zh-cream), 0.09);
  background: linear-gradient(180deg, #151513 0%, #0d0d0c 100%);
}

/* ---------- Контакты ---------- */

#contacts {
  border-radius: var(--zh-panel-radius) !important;
  border: 1px solid rgba(var(--zh-cream), 0.09);
  background: linear-gradient(180deg, #151513 0%, #0d0d0c 100%);
  margin-top: 0.85rem !important;
}

#contacts > div > div:first-child > p:first-child {
  letter-spacing: 0.12em;
}

#contacts a.group {
  border-radius: 0.85rem !important;
  border: 1px solid rgba(var(--zh-cream), 0.07);
  background: linear-gradient(180deg, #1d1d1b 0%, #171716 100%);
  transition:
    border-color 0.3s ease,
    background-color 0.3s ease,
    color 0.3s ease,
    translate 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

#contacts a.group:hover {
  translate: 0 -2px;
  border-color: rgba(var(--zh-cream), 0.4);
}

/* ---------- Футер ---------- */

#features footer {
  border-top: 1px solid rgba(var(--zh-cream), 0.09);
  padding-top: 1.75rem;
  margin-top: 3rem !important;
}

/* ============================================================
   IT-сцена вместо видео с космонавтом
   ============================================================ */

.zh-scene-card {
  background-image: none !important;
  background: linear-gradient(160deg, #191917 0%, #101010 55%, #0b0b0a 100%) !important;
}

.zh-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.zh-scene canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* --- Терминал --- */

.zh-term {
  position: absolute;
  top: 1.1rem;
  left: 1.1rem;
  right: 1.1rem;
  max-width: 420px;
  border-radius: 0.8rem;
  border: 1px solid rgba(var(--zh-cream), 0.16);
  background: rgba(10, 10, 9, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 44px -16px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: zh-term-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes zh-term-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.zh-term-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid rgba(var(--zh-cream), 0.1);
  background: rgba(var(--zh-cream), 0.04);
}

.zh-term-bar span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 9999px;
  background: rgba(var(--zh-cream), 0.22);
}

.zh-term-bar span:first-child {
  background: rgba(var(--zh-cream), 0.38);
}

.zh-term-bar em {
  margin-left: auto;
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(var(--zh-cream), 0.45);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.zh-term-body {
  margin: 0;
  padding: 0.6rem 0.9rem 0.7rem;
  height: 8.4em;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.75;
  color: rgba(var(--zh-cream), 0.88);
  white-space: pre-wrap;
  word-break: break-word;
}

.zh-term-body .zh-ok {
  color: #a8c69a;
}

.zh-term-body .zh-dim {
  color: rgba(var(--zh-cream), 0.45);
}

.zh-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: rgba(var(--zh-cream), 0.85);
  animation: zh-blink 1.05s steps(1) infinite;
}

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

/* Бейдж статуса в углу сцены */

.zh-badge {
  position: absolute;
  right: 1.1rem;
  top: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(var(--zh-cream), 0.16);
  background: rgba(10, 10, 9, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(var(--zh-cream), 0.75);
}

.zh-badge i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 9999px;
  background: #a8c69a;
  box-shadow: 0 0 8px 1px rgba(168, 198, 154, 0.7);
  animation: zh-pulse 2.2s ease-in-out infinite;
}

@keyframes zh-pulse {
  50% {
    opacity: 0.35;
    box-shadow: 0 0 3px 0 rgba(168, 198, 154, 0.35);
  }
}

@media (max-width: 480px) {
  .zh-term {
    max-width: none;
  }
  .zh-term-body {
    font-size: 10.5px;
    height: 7.5em;
  }
}

/* Бейдж прячем там, где он может налезть на терминал */
@media (max-width: 700px) {
  .zh-badge {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zh-term,
  .zh-badge i,
  .zh-cursor {
    animation: none;
  }
  #features article,
  #contacts a.group {
    transition: none;
  }
}

/* ============================================================
   V2: serif-акценты, spotlight, бегущая строка, мини-сценки
   ============================================================ */

/* --- Курсивные serif-акценты в заголовках (шрифт уже загружен) --- */

.zh-serif {
  font-family: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.05em;
  padding-right: 0.06em;
}

/* --- Spotlight: подсветка карточки следует за курсором --- */

#features article {
  position: relative;
  overflow: hidden;
}

#features article::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
  background: radial-gradient(
    340px circle at var(--zh-mx, 50%) var(--zh-my, 50%),
    rgba(var(--zh-cream), 0.07),
    transparent 65%
  );
}

#features article:hover::after {
  opacity: 1;
}

/* --- Микро-анимация иконок-чипов при наведении --- */

#features article span.grid.place-items-center,
#features article img[src*='enterprise-automation'] {
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease,
    border-color 0.4s ease;
}

#features article:hover span.grid.place-items-center,
#features article:hover img[src*='enterprise-automation'] {
  transform: translateY(-3px) rotate(-3deg) scale(1.05);
  border-color: rgba(var(--zh-cream), 0.28);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.7);
}

/* --- Бегущая строка технологий --- */

.zh-ticker {
  width: min(80rem, calc(100% - 3rem));
  margin: 0 auto;
  padding: 0.45rem 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.zh-ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  width: max-content;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(var(--zh-cream), 0.42);
  animation: zh-ticker 46s linear infinite;
  will-change: transform;
}

.zh-ticker-track span {
  margin-right: 1.3rem;
}

.zh-ticker-track i {
  font-style: normal;
  font-size: 6px;
  opacity: 0.35;
  margin-right: 1.3rem;
}

.zh-ticker:hover .zh-ticker-track {
  animation-play-state: paused;
}

@keyframes zh-ticker {
  to {
    transform: translateX(-50%);
  }
}

/* --- Свечение-обводка панели RustDesk --- */

@property --zh-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

#rustdesk > div {
  position: relative;
}

#rustdesk > div::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--zh-panel-radius);
  padding: 1px;
  background: conic-gradient(
    from var(--zh-angle),
    transparent 0deg,
    transparent 295deg,
    rgba(var(--zh-cream), 0.45) 330deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: zh-rotate 11s linear infinite;
  pointer-events: none;
}

@keyframes zh-rotate {
  to {
    --zh-angle: 360deg;
  }
}

/* --- Блеск по кнопке «Скачать клиент» --- */

#rustdesk a.bg-primary {
  position: relative;
  overflow: hidden;
}

#rustdesk a.bg-primary::after {
  content: '';
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -45%;
  width: 38%;
  transform: skewX(-18deg);
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  opacity: 0;
  pointer-events: none;
}

#rustdesk a.bg-primary:hover::after {
  animation: zh-shine 0.9s ease forwards;
}

@keyframes zh-shine {
  0% {
    left: -45%;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    left: 130%;
    opacity: 0;
  }
}

/* --- Контакты: стрелка «наружу» уезжает при наведении --- */

#contacts a.group > svg {
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.3s ease;
}

#contacts a.group:hover > svg {
  transform: translate(3px, -3px);
  opacity: 1;
}

/* --- Футер: подчёркивание ссылок «рисуется» --- */

#features footer a {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.35s ease;
}

#features footer a:hover {
  background-size: 100% 1px;
}

/* ============================================================
   Мини-сценки под текстом блоков
   ============================================================ */

.zh-mini {
  margin-top: 1.5rem;
}

.zh-mini svg {
  display: block;
  width: 100%;
  max-width: 230px;
  height: auto;
}

.zh-mini-wide svg {
  max-width: 300px;
}

/* общие элементы сценок */

.zhm-line {
  stroke: rgba(var(--zh-cream), 0.5);
  fill: rgba(var(--zh-cream), 0.03);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.zhm-hair {
  stroke: rgba(var(--zh-cream), 0.16);
  stroke-width: 1;
}

.zhm-hair2 {
  stroke: rgba(var(--zh-cream), 0.28);
  stroke-width: 1.2;
  stroke-linecap: round;
}

.zhm-fill {
  fill: rgb(var(--zh-cream));
}

.zhm-led {
  fill: #a8c69a;
  animation: zhm-led 1.8s ease-in-out infinite;
}

.zhm-led2 {
  fill: rgba(var(--zh-cream), 0.5);
  animation: zhm-led 2.4s ease-in-out infinite;
}

@keyframes zhm-led {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.15;
  }
}

/* 1С: растущие столбики графика */

.zhm-bar {
  fill: rgba(var(--zh-cream), 0.22);
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: zhm-bar 3.2s ease-in-out infinite alternate;
}

.zhm-bar.zhm-g {
  fill: rgba(168, 198, 154, 0.5);
}

@keyframes zhm-bar {
  from {
    transform: scaleY(0.45);
  }
  to {
    transform: scaleY(1);
  }
}

/* ПК: строки «печатаются» на экране */

.zhm-tl {
  fill: rgba(var(--zh-cream), 0.42);
  transform-box: fill-box;
  transform-origin: 0 50%;
  animation: zhm-type 4.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes zhm-type {
  0% {
    transform: scaleX(0);
    opacity: 1;
  }
  14% {
    transform: scaleX(1);
  }
  78% {
    transform: scaleX(1);
    opacity: 1;
  }
  88% {
    opacity: 0;
  }
  100% {
    transform: scaleX(0);
    opacity: 0;
  }
}

/* Серверы: индикаторы активности */

.zhm-act {
  fill: rgba(var(--zh-cream), 0.35);
  transform-box: fill-box;
  transform-origin: 0 50%;
  animation: zhm-act 1.1s steps(3, end) infinite alternate;
}

@keyframes zhm-act {
  from {
    transform: scaleX(0.3);
  }
  to {
    transform: scaleX(1);
  }
}

/* ЭЦП: подпись рисуется, галочка подтверждает */

.zhm-sig {
  stroke: #a8c69a;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 100;
  animation: zhm-sig 4.6s ease-in-out infinite;
}

@keyframes zhm-sig {
  0% {
    stroke-dashoffset: 100;
    opacity: 1;
  }
  40% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  80% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  92% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
  100% {
    stroke-dashoffset: 100;
    opacity: 0;
  }
}

.zhm-chkc {
  fill: #101010;
  stroke: #a8c69a;
  stroke-width: 1.4;
}

.zhm-chkp {
  stroke: #a8c69a;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.zhm-chk {
  transform-box: fill-box;
  transform-origin: center;
  animation: zhm-chk 4.6s ease-in-out infinite;
}

@keyframes zhm-chk {
  0%,
  38% {
    transform: scale(0);
    opacity: 0;
  }
  46% {
    transform: scale(1.15);
    opacity: 1;
  }
  52% {
    transform: scale(1);
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  92%,
  100% {
    opacity: 0;
  }
}

/* Кассы: сканер пробегает по штрихкоду */

.zhm-code rect {
  fill: rgba(var(--zh-cream), 0.45);
}

.zhm-scan {
  animation: zhm-scan 2.8s ease-in-out infinite alternate;
}

@keyframes zhm-scan {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(126px);
  }
}

/* Сети: волны Wi-Fi расходятся от роутера */

.zhm-arc {
  stroke: rgba(var(--zh-cream), 0.55);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  opacity: 0;
  animation: zhm-arc 2.6s ease-out infinite;
}

@keyframes zhm-arc {
  0% {
    opacity: 0;
  }
  25% {
    opacity: 0.9;
  }
  60%,
  100% {
    opacity: 0;
  }
}

/* RustDesk: пакеты бегут по защищённому каналу */

.zhm-dash {
  stroke: rgba(var(--zh-cream), 0.22);
  stroke-dasharray: 3 7;
  stroke-linecap: round;
}

.zhm-lock {
  stroke: #a8c69a;
  fill: none;
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.zhm-lockbg {
  fill: #0f0f0e;
  stroke: #a8c69a;
  stroke-width: 1.5;
}

.zhm-pk {
  fill: #a8c69a;
  animation: zhm-pk 3s linear infinite;
}

.zhm-pk.zhm-rev {
  animation-name: zhm-pkr;
}

@keyframes zhm-pk {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  8% {
    opacity: 0.9;
  }
  92% {
    opacity: 0.9;
  }
  100% {
    transform: translateX(158px);
    opacity: 0;
  }
}

@keyframes zhm-pkr {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  8% {
    opacity: 0.9;
  }
  92% {
    opacity: 0.9;
  }
  100% {
    transform: translateX(-158px);
    opacity: 0;
  }
}

/* Контакты: чат печатает, ответ приходит */

.zhm-tail {
  stroke: rgba(var(--zh-cream), 0.5);
  fill: none;
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.zhm-dot {
  fill: rgba(var(--zh-cream), 0.7);
  transform-box: fill-box;
  transform-origin: center;
  animation: zhm-dot 1.4s ease-in-out infinite;
}

@keyframes zhm-dot {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  30% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.zhm-replyb {
  fill: rgba(168, 198, 154, 0.1);
  stroke: rgba(168, 198, 154, 0.5);
  stroke-width: 1.4;
}

.zhm-reply {
  transform-box: fill-box;
  transform-origin: center;
  animation: zhm-reply 5.5s ease-in-out infinite;
}

@keyframes zhm-reply {
  0%,
  30% {
    transform: scale(0.8);
    opacity: 0;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  95%,
  100% {
    opacity: 0;
  }
}

/* ---------- RustDesk: окно клиента в тёмной теме ---------- */
/* Цикл 9s: набор ID -> нажатие -> подключение -> защищённая сессия */

.zh-rdwin {
  max-width: 430px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(var(--zh-cream), 0.1);
  background: #141518;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  animation: zh-rdwin-glow 9s linear infinite;
}

@keyframes zh-rdwin-glow {
  0%,
  60%,
  97%,
  100% {
    border-color: rgba(var(--zh-cream), 0.1);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  }
  66%,
  92% {
    border-color: rgba(168, 198, 154, 0.4);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), 0 0 26px rgba(168, 198, 154, 0.14);
  }
}

.zh-rdwin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 11px;
  background: #1b1d21;
  border-bottom: 1px solid rgba(var(--zh-cream), 0.06);
}

.zh-rdwin-app {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(var(--zh-cream), 0.85);
}

.zh-rdwin-app img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.zh-rdwin-btns {
  display: inline-flex;
  gap: 10px;
  font-size: 9px;
  line-height: 1;
  color: rgba(var(--zh-cream), 0.35);
}

.zh-rdwin-btns i {
  font-style: normal;
}

.zh-rdwin-btns .zh-rdwin-x {
  color: rgba(224, 108, 96, 0.75);
}

.zh-rdwin-body {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
}

.zh-rdwin-pane {
  flex: 1 1 150px;
  min-width: 0;
  padding: 11px 13px;
  border-radius: 8px;
  border: 1px solid rgba(var(--zh-cream), 0.05);
  background: #0f1012;
}

.zh-rdwin-label {
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(var(--zh-cream), 0.4);
}

.zh-rdwin-id {
  margin-top: 8px;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 16px;
  letter-spacing: 0.06em;
  color: rgba(var(--zh-cream), 0.92);
}

.zh-rdwin-sub {
  margin-top: 9px;
  font-size: 9px;
  color: rgba(var(--zh-cream), 0.35);
}

.zh-rdwin-pass {
  margin-top: 2px;
  font-size: 13px;
  letter-spacing: 0.22em;
  color: rgba(var(--zh-cream), 0.6);
}

.zh-rdwin-ready {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 9.5px;
  color: rgba(168, 198, 154, 0.85);
}

.zh-rdwin-ready i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a8c69a;
  animation: zh-rdwin-led 2.2s ease-in-out infinite;
}

@keyframes zh-rdwin-led {
  0%,
  100% {
    opacity: 0.45;
    box-shadow: 0 0 0 0 rgba(168, 198, 154, 0.35);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 6px 1px rgba(168, 198, 154, 0.35);
  }
}

.zh-rdwin-input {
  display: flex;
  align-items: center;
  height: 30px;
  margin-top: 8px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid rgba(var(--zh-cream), 0.13);
  background: #17181c;
  animation: zh-rdwin-inp 9s linear infinite;
}

@keyframes zh-rdwin-inp {
  0%,
  4%,
  62%,
  100% {
    border-color: rgba(var(--zh-cream), 0.13);
  }
  6%,
  58% {
    border-color: rgba(var(--zh-cream), 0.32);
  }
}

.zh-rdwin-typed {
  display: inline-block;
  overflow: hidden;
  max-width: 11ch;
  white-space: nowrap;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12px;
  color: rgba(var(--zh-cream), 0.9);
  animation: zh-rdwin-type 9s steps(11, end) infinite;
}

@keyframes zh-rdwin-type {
  0%,
  6% {
    width: 0ch;
  }
  26%,
  100% {
    width: 11ch;
  }
}

.zh-rdwin-caret {
  width: 1.5px;
  height: 13px;
  margin-left: 2px;
  background: rgba(var(--zh-cream), 0.85);
  animation: zh-rdwin-caret-blink 1s steps(2, start) infinite,
    zh-rdwin-caret-vis 9s linear infinite;
}

@keyframes zh-rdwin-caret-blink {
  from {
    visibility: visible;
  }
  to {
    visibility: hidden;
  }
}

@keyframes zh-rdwin-caret-vis {
  0%,
  32% {
    opacity: 1;
  }
  34%,
  100% {
    opacity: 0;
  }
}

.zh-rdwin-connect {
  display: block;
  margin-top: 10px;
  padding: 7px 0;
  border-radius: 6px;
  background: #0071ff;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
  animation: zh-rdwin-press 9s ease-in-out infinite;
}

@keyframes zh-rdwin-press {
  0%,
  30%,
  36%,
  100% {
    transform: none;
    filter: none;
  }
  32.5% {
    transform: translateY(1px) scale(0.965);
    filter: brightness(1.25);
  }
}

.zh-rdwin-status {
  position: relative;
  height: 15px;
  margin-top: 9px;
  font-size: 10px;
}

.zh-rdwin-connecting,
.zh-rdwin-ok {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  opacity: 0;
}

.zh-rdwin-connecting {
  color: rgba(var(--zh-cream), 0.6);
  animation: zh-rdwin-connecting 9s linear infinite;
}

@keyframes zh-rdwin-connecting {
  0%,
  35% {
    opacity: 0;
  }
  38%,
  59% {
    opacity: 1;
  }
  62%,
  100% {
    opacity: 0;
  }
}

.zh-rdwin-spin {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid rgba(var(--zh-cream), 0.22);
  border-top-color: rgba(var(--zh-cream), 0.8);
  animation: zh-rdwin-spin 0.75s linear infinite;
}

@keyframes zh-rdwin-spin {
  to {
    transform: rotate(360deg);
  }
}

.zh-rdwin-ok {
  color: #a8c69a;
  animation: zh-rdwin-ok 9s linear infinite;
}

.zh-rdwin-ok i {
  width: 7px;
  height: 4px;
  border-left: 1.5px solid #a8c69a;
  border-bottom: 1.5px solid #a8c69a;
  transform: rotate(-45deg) translateY(-1px);
}

@keyframes zh-rdwin-ok {
  0%,
  62% {
    opacity: 0;
  }
  65%,
  94% {
    opacity: 1;
  }
  98%,
  100% {
    opacity: 0;
  }
}

@media (max-width: 480px) {
  .zh-ticker-track {
    font-size: 9.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zh-ticker-track,
  .zh-mini *,
  #rustdesk > div::before,
  .zhm-led,
  .zhm-led2 {
    animation: none !important;
  }

  .zh-rdwin-caret {
    display: none;
  }

  .zh-rdwin-ok {
    opacity: 1;
  }
}
