@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: normal;
  src: url('assets/fonts/Montserrat-VariableFont_wght.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: normal;
  src: url('assets/fonts/Unbounded-VariableFont_wght.ttf') format('truetype');
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Header */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  padding: 25px 20px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: none;
  border-bottom: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
  opacity: 1;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  transform: translateY(0);
}

.main-header--hidden {
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
}

.header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  --logo-base-size: 50px;
}

.logo-image {
  max-height: var(--logo-base-size);
  width: auto;
  height: auto;
  transition: transform 0.3s ease;
  transform: scale(1.2);
}

.logo-image:hover {
  transform: scale(1.3);
}

.soundclip {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  padding: 8px 12px;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}

.fixed-player {
  position: fixed;
  bottom: 30px;
  left: 35px;
  z-index: 1000;
}

.soundclip:hover {
  background: #111;
}

.soundclip:active {
  transform: scale(0.95);
}

.soundclip audio {
  display: none;
}

.play-pause {
  position: relative;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-icon,
.pause-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  transition: opacity 0.3s ease;
}

.pause-icon {
  opacity: 0;
}

.soundclip.playing .play-icon {
  opacity: 0;
}

.soundclip.playing .pause-icon {
  opacity: 1;
}

.waveform {
  width: 48px;
  height: 18px;
}

.wave-line {
  stroke-width: 1;
  transition: transform 0.1s ease;
  transform-origin: center;
}

.soundclip.playing .wave-line {
  animation: waveAnimation 0.6s ease-in-out infinite;
}

.soundclip.playing .wave-line:nth-child(1) { animation-delay: 0s; }
.soundclip.playing .wave-line:nth-child(2) { animation-delay: 0.05s; }
.soundclip.playing .wave-line:nth-child(3) { animation-delay: 0.1s; }
.soundclip.playing .wave-line:nth-child(4) { animation-delay: 0.15s; }
.soundclip.playing .wave-line:nth-child(5) { animation-delay: 0.2s; }
.soundclip.playing .wave-line:nth-child(6) { animation-delay: 0.25s; }
.soundclip.playing .wave-line:nth-child(7) { animation-delay: 0.3s; }
.soundclip.playing .wave-line:nth-child(8) { animation-delay: 0.35s; }
.soundclip.playing .wave-line:nth-child(9) { animation-delay: 0.4s; }
.soundclip.playing .wave-line:nth-child(10) { animation-delay: 0.45s; }
.soundclip.playing .wave-line:nth-child(11) { animation-delay: 0.5s; }
.soundclip.playing .wave-line:nth-child(12) { animation-delay: 0.55s; }

@keyframes waveAnimation {
  0%, 100% {
    transform: scaleY(0.5);
  }
  50% {
    transform: scaleY(1);
  }
}

/* Контейнер для конфетти */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

/* Элементы конфетти */
.confetti {
  position: absolute;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #ffb3d9, #ff99cc, #ff80bf);
  border-radius: 50%;
  opacity: 0.8;
  animation: confettiFall linear infinite;
  will-change: transform;
}

/* Разные размеры конфетти */
.confetti:nth-child(3n) {
  width: 6px;
  height: 6px;
}

.confetti:nth-child(3n+1) {
  width: 10px;
  height: 10px;
}

.confetti:nth-child(3n+2) {
  width: 7px;
  height: 7px;
}

/* Анимация падения конфетти */
@keyframes confettiFall {
  0% {
    transform: translateY(-100vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(100vh) translateX(100px) rotate(360deg);
    opacity: 0;
  }
}

/* Фоновое изображение с blur */
.main-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('assets/back24.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(10px);
  z-index: -1;
  transform: scale(1.1); /* Увеличиваем немного, чтобы компенсировать blur на краях */
  will-change: transform;
  backface-visibility: hidden;
}

/* Контент */
.content {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 130px 12px 40px 12px;
  z-index: 1;
  gap: 32px;
  margin-top: 0;
}

/* Блок для первых двух картинок */
.root-block {
  width: 100%;
  max-width: 100%;
  position: relative;
  background: #DEBAB1;
  padding-top: 40px;
}

@media (min-width: 768px) {
  .root-block {
    max-width: 50%;
  }
}

.root-block:first-of-type {
  margin-top: 16px;
}

/* Блок для гифки */
.gif-block {
  background: #CA6378;
}

/* Блок для Tyler */
.tyler-block {
  background: #739842;
}

.responsive-wrap {
  width: 100%;
  position: relative;
}

.desktop-media {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.text-content {
  width: 100%;
  max-width: 800px;
  padding: 0 20px 30px 20px;
  color: #000;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
}

.text-content p {
  margin: 0;
}

/* Контейнер для изображений в ряд */
.images-row {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  flex-wrap: wrap;
}

.content-divider {
  width: 100%;
  max-width: 800px;
  height: 1px;
  background: #000;
  margin: 10px 0 5px 0;
}

/* Контейнер для Tamagochi */
.tamagochi-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  z-index: 2;
  margin-top: 80px;
}

/* Изображение Tamagochi */
.tamagochi-image {
  max-width: 100%;
  height: auto;
  transition: transform 0.3s ease;
  animation: spinIn 1s ease-out, pulse 2s ease-in-out 1s infinite;
  user-select: none;
}

.tamagochi-image:hover {
  transform: scale(1.05);
}

/* Контейнер для Komaru */
.komaru-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  z-index: 1;
  margin: 0 auto;
  width: 100%;
  transform: translateX(20px);
}

