/* Базовые ретро-стили */
body, html {
  background-color: #030703;
  color: #33ff33;
  font-family: 'VT323', Courier, monospace;
  font-size: 20px;
  width: 100%;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Оболочка CRT со сканирующими линиями и свечением */
.crt-screen {
  position: relative;
  width: 100vw;
  height: 100vh;
  background-color: #030703;
  box-sizing: border-box;
  padding: 20px;
  text-shadow: 0 0 4px rgba(51, 255, 51, 0.55);
}

/* Наложение ЭЛТ-эффекта */
.crt-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
    radial-gradient(circle, rgba(0,0,0,0) 60%, rgba(0,0,0,0.85) 100%);
  background-size: 100% 4px, 100% 100%;
  z-index: 99;
  pointer-events: none;
  animation: flicker 0.15s infinite;
}

/* Анимация мерцания экрана */
@keyframes flicker {
  0% { opacity: 0.985; }
  50% { opacity: 1; }
  100% { opacity: 0.99; }
}

/* Экраны и слои */
.screen-layer {
  display: none;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.screen-layer.active {
  display: flex;
  flex-direction: column;
}

/* Кнопка Skip */
.skip-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: 1px solid #33ff33;
  color: #33ff33;
  font-family: inherit;
  font-size: 16px;
  padding: 4px 10px;
  cursor: pointer;
  z-index: 100;
  transition: all 0.2s;
  text-shadow: inherit;
}

.skip-btn:hover {
  background-color: #33ff33;
  color: #030703;
  box-shadow: 0 0 10px #33ff33;
}

/* Сплэш экран */
#splash-screen {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.ascii-logo {
  font-size: 14px;
  line-height: 1.2;
  margin-bottom: 25px;
  white-space: pre-wrap;
  display: inline-block;
  text-align: left;
}

.blink {
  animation: blink-anim 1.2s infinite steps(1);
}

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

/* Лог загрузки BIOS */
.boot-log {
  width: 100%;
  height: 100%;
  font-size: 18px;
  line-height: 1.3;
  overflow-y: auto;
  white-space: pre-wrap;
}

/* Вывод терминала */
.terminal-output {
  flex-grow: 1;
  overflow-y: auto;
  margin-bottom: 10px;
  line-height: 1.4;
  font-size: 22px;
  padding-right: 5px;
}

/* Строка ввода */
.input-line {
  display: flex;
  align-items: center;
  font-size: 22px;
}

.prompt {
  margin-right: 10px;
  white-space: nowrap;
}

#command-input {
  flex-grow: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #33ff33;
  font-family: inherit;
  font-size: inherit;
  text-shadow: inherit;
}

/* Ссылки внутри вывода */
.terminal-output a {
  color: #33ff33;
  text-decoration: underline;
}

.terminal-output a:hover {
  background-color: #33ff33;
  color: #030703;
}

/* Мобильные элементы управления */
.mobile-buttons {
  display: none;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-top: 1px dashed rgba(51, 255, 51, 0.4);
}

.mobile-buttons button {
  background: transparent;
  border: none;
  color: #33ff33;
  font-family: inherit;
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
}

/* Холст эффекта Матрицы */
#matrix-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 50;
  display: none;
}

/* Адаптивный дизайн (для мобильных телефонов) */
@media (max-width: 768px) {
  body, html {
    font-size: 16px;
  }
  
  .ascii-logo {
    font-size: 8px;
  }

  .terminal-output {
    font-size: 18px;
  }

  /* Скрываем поле ввода, чтобы не вызывать экранную клавиатуру */
  #input-container {
    display: none;
  }

  /* Показываем кликабельные кнопки вместо консоли */
  .mobile-buttons {
    display: flex;
  }

  .skip-btn {
    font-size: 12px;
    top: 10px; right: 10px;
  }

  .neofetch-container {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 30px;
	margin-bottom: 15px;
  }

  .neofetch-art {
	font-family: monospace;
	white-space: pre;
	line-height: 1.2;
	margin: 0;
	flex-shrink: 0;
  }

  .neofetch-info {
    display: flex;
    flex-direction: column;
    gap: 4px; /* Небольшой отступ между строками */
  }

  .neofetch-info div {
    white-space: nowrap; /* Запрет на случайный перенос внутри строки */
  }

  /* На мобильных устройствах перестраиваем в одну колонку */
  @media (max-width: 768px) {
    .neofetch-container {
      flex-direction: column;
      gap: 15px;
    }
  }
}