:root {
  --bg: #fff1e6;
  --bg-decoration: #ffd7ba;
  --card: #ffffff;
  --ink: #2e2d4d;
  --muted: #7a7a9b;
  --primary: #ff6b9d;
  --primary-dark: #e74e85;
  --accent: #7bc5d8;
  --border: #f1dfd1;
  --pick-bg: #ffe0e9;
  --pick-border: #ff6b9d;
  --shadow: 0 4px 14px rgba(255, 107, 157, 0.12);
  --shadow-hover: 0 6px 20px rgba(255, 107, 157, 0.22);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 2.5rem 1rem 4rem;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 10% 0%, var(--bg-decoration) 0%, transparent 35%),
    radial-gradient(circle at 90% 100%, #c3dfe0 0%, transparent 40%);
  background-attachment: fixed;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 640px;
  margin: 0 auto;
}

.header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.paw {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  color: var(--primary);
  animation: wiggle 2.4s ease-in-out infinite;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(8deg); }
}

h1 {
  margin: 0;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 600;
  font-size: 2.5rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.subtitle {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.question {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 1.25rem 1.25rem 1.1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.question:hover {
  box-shadow: var(--shadow-hover);
}

.question h2 {
  margin: 0 0 0.9rem;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
}

.hint {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.85rem;
  margin-left: 0.35rem;
}

.options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.pill:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(255, 107, 157, 0.18);
}

.pill input { display: none; }

.pill.picked {
  background: var(--pick-bg);
  border-color: var(--pick-border);
  color: var(--primary-dark);
  font-weight: 700;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 107, 157, 0.25);
}

#breed-search {
  width: 100%;
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.75rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  font: inherit;
  background: #fff;
  transition: border-color 0.15s ease;
}

#breed-search:focus {
  outline: none;
  border-color: var(--primary);
}

#breed-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 0.5rem;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: #fffaf5;
}

button {
  font: inherit;
  cursor: pointer;
  padding: 0.65rem 1.3rem;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  transition: all 0.15s ease;
}

button:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

button.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  padding: 0.85rem 1.8rem;
  font-size: 1.05rem;
  font-weight: 700;
  width: 100%;
  margin-top: 0.5rem;
  box-shadow: var(--shadow);
}

button.primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: var(--shadow-hover);
}

button.primary:active { transform: translateY(0); }

.error {
  color: var(--primary-dark);
  min-height: 1.2em;
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
}

#result {
  margin-top: 2.5rem;
  padding: 2.5rem 1.5rem 2rem;
  background: linear-gradient(135deg, #fff 0%, #fff1e6 100%);
  border: 3px solid var(--pick-border);
  border-radius: 28px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(255, 107, 157, 0.2);
  position: relative;
  overflow: hidden;
  animation: cardPop 0.35s cubic-bezier(0.17, 0.89, 0.32, 1.275);
}

#result::before,
#result::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--pick-bg);
  opacity: 0.6;
  z-index: 0;
}

#result::before { top: -40px; left: -40px; }
#result::after { bottom: -40px; right: -40px; background: #c8ecf3; opacity: 0.5; }

#result > * { position: relative; z-index: 1; }

@keyframes cardPop {
  0% { opacity: 0; transform: scale(0.7) translateY(20px); }
  60% { opacity: 1; transform: scale(1.03) translateY(-4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.kicker {
  color: var(--muted);
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.name-big {
  margin: 0 0 1.5rem;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: 4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--primary-dark);
  line-height: 1.1;
}

.name-big.animating {
  animation: namePop 0.4s cubic-bezier(0.17, 0.89, 0.32, 1.275);
}

@keyframes namePop {
  0% { opacity: 0; transform: scale(0.4) rotate(-8deg); }
  55% { opacity: 1; transform: scale(1.12) rotate(3deg); }
  75% { transform: scale(0.96) rotate(-1deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.actions {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}

.actions button { min-width: 110px; }

#reroll {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

#reroll:hover {
  background: #5eb5cd;
  border-color: #5eb5cd;
}

.hidden { display: none !important; }

footer {
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

footer p { margin: 0; }

@media (max-width: 500px) {
  h1 { font-size: 2rem; }
  .name-big { font-size: 3rem; }
  .paw { width: 36px; height: 36px; }
}
.home {
  max-width: 720px;
  text-align: center;
}

.hero {
  margin: 1rem 0 3rem;
}

.hero .paw {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  display: block;
}

.hero h1 {
  font-size: 3rem;
  margin: 0 0 0.5rem;
}

.tagline {
  color: var(--muted);
  font-size: 1.15rem;
  margin: 0;
}

.projects {
  display: grid;
  gap: 1rem;
  text-align: left;
}

.project-card {
  display: block;
  padding: 1.5rem 1.75rem;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 20px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: all 0.15s ease;
}

.project-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.project-card h2 {
  margin: 0 0 0.4rem;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--primary-dark);
}

.project-card p {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.project-link {
  font-weight: 700;
  color: var(--primary);
}

@media (max-width: 500px) {
  .hero h1 { font-size: 2.25rem; }
  .hero .paw { width: 48px; height: 48px; }
}
