:root {
  --bg: #030712;
  --bg-2: #071122;
  --card: rgba(11, 17, 35, 0.84);
  --card-2: rgba(15, 23, 42, 0.92);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.38);

  --purple: #8b5cf6;
  --violet: #a855f7;
  --pink: #ec4899;
  --orange: #f97316;
  --amber: #f59e0b;
  --gold: #facc15;
  --blue: #3b82f6;
  --cyan: #06b6d4;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: var(--text);

  background:
    radial-gradient(circle at 14% 16%, rgba(168, 85, 247, 0.32), transparent 25%),
    radial-gradient(circle at 84% 18%, rgba(249, 115, 22, 0.24), transparent 22%),
    radial-gradient(circle at 70% 72%, rgba(236, 72, 153, 0.22), transparent 24%),
    radial-gradient(circle at 22% 82%, rgba(250, 204, 21, 0.10), transparent 20%),
    linear-gradient(180deg, #14002e 0%, #080014 42%, #030008 100%);
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero-shell {
  position: relative;
  margin-bottom: 22px;
}

.hero-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(36px);
  opacity: 0.72;
  pointer-events: none;
}

.hero-glow-1 {
  width: 220px;
  height: 220px;
  top: -30px;
  left: 20px;
  background: rgba(168, 85, 247, 0.32);
}

.hero-glow-2 {
  width: 250px;
  height: 250px;
  top: -10px;
  right: 40px;
  background: rgba(249, 115, 22, 0.26);
}

.hero-glow-3 {
  width: 220px;
  height: 220px;
  bottom: -10px;
  left: 36%;
  background: rgba(236, 72, 153, 0.24);
}

.card {
  position: relative;

  background:
    linear-gradient(
      180deg,
      rgba(22, 8, 47, 0.92),
      rgba(8, 3, 23, 0.94)
    );

  border: 1px solid var(--border);
  border-radius: 28px;

  box-shadow:
    var(--shadow),
    0 0 70px rgba(168, 85, 247, 0.08);

  backdrop-filter: blur(14px);
}

.hero-card {
  overflow: hidden;
  padding: 34px 30px 30px;

  background:
    linear-gradient(135deg, rgba(168, 85, 247, 0.18), transparent 34%),
    linear-gradient(225deg, rgba(249, 115, 22, 0.15), transparent 28%),
    linear-gradient(180deg, rgba(24, 10, 52, 0.96), rgba(7, 3, 20, 0.96));
}

.logo {
  margin: 0 0 18px;

  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: lowercase;

  color: rgba(255, 235, 255, 0.88);

  text-shadow:
    0 0 12px rgba(236, 72, 153, 0.18),
    0 0 24px rgba(168, 85, 247, 0.16);
}

.title {
  margin: 0 0 12px;

  font-size: clamp(2.4rem, 4.8vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;

  text-shadow:
    0 0 28px rgba(255, 255, 255, 0.12),
    0 0 52px rgba(236, 72, 153, 0.24);
}

.title em {
  font-style: italic;
  font-weight: 500;
  opacity: 0.92;
}

.subtitle {
  margin: 0;
  max-width: 860px;

  color: #f8ecff;
  font-size: 1.2rem;
  line-height: 1.55;
}

.hero-actions {
  margin-top: 22px;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;

  padding: 14px 22px;

  font: inherit;
  font-weight: 800;

  cursor: pointer;

  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    opacity 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: white;

  background:
    linear-gradient(
      90deg,
      var(--purple),
      var(--pink),
      var(--orange),
      var(--gold)
    );

  box-shadow:
    0 14px 28px rgba(168, 85, 247, 0.24),
    0 0 34px rgba(236, 72, 153, 0.18);
}

.btn-secondary {
  margin-top: 18px;
  color: #f8ecff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-dashboard-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-top: 0;
}

.summary-card,
.all-areas-card,
.reflection-card,
.save-card {
  padding: 26px 24px 24px;
  margin-bottom: 20px;
}

.snapshot-status {
  margin-bottom: 20px;
}

.snapshot-status:empty {
  display: none;
}

.snapshot-status-inner {
  padding: 14px 18px;
  border-radius: 18px;
  line-height: 1.55;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.snapshot-status-inner strong {
  color: var(--text);
}

.snapshot-status-inner[data-type="saved"] {
  border-color: rgba(34, 197, 94, 0.26);
  background: rgba(34, 197, 94, 0.08);
}

.snapshot-status-inner[data-type="local"] {
  border-color: rgba(250, 204, 21, 0.26);
  background: rgba(250, 204, 21, 0.08);
}

.snapshot-status-inner[data-type="preview"] {
  border-color: rgba(168, 85, 247, 0.32);
  background: rgba(168, 85, 247, 0.12);
}

.preview-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.preview-option {
  appearance: none;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f8ecff;
  background: rgba(255, 255, 255, 0.06);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: capitalize;
  cursor: pointer;
}

.preview-option[data-active="true"] {
  color: #14002e;
  background: #f8ecff;
}

.preview-note {
  margin: 12px 0 0;
  color: rgba(248, 236, 255, 0.78);
  font-size: 0.92rem;
  line-height: 1.45;
}

.summary-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.section-label {
  margin: 0 0 6px;

  color: #d2bdfc;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;

  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.15;
}

.timestamp {
  color: var(--soft);
  font-size: 0.92rem;
  white-space: nowrap;
}

.top-areas {
  display: grid;
  gap: 16px;
}

.top-area-card {
  padding: 18px 18px 16px;
  border-radius: 22px;

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.055),
      rgba(255, 255, 255, 0.025)
    );

  border: 1px solid rgba(255, 255, 255, 0.08);
}

