:root {
  --bg: #120b22;
  --bg-soft: #1d1235;
  --card: rgba(255, 255, 255, 0.1);
  --card-border: rgba(255, 255, 255, 0.2);
  --text: #f9f3ff;
  --muted: #dbcdf0;
  --accent: #ff6fcf;
  --accent-2: #ffcf66;
  --ok: #7bffad;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 20%, #2f1a61 0%, var(--bg) 50%, #0a0615 100%);
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -2;
  opacity: 0.55;
}

.bg-glow-1 {
  width: 280px;
  height: 280px;
  top: -90px;
  left: -80px;
  background: #ff5ab9;
}

.bg-glow-2 {
  width: 300px;
  height: 300px;
  bottom: -120px;
  right: -110px;
  background: #7a6dff;
}

.page {
  width: min(1040px, 92%);
  margin: 2rem auto 3rem;
  display: grid;
  gap: 1.2rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 1.2rem 1.15rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.hero h1 {
  font-family: "Baloo 2", system-ui, sans-serif;
  margin: 0.1rem 0 0.5rem;
  font-size: clamp(2rem, 4.8vw, 3.8rem);
  line-height: 0.95;
}

.hero span {
  color: var(--accent-2);
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--accent-2);
}

.hero-copy,
.subcopy {
  margin-top: 0.55rem;
  color: var(--muted);
  max-width: 72ch;
}

.hero-actions {
  margin-top: 0.9rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.btn {
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  padding: 0.7rem 0.95rem;
  font-weight: 700;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(120deg, #ff6fcf, #ff9f65);
  color: #2b0925;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-small {
  font-size: 0.86rem;
  padding: 0.5rem 0.75rem;
}

.sweet-message {
  margin-top: 0.7rem;
  font-weight: 600;
  color: var(--ok);
}

.hidden {
  display: none;
}

h2 {
  margin-top: 0;
  font-family: "Baloo 2", system-ui, sans-serif;
  font-size: clamp(1.3rem, 3vw, 2rem);
}

h3 {
  margin-top: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.wizard {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 0.75rem;
  display: grid;
  gap: 0.7rem;
}

.wizard.hidden {
  display: none;
}

.wizard-progressbar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.wizard-progressfill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffcf66, #ff6fcf);
  transition: width 220ms ease;
}

.wizard-progress {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.9rem;
  font-weight: 700;
}

.wizard-steps {
  display: flex;
  gap: 0.45rem;
}

.wizard-step-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.wizard-step-dot.active {
  color: #1f112f;
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.wizard-step-dot.done {
  color: #120b22;
  background: rgba(123, 255, 173, 0.95);
  border-color: rgba(123, 255, 173, 0.95);
}

#wizardQuestion {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.3;
}

.wizard-feedback {
  margin: 0;
  min-height: 2.8rem;
}

.wizard-complete {
  margin-top: 0.7rem;
  background: rgba(123, 255, 173, 0.1);
  border: 1px solid rgba(123, 255, 173, 0.35);
  border-radius: 12px;
  padding: 0.8rem;
  display: grid;
  gap: 0.55rem;
}

.wizard-complete.hidden {
  display: none;
}

.wizard-complete h3 {
  margin: 0;
}

.profile-type {
  margin: 0;
  color: var(--ok);
  font-weight: 700;
}

.wizard-summary {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.trait-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.selected-choice {
  outline: 2px solid rgba(255, 207, 102, 0.85);
  outline-offset: 1px;
}

.chip {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
}

.chip:hover,
.btn:hover {
  transform: translateY(-1px);
}

.output,
.muted {
  color: var(--muted);
}

.result-box {
  position: relative;
  transition:
    box-shadow 200ms ease,
    border-color 200ms ease,
    background-color 200ms ease,
    transform 200ms ease;
}

.result-box.result-visible {
  background: rgba(255, 207, 102, 0.1);
  border: 1px solid rgba(255, 207, 102, 0.45);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

.result-box.result-visible::before {
  content: "Result";
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.stat-grid {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem 0.8rem;
}

.stat-grid.hidden {
  display: none;
}

.stat-grid p {
  margin: 0.2rem 0;
}

.metric-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 0.55rem 0.6rem;
  display: grid;
  gap: 0.32rem;
}

.metric-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  width: 10%;
  background: linear-gradient(90deg, #7bffad, #ffcf66, #ff6fcf);
  transition: width 240ms ease;
}

.tarot-result,
.profile-result {
  margin-top: 0.8rem;
  padding: 0.85rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.8rem;
}

.service {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.85rem;
}

.meter-wrap {
  display: grid;
  gap: 0.6rem;
}

.rage-card.overloading {
  will-change: transform;
}

.rage-card.exploding {
  animation: rageExplode 650ms ease forwards;
  pointer-events: none;
}

@keyframes rageExplode {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
    filter: blur(0);
  }
  45% {
    transform: scale(1.04) rotate(-2deg);
    opacity: 1;
    filter: blur(0);
  }
  100% {
    transform: scale(1.36) rotate(9deg);
    opacity: 0;
    filter: blur(3px);
  }
}

.meter {
  width: min(520px, 100%);
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.meter-bar {
  width: 5%;
  height: 100%;
  background: linear-gradient(90deg, #7bffad, #ffcf66, #ff8ca8);
  transition: width 260ms ease;
}

.bingo-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.bingo-grid.hidden {
  display: none;
}

.bingo {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 0.6rem 0.65rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.bingo.active {
  background: rgba(123, 255, 173, 0.16);
  border-color: rgba(123, 255, 173, 0.7);
}

.ritual-tools {
  margin-top: 0.2rem;
}

.footer p {
  margin: 0;
  color: #ffe8fb;
}

.butt-overlay {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: grid;
  place-items: center;
  background: rgba(6, 6, 16, 0.55);
}

.butt-overlay.hidden {
  display: none;
}

.butt-panel {
  background: rgba(23, 17, 44, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.butt-text {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffe7f8;
}

.action-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  background: rgba(5, 5, 16, 0.6);
  backdrop-filter: blur(2px);
}

.action-overlay.hidden {
  display: none;
}

.action-panel {
  min-width: 250px;
  background: rgba(20, 14, 40, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
}

.action-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffcf66;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.call-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(4, 4, 12, 0.68);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.call-panel {
  width: min(430px, 92vw);
  background: rgba(20, 14, 38, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 1rem;
  display: grid;
  gap: 0.7rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.call-overlay.hidden {
  display: none;
}

.call-label {
  margin: 0;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
}

.call-panel h3 {
  margin: 0;
  font-size: 1.45rem;
}

.call-pulse {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #7bffad;
  box-shadow: 0 0 0 0 rgba(123, 255, 173, 0.7);
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(123, 255, 173, 0.7);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(123, 255, 173, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(123, 255, 173, 0);
  }
}

.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

.confetti {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 16px;
  border-radius: 2px;
  opacity: 0.95;
  animation: fall 2.5s linear forwards;
}

@keyframes fall {
  to {
    transform: translateY(108vh) rotate(540deg);
    opacity: 0.2;
  }
}

@media (max-width: 620px) {
  .page {
    width: 94%;
    margin-top: 1rem;
  }

  .card {
    padding: 1rem 0.9rem;
  }
}
