/* ============================================================
   BSTRD — COMING SOON (Full CSS)
============================================================ */

:root {
  --bg: #0a0505;
  --accent: #ffffff;
  --text: #ffffff;
  --text-2: #88888d;
  --font: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow-y: auto; 
  overflow-x: hidden;
}

/* ---- ФОНОВЫЕ СЛОИ ---- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease;
}

body.ui-active .bg-layer {
  opacity: 1;
}

.rays-sharp {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200vmax;
  height: 200vmax;
  transform: translate(-50%, -50%) scale(0.8);
  background: repeating-conic-gradient(
    from 0deg,
    transparent 0deg, transparent 8deg,
    rgba(255, 255, 255, 0.05) 8deg, rgba(255, 255, 255, 0.05) 16deg
  );
  -webkit-mask-image: radial-gradient(circle, black 10%, transparent 50%);
  mask-image: radial-gradient(circle, black 10%, transparent 50%);
  transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.rays-blur {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200vmax;
  height: 200vmax;
  transform: translate(-50%, -50%) scale(0.8);
  background: repeating-conic-gradient(
    from 0deg,
    transparent 0deg, transparent 8deg,
    rgba(255, 255, 255, 0.08) 8deg, rgba(255, 255, 255, 0.08) 16deg
  );
  -webkit-mask-image: radial-gradient(circle, transparent 30%, black 50%, transparent 65%);
  mask-image: radial-gradient(circle, transparent 30%, black 50%, transparent 65%);
  filter: blur(12px);
  transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

body.ui-active .rays-sharp,
body.ui-active .rays-blur {
  transform: translate(-50%, -50%) scale(1);
  animation: rotateRays 80s linear infinite;
}

@keyframes rotateRays {
  from { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  to { transform: translate(-50%, -50%) scale(1) rotate(360deg); }
}

/* ---- ЦЕНТРАЛЬНЫЙ БЛОК ---- */
.soon-container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
  padding: 40px 0;
}

.hero-stage {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

/* СКРИНШОТЫ */
.screenshot-gallery {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 600px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

body.ui-active .screenshot-gallery {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.3s;
}

.gallery-window {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 280px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.gallery-img.active {
  opacity: 1;
  pointer-events: auto;
  cursor: zoom-in;
}

.gallery-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.gallery-arrow:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.gallery-arrow svg {
  width: 20px;
  height: 20px;
}

/* ВИДЕО */
.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 800px;
  height: 300px;
  flex-shrink: 0;
}

.items-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  z-index: 1;
}

#loopVideo {
  transform: translate(-50%, -50%) scale(0.85);
}

body.video-ending .items-bg {
  transform: translate(-50%, -50%) scale(0.85);
}

body.video-ended #introVideo {
  opacity: 0;
  pointer-events: none;
}

/* ТЕКСТ */
.logo-text-block {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 10;
  width: 100%;
  max-width: 1200px;
  padding: 0 20px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

body.ui-active .logo-text-block {
  opacity: 1;
  transform: translateY(0);
}

.soon-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.1;
  color: var(--text);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  margin-bottom: 12px;
}

@media (min-width: 769px) {
  .soon-title {
    white-space: nowrap;
  }
}

.soon-spoiler-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s;
  margin-bottom: 0;
}

.soon-spoiler-btn:hover {
  color: #fff;
}

.spoiler-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.soon-spoiler-btn.active .spoiler-arrow {
  transform: rotate(180deg);
}

.soon-spoiler-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.4s ease, margin 0.4s ease;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.soon-spoiler-content p {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.6;
  text-align: center;
  padding: 15px 0;
}

.soon-spoiler-btn.active + .soon-spoiler-content {
  max-height: 300px;
  opacity: 1;
  margin-top: 10px;
  margin-bottom: 10px;
}

/* ============================================================
   ПЛАВАЮЩИЕ ВИДЖЕТЫ (ИДЕАЛЬНЫЙ КРУГ)
============================================================ */

