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

:root {
  --bg: #07070c;
  --card: rgba(18, 18, 28, 0.82);
  --card2: rgba(24, 24, 38, 0.9);
  --text: #ffffff;
  --muted: #a5a5b7;
  --border: rgba(255,255,255,0.09);
  --purple: #8b5cf6;
  --pink: #ec4899;
  --cyan: #22d3ee;
  --red: #ff4d67;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

.background {
  position: fixed;
  inset: 0;
  z-index: -10;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(139,92,246,.12), transparent 30%),
    radial-gradient(circle at 80% 30%, rgba(236,72,153,.1), transparent 30%),
    #07070c;
}

.glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .18;
}

.glow-1 {
  background: #8b5cf6;
  top: -200px;
  left: -150px;
}

.glow-2 {
  background: #ec4899;
  right: -200px;
  top: 300px;
}

.stars {
  position: absolute;
  inset: 0;
  opacity: .25;
  background-image:
    radial-gradient(circle, white 1px, transparent 1px);
  background-size: 90px 90px;
}

main {
  width: min(1050px, calc(100% - 32px));
  margin: auto;
  padding: 70px 0 40px;
}


/* HERO */

.hero {
  text-align: center;
  margin-bottom: 45px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(139,92,246,.35);
  background: rgba(139,92,246,.09);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #c4b5fd;
}

h1 {
  margin-top: 20px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: .95;
  letter-spacing: -4px;
  background: linear-gradient(
    90deg,
    #ffffff,
    #c4b5fd,
    #f9a8d4,
    #67e8f9
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 620px;
  margin: 22px auto 28px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}


/* MODE SWITCH */

.mode-switch {
  border: 1px solid rgba(236,72,153,.35);
  background: rgba(236,72,153,.08);
  color: white;
  padding: 13px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: .2s;
}

.mode-switch:hover {
  transform: translateY(-2px);
  border-color: rgba(236,72,153,.7);
  background: rgba(236,72,153,.15);
  box-shadow: 0 10px 35px rgba(236,72,153,.15);
}


/* GENERATOR */

.generator {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  backdrop-filter: blur(20px);
  box-shadow: 0 25px 80px rgba(0,0,0,.25);
}

.section {
  margin-bottom: 28px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 13px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #aaaabd;
}

.section-title strong {
  color: white;
  text-transform: none;
  letter-spacing: 0;
}


/* CATEGORIES */

.categories {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
}

.category {
  padding: 14px 8px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.035);
  color: #aaaabd;
  cursor: pointer;
  font-weight: 700;
  transition: .2s;
}

.category:hover {
  color: white;
  transform: translateY(-2px);
  background: rgba(255,255,255,.07);
}

.category.active {
  color: white;
  border-color: rgba(139,92,246,.65);
  background: linear-gradient(
    135deg,
    rgba(139,92,246,.25),
    rgba(236,72,153,.16)
  );
  box-shadow: 0 8px 25px rgba(139,92,246,.12);
}


/* AMOUNT */

.amounts {
  display: flex;
  gap: 9px;
}

.amount {
  width: 58px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.035);
  color: #aaaabd;
  font-weight: 800;
  cursor: pointer;
}

.amount.active {
  color: white;
  border-color: #8b5cf6;
  background: rgba(139,92,246,.2);
}


/* SLIDER */

input[type="range"] {
  width: 100%;
  accent-color: #a855f7;
  cursor: pointer;
}

#ridiculousDescription {
  color: #858596;
  margin-top: 9px;
  font-size: 13px;
}


/* BUTTONS */

.generator-buttons {
  display: flex;
  gap: 12px;
}

.generate-button,
.surprise-button {
  flex: 1;
  padding: 16px;
  border-radius: 14px;
  border: none;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: .2s;
}

.generate-button {
  color: white;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  box-shadow: 0 10px 35px rgba(139,92,246,.22);
}

.surprise-button {
  color: white;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
}

.generate-button:hover,
.surprise-button:hover {
  transform: translateY(-2px);
}


/* RESULTS */

.results-section,
.favorites-section {
  margin-top: 45px;
}

.results-header,
.favorites-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.results-small {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #858596;
}

h2 {
  margin-top: 5px;
  font-size: 25px;
}

.results-actions {
  display: flex;
  gap: 8px;
}

.results-actions button,
#clearFavorites {
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: #aaaabd;
  cursor: pointer;
}

.results-actions button:hover,
#clearFavorites:hover {
  color: white;
  background: rgba(255,255,255,.08);
}


/* RESULT CARDS */

#results {
  display: grid;
  gap: 12px;
}

.result-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 19px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 17px;
  backdrop-filter: blur(15px);
  animation: appear .3s ease both;
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(139,92,246,.13);
  color: #c4b5fd;
  font-weight: 900;
  flex-shrink: 0;
}

.result-content {
  flex: 1;
}

.result-text {
  font-size: 18px;
  font-weight: 800;
}

.result-type {
  margin-top: 5px;
  color: #858596;
  font-size: 12px;
}

.result-card-actions {
  display: flex;
  gap: 7px;
}

.card-action {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: #aaaabd;
  cursor: pointer;
}

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

.card-action.favorite.active {
  color: #fb7185;
  border-color: rgba(251,113,133,.4);
}


/* EMPTY */

.empty-state {
  display: none;
  padding: 50px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 18px;
  color: #858596;
}

.empty-state div {
  font-size: 35px;
  margin-bottom: 10px;
}


/* FAVORITES */

.favorites {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.favorite-item {
  padding: 15px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.favorite-item span {
  font-weight: 700;
}

.favorite-remove {
  border: none;
  background: none;
  color: #77778a;
  cursor: pointer;
  font-size: 17px;
}

.favorite-remove:hover {
  color: #fb7185;
}

#favoriteCount {
  display: inline-grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(139,92,246,.2);
  color: #c4b5fd;
  font-size: 12px;
}


/* TOAST */

.toast {
  position: fixed;
  left: 50%;
  bottom: 25px;
  transform: translate(-50%, 20px);
  padding: 12px 18px;
  border-radius: 12px;
  background: #181824;
  border: 1px solid var(--border);
  color: white;
  opacity: 0;
  pointer-events: none;
  transition: .25s;
  z-index: 50;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}


/* FOOTER */

footer {
  text-align: center;
  padding: 35px 15px;
  color: #555568;
  font-size: 11px;
  letter-spacing: 2px;
}


/* ROAST MODE */

body.roast-mode .mode-switch {
  border-color: rgba(255,77,103,.4);
  background: rgba(255,77,103,.08);
}

body.roast-mode .category.active {
  border-color: rgba(255,77,103,.7);
  background: linear-gradient(
    135deg,
    rgba(255,77,103,.22),
    rgba(236,72,153,.16)
  );
}

body.roast-mode .generate-button {
  background: linear-gradient(135deg, #ff4d67, #ec4899);
}


/* MOBILE */

@media (max-width: 700px) {

  main {
    width: min(100% - 20px, 1050px);
    padding-top: 40px;
  }

  h1 {
    letter-spacing: -2px;
  }

  .generator {
    padding: 20px;
  }

  .categories {
    grid-template-columns: repeat(2, 1fr);
  }

  .generator-buttons {
    flex-direction: column;
  }

  .results-header,
  .favorites-header {
    align-items: flex-start;
    gap: 15px;
    flex-direction: column;
  }

  .favorites {
    grid-template-columns: 1fr;
  }

  .result-card {
    align-items: flex-start;
  }

  .result-card-actions {
    flex-direction: column;
  }

}