/* Экран входа и портал: вид лендинга cyberservices.pro — цифровой дождь
   и чёрная полоса с печатающимся текстом. Всегда тёмная тема. */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  background: #000;
  color: #00ff41;
  font-family: "Courier New", "DejaVu Sans Mono", Consolas, monospace;
  overflow: hidden;
}
#matrix {
  position: fixed; inset: 0; width: 100%; height: 100%;
  display: block; background: #000; z-index: 0;
}
.panel {
  position: fixed; left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  min-height: 33vh;
  max-height: 90vh;
  overflow-y: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 6vh 5vw;
  background: #000;
  box-shadow: 0 0 60px 30px #000, 0 0 120px 60px rgba(0, 0, 0, 0.9);
  z-index: 1;
}

/* --- экран входа --- */
#term-panel { cursor: text; }
.lines {
  display: flex; flex-direction: column; gap: 0.35em;
  width: 100%; max-width: 800px;
}
.lines p {
  margin: 0;
  font-size: clamp(15px, 3.4vw, 30px);
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: left;
  color: #d7ffe4;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.55);
  white-space: pre;
  max-width: 100%;
  min-height: 1.5em;
}
.caret {
  margin-left: 0.05em;
  color: #00ff41;
  animation: blink 1s step-end infinite;
}
/* Настоящее поле ввода невидимо: на экране — его зеркальная копия и мигающий
   курсор, как в напечатанных строках выше. */
#term-input {
  position: fixed; left: 0; top: 0; width: 1px; height: 1px;
  opacity: 0; border: 0; padding: 0; margin: 0;
  font-size: 16px; /* без зума на iOS при фокусе */
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .caret { animation: none; }
}
@media (max-width: 480px) {
  .lines p { font-size: clamp(12px, 4.6vw, 20px); white-space: pre-wrap; }
}

/* --- портал --- */
.portal { width: 100%; max-width: 800px; }
.portal header {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; margin-bottom: 1.5rem;
}
.portal h1 {
  font-size: clamp(15px, 3vw, 24px);
  font-weight: normal;
  letter-spacing: 0.04em;
  color: #d7ffe4;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.55);
}
.portal a { color: #00ff41; }
.logout { font-size: 0.9rem; opacity: 0.8; }
.logout:hover { opacity: 1; }
.cards {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.card {
  display: flex; flex-direction: column; gap: 0.35rem;
  padding: 1rem 1.1rem;
  border: 1px solid #0a4d1f;
  border-radius: 4px;
  text-decoration: none;
  background: #000;
}
.card:hover, .card:focus-visible {
  border-color: #00ff41;
  box-shadow: 0 0 12px rgba(0, 255, 65, 0.35);
  outline: none;
}
.card .title { font-size: 1.2rem; color: #d7ffe4; text-shadow: 0 0 8px rgba(0, 255, 65, 0.55); }
.card .host { font-size: 0.8rem; opacity: 0.7; }
.card .desc { font-size: 0.9rem; color: #7fd99a; }
.notice { color: #ff7070; margin-bottom: 1rem; }
.empty { color: #7fd99a; }
