/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Quicksand", sans-serif;
  line-height: 1.6;
  color: #ffffff;
  overflow-x: hidden;
  background: #000;
  cursor: none; /* Hide the default cursor */
}

/* Audio Toggle Button - Always Visible */
.audio-toggle-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: none;
  z-index: 1002;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 8px 32px rgba(78, 205, 196, 0.2);
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 8px 32px rgba(78, 205, 196, 0.2);
  }
  50% {
    box-shadow: 0 8px 40px rgba(78, 205, 196, 0.4);
  }
}

.audio-toggle-btn:hover {
  transform: scale(1.1) rotate(10deg);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 48px rgba(78, 205, 196, 0.4);
}

.audio-toggle-btn:active {
  transform: scale(0.95);
}

.audio-toggle-btn.active {
  background: rgba(78, 205, 196, 0.2);
  border-color: #4ecdc4;
  transform: rotate(180deg);
}

.toggle-icon {
  pointer-events: none;
  transition: transform 0.4s ease;
  display: inline-block;
}

.audio-toggle-btn.active .toggle-icon {
  transform: scale(1.1);
}

/* Autoplay Toggle Button - Positioned beside Audio Toggle */
.autoplay-toggle-btn {
  position: fixed;
  top: 20px;
  left: 80px; /* Positioned right beside the audio toggle button */
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: none;
  z-index: 1002;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 8px 32px rgba(78, 205, 196, 0.2);
}

.autoplay-toggle-btn:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 48px rgba(78, 205, 196, 0.4);
}

.autoplay-toggle-btn:active {
  transform: scale(0.95);
}

.autoplay-toggle-btn.active {
  background: rgba(78, 205, 196, 0.25);
  border-color: #4ecdc4;
  animation: autoplayPulse 2s ease-in-out infinite;
}

@keyframes autoplayPulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.5);
  }
  50% {
    box-shadow: 0 0 35px rgba(78, 205, 196, 0.8);
  }
}

.autoplay-icon {
  pointer-events: none;
  transition: transform 0.3s ease;
  display: inline-block;
}

.autoplay-toggle-btn.active .autoplay-icon {
  animation: rotateIcon 4s linear infinite;
}

@keyframes rotateIcon {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Audio Controls Panel - Horizontal Premium Design */
.audio-controls {
  position: fixed;
  top: 80px;
  left: 20px;
  z-index: 1001;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(20, 20, 20, 0.4) 100%
  );
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  padding: 15px 25px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 80px rgba(78, 205, 196, 0.15);
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: auto;
  max-width: 420px;
}

.audio-controls.hidden {
  opacity: 0;
  transform: translateY(-20px) scale(0.95) translateX(-10px);
  pointer-events: none;
  visibility: hidden;
}

.audio-controls::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(78, 205, 196, 0.05) 0%,
    rgba(255, 255, 255, 0.02) 50%,
    rgba(78, 205, 196, 0.05) 100%
  );
  border-radius: 100px;
  pointer-events: none;
  z-index: -1;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* Audio Buttons - Compact Design */
.audio-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(78, 205, 196, 0.4);
  color: #fff;
  cursor: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.audio-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(78, 205, 196, 0.4), transparent);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.audio-btn:hover::before {
  width: 120%;
  height: 120%;
}

.audio-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 0 30px rgba(78, 205, 196, 0.7);
  background: rgba(78, 205, 196, 0.25);
  border-color: #4ecdc4;
}

.audio-btn:active {
  transform: scale(0.95);
}

.audio-btn.muted {
  background: rgba(255, 68, 68, 0.15);
  border-color: rgba(255, 68, 68, 0.5);
}

.audio-btn.muted:hover {
  box-shadow: 0 0 30px rgba(255, 68, 68, 0.7);
  background: rgba(255, 68, 68, 0.25);
}

.audio-icon {
  pointer-events: none;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

/* Audio Divider */
.audio-divider {
  width: 1px;
  height: 25px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  flex-shrink: 0;
}

/* Volume Control - Horizontal Compact */
.volume-control {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  transition: all 0.3s ease;
  flex: 1;
  min-width: 140px;
  max-width: 180px;
}

.volume-icon {
  font-size: 1.1rem;
  opacity: 0.7;
  transition: opacity 0.3s ease, transform 0.3s ease;
  flex-shrink: 0;
}

.volume-control:hover .volume-icon {
  opacity: 1;
  transform: scale(1.1);
}

#volume-slider {
  flex: 1;
  height: 6px;
  background: linear-gradient(
    to right,
    #4ecdc4 0%,
    #4ecdc4 50%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.1) 100%
  );
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: none;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, #fff, #4ecdc4);
  border-radius: 50%;
  cursor: none;
  transition: all 0.3s ease;
  box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.3), 0 4px 12px rgba(0, 0, 0, 0.3),
    0 0 25px rgba(78, 205, 196, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.8);
}

#volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.4), 0 4px 16px rgba(0, 0, 0, 0.4),
    0 0 35px rgba(78, 205, 196, 0.6);
}

#volume-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, #fff, #4ecdc4);
  border-radius: 50%;
  cursor: none;
  transition: all 0.3s ease;
  box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.3), 0 4px 12px rgba(0, 0, 0, 0.3),
    0 0 25px rgba(78, 205, 196, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.8);
}

#volume-slider::-moz-range-thumb:hover {
  transform: scale(1.3);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.4), 0 4px 16px rgba(0, 0, 0, 0.4),
    0 0 35px rgba(78, 205, 196, 0.6);
}

/* Custom Cursor */
#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 10px 5px rgba(255, 255, 255, 0.6);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    background-color 0.3s ease;
  will-change: transform;
  z-index: 9999;
}

#custom-cursor::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.5);
  width: 200%;
  height: 200%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.3) 10%,
    rgba(255, 255, 255, 0) 70%
  );
  opacity: 0.6;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

/* Hover state for the cursor */
a:hover ~ #custom-cursor,
button:hover ~ #custom-cursor,
.dot:hover ~ #custom-cursor {
  background-color: #4ecdc4;
  transform: translate(-50%, -50%) scale(1.2);
}

#custom-cursor.star-mode::after {
  display: none !important;
}

@keyframes starPulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

/* Scroll Snap Container */
.slides-container {
  scroll-snap-type: y mandatory;
  height: 100vh;
  overflow-y: scroll;
  overflow-x: hidden;
  position: relative;
  scroll-behavior: smooth;
}

/* Individual Slides */
.slide {
  height: 100vh;
  width: 100vw;
  position: relative;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
}

/* Parallax Background */
.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: translateZ(0);
  will-change: transform;
  z-index: 1;
  opacity: 0;
  visibility: visible !important;
  display: block !important;
  background-attachment: scroll !important;
  background-clip: border-box !important;
  background-origin: border-box !important;
  overflow: hidden;
  min-height: 100vh;
  min-width: 100vw;
  transition: opacity 1.5s ease-in-out;
}

/* Background fade-in animation */
.parallax-bg.fade-in {
  opacity: 1;
  animation: backgroundGlow 2s ease-out;
}

@keyframes backgroundGlow {
  0% {
    opacity: 0;
    filter: brightness(0.8) contrast(1.2);
  }
  100% {
    opacity: 1;
    filter: brightness(1) contrast(1);
  }
}

/* Slide Content */
.slide-content-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 800px;
  padding: 2rem;
  z-index: 10;
  text-align: center;
}

/* Slide Title and Text */
.slide-title,
.slide-text {
  font-family: "Orbitron", monospace;
  font-weight: 900;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 0 10px #b400a5, 0 0 20px #c708c7, 0 0 30px #4ecdc4,
    1px 1px #000, 2px 2px #000, 3px 3px #000, 4px 4px #000;
  opacity: 0;
  will-change: transform, opacity;
}

.slide-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  margin-bottom: 1rem;
}

.slide-text {
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  text-shadow: 0 0 10px #e915d7, 0 0 20px #c708c7, 0 0 30px #4ecdc4;
}

/* Animations */
.slide-title.animate-in {
  animation: titleEntrance 2s ease-out forwards;
  animation-delay: 0.6s;
}

.slide-text.animate-in {
  animation: textEntrance 2s ease-out forwards;
  animation-delay: 2s;
}

@keyframes titleEntrance {
  0% {
    opacity: 0;
    transform: translate(-200px, -200px) scale(0.8) rotate(-10deg);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
}

@keyframes textEntrance {
  0% {
    opacity: 0;
    transform: translate(200px, 200px) scale(0.8) rotate(10deg);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
}

/* Animated birds */
.animated-bird {
  position: absolute;
  left: -10%;
  width: 50px;
  height: auto;
  z-index: 2;
  display: none;
  animation: flyAcross 20s linear infinite;
  animation-play-state: paused;
}

@keyframes flyAcross {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(120vw);
  }
}

/* Bird positions and durations for each slide */
#bird-1-1 {
  top: 15%;
  animation-duration: 25s;
}
#bird-1-2 {
  top: 20%;
  animation-duration: 18s;
}
#bird-1-3 {
  top: 10%;
  animation-duration: 22s;
}
#bird-1-4 {
  top: 25%;
  animation-duration: 20s;
}
#bird-1-5 {
  top: 30%;
  animation-duration: 23s;
}

