:root {
  --bg-deep: #120728;
  --bg-mid: #2a0f45;
  --bg-outer: #051d36;

  --card-bg: rgba(28, 10, 56, 0.94);
  --card-border: rgba(255, 255, 255, 0.08);

  --button-bg: linear-gradient(180deg, #5a337d 0%, #472663 100%);
  --button-bg-hover: linear-gradient(180deg, #69408d 0%, #54306f 100%);
  --button-active: linear-gradient(180deg, #8152ac 0%, #64388c 100%);

  --text-main: #f5efe9;
  --text-soft: #d9d0e9;
  --text-muted: #b8accf;
  --accent: #efc56b;

  --field-bg: rgba(108, 67, 148, 0.22);
  --field-border: rgba(255, 255, 255, 0.1);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Inter", sans-serif;
  background: #0d1630;
  color: var(--text-main);
}

body {
  position: relative;
  overflow-x: hidden;
}

.page-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top center, rgba(150, 67, 180, 0.28), transparent 24%),
    linear-gradient(180deg, #3f114f 0%, #26093f 32%, #18052e 65%, #071f38 100%);
  z-index: -2;
}

.page-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.05), transparent 12%),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.04), transparent 10%),
    radial-gradient(circle at 70% 80%, rgba(153, 87, 205, 0.12), transparent 20%);
  z-index: -1;
}

.app-shell {
  min-height: 100vh;
  padding: 42px 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.card {
  width: min(1100px, 100%);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 36px 32px 34px;
  backdrop-filter: blur(8px);
}

.icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.moon-icon {
  font-size: 28px;
  line-height: 1;
  opacity: 0.95;
}

.eyebrow {
  text-align: center;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 10px;
}

h1 {
  margin: 0;
  text-align: center;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.8rem, 5vw, 4.25rem);
  line-height: 1;
  font-weight: 600;
  color: var(--text-main);
}

.subtitle {
  text-align: center;
  color: var(--text-soft);
  font-size: 1.2rem;
  line-height: 1.6;
  max-width: 760px;
  margin: 18px auto 34px;
}

.section-block h2,
.reflection-preview h3 {
  font-family: "Cormorant Garamond", serif;
  color: var(--accent);
  font-size: clamp(2rem, 3vw, 2.6rem);
  margin: 0 0 18px;
  font-weight: 600;
}

.belief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.belief-btn {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--button-bg);
  color: var(--text-main);
  padding: 28px 22px;
  border-radius: 22px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.5rem, 2.2vw, 1.95rem);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.belief-btn:hover {
  transform: translateY(-1px);
  background: var(--button-bg-hover);
}

.belief-btn.active {
  background: var(--button-active);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 12px 24px rgba(42, 10, 73, 0.4);
}

.rewire-card {
  padding-top: 10px;
}

.columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.column-box,
.younger-self-box,
.reflection-preview {
  background: rgba(82, 43, 120, 0.18);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.younger-self-box {
  margin-top: 18px;
}

label {
  display: block;
  margin-bottom: 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.55rem;
  color: var(--text-main);
  font-weight: 600;
}

textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: var(--field-bg);
  color: var(--text-main);
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  padding: 16px;
  outline: none;
}

.younger-self-box textarea {
  min-height: 120px;
}

textarea::placeholder {
  color: #c8bdd9;
}

textarea:focus {
  border-color: rgba(239, 197, 107, 0.55);
  box-shadow: 0 0 0 3px rgba(239, 197, 107, 0.12);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 22px 0;
}

.action-btn {
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  font-family: "Inter", sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.action-btn:hover {
  transform: translateY(-1px);
}

.action-btn.primary {
  background: linear-gradient(180deg, #efc56b 0%, #d8a93f 100%);
  color: #2a1637;
}

.action-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid rgba(255,255,255,0.08);
}

.action-btn.ghost {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid rgba(255,255,255,0.12);
}

.reflection-preview h3 {
  margin-bottom: 14px;
}

.preview-content {
  color: var(--text-soft);
  line-height: 1.8;
  font-size: 1rem;
}

.preview-content p {
  margin: 0 0 10px;
}

.preview-content strong {
  color: var(--text-main);
}

#empowerText {
  color: #f3d78a;
  font-weight: 600;
}

@media (max-width: 920px) {
  .belief-grid,
  .columns {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 28px 20px;
  }

  .belief-btn {
    padding: 22px 18px;
  }

  textarea {
    min-height: 150px;
  }
}