:root {
  --bg: #0b0f1a;
  --card: #141a2b;
  --text: #e6edf7;
  --muted: #9fb0c9;
  --accent: #3a86ff;
}

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

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    linear-gradient(180deg, rgba(11, 15, 26, 0.7), rgba(11, 15, 26, 0.95)),
    url("media/bg/space-background_hq.jpg") center/cover no-repeat fixed;
  color: var(--text);
  min-height: 100vh;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  position: relative;
}

.app {
  max-width: min(1100px, 100%);
  width: 100%;
  height: 100vh;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 32px) clamp(16px, 4vw, 24px) 48px;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
}

.menu-toggle {
  position: fixed;
  top: 20px;
  right: 65px;
  width: 64px;
  height: 48px;
  border-radius: 10px;
  border: 2px solid #14d9ff;
  background: linear-gradient(135deg, rgba(12, 39, 70, 0.9), rgba(8, 26, 48, 0.9));
  color: #9ef3ff;
  cursor: pointer;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(20, 217, 255, 0.9);
  box-shadow: 0 0 18px rgba(20, 217, 255, 0.35), inset 0 0 12px rgba(20, 217, 255, 0.25);
  z-index: 30;
}

.menu-toggle:hover {
  transform: translateY(-1px);
}

.hero {
  text-align: center;
  margin-bottom: 28px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.logo-image {
  max-width: 220px;
  height: auto;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.45));
}

.subtitle {
  color: var(--muted);
  margin-top: 8px;
}

.carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.frame-menu {
  position: fixed;
  right: 24px;
  top: 120px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
  transition: all 0.3s ease;
}

.frame-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 18, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.menu-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.frame-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
  animation: float 5s ease-in-out infinite;
}

.frame-btn img {
  width: 160px;
  height: auto;
  display: block;
}

.view {
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
}

.view-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  position: relative;
}

.socials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
  padding: 20px;
}

.social-card {
  background: linear-gradient(135deg, rgba(58, 134, 255, 0.25), rgba(155, 93, 229, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e6edf7;
  padding: 18px;
  border-radius: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  box-shadow: inset 0 0 18px rgba(58, 134, 255, 0.2), 0 10px 20px rgba(0, 0, 0, 0.35);
}

.credits {
  overflow: hidden;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.credits-track {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
  font-size: 20px;
  animation: credits 24s linear infinite;
  color: #dfe7f5;
}

.own-placeholder {
  text-align: center;
  padding: 40px 20px;
}

.ring-view {
  position: relative;
  width: 100%;
  max-width: 100vw;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  overflow: visible;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.ring {
  position: relative;
  width: 100%;
  height: 600px;
  transform-style: preserve-3d;
  transition: transform 0.8s ease;
}

.slide {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 360px;
  transform-style: preserve-3d;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  border-radius: 20px;
  padding: 22px;
  align-items: center;
  text-align: center;
  translate: -50% -50%;
  transition: opacity 0.3s ease;
}

.slide .info {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.slide.is-active .info {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.planet {
  width: 220px;
  height: 220px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.9);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  -webkit-mask-image: radial-gradient(circle at center, #000 62%, transparent 100%);
  mask-image: radial-gradient(circle at center, #000 62%, transparent 100%);
  justify-self: center;
  animation: float 5s ease-in-out infinite;
}

@media (max-width: 640px) {
  .ring-view {
    width: 100%;
    max-width: 100%;
    min-height: 450px;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
  }

  .ring {
    height: 450px;
  }

  .slide {
    width: 260px;
  }

  .planet {
    width: 160px;
    height: 160px;
  }

  .carousel {
    gap: 6px;
  }

  .nav {
    width: 44px;
    height: 44px;
    font-size: 16px;
    flex-shrink: 0;
  }

  .info h2 {
    font-size: 22px;
  }

  .info p {
    font-size: 14px;
  }
}

.info h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

.info p {
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.nav {
  background: #1f2a46;
  color: #fff;
  border: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  transition: transform 0.2s ease;
}

.nav:hover {
  transform: scale(1.05);
}


.footer {
  text-align: center;
  margin-top: 32px;
  color: var(--muted);
}

.footer-image {
  display: block;
  margin: 0 auto 8px;
  max-width: 180px;
  height: auto;
  opacity: 0.8;
}

@media (max-width: 800px) {
  .ring {
    height: 360px;
  }
  .slide {
    width: 280px;
  }
  .planet {
    width: 180px;
    height: 180px;
  }

  .frame-menu {
    right: auto;
    left: 50%;
    top: 120px;
    transform: translateX(-50%) translateY(10px);
    align-items: center;
  }

  .frame-menu.open {
    transform: translateX(-50%) translateY(0);
  }

  .frame-btn img {
    width: min(90vw, 360px);
  }
}

@media (max-width: 520px) {
  .ring-view {
    min-height: 360px;
  }
  .ring {
    height: 320px;
  }
  .slide {
    width: 220px;
    padding: 16px;
  }
  .planet {
    width: 140px;
    height: 140px;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes credits {
  0% {
    transform: translateY(100%);
  }
  90% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(-100%);
  }
}
