:root {
  --bg: #0f172a;
  --card: #1e293b;
  --accent: #38bdf8;
  --accent2: #818cf8;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --green: #22c55e;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(circle at top, #1e293b, var(--bg));
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.card {
  background: var(--card);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 22px;
  padding: 2.5rem 2.5rem 2rem;
  max-width: 560px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

h1 {
  font-size: 2.1rem;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead { color: var(--muted); font-size: 1rem; margin-bottom: 1.75rem; }

.phrase {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

.phrase.loading { opacity: 0.5; }

@keyframes pop {
  0%   { transform: scale(0.96); opacity: 0; }
  60%  { transform: scale(1.02); opacity: 1; }
  100% { transform: scale(1); }
}
.phrase.pop { animation: pop 0.35s ease-out; }

.actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

button {
  font: inherit;
  cursor: pointer;
  border-radius: 12px;
  padding: 0.85rem 1.5rem;
  font-weight: 600;
  transition: transform 0.08s ease, filter 0.15s ease;
  border: none;
}
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.6; cursor: wait; }

.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #0b1120;
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.counter { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.counter strong { color: var(--accent); }

footer {
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  padding-top: 1.25rem;
}
