/* ===================================================
   Vrindavan Particle Experience - Sacred Aesthetics
   Obsidian, Cyan, Neon Magenta, and Celestial Gold
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Cinzel+Decorative:wght@700&family=Montserrat:wght@300;400;500;600&family=Rozha+One&display=swap');

:root {
  --bg-deep: #02040a;
  --cyan-neon: #00f5ff;
  --blue-electric: #0099ff;
  --magenta-neon: #ff0088;
  --pink-neon: #ff66cc;
  --violet-neon: #9d4edd;
  --gold-warm: #ffd166;
  --gold-bright: #ffb703;
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --glass-bg: rgba(6, 11, 25, 0.65);
  --glass-border: rgba(0, 245, 255, 0.22);
  --glass-glow: rgba(0, 245, 255, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Montserrat', sans-serif;
  position: relative;
}

#webgl-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  outline: none;
}

/* Full clarity - no darkening vignette overlay */
#webgl-container::after {
  display: none;
}

/* UI Overlay Wrapper */
.ui-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem 2rem;
}

/* ===================================================
   Header & Typography
   =================================================== */
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.brand-wrapper {
  pointer-events: auto;
  animation: fadeInDown 1.4s ease-out;
}

.brand-tag {
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--cyan-neon);
  margin-bottom: 0.25rem;
  text-shadow: 0 0 10px rgba(0, 245, 255, 0.6);
  font-weight: 500;
}

.brand-title {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #ffffff;
  text-shadow: 
    0 0 20px rgba(0, 245, 255, 0.7),
    0 0 40px rgba(255, 0, 136, 0.4);
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 30%, #a5f3fc 70%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  margin-top: 0.4rem;
  font-weight: 400;
}

.stage-badge {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
  background: rgba(255, 183, 3, 0.1);
  border: 1px solid rgba(255, 183, 3, 0.3);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  transition: opacity 0.5s ease;
}

/* ===================================================
   Corner Controls (Audio, Settings)
   =================================================== */
.top-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  pointer-events: auto;
}

.glass-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.glass-btn:hover {
  border-color: var(--cyan-neon);
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
  transform: translateY(-2px) scale(1.05);
}

.glass-btn.active {
  background: rgba(0, 245, 255, 0.2);
  border-color: var(--cyan-neon);
  color: var(--cyan-neon);
  box-shadow: 0 0 25px rgba(0, 245, 255, 0.6);
}

.skip-btn {
  background: rgba(255, 0, 136, 0.15);
  border: 1px solid rgba(255, 0, 136, 0.4);
  color: #ffffff;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  font-weight: 500;
}

.skip-btn:hover {
  background: rgba(255, 0, 136, 0.35);
  box-shadow: 0 0 20px rgba(255, 0, 136, 0.5);
  transform: translateY(-1px);
}

/* ===================================================
   Center / Bottom UI & Guidance
   =================================================== */
.bottom-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
}

.hint-wrapper {
  text-align: center;
  pointer-events: auto;
  animation: pulseGlow 3s infinite ease-in-out;
}

.hint-text {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(4, 8, 20, 0.6);
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 245, 255, 0.2);
  backdrop-filter: blur(10px);
}

.hint-text span.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--cyan-neon);
  box-shadow: 0 0 8px var(--cyan-neon);
}

/* Stage Navigation Pill Bar */
.stage-nav {
  display: flex;
  gap: 0.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  backdrop-filter: blur(16px);
  pointer-events: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.stage-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  padding: 0.5rem 1.0rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.stage-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.stage-btn.active {
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.25), rgba(255, 0, 136, 0.25));
  border: 1px solid var(--cyan-neon);
  color: #ffffff;
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.4);
  font-weight: 600;
}

/* ===================================================
   Settings Drawer (Slide-out panel)
   =================================================== */
.settings-drawer {
  position: absolute;
  top: 0;
  right: -360px;
  width: 340px;
  height: 100%;
  background: rgba(4, 8, 22, 0.88);
  border-left: 1px solid var(--glass-border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 20;
  padding: 2.2rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  overflow-y: auto;
}

.settings-drawer.open {
  right: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
}

.drawer-title {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  letter-spacing: 0.15em;
  color: var(--cyan-neon);
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.4rem;
  transition: color 0.2s;
}

.close-btn:hover {
  color: #ffffff;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.control-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: #cbd5e1;
}

.control-val {
  color: var(--cyan-neon);
  font-weight: 600;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cyan-neon);
  box-shadow: 0 0 12px var(--cyan-neon);
  cursor: pointer;
  transition: transform 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.action-btn {
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(255, 0, 136, 0.25));
  border: 1px solid var(--cyan-neon);
  color: #ffffff;
  padding: 0.75rem 1.2rem;
  border-radius: 8px;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 0.4rem;
}

.action-btn:hover {
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.4), rgba(255, 0, 136, 0.45));
  box-shadow: 0 0 25px rgba(0, 245, 255, 0.5);
  transform: translateY(-2px);
}

/* ===================================================
   Loading Screen Overlay
   =================================================== */
#loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-deep);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: opacity 0.35s ease-out;
}

.om-symbol {
  font-size: 4rem;
  color: var(--cyan-neon);
  text-shadow: 
    0 0 25px rgba(0, 245, 255, 0.9),
    0 0 60px rgba(255, 0, 136, 0.6);
  animation: floatOm 3s infinite ease-in-out;
}

.loading-text {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #e2e8f0;
}

/* ===================================================
   Keyframes
   =================================================== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.75;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

@keyframes floatOm {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.04);
  }
}

/* ===================================================
   Responsive Mobile Adjustments
   =================================================== */
@media (max-width: 768px) {
  .ui-layer {
    padding: 1rem 1rem;
  }

  .brand-title {
    font-size: 1.55rem;
  }

  .brand-subtitle {
    font-size: 0.72rem;
  }

  .stage-nav {
    overflow-x: auto;
    max-width: 95vw;
    padding: 0.25rem 0.35rem;
    scrollbar-width: none;
  }

  .stage-nav::-webkit-scrollbar {
    display: none;
  }

  .stage-btn {
    font-size: 0.68rem;
    padding: 0.4rem 0.75rem;
  }

  .hint-text {
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    padding: 0.35rem 0.9rem;
  }

  .settings-drawer {
    width: 290px;
    right: -310px;
  }
}