/* Изображение Komaru */
.komaru-image {
  max-width: 100%;
  height: auto;
  transition: transform 0.3s ease;
  animation: zoomIn 2s ease-in-out, pulse 2s ease-in-out 2s infinite;
  user-select: none;
}

.komaru-image:hover {
  transform: scale(1.05);
}

.komaru-image:active {
  transform: scale(1.05);
}

/* Контейнер для GIF */
.gif-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin-top: 20px;
}

/* GIF изображение */
.gif-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  background: #000;
}

/* Контейнер для Tyler */
.tyler-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
}

/* Изображение Tyler */
.tyler-image {
  max-width: 100%;
  height: auto;
  transition: transform 0.3s ease;
  animation: fadeIn 1s ease-in;
  user-select: none;
}

.tyler-image:hover {
  transform: scale(1.05);
}

/* Контейнер для Ramka */
.ramka-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  margin-top: 20px;
}

/* Изображение Ramka */
.ramka-image {
  max-width: 100%;
  height: auto;
  transition: transform 0.3s ease;
  animation: fadeIn 1s ease-in;
  user-select: none;
}

.ramka-image:hover {
  transform: scale(1.05);
}

.media-listing {
  width: 100%;
  max-width: 1080px;
  margin: 40px auto 0 auto;
  padding: 0 10px 60px 10px;
}

.media-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.media-grid-item {
  display: flex;
}

.media-card {
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.media-card-image {
  position: relative;
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
  background: #111;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.media-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-card-caption {
  width: 100%;
  padding: 12px 4px 0 4px;
  background: transparent;
  color: #f7f7f7;
  text-align: left;
  font-family: 'Unbounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  letter-spacing: 0.02em;
}

.media-card-caption h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

@media (min-width: 1024px) {
  .media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Анимации */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spinIn {
  from {
    opacity: 0;
    transform: rotate(-180deg) scale(0.5);
  }
  to {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

@keyframes zoomIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Адаптивные стили для мобильных устройств */
@media (max-width: 768px) {
  .main-header {
    padding: 20px 15px;
    gap: 12px;
  }

  .logo-image {
    max-height: 40px;
  }

  .audio-toggle {
    width: 45px;
    height: 45px;
  }

  .audio-icon {
    font-size: 18px;
  }

  .content {
    align-items: center;
    padding: 90px 15px 30px 15px;
    gap: 30px;
  }

  .images-row {
    flex-wrap: nowrap;
    gap: 0;
    justify-content: center;
    align-items: center;
  }

  .tamagochi-container {
    margin-left: -30%;
    margin-top: 60px;
    z-index: 2;
    max-width: 60%;
  }

  .tamagochi-image {
    width: 100%;
    max-width: 300px;
  }

  .komaru-container {
    width: 100%;
    max-width: 500px;
    z-index: 1;
  }

  .komaru-image {
    width: 100%;
    max-width: 400px;
  }

  .video-container {
    max-width: 100%;
  }

  .tyler-container {
    width: 100%;
    max-width: 500px;
  }

  .tyler-image {
    width: 100%;
    max-width: 400px;
  }
}

@media (max-width: 480px) {
  .main-header {
    padding: 18px 12px;
    gap: 10px;
  }

  .logo-image {
    max-height: 35px;
  }


  .content {
    align-items: center;
    padding: 80px 10px 20px 10px;
    gap: 20px;
  }

  .video-container {
    max-width: 100%;
  }

  .video-player {
    border-radius: 10px;
  }

  .images-row {
    flex-wrap: nowrap;
    gap: 0;
    justify-content: center;
    align-items: center;
  }

  .tamagochi-container {
    margin-left: -25%;
    margin-top: 50px;
    z-index: 2;
    max-width: 55%;
  }

  .tamagochi-image {
    max-width: 250px;
  }

  .komaru-container {
    width: 100%;
    z-index: 1;
  }

  .komaru-image {
    max-width: 100%;
  }

  .tyler-container {
    width: 100%;
  }

  .tyler-image {
    max-width: 100%;
  }

  .ramka-container {
    width: 100%;
    max-width: 500px;
  }

  .ramka-image {
    width: 100%;
    max-width: 400px;
  }
}

/* Адаптивные стили для больших экранов */
@media (min-width: 1200px) {
  .images-row {
    gap: 30px;
  }

  .tamagochi-container {
    max-width: 400px;
  }

  .tamagochi-image {
    max-width: 400px;
  }

  .komaru-container {
    max-width: 700px;
  }

  .komaru-image {
    max-width: 600px;
  }

  .tyler-container {
    max-width: 700px;
  }

  .tyler-image {
    max-width: 600px;
  }

  .ramka-container {
    max-width: 700px;
  }

  .ramka-image {
    max-width: 600px;
  }
}
