/* Natural 2D Rain Overlay */

#cvs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 200vh;
  z-index: 9998;
  pointer-events: none;
  /* let clicks pass through to website */
  display: block;
  transition: opacity 1s ease;
}

/* UI Panel Awwwards Redesign */
#ui {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: rgba(10, 15, 25, 0.4);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  padding: 60px 24px;
  border-radius: 24px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
  width: 260px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  user-select: none;
  opacity: 1;
  transform: translateY(0) scale(1);
}

#ui.hidden {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
}

/* Close Button */
#ui-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a0aab5;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.3s ease;
}

#ui-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: rotate(90deg);
}

/* Open Button */
#ui-open {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(10, 15, 25, 0.4);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 9998;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 1;
  transform: scale(1);
}

#ui-open:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1) rotate(45deg);
}

#ui-open.hidden {
  opacity: 0;
  transform: scale(0.8) rotate(-45deg);
  pointer-events: none;
}

/* Controls */
.ctrl {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 2px;
}

.ctrl label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 500;
  color: #8395a7;
}

/* Custom Sleek Range Sliders */
input[type=range] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  height: 2px;
  border-radius: 1px;
  outline: none;
  transition: background 0.3s;
  position: relative;
}

input[type=range]:hover {
  background: rgba(255, 255, 255, 0.2);
}

input[type=range]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5), 0 2px 5px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s;
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.4);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.8), 0 2px 8px rgba(0, 0, 0, 0.6);
}

#start-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 12, 0.85);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  flex-direction: column;
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), visibility 1s;
  font-family: system-ui, -apple-system, sans-serif;
}

#start-overlay h1 {
  color: #fff;
  margin-bottom: 12px;
  font-weight: 200;
  letter-spacing: 12px;
  font-size: clamp(24px, 4vw, 42px);
  text-align: center;
  text-transform: uppercase;
}

#start-overlay p {
  color: #a0aab5;
  margin-bottom: 48px;
  font-weight: 300;
  letter-spacing: 2px;
  font-size: clamp(12px, 1.5vw, 15px);
  text-align: center;
  max-width: 400px;
  line-height: 1.6;
}

.start-btn-premium {
  background: #fff;
  color: #05080c;
  border: none;
  padding: 18px 48px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.15);
}

.start-btn-premium:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 40px rgba(255, 255, 255, 0.25);
  background: #f0f0f0;
}

.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}