:root {
  --bg-gradient: linear-gradient(135deg, #eef2ff, #e0e7ff);
  --primary-color: #4f46e5;
  --secondary-color: #6366f1;
  --text-color: #1e293b;
  --border-color: #cbd5e1;
  --font-body: "Poppins", "Segoe UI", sans-serif;
  --shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: var(--bg-gradient);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  line-height: 1.6;
  padding: 1.5rem;
}
.container {
  background: #ffffff;
  max-width: 650px;
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  animation: fadeIn 0.8s ease-in-out;
}
header h1 {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 0.5px;
}
form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.prompt {
  padding: 0.9rem 1.1rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.prompt:focus {
  border-color: var(--secondary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.instruction {
  font-size: 0.9rem;
  color: #6b7280;
  margin-top: -0.3rem;
  text-align: center;
  font-style: italic;
  letter-spacing: 0.3px;
  transition: color 0.3s ease;
}

.instruction::before {
  content: "💡 ";
  color: var(--secondary-color);
}

.prompt:focus + .instruction {
  color: var(--secondary-color);
}

.submit-button {
  background: var(--primary-color);
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  padding: 0.9rem 1.2rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.submit-button:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}
.poem {
  background: #f8fafc;
  border-left: 4px solid var(--primary-color);
  padding: 1.2rem 1rem;
  border-radius: 10px;
  font-style: italic;
  font-size: 1.05rem;
  color: #334155;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.05);
  white-space: pre-line;
  animation: fadeIn 1s ease-in-out;
}
.poem strong {
  color: var(--primary-color);
}
.hidden {
  display: none;
}
footer {
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.5;
}

footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

footer a:hover {
  text-decoration: underline;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
.loading {
  color: var(--secondary-color);
  font-style: italic;
  text-align: center;
  animation: blink 1.2s infinite ease-in-out;
}
