/* ===== GLOBAL STYLES ===== */

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


body {
  min-height: 100vh;
  font-family: "Poppins", sans-serif;
  color: #333;

  display: flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(
    180deg,
    #f6d6ff 0%,
    #cf7fea 40%,
    #e7b6ff 100%
  );
}



/* ===== CONTAINER ===== */

.container {
  width: 100%;
  max-width: 420px;
  padding: 30px;

  text-align: center;

  background: linear-gradient(
    180deg,
    #f4def3 0%,
    #f3e5f7 100%
  );

  border-radius: 24px;

  box-shadow: 0 20px 45px rgba(157, 78, 221, 0.25);

  animation: float 6s ease-in-out infinite;
}



/* ===== HEADER ===== */

header h1 {
  font-size: 1.9rem;
  font-weight: 700;
  color: #3c096c;

  letter-spacing: -0.5px;
  margin-bottom: 10px;
}


.subtitle {
  font-size: 0.9rem;
  color: #6c4ab6;
  opacity: 0.85;
}


.subtitle a {
  color: #9d4edd;
  font-weight: 600;
  text-decoration: none;
}


.subtitle a:hover {
  text-decoration: underline;
}



/* ===== FORM ===== */

form {
  display: flex;
  gap: 10px;

  margin: 25px 0;
}


input[type="text"] {
  flex: 1;

  padding: 12px;

  font-size: 0.95rem;

  border-radius: 14px;
  border: 1px solid #ddd;

  background: #eab9f4;
}


input[type="text"]:focus {
  outline: none;
  border-color: #9d4edd;
}



/* ===== BUTTONS ===== */

button {
  padding: 12px 16px;

  font-size: 0.9rem;
  font-weight: 600;

  color: white;
  background: #9d4edd;

  border: none;
  border-radius: 16px;

  cursor: pointer;

  box-shadow: 0 20px 45px rgba(157, 78, 221, 0.25);

  transition: all 0.3s ease;
}


button:hover {
  background: #7b2cbf;
  transform: translateY(-2px);
}


button:active {
  transform: translateY(2px);
}



/* ===== QUOTE OUTPUT ===== */

#quote {
  min-height: 80px;
  margin-top: 28px;
  padding: 20px;

  display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 6px;
text-align: center;

  font-size: 1.05rem;
  line-height: 1.6;
  font-style: italic;

  color: #4a4a4a;

  border-radius: 18px;

  border: 1px solid rgba(157, 78, 221, 0.15);

  backdrop-filter: blur(6px);

  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.75),
    rgba(245, 230, 255, 0.85)
  );
}




/* ===== COPY BUTTON ===== */

#copy-quote {
  width: 100%;
  margin-top: 28px;   /* increased spacing */

  font-size: 1rem;
  letter-spacing: 0.3px;

  border-radius: 999px;
  /* rounder button */

  background: linear-gradient(
    135deg,
    #f3b4e6,
    #e9a8f0
  );
}


#copy-quote:hover {
  background: #ea6fd8;
}



/* ===== WORD ANIMATION ===== */

.word {
  opacity: 0;

  display: inline-block;

  transform: translateY(10px);

  animation: fadeUp 0.4s ease forwards;
}


@keyframes fadeUp {

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

}



/* ===== FLOAT ANIMATION ===== */

@keyframes float {

  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }

  100% {
    transform: translateY(0);
  }

}



/* ===== TITLE SPARKLE ===== */

header h1 span {
  display: inline-block;
  animation: sparkle 1.5s ease-in-out infinite alternate;
}


@keyframes sparkle {

  from {
    transform: rotate(-3deg);
  }

  to {
    transform: rotate(3deg);
  }

}



/* ===== RESPONSIVE ===== */

@media (max-width: 480px) {

  form {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

}
