/* main.css - Core Design Tokens & Theme Styles */

:root {
  --primary: #FF007F;      /* Electric Magenta */
  --secondary: #00FFFF;    /* Neon Cyan */
  --amber: #FFB800;        /* Glowing Gold/Amber */
  --bg: #05040e;           /* Deep Space/Cavern Background */
  --card-bg: rgba(16, 12, 36, 0.78); /* Translucent Amethyst */
  --card-border: rgba(99, 74, 186, 0.22); /* Glowing Crystal Border */
}

body {
  background-color: var(--bg);
  color: #f8fafc;
  font-family: 'Space Grotesk', sans-serif;
  overflow-x: hidden;
  /* Scroll vertical height to drive horizontal + vertical diagonal scroll */
  height: 600vh !important;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255, 0, 127, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 255, 255, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(255, 184, 0, 0.03) 0%, transparent 50%);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
}

/* Parallax Background */
#parallax-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 250vw;
  height: 180vh;
  background:
    radial-gradient(circle at 15% 25%, rgba(255, 0, 127, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(0, 255, 255, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 50% 45%, rgba(255, 184, 0, 0.05) 0%, transparent 50%);
  transition: transform 0.22s cubic-bezier(0.1, 0.75, 0.25, 1);
  z-index: 0;
  pointer-events: none;
}

.dust-particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  animation: floatDust 8s ease-in-out infinite;
  pointer-events: none;
}

/* Glassmorphism & Cavern Shadows */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
}

.neon-glow-magenta {
  box-shadow: 0 0 15px rgba(255, 0, 127, 0.3);
}

.text-glow-magenta {
  text-shadow: 0 0 10px rgba(255, 0, 127, 0.6);
}

.text-glow-cyan {
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
}

.text-gold-gradient {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Card Adventure Hovers */
.card-adventure {
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card-adventure:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 0, 127, 0.6);
  box-shadow: 0 12px 24px -10px rgba(255, 0, 127, 0.3);
}

.btn-adventure {
  background: linear-gradient(135deg, var(--primary) 0%, #d6006a 100%);
  transition: all 0.3s ease;
}

.btn-adventure:hover {
  transform: scale(1.03);
  box-shadow: 0 0 20px rgba(255, 0, 127, 0.6);
}

/* Gem Clicker Shaking */
.gem-clicker {
  transition: transform 0.1s ease;
}

.gem-clicker:active {
  transform: scale(0.88) rotate(-4deg);
}

/* Progress Bar */
.mining-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mining-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  box-shadow: 0 0 8px var(--primary);
  transition: width 0.4s cubic-bezier(0.1, 0.8, 0.2, 1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(99, 74, 186, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.modal-overlay {
  background: rgba(4, 3, 10, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
}

/* Hidden Crystals */
.hidden-gem {
  position: absolute;
  z-index: 15;
  cursor: pointer;
  animation: gemFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.6));
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hidden-gem:hover {
  transform: scale(1.3) rotate(15deg);
  filter: drop-shadow(0 0 15px rgba(217, 70, 239, 1));
}

/* Floating Popups */
.gem-popup {
  position: absolute;
  z-index: 99;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
  color: var(--secondary);
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
  pointer-events: none;
  animation: popupFloat 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Campfire Animation styles */
.campfire-container {
  position: relative;
  width: 140px;
  height: 110px;
  margin: 0 auto;
}

.fire {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 70px;
}

.flame {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 100%;
  border-radius: 0 300px 300px 300px;
  transform: rotate(-135deg) scale(1);
  transform-origin: 50% 50%;
  filter: blur(2px);
  animation: flicker 1.4s ease-in-out infinite alternate;
}

.flame-1 {
  background: var(--primary);
  z-index: 3;
  width: 44px;
  height: 44px;
  left: 13px;
  animation-duration: 1s;
}

.flame-2 {
  background: var(--amber);
  z-index: 2;
  width: 58px;
  height: 58px;
  left: 6px;
  animation-duration: 1.4s;
}

.flame-3 {
  background: #f43f5e;
  z-index: 1;
  width: 70px;
  height: 70px;
  left: 0;
  animation-duration: 1.8s;
}

.wood-logs {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 14px;
  background: #78350f;
  border-radius: 6px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
  z-index: 4;
}

.wood-logs::after {
  content: '';
  position: absolute;
  top: -6px;
  left: 15px;
  width: 50px;
  height: 12px;
  background: #451a03;
  border-radius: 6px;
  transform: rotate(12deg);
}

.ember {
  position: absolute;
  width: 3.5px;
  height: 3.5px;
  background: var(--amber);
  border-radius: 50%;
  bottom: 25px;
  opacity: 0;
  animation: floatEmber 3s linear infinite;
}

/* Loading States */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.02); }
}

/* Development Dashboard */
.dev-dashboard {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 999;
  display: none;
  background: rgba(10, 10, 20, 0.9);
  border: 1px solid var(--primary);
  padding: 0.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(255, 0, 127, 0.2);
}

.dev-dashboard button {
  background: var(--primary);
  color: white;
  font-size: 9px;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  margin-right: 4px;
}

.dev-dashboard button:hover {
  opacity: 0.9;
}

/* ============================================ */
/* MOBILE RESPONSIVE OVERRIDES - Added via Git Bash */
/* ============================================ */

@media (max-width: 768px) {
  body {
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  
  #scroll-container {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    transition: none !important;
  }
  
  .realm {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100vh;
    padding: 80px 16px 40px 16px !important;
    margin: 0 !important;
  }
  
  #realm-1, #realm-2, #realm-3, #realm-4, #realm-5, #realm-6 {
    transform: none !important;
  }
  
  #rail-svg, #parallax-bg, #cart-container {
    display: none !important;
  }
  
  .glass-panel {
    padding: 16px !important;
  }
  
  .realm .grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  
  #attendee-gallery {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  
  #teams-container {
    grid-template-columns: 1fr !important;
  }
  
  button, .btn-adventure, .gem-clicker, [onclick] {
    min-height: 44px;
    cursor: pointer;
  }
  
  .modal-overlay .glass-panel {
    max-width: 90% !important;
    margin: 16px !important;
    padding: 20px !important;
  }
  
  footer {
    position: relative !important;
    margin-top: 40px !important;
    padding: 20px !important;
  }
}

@media (max-width: 480px) {
  #attendee-gallery {
    grid-template-columns: 1fr !important;
  }
  
  header .text-xl {
    font-size: 0.9rem !important;
  }
  
  .flex.gap-4.md\:gap-6 {
    gap: 4px !important;
  }
  
  .campfire-container {
    transform: scale(0.7);
  }
}