.support-widget {
  position: absolute;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  
  top: 50%;
  left: 50%;
  
  transform: translate(-50%, -50%) scale(0.5);
  opacity: 0;
  
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.4s ease;
}

body.buttons-fly .support-widget {
  opacity: 1;
}

/* Математически точные позиции (ПК) */
body.buttons-fly .vk-widget { 
  transform: translate(calc(-50% - 250px), calc(-50% - 100px)) scale(1); 
}
body.buttons-fly .tg-widget { 
  transform: translate(calc(-50% + 250px), calc(-50% - 100px)) scale(1); 
}
body.buttons-fly .registry-widget { 
  transform: translate(calc(-50% - 250px), calc(-50% + 80px)) scale(1); 
}
body.buttons-fly .donate-widget { 
  transform: translate(calc(-50% + 250px), calc(-50% + 80px)) scale(1); 
}

.support-icon-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.support-explosion-img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1; 
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.support-widget:hover .support-explosion-img {
  opacity: 1;
  transform: scale(1.8); 
}

.support-icon-main,
.support-shard {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

.support-icon-main {
  z-index: 10;
  opacity: 1;
}

.support-widget:hover .support-icon-main {
  opacity: 0;
  transform: scale(0.8);
}

.support-shard {
  z-index: 5;
  opacity: 0;
}

.support-widget:hover .s1 { opacity: 0.8; transform: translate(-30px, -30px) rotate(-15deg) scale(0.6); }
.support-widget:hover .s2 { opacity: 0.8; transform: translate(30px, -20px) rotate(15deg) scale(0.6); }
.support-widget:hover .s3 { opacity: 0.8; transform: translate(-20px, 30px) rotate(10deg) scale(0.6); }
.support-widget:hover .s4 { opacity: 0.8; transform: translate(25px, 25px) rotate(-10deg) scale(0.6); }

.support-popup {
  position: absolute;
  top: 100%; 
  left: 50%;
  transform: translateX(-50%) translateY(-20px) scale(0.8); 
  width: 240px;
  text-align: center;
  pointer-events: none; 
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.support-widget:hover .support-popup {
  opacity: 1;
  transform: translateX(-50%) translateY(10px) scale(1);
}

.support-info-title {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}

.support-info-desc {
  font-family: var(--font);
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.4;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* ============================================================
   ЛАЙТБОКС ДЛЯ СКРИНШОТОВ
============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  object-fit: contain;
}

.lightbox.active .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.lightbox-close:hover {
  color: var(--text-2);
}

/* ============================================================
   АНИМАЦИЯ ПЕРЕХОДА
============================================================ */

.page-transition {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

body.is-transitioning .page-transition {
  opacity: 1;
  pointer-events: auto;
}

body:not(.is-loaded) .page-transition {
  opacity: 1;
}

/* ============================================================
   АДАПТИВ
============================================================ */
@media (max-width: 768px) {
  .video-wrapper {
    height: 250px; 
  }
  
  .logo-text-block { padding: 0 10px; }
  
  .screenshot-gallery {
    gap: 10px;
    padding: 0 10px;
  }
  .gallery-window { height: 200px; }
  .gallery-arrow { width: 32px; height: 32px; }

  .support-icon-wrap {
    width: 50px;
    height: 50px;
  }
  
  /* Адаптация прямоугольной сетки под экран телефона */
  body.buttons-fly .vk-widget { 
    transform: translate(calc(-50% - 100px), calc(-50% - 60px)) scale(1); 
  }
  body.buttons-fly .tg-widget { 
    transform: translate(calc(-50% + 100px), calc(-50% - 60px)) scale(1); 
  }
  body.buttons-fly .registry-widget { 
    transform: translate(calc(-50% - 100px), calc(-50% + 60px)) scale(1); 
  }
  body.buttons-fly .donate-widget { 
    transform: translate(calc(-50% + 100px), calc(-50% + 60px)) scale(1); 
  }

  .support-popup {
    display: none;
  }

  .lightbox-close {
    top: 10px;
    right: 20px;
    font-size: 36px;
  }
}