:root {
  --blue: #9ecae1;
  --blue-dark: #4f86a6;
  --text: #24313a;
  --muted: #687782;
  --card: #ffffff;
  --soft: #f4f9fc;
  --border: #d7e8f1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 24px;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background: transparent;
}

#baby-name-widget {
  max-width: 760px;
  margin: 0 auto;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 34px 26px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(79, 134, 166, 0.12);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue-dark);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 700;
  font-family: Arial, sans-serif;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.08;
}

.intro {
  max-width: 560px;
  margin: 14px auto 24px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.name-form {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 auto;
}

#nameInput {
  width: min(100%, 390px);
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 16px;
  font-family: Arial, sans-serif;
  outline: none;
}

#nameInput:focus {
  border-color: var(--blue-dark);
  box-shadow: 0 0 0 3px rgba(158, 202, 225, 0.35);
}

button {
  padding: 15px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #17394d;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  font-family: Arial, sans-serif;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#statusMessage {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--blue-dark);
  font-size: 14px;
  font-family: Arial, sans-serif;
}

#wordCloud {
  min-height: 260px;
  margin-top: 26px;
  padding: 26px 12px 10px;
  background: linear-gradient(180deg, var(--soft), #ffffff);
  border-radius: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
}

.cloud-word {
  display: inline-block;
  color: var(--text);
  line-height: 1;
  animation: floatIn 0.25s ease both;
  transition: transform 0.2s ease;
}

.cloud-word:hover {
  transform: scale(1.08);
}

.empty-state {
  color: var(--muted);
  font-size: 16px;
  font-family: Arial, sans-serif;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 520px) {
  body {
    padding: 12px;
  }

  .card {
    padding: 28px 18px;
    border-radius: 22px;
  }

  #nameInput,
  button {
    width: 100%;
  }

  #wordCloud {
    min-height: 220px;
  }
}
