:root {
  --bg-1: #6d5dfc;
  --bg-2: #46c2ff;
  --card-bg: #ffffff;
  --accent: #ff5fa2;
  --accent-2: #ffb83d;
  --text: #2b2d42;
  --muted: #7a7d99;
  --shadow: 0 14px 40px rgba(45, 35, 110, 0.28);
}

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

body {
  font-family: 'Nunito', system-ui, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  background-attachment: fixed;
  display: flex;
  justify-content: center;
  padding: 24px 16px;
}

#app {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

/* Header */
.topbar {
  text-align: center;
  color: #fff;
}

.logo {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  font-weight: 800;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.12);
}

.tagline {
  margin-top: 6px;
  font-size: 1.05rem;
  font-weight: 600;
  opacity: 0.95;
}

/* Stage */
.stage {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

/* Category chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.chip {
  border: none;
  cursor: pointer;
  padding: 9px 16px;
  border-radius: 999px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
  transition: transform 0.12s ease, background 0.2s ease;
}

.chip:hover {
  transform: translateY(-2px);
}

.chip.active {
  background: #fff;
  color: var(--bg-1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.chip-emoji {
  margin-right: 6px;
}

/* Idea card */
.card {
  width: 100%;
  min-height: 240px;
  background: var(--card-bg);
  border-radius: 28px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 26px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 184, 61, 0.16), transparent 60%),
    radial-gradient(circle at bottom left, rgba(255, 95, 162, 0.16), transparent 60%);
  pointer-events: none;
}

.idea {
  text-align: center;
  position: relative;
  z-index: 1;
}

.idea-emoji {
  font-size: clamp(3.4rem, 14vw, 5rem);
  line-height: 1;
  margin-bottom: 14px;
}

.idea-text {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(1.3rem, 5vw, 1.9rem);
  font-weight: 700;
  line-height: 1.3;
}

.placeholder .idea-text {
  color: var(--muted);
  font-size: clamp(1.05rem, 4vw, 1.3rem);
}

.idea-tag {
  margin-top: 14px;
  display: inline-block;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: rgba(255, 95, 162, 0.12);
  padding: 5px 12px;
  border-radius: 999px;
}

/* Reference image link */
.ref-button {
  display: inline-block;
  margin-top: 16px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--bg-1);
  background: rgba(109, 93, 252, 0.12);
  border: 2px solid rgba(109, 93, 252, 0.35);
  padding: 9px 18px;
  border-radius: 999px;
  transition: transform 0.12s ease, background 0.2s ease;
}

.ref-button:hover {
  transform: translateY(-2px);
  background: rgba(109, 93, 252, 0.2);
}

/* Pop animation */
@keyframes pop {
  0% { transform: scale(0.94); opacity: 0.4; }
  60% { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(1); }
}

.card.pop .idea {
  animation: pop 0.35s ease;
}

/* Big button */
.big-button {
  border: none;
  cursor: pointer;
  font-family: 'Baloo 2', cursive;
  font-weight: 800;
  font-size: clamp(1.2rem, 5vw, 1.6rem);
  color: #fff;
  padding: 18px 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px rgba(255, 95, 162, 0.45);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}

.big-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(255, 95, 162, 0.55);
}

.big-button:active {
  transform: translateY(1px) scale(0.98);
}

.big-button-emoji {
  font-size: 1.4em;
}

/* History */
.history {
  width: 100%;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 18px 20px;
  backdrop-filter: blur(6px);
}

.history-title {
  font-family: 'Baloo 2', cursive;
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.history-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.history-emoji {
  font-size: 1.3rem;
}

/* Footer */
.footer {
  color: #fff;
  opacity: 0.9;
  font-weight: 600;
  text-align: center;
  font-size: 0.9rem;
}
