/* Общие стили */
@font-face {
  font-family: 'Odachi';
  src: url('fonts/Odachi.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}



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


html {
  height: 100%;
  overflow-x: hidden;
  
}

body {
  min-height: 100vh;
  font-family: 'Segoe UI', sans-serif;
  overflow-x: hidden;
  position: relative;
}


/* Параллакс фон */
body::before {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  width: 110%;
  height: 110%;
  background: var(--bg-image) center center / cover no-repeat;
  z-index: -1;
  transform: translate(calc(-50% + var(--x, 0px)), calc(-50% + var(--y, 0px)));
  transition: background-image 2s ease, transform 0.1s ease;
  will-change: transform, background-image;
}

/* Чтобы фон изначально был по центру */
body:not(.hasMoved)::before {
  transform: translate(-50%, -50%);
}




/* Стили для канваса */
#dust-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none; /* чтобы не мешал кликам */
  z-index: -1;          /* остаётся под всем контентом */
}

/* Заголовок */
.site-title {
  color: white;
  font-size: 4.5rem;
  margin: 15px auto 10px;
  text-align: center;
  text-shadow: 0 0 8px rgba(0,0,0,0.5);
  font-family: 'Odachi', sans-serif;

}


/* Меню */
.menu {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  justify-content: center;
  flex-wrap: wrap;
}


.menu a {
  text-decoration: none;
  color: white;
  padding: 12px 20px;
  border-radius: 15px;
  background: rgba(129, 129, 129, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3),
              inset 0 -1px 1px rgba(0, 0, 0, 0.2),
              0 4px 10px rgba(0,0,0,0.2);
  /*border: 1px solid rgba(255, 255, 255, 0.2);*/

  font-weight: 500;
  transition: all 0.3s ease;
}

.menu a:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.2);
}


/*инфо бокс*/
.info-box {
  position: relative;
  margin: 60px auto 60px;
  width: 90%;
  max-width: 1000px;
  background: rgba(46, 46, 46, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  padding: 30px;
  z-index: 10;
  color: white;
  font-family: 'Segoe UI', sans-serif;
  text-align: center;
  transition: all 0.3s ease;
  overflow-wrap: break-word;
}



.info-box h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: bold;
}

.info-box p {
  font-size: 15px;
  line-height: 1.4;
}

/*спонсоры*/
.sponsors-box {
  position: relative;
  margin: 40px auto 40px;
  width: 90%;
  max-width: 1000px;
  background: rgba(46, 46, 46, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  padding: 30px;
  z-index: 10;
  color: white;
  font-family: 'Segoe UI', sans-serif;
  text-align: center;
  transition: all 0.3s ease;
}

.sponsors-box h2 {
  margin-bottom: 20px;
  font-size: 24px;
  font-weight: bold;
}

.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* три столбца */
  gap: 15px;
  text-align: center;
}

.sponsor {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px;
  transition: background 0.3s;
}

.sponsor:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Базовый значок */
.sponsor::before {
  content: "";
  margin-right: 6px;
  font-size: 1.2em;
}

/* Алмаз */
.sponsor.diamond::before {
  content: "💎👑";
  color: #00e5ff; /* голубой */
}

/* Золото */
.sponsor.gold::before {
  content: "🥇";
  color: gold;
}

/* Серебро */
.sponsor.silver::before {
  content: "🥈";
  color: silver;
}

/* Бронза */
.sponsor.bronze::before {
  content: "🥉";
  color: #cd7f32;
}

/*портфолио*/
.portfolio-box {
  position: relative;
  margin: 60px auto 60px;
  width: 90%;
  max-width: 1500px;
  background: rgba(46, 46, 46, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  padding: 30px;
  z-index: 10;
  color: white;
  font-family: 'Segoe UI', sans-serif;
  text-align: center;
  transition: all 0.3s ease;
  overflow-wrap: break-word;
}



.portfolio-box h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: bold;
}

.portfolio-box p {
  font-size: 15px;
  line-height: 1.4;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* соотношение 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(46, 46, 46, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: contain;
  background: black;
}

.video-wrapper iframe,
.video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover; /* для <video> чтобы заполняло окно */
  border-radius: 12px;
}

/* Стили для выпадающего списка выбора источника */
.video-select {
  position: absolute;
  top: 10px;
  right: 250px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3),
              inset 0 -1px 1px rgba(0, 0, 0, 0.2),
              0 4px 10px rgba(0,0,0,0.2);
  appearance: none; /* убираем дефолтные стрелки */
}

.video-select option {
  background: rgba(30,30,30,0.9);
  color: white;
}