#bird-2-1 {
  top: 18%;
  animation-duration: 21s;
}
#bird-2-2 {
  top: 22%;
  animation-duration: 19s;
}
#bird-2-3 {
  top: 13%;
  animation-duration: 24s;
}

#bird-4-1 {
  top: 12%;
  animation-duration: 23s;
}
#bird-4-2 {
  top: 28%;
  animation-duration: 20s;
}
#bird-4-3 {
  top: 17%;
  animation-duration: 18s;
}

#bird-5-1 {
  top: 32%;
  animation-duration: 25s;
}
#bird-5-2 {
  top: 14%;
  animation-duration: 22s;
}
#bird-5-3 {
  top: 24%;
  animation-duration: 20s;
}
#bird-5-4 {
  top: 19%;
  animation-duration: 18s;
}

/* Moving Grass */
#moving-grass {
  position: absolute;
  bottom: 0%;
  right: 20%;
  width: 105px;
  height: auto;
  z-index: 5;
  opacity: 0.8;
  filter: brightness(0.4);
}

/* Navigation Dots */
.nav-dots {
  position: fixed;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: none;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.dot.active {
  background: #4ecdc4;
  box-shadow: 0 0 20px #4ecdc4;
  transform: scale(1.3);
}

/* Scroll Indicator */
.scroll-indicator {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  text-align: center;
  color: rgba(255, 255, 255, 1);
  font-size: 0.9rem;
  animation: fadeInOut 2s ease-in-out infinite;
  cursor: none;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid rgba(255, 255, 255, 0.8);
  border-bottom: 2px solid rgba(255, 255, 255, 0.8);
  transform: rotate(45deg);
  margin: 0 auto 10px;
  animation: bounce 2s infinite;
}

/* Animations */
@keyframes fadeInOut {
  0%,
  100% {
    opacity: 0.8;
  }
  50% {
    opacity: 0.3;
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0) rotate(45deg);
  }
  40% {
    transform: translateY(-10px) rotate(45deg);
  }
  60% {
    transform: translateY(-5px) rotate(45deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .audio-toggle-btn {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }

  .autoplay-toggle-btn {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    left: 75px;
  }

  .audio-controls {
    top: 75px;
    left: 10px;
    padding: 12px 20px;
    gap: 15px;
    max-width: calc(100vw - 40px);
  }

  .audio-btn {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  .volume-control {
    min-width: 120px;
  }

  #volume-slider {
    height: 5px;
  }

  .audio-divider {
    height: 20px;
  }

  .nav-dots {
    right: 15px;
    gap: 10px;
  }

  .dot {
    width: 10px;
    height: 10px;
  }

  .slide-content {
    padding: 1.5rem;
    margin: 0 1rem;
  }

  .scroll-indicator {
    bottom: 20px;
    font-size: 0.8rem;
  }

  #custom-cursor {
    display: none;
  }

  body {
    cursor: auto;
  }
}

@media (max-width: 480px) {
  .audio-toggle-btn {
    width: 40px;
    height: 40px;
    top: 15px;
    left: 15px;
    font-size: 1rem;
  }

  .autoplay-toggle-btn {
    width: 40px;
    height: 40px;
    top: 15px;
    left: 60px;
    font-size: 1rem;
  }

  .audio-controls {
    top: 65px;
    left: 15px;
    padding: 10px 15px;
    gap: 10px;
    flex-wrap: wrap;
    max-width: calc(100vw - 30px);
    border-radius: 20px;
  }

  .audio-btn {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .audio-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(
      to right,
      transparent,
      rgba(255, 255, 255, 0.2),
      transparent
    );
  }

  .volume-control {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    padding: 5px 0;
    gap: 10px;
  }

  .volume-icon {
    font-size: 1rem;
  }

  #volume-slider {
    height: 4px;
    flex: 1;
  }

  #volume-slider::-webkit-slider-thumb {
    width: 15px;
    height: 15px;
  }

  #volume-slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
  }

  .slide-title {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .slide-text {
    font-size: clamp(1rem, 5vw, 1.4rem);
  }

  .nav-dots {
    right: 10px;
    gap: 8px;
  }

  .dot {
    width: 8px;
    height: 8px;
  }

  #moving-grass {
    width: 80px;
    right: 3%;
  }
}

/* Performance Optimizations */
.slide {
  will-change: transform;
}

.parallax-bg {
  will-change: transform;
}

.floating-elements > * {
  will-change: transform, opacity;
}

/* Smooth Scrolling for Webkit */
.slides-container::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

/* custom Scrollbar for Firefox */
.slides-container {
  scrollbar-width: none;
}

/* High DPI Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .parallax-bg {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}