.top-area-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 34px;
  height: 34px;
  padding: 0 10px;

  border-radius: 999px;

  color: white;
  font-weight: 900;
  font-size: 0.9rem;

  margin-bottom: 12px;
}

.top-area-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.top-area-title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.15;
}

.top-area-score {
  color: #f8e8ff;
  font-weight: 800;
  font-size: 0.98rem;
  white-space: nowrap;
}

.bar-track {
  width: 100%;
  height: 14px;

  border-radius: 999px;

  background: rgba(255, 255, 255, 0.08);

  overflow: hidden;
  margin: 10px 0 14px;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
}

.top-area-description,
.top-area-next,
.area-description,
.reflection-text {
  margin: 0;

  color: var(--muted);
  line-height: 1.65;
  font-size: 1rem;
}

.top-area-next {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: #e9d5ff;
}

.score-detail {
  margin: 12px 0 0;
  color: rgba(203, 213, 225, 0.56);
  font-size: 0.82rem;
  line-height: 1.45;
}

.all-areas {
  display: grid;
  gap: 14px;
}

.area-row {
  padding: 16px 16px 14px;
  border-radius: 18px;

  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.area-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
}

.area-name {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
}

.area-score {
  margin: 0;
  color: #e2e8f0;
  font-size: 0.95rem;
  font-weight: 800;
}

.save-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.save-text {
  margin: 14px 0 16px;

  color: var(--muted);
  line-height: 1.7;
}

.privacy-note {
  margin: 0;

  color: #f8d9ff;
  font-size: 0.94rem;
  line-height: 1.6;
}

.save-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-label {
  color: #f4e8ff;
  font-size: 0.95rem;
}

.email-input {
  width: 100%;

  padding: 16px 18px;

  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);

  background: rgba(255,255,255,0.05);

  color: white;
  font: inherit;

  outline: none;

  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.email-input:focus {
  border-color: rgba(236,72,153,0.45);

  box-shadow:
    0 0 0 4px rgba(236,72,153,0.10),
    0 0 28px rgba(168,85,247,0.10);

  background: rgba(255,255,255,0.07);
}

.consent-row {
  display: flex;
  align-items: start;
  gap: 12px;

  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.consent-row input {
  margin-top: 4px;
}

.save-message {
  min-height: 24px;

  color: #facc15;
  font-size: 0.95rem;
}

.save-message[data-type="success"] {
  color: #86efac;
}

.save-message[data-type="error"] {
  color: #fecaca;
}

.save-message[data-type="pending"] {
  color: #facc15;
}

.save-message[data-type="warning"] {
  color: #fed7aa;
}

.empty-state {
  padding: 24px;
  border-radius: 20px;

  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.empty-state h2 {
  margin: 0 0 10px;
  font-size: 1.4rem;
}

.empty-state p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.65;
}

@media (max-width: 760px) {

  .page {
    width: min(100% - 20px, 1120px);
    padding-top: 18px;
  }

  .hero-card,
  .summary-card,
  .all-areas-card,
  .reflection-card,
  .save-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .summary-head,
  .top-area-title-row,
  .area-row-head {
    display: block;
  }

  .timestamp,
  .top-area-score,
  .area-score {
    margin-top: 6px;
    display: block;
  }

  .save-card {
    grid-template-columns: 1fr;
  }

  .logo {
    font-size: 1rem;
    letter-spacing: 0.22em;
  }

  .title {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1.06rem;
  }
}