/* блок новостей */
.news-box {
  position: relative;
  margin: 40px auto 40px;
  width: 90%;
  max-width: 1000px;
  background: rgba(46, 46, 46, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  padding: 30px;
  z-index: 10;
  color: white;
  font-family: 'Segoe UI', sans-serif;
  text-align: center;
  transition: all 0.3s ease;
}

.news-box h2 {
  font-size: 26px;
  margin-bottom: 25px;
}

.news-item {
  position: relative; 
  background: rgba(14, 14, 14, 0.219);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 60px 20px 50px 20px;
  padding-bottom: 50px; 
  margin-bottom: 25px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  text-align: center;
  overflow: hidden; 
}

.news-date {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.089);
  color: #ffffff80;
  font-size: 14px;
  padding: 6px 10px;
  text-align: right; 
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}


.news-title {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  margin: 0; /* убираем отступы у h3 */
  background: rgba(0, 0, 0, 0.089);
  color: #fff;
  font-size: 18px;
  padding: 8px 12px;
  text-align: center;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.news-image {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 15px;
}

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

.news-text {
  font-size: 16px;
  line-height: 1.6;
  color: #eee;
}


.newsbutton {
  display: inline-flex; /* теперь в строку */
  margin-left: 8px; /* небольшой отступ от текста */
}

.newsbutton a {
  text-decoration: none;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 2px 10px;
  transition: background 0.3s;
}

.newsbutton a:hover {
  background: rgba(255, 255, 255, 0.2);
}





/*плеер музыки*/
.music-box {
  position: relative;
  margin: 60px auto 60px;
  width: 90%;
  max-width: 1000px;
  background: rgba(46, 46, 46, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  padding: 30px;
  z-index: 10;
  color: white;
  font-family: 'Segoe UI', sans-serif;
  text-align: center;
  transition: all 0.3s ease;
  overflow-wrap: break-word;
}


.music-box h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 26px;
  font-weight: bold;
}

.music-box p {
  font-size: 16px;
  line-height: 1.5;
}

.audio-player {
  margin-top: 30px;
}

.audio-player audio {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 15px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}


.playlist {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 150px; /* максимальная высота плейлиста без прокрутки */
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.3) transparent;
  border-radius: 12px;
}
.playlist::-webkit-scrollbar {
  width: 8px;
}
.playlist::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.3);
  border-radius: 8px;
}



.playlist li {
  padding: 10px 15px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
}

.playlist li:hover {
  background: rgba(255, 255, 255, 0.2);
}

.now-playing {
  margin: 10px 0;
  font-size: 1rem;
  color: #fff;
}

#visualizer {
  display: block;
  width: 100%;
  height: 100px;
  margin: 10px 0 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

audio {
  width: 100%;
  max-width: 100%;
  height: 40px;
  padding: 10px;
  border-radius: 16px;
  background: transparent;              /* Убираем фон */
  backdrop-filter: blur(12px);          /* Стеклянность */
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  filter: brightness(1.8) saturate(2);  /* Белизна элементов */
  color-scheme: light dark;             /* Улучшение цвета в Firefox */
  appearance: none;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  flex-wrap: nowrap;
  flex-direction: row;
  justify-content: space-between;
}


    .play-btn {
  width: 48px;
  height: 48px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0; /* Чтобы не сжималась */
}


    .play-btn:hover {
      background: rgba(255, 255, 255, 0.3);
    }

    .play-btn svg {
      fill: white;
      width: 20px;
      height: 20px;
    }

    .progress-bar {
  flex: 1 1 auto;
  min-width: 0;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  position: relative;
  cursor: pointer;
}


    .progress {
      height: 100%;
      background: white;
      border-radius: 10px;
      width: 0%;
    }

    .volume-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.volume-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 10px;
  transition: background 0.2s;
}

.volume-btn:hover {
  background: rgba(255,255,255,0.3);
}

.volume-btn svg {
  width: 20px;
  height: 20px;
  fill: white;
}

#volumeSlider {
  width: 100px;
  appearance: none;
  background: rgba(255,255,255,0.3);
  height: 6px;
  border-radius: 10px;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.volume-wrapper:hover #volumeSlider {
  opacity: 1;
}


.media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* ровно 4 в ряд на больших экранах */
  gap: 15px;
  margin-top: 25px;
}

.media-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  cursor: pointer;
  aspect-ratio: 1 / 1; /* делаем квадрат */
}

.media-item img,
.media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover; /* чтобы картинка/видео заполняли квадрат */
  display: block;
  transition: transform 0.3s ease;
}

.media-item:hover img,
.media-item:hover video {
  transform: scale(1.05);
}


