@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg-main: #120422;
  --bg-top: #4b115f;
  --bg-mid: #25063f;
  --panel: rgba(30, 13, 56, 0.92);
  --panel-soft: rgba(61, 43, 101, 0.95);
  --card: #2a1a49;
  --card-2: #311d57;
  --text-main: #f4ecf8;
  --text-soft: #d6c8e7;
  --text-muted: #b8a8cb;
  --accent: #d2b2ff;
  --accent-strong: #c39cff;
  --accent-warm: #ffd8f1;
  --border: rgba(212, 186, 244, 0.14);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  --glow: 0 0 24px rgba(195, 156, 255, 0.16);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top center, rgba(118, 42, 145, 0.55) 0%, transparent 28%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 16%, #17052d 45%, var(--bg-main) 100%);
}

.tool-container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.tool-card {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid rgba(209, 180, 245, 0.12);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 42px 32px 36px;
}

.tool-header {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 30px;
}

.eyebrow {
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text-soft);
  margin: 0 0 18px;
}

h1 {
  margin: 0 0 14px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3rem, 5vw, 4.2rem);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f7f0fa;
}

.intro {
  margin: 0 auto 12px;
  max-width: 760px;
  font-size: 1.5rem;
  line-height: 1.45;
  font-family: "Cormorant Garamond", serif;
  color: var(--text-soft);
}

.sub-note {
  margin: 0;
  color: var(--accent);
  font-size: 0.98rem;
  line-height: 1.6;
}

.top-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.main-reset-btn {
  border: 1px solid rgba(210, 178, 255, 0.18);
  background: rgba(210, 178, 255, 0.08);
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  padding: 14px 24px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.main-reset-btn:hover {
  transform: translateY(-1px);
  background: rgba(210, 178, 255, 0.12);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 1040px;
  margin: 0 auto;
}

.fear-card {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 20px;
  min-height: 390px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.card-inner {
  height: 100%;
}

.card-step {
  display: none;
  height: 100%;
  background: var(--card);
  border: 1px solid rgba(212, 186, 244, 0.10);
  border-radius: 22px;
  padding: 22px;
}

.card-step.active {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 348px;
}

.step-label {
  display: inline-flex;
  align-self: flex-start;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  background: rgba(210, 178, 255, 0.12);
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.card-step h2 {
  margin: 0 0 14px;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  line-height: 1.02;
  color: #f7f0fa;
}

.step-text,
.truth-text {
  margin: 0 0 18px;
  color: var(--text-soft);
  line-height: 1.75;
  font-size: 1rem;
}

.truth-text {
  font-size: 1.05rem;
}

.reframe-box,
.anchor-box {
  background: var(--card-2);
  border: 1px solid rgba(212, 186, 244, 0.12);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 14px;
}

.reframe-box {
  background: rgba(210, 178, 255, 0.10);
  border-color: rgba(210, 178, 255, 0.22);
  box-shadow: var(--glow);
}

.reframe-box h3,
.anchor-box h3 {
  margin: 0 0 8px;
  font-size: 0.96rem;
  color: var(--accent);
}

.reframe-box p,
.anchor-box p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.reframe-text {
  font-size: 1.02rem;
}

.card-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: auto;
}

.card-actions.dual {
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-btn,
.copy-btn {
  border: none;
  border-radius: var(--radius-pill);
  padding: 13px 20px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-btn:hover,
.copy-btn:hover {
  transform: translateY(-1px);
}

.next-btn,
.copy-btn {
  background: linear-gradient(180deg, #d9b8ff 0%, #caa4ff 100%);
  color: #2d174b;
  box-shadow: 0 8px 28px rgba(201, 164, 255, 0.22);
}

.back-btn {
  background: rgba(210, 178, 255, 0.08);
  color: var(--text-soft);
  border: 1px solid rgba(210, 178, 255, 0.14);
}

.copy-message {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(38, 21, 66, 0.94);
  color: var(--text-main);
  border: 1px solid rgba(210, 178, 255, 0.18);
  border-radius: 999px;
  padding: 12px 18px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.copy-message.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .fear-card {
    min-height: auto;
  }

  .card-step.active {
    min-height: 320px;
  }
}

@media (max-width: 768px) {
  .tool-container {
    padding: 24px 14px 40px;
  }

  .tool-card {
    padding: 28px 18px 22px;
    border-radius: 24px;
  }

  .intro {
    font-size: 1.25rem;
  }

  .fear-card {
    padding: 16px;
    border-radius: 22px;
  }

  .card-step {
    padding: 18px;
  }

  .card-step h2 {
    font-size: 1.75rem;
  }

  .card-actions.dual {
    flex-direction: column;
  }

  .nav-btn,
  .copy-btn,
  .main-reset-btn {
    width: 100%;
  }

  .copy-message {
    right: 14px;
    left: 14px;
    bottom: 14px;
    text-align: center;
  }
}