/* public/hub.css */

/* ── Base ── */
body {
  margin: 0; padding: 0;
  background: #000;
  overflow: hidden;
  font-family: var(--font-body);
}

.hidden {
  display: none !important;
}

/* ── The Gate (Lock Screen) ── */
.hub-gate {
  position: fixed; inset: 0;
  background: linear-gradient(to bottom, #060913 0%, #151e32 100%);
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  z-index: 1000;
  transition: opacity 1s ease, visibility 1s;
}

.hub-gate:not(.is-visible) {
  opacity: 0;
  visibility: hidden;
}

.gate-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2rem;
  background: rgba(11, 17, 32, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 24px;
  max-width: 400px;
  width: 90%;
}

.gate-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: #fff;
  margin: 0 0 10px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.gate-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 30px;
}

.gate-countdown {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
}

.cd-box {
  background: rgba(0,0,0,0.3);
  padding: 15px;
  border-radius: 12px;
  min-width: 70px;
}

.cd-box span {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent-trail);
}

.cd-box label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

#gate-passcode {
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-family: monospace;
  font-size: 1.5rem;
  padding: 15px;
  width: 150px;
  text-align: center;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.3s;
}

#gate-passcode:focus {
  border-color: var(--accent-trail);
}

.gate-error {
  color: #ff5252;
  font-size: 0.9rem;
  margin-top: 10px;
  height: 20px;
}

/* ── Main Hub (The Campsite) ── */
.hub-main {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  overflow: hidden;
  background: #000;
}

/* Cinematic Background Layer */
.parallax-bg {
  position: absolute;
  /* Make it slightly larger than viewport to allow for parallax panning */
  inset: -5%;
  background: url('/img/dashboard-bg.png') center bottom / cover no-repeat;
  z-index: 1;
  /* Smooth transform for parallax */
  transition: transform 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  /* Fallback color if image is missing */
  background-color: #060913; 
}

/* Fog Layer */
.fog-container {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 50vh;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.fog-layer {
  position: absolute;
  bottom: -10vh;
  width: 200vw;
  height: 100%;
  /* Generated a soft, translucent smoke-like gradient */
  background: radial-gradient(ellipse at center, rgba(16, 25, 45, 0.4) 0%, rgba(16, 25, 45, 0) 70%);
  animation: fogFloat 60s linear infinite;
  opacity: 0.8;
  filter: blur(20px);
}

.fog-1 { left: 0; animation-duration: 80s; }
.fog-2 { left: -100vw; animation-duration: 60s; animation-direction: reverse; opacity: 0.5; }

@keyframes fogFloat {
  0% { transform: translateX(0) translateY(0) scale(1); }
  50% { transform: translateX(-20vw) translateY(5vh) scale(1.1); }
  100% { transform: translateX(0) translateY(0) scale(1); }
}

/* Dynamic Fireflies */
.camp-fireflies {
  position: absolute; inset: 0;
  z-index: 3;
  pointer-events: none;
}

.firefly {
  position: absolute;
  width: 5px; height: 5px;
  background: #d4ffd6; /* Bioluminescent teal/green */
  border-radius: 50%;
  box-shadow: 0 0 15px 3px rgba(165,214,167,0.8);
  opacity: 0;
  animation: fly linear infinite, pulseGlow 3s ease-in-out infinite alternate;
}

@keyframes fly {
  0% { transform: translateY(0) translateX(0) scale(0.5); opacity: 0; }
  20% { opacity: 1; scale: 1; }
  80% { opacity: 1; scale: 1; }
  100% { transform: translateY(-400px) translateX(150px) scale(0.5); opacity: 0; }
}

@keyframes pulseGlow {
  0% { filter: drop-shadow(0 0 5px rgba(165,214,167,0.5)); }
  100% { filter: drop-shadow(0 0 20px rgba(165,214,167,1)); }
}

/* Foreground UI Layer */
.camp-foreground {
  position: absolute; inset: 0;
  z-index: 4;
  display: flex; flex-direction: column;
  align-items: center;
  transition: transform 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.camp-title {
  margin-top: 8vh;
  font-family: 'Caveat', cursive;
  font-size: clamp(3rem, 6vw, 4.5rem);
  color: #fff;
  text-shadow: 0 0 30px rgba(255, 176, 58, 0.6), 0 4px 10px rgba(0,0,0,0.8);
  font-weight: 400;
  z-index: 10;
  letter-spacing: 2px;
}

/* Campfire Pulse Glow */
.campfire-pulse {
  position: absolute;
  bottom: 20%; left: 50%;
  transform: translateX(-50%);
  width: 300px; height: 100px;
  background: radial-gradient(ellipse, rgba(255, 122, 0, 0.4) 0%, transparent 60%);
  filter: blur(30px);
  animation: campfireGlow 3s infinite alternate ease-in-out;
  pointer-events: none;
}

@keyframes campfireGlow {
  0% { opacity: 0.5; transform: translateX(-50%) scale(0.9); }
  100% { opacity: 1; transform: translateX(-50%) scale(1.2); }
}

/* Glassmorphism Orbs container */
.camp-experiences {
  position: absolute;
  inset: 0;
  pointer-events: none; /* Let clicks pass through to background */
}

/* Individual Orb */
.camp-orb {
  position: absolute;
  pointer-events: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-decoration: none;
  width: 110px; height: 110px;
  
  /* Deep Glassmorphism */
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom-color: rgba(255, 255, 255, 0.05);
  border-right-color: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.5), 
    inset 0 0 20px rgba(255, 255, 255, 0.05);
  
  transform: translate(-50%, -50%);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
  /* Constant breathing animation */
  animation: levitate 6s ease-in-out infinite;
}

/* Stagger breathing animations so they look organic */
.pos-trail { animation-delay: 0s; }
.pos-chat { animation-delay: 0.5s; }
.pos-garden { animation-delay: 1s; }
.pos-letters { animation-delay: 1.5s; }
.pos-mixtape { animation-delay: 2s; }
.pos-noticed { animation-delay: 2.5s; }
.pos-future { animation-delay: 3s; }
.pos-stars { animation-delay: 3.5s; }

@keyframes levitate {
  0% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, -60%); }
  100% { transform: translate(-50%, -50%); }
}