/* ---------- Модалка (поверх всего) ---------- */
.media-modal {
  display: none; /* чтобы по умолчанию не было видно */
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  flex-direction: column; /* теперь элементы идут сверху вниз */
}

.media-modal.active {
  display: flex;
}

.modal-media {
  width: 95%;
  max-width: 1200px;
  height: auto;
  max-height: 80vh;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

.modal-media img,
.modal-media video {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

.modal-desc {
  margin-top: 15px;
  color: #fff;
  text-align: center;
  max-width: 95%;
  font-size: 1rem;
}

.close-btn {
  position: fixed;
  top: 18px;
  right: 24px;
  font-size: 1.8rem;
  color: #fff;
  cursor: pointer;
  z-index: 100000;
  user-select: none;
  background: rgba(0,0,0,0.4);
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;  /* центрируем по вертикали */
  justify-content: center; /* центрируем по горизонтали */
  font-family: Arial, sans-serif; /* ровный крестик */
  line-height: 0; /* убираем смещение */
}



.modal-nav {
  position: fixed;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
  pointer-events: none;
  z-index: 100000;
}

.modal-nav span {
  pointer-events: auto;
  font-size: 2.6rem;
  color: white;
  cursor: pointer;
  user-select: none;
  padding: 6px 10px;
  background: rgba(0,0,0,0.25);
  border-radius: 8px;
}

/* Контейнер для моделей Sketchfab */
.models-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 в ряд */
  gap: 20px;
  margin-top: 25px;
}

/* Стили для iframe моделей */
.models-grid iframe {
  width: 100%;
  height: 400px; /* можно подстроить под дизайн */
  border: none;
  border-radius: 12px;
}

.social-box {
  position: relative;
  margin: 60px auto 1px;
  width: 90%;
  max-width: 700px;
  background: rgba(46, 46, 46, 0.1);                            /*background: rgba(255, 255, 255, 0.1);*/
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  padding: 30px;
  z-index: 10;
  color: white;
  font-family: 'Segoe UI', sans-serif;
}

.social-item {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  color: white;
  padding: 15px 10px;
  border-radius: 12px;
  transition: background 0.3s, transform 0.2s;
}

.social-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.social-item img {
  width: 50px;
  height: 50px;
  filter: brightness(0) invert(1); /* делает иконки белыми */
  flex-shrink: 0;
}

.social-text {
  flex: 1;
}

.social-box h2 {
  text-align: center;
  margin-bottom: 15px;
  font-size: 24px;
  font-weight: bold;
}

.social-text h3 {
  margin: 0;
  font-size: 20px;
  
}

.social-text p {
  margin: 5px 0 0;
  font-size: 18px;
  opacity: 0.85;
}

.social-btn {
  padding: 8px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
  transition: background 0.3s;
  flex-shrink: 0;
}

.social-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.social-box hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.2);
  margin: 8px 0;
}




/*подвал*/
footer {
  text-align: center;
  color: white;
  font-size: 0.9rem;
  padding: 5px 0;
  margin-top: 40px;
  opacity: 0.8;
}



/*MOBILE*/
@media (max-width: 768px) {
  .site-title {
    font-size: 2.2rem;
  }

  .menu {
    flex-direction: column;
    align-items: center;
  }

  .menu a {
    width: 100%;
    text-align: center;
  }

  .sponsors-grid {
    grid-template-columns: repeat(2, 1fr); /* два столбца */
  }

  .music-box {
    padding: 20px;
    width: 95%;
    margin: 40px auto;
  }

  .music-box h2 {
    font-size: 22px;
  }

  .player-controls {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
  }

  .progress-bar {
    width: 100%;
  }

  #volumeSlider {
    display: none;
  }

  .volume-wrapper {
    flex-direction: row; /* пусть остаются в строку */
    gap: 0;
  }

  #visualizer {
    height: 70px;
  }

  .models-grid {
    grid-template-columns: 1fr; /* в один столбец на мобилках */
  }

  .models-grid iframe {
    height: 300px;
  }

  .modal-media {
    width: 98%;
    height: 78vh;
    border-radius: 12px;
  }

  .close-btn {
    top: 10px;
    right: 12px;
    font-size: 1.6rem;
  }

  .modal-nav span {
    font-size: 2rem;
  }
  

}

@media (max-width: 480px) {
  .models-grid iframe {
    height: 250px;
  }

   .sponsors-grid {
    grid-template-columns: 1fr; /* один столбец */
  }
}




@media (max-width: 600px) {
  .social-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .social-text p {
    font-size: 13px;
  }
}