* {
  box-sizing: border-box;
}

:root {
  --bg: #0b0a12;
  --card: rgba(25, 22, 38, 0.82);
  --text: #f7f4ff;
  --muted: #aaa4bb;
  --accent: #b995ff;
  --accent-2: #7c5cff;
  --border: rgba(255,255,255,.10);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  background:
    radial-gradient(circle at 15% 15%, rgba(124,92,255,.18), transparent 28%),
    radial-gradient(circle at 85% 75%, rgba(185,149,255,.13), transparent 28%),
    var(--bg);
  display: grid;
  place-items: center;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: radial-gradient(rgba(255,255,255,.5) .6px, transparent .6px);
  background-size: 22px 22px;
}

.app {
  width: min(920px, 92%);
  padding: 55px 0 30px;
  text-align: center;
}

.hero .badge {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #cfc5ff;
  background: rgba(255,255,255,.045);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
}

h1 {
  margin: 20px 0 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(42px, 8vw, 78px);
  line-height: .95;
  letter-spacing: -.05em;
}

h1 span {
  color: var(--accent);
}

.hero p {
  margin: 0 auto;
  max-width: 560px;
  color: var(--muted);
  font-size: 16px;
}

.generator {
  margin: 35px auto 0;
  max-width: 720px;
}

.category-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.category {
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(255,255,255,.035);
  border-radius: 999px;
  padding: 9px 13px;
  cursor: pointer;
  transition: .2s ease;
}

.category:hover, .category.active {
  color: white;
  border-color: rgba(185,149,255,.5);
  background: rgba(124,92,255,.16);
  transform: translateY(-1px);
}

.thought-card {
  position: relative;
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 38px 35px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(33,29,51,.92), rgba(18,16,28,.88));
  box-shadow: 0 25px 80px rgba(0,0,0,.35);
  overflow: hidden;
}

.thought-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -70px;
  top: -70px;
  border-radius: 50%;
  background: rgba(185,149,255,.10);
}

.sparkle {
  position: absolute;
  top: 18px;
  left: 25px;
  color: var(--accent);
  font-size: 22px;
}

.emoji {
  font-size: 46px;
}

.thought-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 610px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(22px, 4vw, 32px);
  line-height: 1.25;
}

.main-btn, .again-btn {
  width: 100%;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: .2s ease;
}

.main-btn {
  margin-top: 15px;
  padding: 17px 20px;
  border-radius: 17px;
  color: white;
  background: linear-gradient(135deg, var(--accent-2), #9b75ff);
  box-shadow: 0 12px 35px rgba(124,92,255,.22);
}

.main-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 42px rgba(124,92,255,.30);
}

.again-btn {
  margin-top: 9px;
  padding: 13px;
  border-radius: 15px;
  color: #c9c1d7;
  background: rgba(255,255,255,.045);
  border: 1px solid var(--border);
}

.again-btn:hover {
  background: rgba(255,255,255,.08);
  color: white;
}

.counter {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.counter b {
  color: #ded5ef;
}

footer {
  margin-top: 35px;
  color: #6f6a79;
  font-size: 12px;
}

.pop {
  animation: pop .38s ease;
}

@keyframes pop {
  0% { transform: scale(.96); opacity: .4; }
  60% { transform: scale(1.02); opacity: 1; }
  100% { transform: scale(1); }
}

@media (max-width: 600px) {
  .app { padding-top: 35px; }
  .thought-card { min-height: 285px; padding: 30px 22px; }
  .hero p { font-size: 14px; }
}
