/* =====================================================
   ФОН И ОГОНЬ
   ===================================================== */

html,
body {
  background: #000 !important;
}

.site {
  background-color: #000 !important;
}

/* Убираем старые огненные полотна.
   Новый огонь рисуется отдельно. */
.pixel-fire,
.title-flame-v3 {
  display: none !important;
}

.footer-collage {
  background: #000 !important;
}

.fire-image {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 44px;
  object-fit: fill;
  pointer-events: none;
  z-index: 2;
  image-rendering: pixelated;
}

.fire-image[hidden] {
  display: none !important;
}

.fire-image--header {
  height: 38px;
}

.fire-image--footer {
  height: 46px;
}

.hero-title {
  color: #ffe46c;
  filter: none !important;
  text-shadow:
    2px 0 #ff9300,
    -2px 0 #ff9300,
    0 -2px #ff6500,
    3px 4px #791400 !important;
}

/* =====================================================
   МЕЧТЫ — СТИКЕР
   ===================================================== */

.dreams {
  top: 12px;
  right: 12px;
  z-index: 5;
  display: block;
  width: 145px;
  max-width: 24%;
  padding: 12px 10px;
  color: #27202f;
  background: #eedbff;
  border: 1px solid #a585b0;
  box-shadow: 3px 4px 0 #0008;
  font: 15px/1.25 "Segoe Print", "Comic Sans MS", cursive;
  text-shadow: none;
  transform: rotate(6deg);
  white-space: pre-line;
}

.dreams::before {
  content: "";
  position: absolute;
  left: 30%;
  top: -6px;
  width: 44%;
  height: 14px;
  background: #efebc5b0;
  border: 1px solid #ffffff60;
  transform: rotate(-5deg);
}

/* =====================================================
   АКТИВНЫЙ РАЗДЕЛ
   ===================================================== */

.nav a.active {
  animation: active-nav-v4 1.8s ease-in-out infinite;
}

@keyframes active-nav-v4 {
  0%, 100% {
    background-color: #031707;
    box-shadow: inset 0 0 5px #176b17, 0 0 3px #44b42c;
  }
  50% {
    background-color: #07300e;
    box-shadow: inset 0 0 12px #268329, 0 0 8px #63d63d;
  }
}

.tool:disabled {
  opacity: .45;
  cursor: default;
}

/* =====================================================
   ОБО МНЕ НА ГЛАВНОЙ
   ===================================================== */

.home-about-v4 {
  margin-top: 5px;
  color: var(--about-text, #ded4ef);
  background: var(--about-bg, #080610);
  border-color: var(--about-border, #bad3e5);
}

.home-about-v4 h2 {
  color: var(--about-accent, #e3adff);
}

.home-about-body-v4 {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 13px;
}

.home-about-body-v4 img {
  width: var(--about-image-size, 115px);
  max-width: 40%;
  max-height: 200px;
  object-fit: cover;
  border: 3px ridge var(--about-border, #bad3e5);
}

.home-about-v4.image-right .home-about-body-v4 {
  flex-direction: row-reverse;
}

.home-about-copy-v4 {
  min-width: 0;
  flex: 1;
}

.home-about-copy-v4 p {
  margin: 0 0 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: var(--about-font-size, 13px)/1.6 "Courier New", monospace;
}

.home-about-copy-v4 a {
  display: inline-block;
}

/* =====================================================
   WINAMP
   ===================================================== */

.player {
  background: #aeb2c0;
  border: 2px outset #dde2f0;
  box-shadow: inset 0 0 0 1px #484b65;
}

.player-title {
  position: relative;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0 2px,
      #8290b8 2px 3px
    ),
    #272943;
  color: #e7e9ff;
  text-shadow: 1px 1px #121324;
  font: bold 10px Tahoma, Arial, sans-serif;
  letter-spacing: 2px;
  padding: 3px;
}

.player-screen {
  margin: 4px;
  padding: 7px 5px;
  background: #020b06;
  border: 2px inset #696d80;
  box-shadow: inset 0 0 8px #020202;
}

.track-name {
  font: 11px/1.3 "Courier New", monospace;
}

#trackTime {
  font: 11px "Courier New", monospace;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
}

.player-controls > .transport-v4 {
  flex: 0 0 29px;
  width: 29px;
  height: 23px;
  display: grid;
  place-items: center;
  padding: 0;
}

.transport-v4 svg {
  width: 13px;
  height: 13px;
  fill: #101320;
  display: block;
}

.player-controls .volume {
  width: auto;
  min-width: 30px;
  flex: 1;
  margin-left: 3px;
  accent-color: #525888;
}

#seek {
  height: 11px;
  accent-color: #51567f;
}

/* =====================================================
   ГАЛЕРЕЯ И ИГРОВЫЕ ПОСТЫ
   ===================================================== */

.games-heading-v4 {
  margin: 18px 0 10px;
  color: #e3b8ff;
  font: bold 18px "Courier New", monospace;
}

.screenshot-carousel-v4 {
  margin-top: 12px;
  border: 3px ridge #a6bdd2;
  background: #030305;
}

.carousel-stage-v4 {
  display: block;
  width: 100%;
  height: 270px;
  padding: 0;
  background: #030305;
  border: 0;
  cursor: zoom-in;
}

.carousel-stage-v4 img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: screenshot-in-v4 .2s steps(3, end);
}

.carousel-controls-v4 {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px;
  color: #111;
  background: silver;
  font: 11px Tahoma, Arial, sans-serif;
}

.carousel-controls-v4 span {
  flex: 1;
  text-align: center;
  overflow-wrap: anywhere;
}

.game-post-v4 {
  margin-top: 15px;
  padding: 12px;
  background: #09080f;
  border: 2px ridge #9b9ec1;
}

.game-post-v4 h3 {
  margin: 6px 0 9px;
  color: #e7b1ff;
  font: bold 18px "Courier New", monospace;
}

.game-post-v4 time {
  color: #80cfdc;
  font-size: 11px;
}

.game-post-v4 p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 13px/1.6 "Courier New", monospace;
}

