body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  transition: background 1s ease;
}

header h1 {
  text-align: center;
  margin-top: 40px;
  font-size: 32px;
  color: #010101;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.1);
}

main {
  width: 100%;
  max-width: 500px;
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

form#poem-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

form input.listen {
  padding: 12px 15px;
  border-radius: 8px;
  border: 2px solid #ccc;
  font-size: 16px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

form input.listen:focus {
  border-color: #006064;
  box-shadow: 0 0 8px rgba(0,96,100,0.5);
  outline: none;
}

form input.button {
  padding: 12px 20px;
  background: #006064;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.3s ease;
}

form input.button:hover {
  background: #004d52;
  transform: scale(1.05);
}

.hint {
  font-size: 13px;
  opacity: 0.7;
  margin-bottom: 20px;
  font-style: italic;
  text-align: center;
  animation: floatHint 3s ease-in-out infinite alternate;
}

@keyframes floatHint {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-4px); }
}

.rhyme {
  width: 100%;
  margin-top: 20px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
  min-height: 60px;
}

.rhyme.generating {
  animation: blinkText 1s steps(2, start) infinite;
  color: #006064;
  font-style: italic;
}

@keyframes blinkText {
  to { visibility: hidden; }
}

footer {
  margin-top: auto;
  text-align: center;
  opacity: 0.7;
  font-size: 14px;
  padding: 20px;
}

footer a {
  color: #006064;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #004d52;
  text-decoration: underline;
}
