/* ========================================================
   Dual G Web — 3D Solar System Navigation Engine (Vengeance UI Math)
   Menu Orbital Tridimensional acionado pelo botão flutuante.
   ======================================================== */

/* ---------- Trigger flutuante (bússola inferior direita) ---------- */
.orbital-trigger-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(9, 12, 20, 0.9);
  border: 1px solid rgba(212, 175, 55, 0.45);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), 0 0 20px rgba(212, 175, 55, 0.25);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  cursor: pointer;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffd978;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.orbital-trigger-btn:hover {
  transform: scale(1.1) rotate(45deg);
  border-color: #ffd978;
  color: #fff;
  box-shadow: 0 10px 40px rgba(255, 217, 120, 0.4), 0 0 30px rgba(212, 175, 55, 0.35);
}

.orbital-trigger-btn:focus-visible {
  outline: 2px solid #ffd978;
  outline-offset: 4px;
}

.orbital-trigger-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px dashed rgba(212, 175, 55, 0.35);
  animation: orbitalSpin 14s linear infinite;
  pointer-events: none;
}

@keyframes orbitalSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ---------- Fullscreen Solar System Modal Overlay ---------- */
.solar-modal-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.08) 0%, rgba(14, 165, 233, 0.04) 40%, rgba(5, 7, 13, 0.96) 80%);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
  overflow: hidden;
}

.solar-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.solar-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 217, 120, 0.3);
  color: #ffd978;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 100;
}

.solar-close-btn:hover {
  background: rgba(255, 217, 120, 0.2);
  transform: rotate(90deg) scale(1.1);
}

.solar-modal-header {
  text-align: center;
  margin-bottom: 5px;
  z-index: 10;
  pointer-events: none;
}

.solar-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fff, #ffd978);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.solar-modal-sub {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-top: 4px;
}

/* 3D Tilted Plane (Vengeance UI Math) */
.solar-stage {
  position: relative;
  width: 780px;
  height: 780px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  transform: rotateX(65deg) rotateY(-10deg);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

:root {
  --r-inner: 160px;
  --r-mid: 260px;
  --r-outer: 370px;
}

@media (max-width: 768px) {
  :root {
    --r-inner: 110px;
    --r-mid: 180px;
    --r-outer: 250px;
  }
  .solar-stage {
    width: 520px;
    height: 520px;
  }
  .solar-modal-title {
    font-size: 1.3rem;
  }
}

/* Central Sun Core with crisp Logo (Spherical Dyson Hub) */
.sun-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotateY(10deg) rotateX(-65deg);
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #fff 0%, #ffe599 25%, #d4af37 65%, #926d0e 100%);
  box-shadow: 0 0 55px rgba(255, 217, 120, 0.85), 0 0 110px rgba(212, 175, 55, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sun-core:hover {
  transform: translate(-50%, -50%) rotateY(10deg) rotateX(-65deg) scale(1.08);
  box-shadow: 0 0 70px rgba(255, 217, 120, 0.95), 0 0 130px rgba(212, 175, 55, 0.6);
}

.sun-billboard {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.sun-logo-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,0.85));
}

/* Dashed Orbit Rings */
.orbit-track {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  pointer-events: none;
  box-shadow: inset 0 0 25px rgba(255, 255, 255, 0.02), 0 0 25px rgba(255, 255, 255, 0.02);
}
.track-1 { width: calc(2 * var(--r-inner)); height: calc(2 * var(--r-inner)); }
.track-2 { width: calc(2 * var(--r-mid)); height: calc(2 * var(--r-mid)); }
.track-3 { width: calc(2 * var(--r-outer)); height: calc(2 * var(--r-outer)); }

/* Orbiting Items Wrapper */
.orbit-pivot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  transform-style: preserve-3d;
  animation: solarOrbitMove var(--dur, 28s) linear infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes solarOrbitMove {
  0% {
    transform: translate(-50%, -50%) rotateZ(0deg) translateX(var(--r));
  }
  100% {
    transform: translate(-50%, -50%) rotateZ(-360deg) translateX(var(--r));
  }
}

/* Laser Connecting Beam (Sun to Planet) */
.orbit-laser {
  position: absolute;
  right: 0;
  top: 50%;
  height: 2px;
  transform-origin: right center;
  transform: translateY(-50%);
  width: var(--r);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 5;
}

/* Planet Navigation Card (Billboarded to face user) */
.orbit-node {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px;
  background: rgba(13, 18, 30, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
  cursor: pointer;
  text-decoration: none;
  color: #cbd5e1;
  pointer-events: auto;
  white-space: nowrap;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
  animation: solarBillboardCancel var(--dur, 28s) linear infinite;
  animation-delay: var(--delay, 0s);
  z-index: 15;
}

@keyframes solarBillboardCancel {
  0% {
    transform: translate(-50%, -50%) rotateZ(0deg) rotateY(10deg) rotateX(-65deg);
  }
  100% {
    transform: translate(-50%, -50%) rotateZ(360deg) rotateY(10deg) rotateX(-65deg);
  }
}

.orbit-node:hover {
  color: #fff;
  transform: translate(-50%, -50%) rotateY(10deg) rotateX(-65deg) scale(1.18);
  border-color: var(--color, #ffd978);
  box-shadow: 0 0 25px var(--color, #ffd978), 0 0 45px rgba(0,0,0,0.9);
  z-index: 40;
}

.orbit-node:hover .node-icon {
  transform: scale(1.2);
  color: var(--color, #ffd978);
}

.solar-stage:hover .orbit-pivot,
.solar-stage:hover .orbit-node {
  animation-play-state: paused;
}

.node-icon {
  font-size: 0.95rem;
  color: var(--color, #ffd978);
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.node-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.node-badge {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color, #ffd978);
  font-family: 'Space Mono', monospace;
}

/* HUD Bar at Bottom */
.solar-hud {
  position: absolute;
  bottom: 25px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(14, 20, 35, 0.85);
  border: 1px solid rgba(255, 217, 120, 0.25);
  border-radius: 999px;
  padding: 8px 24px;
  backdrop-filter: blur(12px);
  font-size: 0.82rem;
  color: #94a3b8;
  z-index: 10;
}

.hud-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffd978;
  box-shadow: 0 0 10px #ffd978;
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
