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

/* ---------------------------- */
/* BODY CON SFONDO ANIMATO     */
/* ---------------------------- */
body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: linear-gradient(-45deg, #1f0c2f, #391b5b, #772885, #391b5b);
  background-size: 400% 400%;
  animation: gradientFlow 15s ease infinite;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Particelle sottili */
body::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: starsMove 60s linear infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes starsMove {
  0% { background-position: 0 0; }
  100% { background-position: 400px 400px; }
}

/* ---------------------------- */
/* CONTENITORE PRINCIPALE      */
/* ---------------------------- */
.container {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 3rem 2.5rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  max-width: 520px;
  width: 90%;
  text-align: center;
  animation: fadeInUp 1s ease forwards;
}

/* ---------------------------- */
/* TITOLI                      */
/* ---------------------------- */
h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
  letter-spacing: -0.5px;
}

/* ---------------------------- */
/* FILE INPUT (fallback)       */
/* ---------------------------- */
input[type="file"] {
  background-color: rgba(255, 255, 255, 0.07);
  padding: 0.6rem;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  margin: 0.5rem 0 1.5rem 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

input[type="file"]::file-selector-button {
  background-color: #772885;
  border: none;
  padding: 0.5rem 1rem;
  color: white;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

input[type="file"]::file-selector-button:hover {
  background-color: #5d1f6c;
}

/* ---------------------------- */
/* BOTTONE MODERNO IO STYLE    */
/* ---------------------------- */
.cssbuttons-io-button {
  background: rgba(163, 112, 240, 0.1);
  color: #f6e5ff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 500;
  border-radius: 0.9em;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.4em 1.4em;
  padding-right: 3.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 3em;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 24px rgba(119, 40, 133, 0.3);
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  margin: 1.5rem auto;
}

.cssbuttons-io-button .icon {
  background: white;
  margin-left: 1em;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.2em;
  width: 2.2em;
  border-radius: 0.7em;
  box-shadow: 0 2px 6px rgba(123, 82, 185, 0.3);
  right: 0.3em;
  transition: all 0.3s;
}

.cssbuttons-io-button:hover .icon {
  width: calc(100% - 0.6em);
}

.cssbuttons-io-button .icon img {
  width: 1.4em;
  height: 1.4em;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.cssbuttons-io-button:hover .icon img {
  transform: scale(1.08);
}

.cssbuttons-io-button:active .icon {
  transform: scale(0.95);
}

/* ---------------------------- */
/* MESSAGGI DI STATO           */
/* ---------------------------- */
.note.glass {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f7e9ff;
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 1.2rem;
  padding: 0.9rem 1.4rem;
  border-radius: 1em;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  animation: fadeInUp 0.8s ease forwards, softGlow 4s ease-in-out infinite alternate;
  opacity: 0;
  transform: translateY(15px);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softGlow {
  0% {
    box-shadow: 0 4px 10px rgba(119, 40, 133, 0.2);
  }
  100% {
    box-shadow: 0 8px 28px rgba(119, 40, 133, 0.4);
  }
}

.note.loading {
  animation: fadeInUp 0.8s ease forwards, loaderWave 2s ease-in-out infinite;
}

@keyframes loaderWave {
  0% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 0.5; transform: scale(1); }
}

@keyframes sparkleOrbit {
  0%   { transform: rotate(0deg) translateX(0.1em) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(0.1em) rotate(-360deg); }
}



.gradient-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.gradient-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
}


@keyframes float-1 {
  0% {
      transform: translate(0, 0) scale(1);
  }
  100% {
      transform: translate(10%, 10%) scale(1.1);
  }
}

@keyframes float-2 {
  0% {
      transform: translate(0, 0) scale(1);
  }
  100% {
      transform: translate(-10%, -5%) scale(1.15);
  }
}

@keyframes float-3 {
  0% {
      transform: translate(0, 0) scale(1);
      opacity: 0.3;
  }
  100% {
      transform: translate(-5%, 10%) scale(1.05);
      opacity: 0.6;
  }
}

.glow {
  position: absolute;
  width: 40vw;
  height: 40vh;
  background: radial-gradient(circle, rgba(72, 0, 255, 0.15), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  animation: pulse 8s infinite alternate;
  filter: blur(30px);
}

@keyframes pulse {
  0% {
      opacity: 0.4;
      transform: translate(-50%, -50%) scale(0.9);
  }
  100% {
      opacity: 0.7;
      transform: translate(-50%, -50%) scale(1.1);
  }
}

.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
