/* Дополнительный слой Windows 95 / старого интернета */

:root {
  --retro-blue: #000080;
  --retro-cyan: #9de8ff;
}

html {
  scrollbar-color: #c0c0c0 #777;
}

body {
  background:
    repeating-linear-gradient(
      45deg,
      #101021 0 2px,
      #080811 2px 4px
    );
}

::-webkit-scrollbar {
  width: 17px;
  height: 17px;
}

::-webkit-scrollbar-track {
  background:
    repeating-conic-gradient(#bbb 0 25%, #ddd 0 50%)
    0 / 4px 4px;
}

::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border: 2px solid;
  border-color: white #444 #444 white;
}

.site::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: .1;
  background: repeating-linear-gradient(
    transparent 0 2px,
    #000 2px 3px
  );
}

.hero {
  isolation: isolate;
}

.hero-title {
  position: relative;
  z-index: 3;
  animation: fire-title-flicker 2.7s steps(4, end) infinite;
}

.hero-subtitle {
  z-index: 3;
  animation: neon-text 4s linear infinite;
}

.hero-cat {
  z-index: 1;
  animation: cat-drift 7s ease-in-out infinite;
}

.hero-cat.right {
  animation-delay: -3s;
}

.hero-image {
  animation: space-pulse 8s ease-in-out infinite alternate;
}

.pixel-fire {
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 135px;
  z-index: 2;
  pointer-events: none;
  image-rendering: pixelated;
  opacity: .88;
}

.footer-collage .pixel-fire {
  height: 155px;
  z-index: 1;
  opacity: .65;
}

.footer-grid {
  z-index: 3;
}

.star-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.retro-star {
  position: absolute;
  color: #b6caff;
  text-shadow: 0 0 4px white, 0 0 9px #be46ff;
  animation: star-flash var(--speed) steps(3, end) infinite;
  animation-delay: var(--delay);
  font-family: monospace;
}

.graffiti {
  animation: graffiti-glow 2.4s steps(5, end) infinite;
}

.photo-label {
  animation: sticker-wiggle 5s ease-in-out infinite;
}

.photo-caption,
.quote,
.badge,
.game-over,
.alien-sign,
.thanks strong {
  animation: neon-text 4.5s linear infinite;
}

.game-over {
  animation:
    neon-text 3s linear infinite,
    game-bob 4s ease-in-out infinite;
}

.counter {
  position: relative;
  background: #020902;
}

.counter::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    transparent 0 3px,
    #001b0090 3px 4px
  );
}

.windows-flag {
  animation: flag-wave 3.4s ease-in-out infinite;
}

.nav a {
  font-size: 13px;
  min-height: 34px;
}

.nav a:hover {
  color: white;
  background:
    repeating-linear-gradient(
      90deg,
      #000080,
      #10109a 5px,
      #000080 10px
    );
}

.nav a.active {
  background: #021707;
}

