/* 420 site - trippy/weed aesthetic */

@import url("https://fonts.googleapis.com/css2?family=Creepster&family=Space+Mono&display=swap");

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

html, body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background: #0a0a0a;
  color: #c8e6a0;
  font-family: "Space Mono", monospace;
}

/* full-screen shader canvas */
#shader-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;

  /* fallback gradient for no-WebGL */
  background: radial-gradient(ellipse at 30% 40%, #2a1a4a, #0f0a2a 60%),
              radial-gradient(ellipse at 70% 60%, #1a3a2a, #0a0a1a 80%),
              #0a0a1a;
}

/* semi-transparent overlay for readability */
.page-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
  z-index: 1;
  pointer-events: none;
}

/* ---- click to enter overlay ---- */
#enter-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.5s ease;
}

#enter-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ---- audio controls ---- */
#audio-controls {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 50;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(100, 255, 100, 0.3);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  backdrop-filter: blur(4px);
}

#audio-controls.hidden {
  display: none;
}

#mute-btn {
  background: transparent;
  border: none;
  color: #c8e6a0;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: transform 0.2s ease;
}

#mute-btn:hover {
  transform: scale(1.1);
}

#volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  background: rgba(100, 255, 100, 0.3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #c8e6a0;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

#volume-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 8px rgba(100, 255, 100, 0.6);
}

#volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #c8e6a0;
  cursor: pointer;
  border: none;
}

.overlay-title {
  font-family: "Creepster", cursive;
  font-size: clamp(3rem, 10vw, 8rem);
  color: #ffd700;
  text-shadow:
    0 0 10px rgba(255, 215, 0, 0.8),
    0 0 30px rgba(255, 215, 0, 0.4);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.overlay-subtitle {
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: #a8d89a;
  text-shadow: 0 0 10px rgba(168, 216, 154, 0.6);
  animation: pulse-text 2s ease-in-out infinite;
}

@keyframes pulse-text {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ---- main content container ---- */
.content {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---- floating cannabis leaves ---- */
.leaves-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.leaf {
  position: absolute;
  width: 2rem;
  height: 2rem;
  color: #4ade80;
  opacity: 0.6;
  animation: leaf-float linear infinite;
  will-change: transform, opacity;
  pointer-events: auto;
}

.leaf svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

@keyframes leaf-float {
  0% {
    transform: translateY(110vh) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.4;
  }
  100% {
    transform: translateY(-10vh) rotate(360deg) scale(1.2);
    opacity: 0;
  }
}

/* ---- hero section ---- */
.hero {
  width: 100%;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  gap: 1.5rem;
}

.hero-title {
  font-family: "Creepster", cursive;
  font-size: clamp(3rem, 10vw, 8rem);
  color: #ffd700;
  text-shadow:
    0 0 10px rgba(255, 215, 0, 0.8),
    0 0 30px rgba(255, 215, 0, 0.4),
    0 0 60px rgba(255, 215, 0, 0.2);
  letter-spacing: 0.1em;
  animation: glow-pulse 3s ease-in-out infinite;
  margin-bottom: 1rem;
}

.happy-420 {
  font-family: "Creepster", cursive;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: #ffd700;
  text-shadow:
    0 0 10px rgba(255, 215, 0, 0.8),
    0 0 30px rgba(255, 215, 0, 0.4);
  animation: glow-pulse 2s ease-in-out infinite;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: #a8d89a;
  text-shadow: 0 0 10px rgba(168, 216, 154, 0.6);
  margin-bottom: 2rem;
}

.hero-image {
  max-width: min(90vw, 500px);
  height: auto;
  filter: drop-shadow(0 0 20px rgba(100, 255, 100, 0.4));
  animation: float 6s ease-in-out infinite;
}

/* ---- hat toggle button ---- */
.hat-btn {
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(100, 255, 100, 0.4);
  border-radius: 999px;
  padding: 0.6rem 1.8rem;
  color: #c8e6a0;
  font-family: "Space Mono", monospace;
  font-size: 1rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.hat-btn:hover {
  background: rgba(100, 255, 100, 0.15);
  border-color: rgba(100, 255, 100, 0.8);
  box-shadow: 0 0 15px rgba(100, 255, 100, 0.3);
}

.hat-btn:active {
  transform: scale(0.96);
}

/* ---- footer ---- */
.footer {
  width: 100%;
  padding: 2rem;
  text-align: center;
  color: rgba(200, 230, 160, 0.5);
  font-size: 0.8rem;
}

.footer a {
  color: #c8e6a0;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

/* ---- animations ---- */
@keyframes glow-pulse {
  0%, 100% {
    text-shadow:
      0 0 10px rgba(255, 215, 0, 0.8),
      0 0 30px rgba(255, 215, 0, 0.4),
      0 0 60px rgba(255, 215, 0, 0.2);
  }
  50% {
    text-shadow:
      0 0 15px rgba(255, 215, 0, 1),
      0 0 40px rgba(255, 215, 0, 0.6),
      0 0 80px rgba(255, 215, 0, 0.3);
  }
}

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