.orb-icon {
  font-size: 2.5rem;
  margin-bottom: 6px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.6));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.orb-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  font-weight: 600;
  text-shadow: 0 2px 5px rgba(0,0,0,0.9);
  white-space: nowrap;
}

/* Orb Hover States */
.camp-orb:hover {
  /* Pause levitation on hover so it stays scaled up */
  animation-play-state: paused;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -60%) scale(1.15) !important;
  z-index: 20;
}

.camp-orb:hover .orb-icon {
  transform: translateY(-8px) scale(1.1);
}

/* Color Specific Glows on Hover */
.camp-orb.pos-trail:hover { box-shadow: 0 20px 50px rgba(255,112,67,0.5), inset 0 0 30px rgba(255,112,67,0.3); }
.camp-orb.pos-chat:hover { box-shadow: 0 20px 50px rgba(66,165,245,0.5), inset 0 0 30px rgba(66,165,245,0.3); }
.camp-orb.pos-garden:hover { box-shadow: 0 20px 50px rgba(102,187,106,0.5), inset 0 0 30px rgba(102,187,106,0.3); }
.camp-orb.pos-letters:hover { box-shadow: 0 20px 50px rgba(236,64,122,0.5), inset 0 0 30px rgba(236,64,122,0.3); }
.camp-orb.pos-mixtape:hover { box-shadow: 0 20px 50px rgba(171,71,188,0.5), inset 0 0 30px rgba(171,71,188,0.3); }
.camp-orb.pos-noticed:hover { box-shadow: 0 20px 50px rgba(255,167,38,0.5), inset 0 0 30px rgba(255,167,38,0.3); }
.camp-orb.pos-future:hover { box-shadow: 0 20px 50px rgba(38,166,154,0.5), inset 0 0 30px rgba(38,166,154,0.3); }
.camp-orb.pos-stars:hover { box-shadow: 0 20px 50px rgba(126,87,194,0.5), inset 0 0 30px rgba(126,87,194,0.3); }

/* Desktop Radial Layout (Circular around center) */
@media (min-width: 768px) {
  .pos-future  { top: 20%; left: 50%; }
  .pos-letters { top: 32%; left: 78%; }
  .pos-garden  { top: 60%; left: 85%; }
  .pos-stars   { top: 85%; left: 72%; }
  
  .pos-trail   { top: 88%; left: 50%; width: 130px; height: 130px; border-color: rgba(255,112,67,0.3); background: rgba(255,112,67,0.1); }
  
  .pos-mixtape { top: 85%; left: 28%; }
  .pos-chat    { top: 60%; left: 15%; }
  .pos-noticed { top: 32%; left: 22%; }
}

/* Mobile Staggered Path Layout */
@media (max-width: 767px) {
  .hub-main {
    overflow-y: auto;
    overflow-x: hidden;
  }
  
  /* Fix background to viewport on mobile while scrolling */
  .parallax-bg {
    position: fixed;
    height: 100vh;
    background-position: center bottom;
  }
  
  .fog-container {
    position: fixed;
  }

  .camp-foreground {
    position: relative;
    height: auto;
    min-height: 100vh;
    padding-bottom: 120px;
  }
  
  .camp-title {
    margin-top: 10vh;
    margin-bottom: 10vh;
  }
  
  .campfire-pulse {
    position: fixed;
    bottom: 0;
  }
  
  .camp-experiences {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 100%;
  }
  
  .camp-orb {
    position: relative;
    transform: none;
    top: auto !important; left: auto !important;
    animation: levitateMobile 6s ease-in-out infinite;
  }

  @keyframes levitateMobile {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
  }
  
  .camp-orb:hover {
    transform: scale(1.1) !important;
  }
  
  /* Create an elegant winding path effect by staggering margins */
  .pos-future  { margin-left: -120px; }
  .pos-letters { margin-right: -140px; }
  .pos-garden  { margin-left: -100px; }
  .pos-stars   { margin-right: -120px; }
  .pos-trail   { margin: 30px 0; width: 140px; height: 140px; border-color: rgba(255,112,67,0.4); background: rgba(255,112,67,0.15); }
  .pos-mixtape { margin-left: -130px; }
  .pos-chat    { margin-right: -110px; }
  .pos-noticed { margin-left: -90px; }
}