.win95-icon {
  display: block;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  image-rendering: pixelated;
  filter: drop-shadow(1px 1px 0 #000);
}

.nav a:hover .win95-icon {
  animation: icon-hop .6s steps(2, end) infinite;
}

.browser-icon {
  cursor: default;
  user-select: none;
}

/* Разделы */

.retro-tabbar {
  display: flex;
  align-items: end;
  gap: 3px;
  min-height: 27px;
  padding: 4px 4px 0;
  background: silver;
  border-bottom: 2px solid white;
  overflow-x: auto;
}

.retro-tabbar button {
  flex-shrink: 0;
  padding: 4px 11px;
  color: #111;
  background: #b9b9b9;
  border: 2px solid;
  border-color: white #555 #555 white;
  border-radius: 3px 3px 0 0;
  font: 11px Tahoma, Arial, sans-serif;
}

.retro-tabbar button.active {
  position: relative;
  top: 2px;
  padding-top: 6px;
  background: #ddd;
  border-bottom-color: #ddd;
}

.page-address {
  display: flex;
  gap: 8px;
  padding: 4px 7px;
  border-bottom: 2px ridge #eee;
  background: #c0c0c0;
  color: #222;
  font: 11px Tahoma, Arial, sans-serif;
}

.page-address span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retro-page {
  min-height: 432px;
  padding: 15px;
  background:
    linear-gradient(#000000c0, #000000c0),
    repeating-linear-gradient(0deg, #151129 0 1px, #08080f 1px 5px);
  animation: page-arrive .18s steps(3, end);
}

.retro-page h2 {
  margin: 0 0 15px;
  color: #dcc2ff;
  font: bold 23px "Courier New", monospace;
  text-shadow: 2px 2px #48238d;
}

.retro-page-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #ded8ec;
  font: 13px/1.65 "Courier New", monospace;
}

.retro-page-image {
  display: block;
  max-width: 100%;
  max-height: 350px;
  margin: 16px auto;
  border: 3px ridge #d1d6f1;
  object-fit: contain;
}

.retro-page-action {
  display: inline-block;
  margin-top: 16px;
}

.page-file {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 9px;
  padding: 9px;
  text-align: left;
}

.page-file .win95-icon {
  width: 22px;
  height: 22px;
}

.empty-drive {
  margin-top: 22px;
  padding: 11px;
  border: 2px inset silver;
  color: #7eff72;
  background: #030903;
  font: 12px/1.6 "Courier New", monospace;
}

/* Разные системные иконки */

.system-symbol {
  display: grid;
  place-items: center;
  flex: 0 0 45px;
  width: 45px;
  height: 45px;
  font: bold 32px Arial, sans-serif;
  filter: drop-shadow(2px 2px 0 #666);
}

.system-symbol.error {
  border: 3px outset #ffb3b3;
  border-radius: 50%;
  background: #bd0808;
  color: white;
}

.system-symbol.warning {
  clip-path: polygon(50% 0, 100% 93%, 0 93%);
  background: #1b1b00;
}

.system-symbol.warning::before {
  content: "";
  position: absolute;
  inset: 4px;
  background: #ffff29;
  clip-path: polygon(50% 0, 100% 93%, 0 93%);
}

.system-symbol.warning span {
  position: relative;
  padding-top: 10px;
  color: #111;
  font-size: 29px;
}

.system-symbol.info,
.system-symbol.question {
  border-radius: 50%;
  border: 3px outset #a8d4ff;
  color: white;
  background: #0346b7;
}

.system-symbol.info {
  font-family: Georgia, serif;
  font-style: italic;
}

.system-symbol.disk {
  border: 3px outset #c7c7d8;
  background: #353580;
  color: #fff;
  border-radius: 2px;
  font: bold 28px monospace;
}

#dialog .window {
  animation: window-open .15s steps(3, end);
}

.window-shake {
  animation: window-shake .25s steps(4, end) !important;
}

.error-code {
  position: relative;
  text-shadow: 1px 0 #127614;
}

.login-note {
  margin: 0 0 14px;
  padding: 8px;
  color: #76ff7d;
  background: #080808;
  border: 2px inset white;
  font: 12px/1.5 "Courier New", monospace;
}

.admin-notice {
  margin: 12px 14px 0;
  padding: 8px;
  background: #ffffcc;
  border: 1px solid #7a7424;
  color: #222;
  font: 12px/1.4 Arial, sans-serif;
}

@keyframes fire-title-flicker {
  0%, 100% { filter: brightness(1); }
  25% { filter: brightness(1.13); }
  50% { filter: brightness(.92); }
  75% { filter: brightness(1.07); }
}

@keyframes neon-text {
  0%, 100% {
    color: #d9a9ff;
    text-shadow: 2px 0 #692eff, -2px 1px #ff2873, 0 0 8px #8127ff;
  }
  33% {
    color: #97ffef;
    text-shadow: -2px 0 #00baff, 2px 1px #5bff36, 0 0 9px #00bfff;
  }
  66% {
    color: #ffb3dd;
    text-shadow: 2px -1px #ff3535, -2px 1px #662cff, 0 0 9px #ff21bc;
  }
}

@keyframes graffiti-glow {
  0%, 100% { color: #69ff75; text-shadow: 0 0 5px #20ff00, 3px 2px #064212; }
  50% { color: #b2ffc0; text-shadow: 0 0 12px #00ffd5, -2px 2px #6511ca; }
}

@keyframes star-flash {
  0%, 80%, 100% { opacity: .15; transform: scale(.7); }
  40% { opacity: 1; transform: scale(1.3); }
}

@keyframes cat-drift {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -5px; }
}

@keyframes space-pulse {
  from { filter: saturate(1); }
  to { filter: saturate(1.8) hue-rotate(15deg); }
}

@keyframes sticker-wiggle {
  0%, 85%, 100% { rotate: 0deg; }
  90% { rotate: -3deg; }
  95% { rotate: 3deg; }
}

@keyframes game-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}

@keyframes flag-wave {
  0%, 100% { rotate: -3deg; }
  50% { rotate: 5deg; }
}

@keyframes icon-hop {
  50% { translate: 0 -2px; }
}

@keyframes page-arrive {
  from { opacity: .35; translate: 0 3px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes window-open {
  from { opacity: .4; scale: .96; }
  to { opacity: 1; scale: 1; }
}

@keyframes window-shake {
  25% { translate: -5px 0; }
  75% { translate: 5px 0; }
}

@media (max-width: 520px) {
  .nav a {
    font-size: 10px;
  }

  .win95-icon {
    flex-basis: 19px;
    width: 19px;
    height: 19px;
  }

  .retro-page {
    min-height: 330px;
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* Убираем верхнюю полосу вкладок.
   Переключение разделов через левое меню остаётся. */
.retro-tabbar {
  display: none !important;
}

/* Чёрный текст на всех стандартных серых кнопках,
   включая ссылки, оформленные как кнопки. */
button.win-button,
a.win-button,
a.win-button:link,
a.win-button:visited,
a.win-button:hover,
a.win-button:active,
a.win-button:focus,
input.win-button,
.page-file,
.retro-page-action {
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  text-shadow: none !important;
}

/* Текст внутри серых кнопок тоже должен быть чёрным. */
.win-button span,
.page-file span {
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  text-shadow: none !important;
}

/* Синие активные вкладки админки делаем серыми,
   чтобы чёрный текст оставался читаемым. */
.admin-tabs button.active {
  background: #dedede !important;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  font-weight: bold;
  border-color: #444 #fff #fff #444;
}

/* Кнопки меню браузера: чёрный текст в обычном состоянии. */
.menu-bar button {
  color: #000;
  text-shadow: none;
}

/* На синем выделении меню сохраняем белый текст. */
.menu-bar button:hover {
  color: #fff;
}

/* Поля ввода в системных окнах и админке. */
.window input:not([type="range"]):not([type="checkbox"]),
.window textarea,
.window select {
  color: #000;
  background-color: #fff;
  text-shadow: none;
}
