:root {
  --bg-1: #07111f;
  --bg-2: #0b1b34;
  --bg-3: #10284f;
  --card: rgba(24, 55, 108, 0.42);
  --card-strong: rgba(31, 71, 138, 0.58);
  --border: rgba(173, 216, 255, 0.12);
  --text: #eef6ff;
  --muted: rgba(238, 246, 255, 0.74);
  --soft: rgba(238, 246, 255, 0.54);
  --accent: #55b7ff;
  --accent-2: #7a8cff;
  --gold: #8fd3ff;
  --danger: #ff9bb3;
  --shadow: 0 18px 50px rgba(0, 8, 22, 0.35);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(85, 183, 255, 0.22), transparent 26%),
    radial-gradient(circle at top right, rgba(122, 140, 255, 0.18), transparent 24%),
    linear-gradient(180deg, var(--bg-2), var(--bg-1) 38%, #050d18 100%);
}

body {
  padding: 0;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  position: relative;
  z-index: 2;
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 18px 16px 28px;
}

.card {
  position: relative;
  background: linear-gradient(180deg, var(--card-strong), var(--card));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(143, 211, 255, 0.08), transparent 24%),
    radial-gradient(circle at left center, rgba(85, 183, 255, 0.1), transparent 30%);
  pointer-events: none;
}

.hero-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.logo-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #7fe0ff, #55b7ff 45%, #7a8cff);
  color: #07203e;
  font-size: 28px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(85, 183, 255, 0.24);
}

.eyebrow {
  font-size: 12px;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.08;
}

h2 {
  font-size: 24px;
  line-height: 1.15;
}

h3 {
  font-size: 20px;
  line-height: 1.2;
}

.hero-text,
.section-title p,
.rich-text p,
#adviceList li,
#summaryText,
#birthDateLabel {
  color: var(--muted);
}

.hero-text {
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 16px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-badges span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(173, 216, 255, 0.08);
  color: #dff4ff;
  font-size: 13px;
}

.section-title {
  margin-bottom: 14px;
}

.section-title p {
  margin-top: 6px;
  font-size: 14px;
}

.input-wrap {
  margin-bottom: 14px;
}

input {
  width: 100%;
  height: 58px;
  border: 1px solid rgba(173, 216, 255, 0.14);
  outline: none;
  border-radius: 18px;
  padding: 0 18px;
  font-size: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

input::placeholder {
  color: rgba(238, 246, 255, 0.36);
}

.primary-btn,
.secondary-btn {
  width: 100%;
  border: 0;
  border-radius: 18px;
  min-height: 56px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.primary-btn:active,
.secondary-btn:active {
  transform: translateY(1px) scale(0.995);
}

.primary-btn {
  color: #f7fcff;
  background: linear-gradient(90deg, #2fa7ff, #55b7ff 42%, #7a8cff);
  box-shadow: 0 12px 26px rgba(72, 154, 255, 0.34);
}

.secondary-btn {
  color: #eef6ff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(173, 216, 255, 0.12);
}

.error-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 92, 123, 0.14);
  border: 1px solid rgba(255, 142, 158, 0.2);
  color: #ffd9df;
  font-size: 14px;
  line-height: 1.45;
}

.loading-card {
  text-align: center;
  padding-top: 36px;
  padding-bottom: 36px;
}

.loader-star {
  font-size: 50px;
  color: var(--gold);
  margin-bottom: 14px;
  animation: pulse 1.6s infinite ease-in-out;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.16);
    opacity: 1;
  }
}

.result .card {
  margin-bottom: 14px;
}

.image-card img {
  width: 100%;
  max-height: 720px;
  display: block;
  border-radius: 20px;
  object-fit: contain;
  border: 1px solid rgba(173, 216, 255, 0.08);
  background: rgba(248, 252, 255, 0.96);
  padding: 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat-item {
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04));
  border: 1px solid rgba(173, 216, 255, 0.1);
  min-height: 90px;
}

.stat-item.wide {
  grid-column: 1 / -1;
}

.stat-label {
  font-size: 12px;
  color: var(--soft);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-value {
  font-size: 22px;
  font-weight: 800;
  color: #cfeeff;
  line-height: 1.25;
  word-break: break-word;
}

.rich-text {
  display: grid;
  gap: 14px;
}

.rich-text p {
  line-height: 1.75;
  font-size: 16px;
  color: rgba(238, 246, 255, 0.9);
}

.summary-card p {
  font-size: 17px;
  line-height: 1.65;
  color: #e3f6ff;
}

.advice-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

.advice-list li {
  line-height: 1.7;
  font-size: 15px;
  color: rgba(238, 246, 255, 0.9);
}

.actions-card {
  position: sticky;
  bottom: 12px;
  backdrop-filter: blur(18px);
}

.hidden {
  display: none !important;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 220px;
  height: 220px;
  background: #3faeff;
  top: -20px;
  left: -60px;
}

.orb-2 {
  width: 260px;
  height: 260px;
  background: #6f8dff;
  right: -120px;
  top: 140px;
  opacity: 0.18;
}

.stars::before,
.stars::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.45) 1px, transparent 1.5px),
    radial-gradient(circle, rgba(173,216,255,0.14) 1px, transparent 1.5px);
  background-size: 130px 130px, 190px 190px;
  background-position: 0 0, 40px 60px;
  opacity: 0.22;
}

@media (max-width: 480px) {
  .container {
    padding: 14px 12px 24px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 22px;
  }

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

  .card {
    border-radius: 22px;
    padding: 16px;
  }

  .stat-value {
    font-size: 20px;
  }
}
