/* Soft, rounded, magical font */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@500;700;900&display=swap');

*, *::before, *::after { box-sizing: border-box; }

body { 
  margin: 0; 
  font-family: 'Nunito', sans-serif;
  /* Dreamy Y2K Pastel Gradient Sky */
  background: linear-gradient(-45deg, #ffc3a0, #ffafbd, #e0c3fc, #8ec5fc);
  background-size: 400% 400%;
  animation: skyGradient 15s ease infinite;
  color: #555; 
  min-height: 100vh; 
  overflow-x: hidden;
  position: relative;
}

@keyframes skyGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Background Stars */
.stars {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 0;
}

.bg-star {
  position: absolute;
  color: rgba(255, 255, 255, 0.6);
  animation: twinkle var(--duration) ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.2; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.2); }
}

.main { 
  max-width: 900px; 
  margin: 0 auto; 
  padding: 3rem 1.5rem; 
  position: relative;
  z-index: 10;
}

/* Header */
.header { text-align: center; margin-bottom: 3rem; }
.app-title { 
  font-size: clamp(2.5rem, 6vw, 4rem); 
  font-weight: 900; 
  color: #ffffff;
  margin: 0; 
  text-shadow: 0 4px 15px rgba(255, 175, 189, 0.6);
}
.app-subtitle { 
  font-size: 1.4rem; 
  color: #ffffff; 
  font-weight: 700;
  margin-top: 0.5rem; 
  opacity: 0.9;
  letter-spacing: 1px;
}

/* Grid */
.sound-grid { 
  display: flex; 
  flex-wrap: wrap; 
  justify-content: center; 
  gap: 2.5rem; 
}

/* Floating Cloud Buttons */
.sound-btn { 
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f4faff 100%);
  padding: 1.5rem 2.5rem; 
  border-radius: 50px; /* Pill/cloud shape */
  border: 2px solid rgba(255, 255, 255, 0.8);
  /* Complex shadows to make it look fluffy and 3D */
  box-shadow: 
    0 10px 25px rgba(142, 197, 252, 0.3),
    inset 0 4px 0px rgba(255, 255, 255, 1),
    inset 0 -4px 10px rgba(200, 220, 255, 0.3);
  color: #7b8ab8; 
  font-size: 1.25rem; 
  font-weight: 800; 
  font-family: inherit;
  text-align: center;
  cursor: pointer; 
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: floatCloud 4s ease-in-out infinite;
}

@keyframes floatCloud {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

.sound-btn:hover { 
  transform: translateY(-5px) scale(1.05) !important;
  box-shadow: 
    0 15px 35px rgba(142, 197, 252, 0.5),
    inset 0 4px 0px rgba(255, 255, 255, 1);
  color: #5c6b99;
}

.sound-btn:active { 
  transform: scale(0.95) !important; 
}

/* Playing State: Magical Glow */
.sound-btn.playing { 
  background: linear-gradient(180deg, #ffffff 0%, #fff0f5 100%);
  color: #ff8fab;
  border-color: #ffafbd;
  box-shadow: 
    0 0 30px rgba(255, 175, 189, 0.8),
    inset 0 4px 0px rgba(255, 255, 255, 1);
  animation: magicalPulse 2s infinite;
}

@keyframes magicalPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 175, 189, 0.5), inset 0 4px 0px #fff; }
  50% { box-shadow: 0 0 40px rgba(255, 175, 189, 0.9), inset 0 4px 0px #fff; }
}

/* Sparkle Particle Effect (Injected by JS) */
.click-sparkle {
  position: absolute;
  pointer-events: none;
  font-size: 1.2rem;
  animation: sparkleFly 0.8s ease-out forwards;
  z-index: 100;
}

@keyframes sparkleFly {
  0% { opacity: 1; transform: translate(0, 0) scale(0.5); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(1.5); }
}

/* Admin Panel (Cloud styling) */
.cloud-panel { 
  background: rgba(255, 255, 255, 0.85); 
  backdrop-filter: blur(10px);
  padding: 2.5rem; 
  border-radius: 30px; 
  box-shadow: 0 15px 35px rgba(0,0,0,0.05);
  border: 2px solid white;
  max-width: 500px; 
  margin: 0 auto; 
}
.form { display: flex; flex-direction: column; gap: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; font-weight: 700; color: #7b8ab8; }
.input { 
  background: rgba(255, 255, 255, 0.9); 
  border: 2px solid #e0c3fc; 
  padding: 1rem; 
  border-radius: 15px; 
  color: #555; 
  font-family: inherit; font-size: 1rem; font-weight: bold;
}
.input:focus { outline: none; border-color: #ffafbd; }
.primary-btn { 
  background: linear-gradient(90deg, #ffafbd, #ffc3a0); 
  color: white; 
  padding: 1rem; 
  border-radius: 50px; 
  border: none; 
  font-weight: 800; font-size: 1.2rem; cursor: pointer; transition: 0.2s;
  box-shadow: 0 5px 15px rgba(255, 175, 189, 0.4);
}
.primary-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(255, 175, 189, 0.6); }
.status { margin-top: 1.5rem; font-weight: 800; text-align: center; }
.error { color: #ff6b6b; }
.success { color: #8ec5fc; }