.post-images-v4 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.post-images-v4 button,
.meme-card-v4 {
  min-width: 0;
  padding: 3px;
  border: 2px ridge #a2abc7;
  background: #08080c;
  cursor: zoom-in;
}

.post-images-v4 img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.empty-v4 {
  margin-top: 12px;
  padding: 13px;
  color: #baa8cb;
  border: 1px dashed #655873;
  font: 12px/1.5 "Courier New", monospace;
}

@keyframes screenshot-in-v4 {
  from { opacity: .35; }
  to { opacity: 1; }
}

/* =====================================================
   ЗМЕЙКА-КЛУБОК
   ===================================================== */

.yarn-game-v4 {
  margin-top: 15px;
  padding: 5px;
  background: silver;
  color: #111;
  border: 3px outset #eee;
}

.yarn-game-v4 canvas {
  display: block;
  width: 100%;
  border: 2px inset #eee;
  background: #080a16;
  image-rendering: pixelated;
  touch-action: none;
}

.yarn-controls-v4 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding-top: 7px;
  font: 12px Tahoma, Arial, sans-serif;
}

.yarn-arrows-v4 {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding-top: 7px;
}

.yarn-arrows-v4 button {
  min-width: 40px;
  min-height: 32px;
}

/* =====================================================
   МЕМЫ И ПРОСМОТР КАРТИНОК
   ===================================================== */

.memes-grid-v4 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.meme-card-v4 img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: #060609;
}

.meme-card-v4 span {
  display: block;
  padding: 6px 3px;
  color: #ded0f1;
  font: 11px Tahoma, Arial, sans-serif;
}

.image-view-v4 {
  display: block;
  max-width: 100%;
  max-height: 65vh;
  margin: auto;
  object-fit: contain;
}

.window:has(.image-view-v4) {
  width: min(960px, 95vw);
}

/* =====================================================
   АДМИНКА
   ===================================================== */

.upload-preview-v4 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.upload-preview-v4 > div {
  width: 115px;
  padding: 5px;
  border: 2px groove #eee;
}

.upload-preview-v4 img {
  display: block;
  width: 100%;
  height: 75px;
  object-fit: cover;
  margin-bottom: 5px;
}

.upload-preview-v4 button {
  padding: 3px 5px;
  font-size: 11px;
}

@media (max-width: 600px) {
  .dreams {
    width: 112px;
    max-width: 30%;
    font-size: 11px;
    padding: 8px;
    right: 5px;
    top: 8px;
  }

  .carousel-stage-v4 {
    height: 210px;
  }

  .meme-card-v4 img {
    height: 155px;
  }

  .home-about-body-v4 {
    gap: 9px;
    padding: 9px;
  }

  .fire-image--header {
    height: 28px;
  }

  .fire-image--footer {
    height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
  }
}
/* =====================================================
   ШАПКА БЕЗ КОСЫХ ЗАЗОРОВ
   Коты больше не поворачиваются: они плотно стоят
   у краёв и плавно растворяются в общем фоне.
   ===================================================== */

.hero {
  background: #0a0620;
}

.hero-image {
  opacity: .7;
}

.hero-cat,
.hero-cat.left,
.hero-cat.right {
  top: 0;
  bottom: 0;
  width: 26%;
  max-width: 300px;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.15);
}

.hero-cat.left {
  left: 0;
  transform: none;
}

.hero-cat.right {
  right: 0;
  left: auto;
  transform: scaleX(-1);
}

@media (max-width: 600px) {
  .hero-cat,
  .hero-cat.left,
  .hero-cat.right {
    width: 30%;
  }
}
