:root {
  color-scheme: dark;
  --ink: #fff7d2;
  --muted: #b9aa86;
  --line: rgba(244, 201, 93, 0.22);
  --paper: #05060b;
  --panel: rgba(17, 14, 20, 0.74);
  --accent: #d09a35;
  --accent-strong: #fff0a6;
  --gold: #f0c85a;
  --jade: #6ee0c3;
  --night: #05060b;
  --shadow: 0 26px 90px rgba(0, 0, 0, 0.46);
  font-family:
    Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 52% 8%, rgba(255, 219, 104, 0.18), transparent 24%),
    radial-gradient(circle at 16% 22%, rgba(119, 61, 255, 0.18), transparent 24%),
    radial-gradient(circle at 84% 72%, rgba(16, 202, 173, 0.13), transparent 28%),
    linear-gradient(180deg, rgba(5, 6, 11, 0.5), #05060b 520px),
    repeating-linear-gradient(90deg, rgba(240, 200, 90, 0.035) 0 1px, transparent 1px 96px),
    var(--paper);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 56% 36%, rgba(255, 241, 166, 0.38) 0 2px, transparent 3px),
    radial-gradient(circle at 56% 36%, rgba(215, 166, 63, 0.34), transparent 18%),
    conic-gradient(from 18deg at 56% 36%, transparent 0 13%, rgba(243, 198, 83, 0.16) 13% 15%, transparent 15% 100%),
    repeating-radial-gradient(circle at 56% 36%, transparent 0 72px, rgba(243, 198, 83, 0.08) 73px 74px),
    repeating-linear-gradient(0deg, transparent 0 79px, rgba(243, 198, 83, 0.035) 80px),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(243, 198, 83, 0.035) 80px),
    radial-gradient(circle at center, transparent, rgba(0, 0, 0, 0.72) 72%);
  opacity: 0.52;
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 32px;
  align-items: stretch;
  min-height: 520px;
  padding: 48px;
  overflow: hidden;
  border: 1px solid rgba(255, 250, 241, 0.24);
  border-radius: 28px;
  background:
    radial-gradient(circle at 72% 44%, rgba(255, 224, 118, 0.2), transparent 26%),
    radial-gradient(circle at 68% 40%, rgba(255, 246, 191, 0.78) 0 2px, transparent 3px),
    radial-gradient(circle at 68% 40%, rgba(240, 200, 90, 0.34), transparent 21%),
    conic-gradient(from 22deg at 68% 40%, transparent 0 10%, rgba(240, 200, 90, 0.18) 10% 12%, transparent 12% 32%, rgba(110, 224, 195, 0.1) 32% 33%, transparent 33% 100%),
    repeating-radial-gradient(circle at 68% 40%, transparent 0 54px, rgba(240, 200, 90, 0.1) 55px 56px),
    linear-gradient(24deg, transparent 0 36%, rgba(240, 200, 90, 0.16) 36% 38%, transparent 38% 100%),
    linear-gradient(135deg, transparent 0 62%, rgba(255, 245, 184, 0.09) 62% 63%, transparent 63% 100%),
    linear-gradient(115deg, rgba(7, 8, 15, 0.02), rgba(5, 6, 11, 0.82)),
    repeating-linear-gradient(90deg, rgba(240, 200, 90, 0.04) 0 1px, transparent 1px 82px),
    #05060b;
  box-shadow:
    0 0 0 1px rgba(240, 200, 90, 0.12),
    0 36px 120px rgba(0, 0, 0, 0.58),
    inset 0 0 80px rgba(255, 215, 98, 0.08);
}

.hero::before {
  position: absolute;
  inset: 18px;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(240, 200, 90, 0.2);
  border-radius: 22px;
  box-shadow: inset 0 0 80px rgba(240, 200, 90, 0.06);
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fffaf1;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 600px;
  margin: 0;
  font-size: clamp(42px, 5.8vw, 76px);
  line-height: 1.02;
  letter-spacing: 0;
  color: #fff8cf;
  text-shadow:
    0 0 24px rgba(255, 226, 116, 0.28),
    0 24px 70px rgba(0, 0, 0, 0.72);
}

.hero h1 span {
  display: block;
}

.hero-text {
  max-width: 560px;
  margin: 24px 0 0;
  color: rgba(255, 250, 241, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.trust-row span {
  padding: 8px 12px;
  color: rgba(255, 250, 241, 0.92);
  border: 1px solid rgba(240, 200, 90, 0.32);
  border-radius: 999px;
  background: rgba(255, 225, 124, 0.08);
  box-shadow: inset 0 0 18px rgba(240, 200, 90, 0.06);
  font-size: 13px;
  font-weight: 800;
}

.birth-form {
  position: relative;
  z-index: 1;
  align-self: end;
  display: grid;
  gap: 18px;
  padding: 26px;
  border: 1px solid rgba(240, 200, 90, 0.28);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(20, 16, 21, 0.88), rgba(8, 9, 16, 0.82));
  backdrop-filter: blur(18px);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 244, 182, 0.12);
}

.form-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(240, 200, 90, 0.2);
}

.form-title strong {
  font-size: 22px;
}

.form-title span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

label {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 248, 219, 0.08);
  outline: none;
}

select option {
  color: #1d1a16;
  background: #fff7dd;
}

input::placeholder {
  color: rgba(255, 244, 189, 0.48);
}

.date-picker {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 10px;
}

.date-picker select {
  min-height: 70px;
  padding: 0 14px;
  color: #fff4bd;
  border-color: rgba(240, 200, 90, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 232, 142, 0.15), rgba(255, 232, 142, 0.06));
  font-size: 21px;
  font-weight: 900;
  cursor: pointer;
}

input:focus,
select:focus {
  border-color: var(--gold);
  box-shadow:
    0 0 0 3px rgba(240, 200, 90, 0.14),
    0 0 22px rgba(240, 200, 90, 0.16);
}

button {
  min-height: 52px;
  margin-top: 4px;
  color: #fffaf1;
  border: 0;
  border-radius: 12px;
  background:
    linear-gradient(135deg, #8c5b13, #f0c85a 52%, #fff2a8);
  box-shadow:
    0 16px 42px rgba(240, 200, 90, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  color: #180f05;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

button:hover {
  background: linear-gradient(135deg, #a46b17, #ffe58f 60%, #fff8c8);
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.76;
  transform: none;
}

.loading-panel {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-top: 32px;
  padding: 34px;
  color: #fffaf1;
  border: 1px solid rgba(240, 200, 90, 0.34);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(5, 6, 11, 0.94), rgba(42, 27, 9, 0.84)),
    radial-gradient(circle at 28% 48%, rgba(240, 200, 90, 0.26), transparent 20%),
    repeating-radial-gradient(circle at 28% 48%, transparent 0 42px, rgba(240, 200, 90, 0.14) 43px 44px),
    conic-gradient(from 35deg at 28% 48%, transparent 0 18%, rgba(240, 200, 90, 0.22) 18% 20%, transparent 20% 100%),
    #05060b;
  box-shadow: var(--shadow);
}

.loading-panel.hidden {
  display: none;
}

.loading-panel h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.2;
}

.compass {
  position: relative;
  width: 156px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 250, 241, 0.38);
  border-radius: 50%;
}

.compass::before,
.compass::after,
.compass i {
  position: absolute;
  inset: 18px;
  content: "";
  border: 1px solid rgba(194, 139, 44, 0.48);
  border-radius: 50%;
}

.compass::after {
  inset: 42px;
  border-color: rgba(255, 250, 241, 0.34);
}

.compass i {
  inset: 34px;
  border: 0;
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid rgba(255, 250, 241, 0.28);
  animation: spinCompass 1.8s linear infinite;
}

.compass b {
  position: absolute;
  color: rgba(255, 250, 241, 0.86);
  font-size: 13px;
}

.compass b:nth-of-type(1) {
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.compass b:nth-of-type(2) {
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.compass b:nth-of-type(3) {
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
}

.compass b:nth-of-type(4) {
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
}

.loading-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.loading-steps span {
  padding: 7px 10px;
  color: rgba(255, 250, 241, 0.88);
  border: 1px solid rgba(255, 250, 241, 0.25);
  background: rgba(255, 250, 241, 0.08);
  font-size: 13px;
  font-weight: 800;
}

@keyframes spinCompass {
  to {
    transform: rotate(360deg);
  }
}

.result {
  display: grid;
  gap: 28px;
  margin-top: 32px;
  padding-bottom: 8px;
}

.hidden {
  display: none;
}

.result-header,
.insight-band,
.score-panel,
.annual-detail,
.summary-grid article,
.pillar-card,
.month-card {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(14, 14, 21, 0.76);
  box-shadow:
    0 20px 70px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 244, 182, 0.08);
  backdrop-filter: blur(18px);
}

.score-panel {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 30px;
  background:
    radial-gradient(circle at 18% 40%, rgba(240, 200, 90, 0.18), transparent 26%),
    linear-gradient(135deg, rgba(20, 15, 18, 0.88), rgba(7, 8, 15, 0.84));
}

.score-orb {
  display: grid;
  place-items: center;
  width: 160px;
  aspect-ratio: 1;
  color: #fffaf1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 250, 241, 0.42), transparent 30%),
    linear-gradient(145deg, #f0c85a, #6c3c06 52%, #05060b);
  box-shadow:
    0 0 44px rgba(240, 200, 90, 0.35),
    inset 0 0 30px rgba(255, 242, 168, 0.18);
}

.score-orb span {
  font-size: 56px;
  line-height: 0.9;
  font-weight: 900;
}

.score-orb small {
  color: rgba(255, 250, 241, 0.78);
  font-weight: 800;
}

.score-panel h3 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: 0;
  color: #fff3b0;
}

.score-panel p,
.annual-detail p,
.summary-grid p {
  font-size: 16px;
  text-align: justify;
}

.result-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 26px 28px;
  background:
    linear-gradient(135deg, rgba(25, 18, 16, 0.9), rgba(6, 8, 15, 0.86));
}

.result-header h2,
.section-title h3,
.insight-band h3,
.summary-grid h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
  color: #fff4bd;
}

.year-pill {
  flex: 0 0 auto;
  padding: 10px 14px;
  color: #1b1206;
  background: linear-gradient(135deg, #f0c85a, #fff3b0);
  font-weight: 800;
  border-radius: 999px;
}

.result-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  align-items: center;
}

.ghost-button {
  min-height: 42px;
  margin: 0;
  padding: 0 14px;
  color: #fff0a6;
  border: 1px solid rgba(240, 200, 90, 0.28);
  border-radius: 999px;
  background: rgba(255, 232, 142, 0.08);
  font-size: 14px;
}

.ghost-button:hover {
  color: #1b1206;
  background: linear-gradient(135deg, #f0c85a, #fff3b0);
}

.bazi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.pillar-card {
  display: grid;
  gap: 12px;
  min-height: 160px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 232, 142, 0.09), rgba(10, 11, 18, 0.76));
}

.pillar-card,
.month-card,
.annual-detail,
.summary-grid article,
.insight-band {
  position: relative;
  overflow: hidden;
}

.pillar-card::before,
.month-card::before,
.annual-detail::before,
.summary-grid article::before,
.insight-band::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  content: "";
  background: linear-gradient(180deg, var(--gold), rgba(181, 61, 49, 0.24));
  box-shadow: 0 0 18px rgba(240, 200, 90, 0.36);
}

.pillar-card span,
.month-top span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.pillar-card strong {
  font-size: 46px;
  line-height: 1;
  letter-spacing: 0;
  color: #fff4bd;
  text-shadow: 0 0 20px rgba(240, 200, 90, 0.18);
}

.pillar-card small {
  color: var(--jade);
  font-size: 14px;
  font-weight: 800;
}

.insight-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
  gap: 28px;
  padding: 28px;
}

.annual-detail {
  display: grid;
  gap: 14px;
  padding: 30px;
  background:
    linear-gradient(135deg, rgba(255, 232, 142, 0.08), rgba(8, 9, 16, 0.82));
}

.annual-detail h3 {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
  color: #fff4bd;
}

.insight-band p,
.summary-grid p,
.month-card p,
.notice,
.section-title p {
  margin: 0;
  color: #c8b992;
  line-height: 1.75;
}

.insight-band h3 {
  margin-bottom: 14px;
}

.element-bars {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 24px 1fr 22px;
  gap: 12px;
  align-items: center;
  font-size: 14px;
  font-weight: 800;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  background: rgba(255, 244, 182, 0.1);
}

.bar-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  box-shadow: 0 0 16px rgba(240, 200, 90, 0.32);
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 16px;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.month-card {
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 300px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 232, 142, 0.09), rgba(8, 9, 16, 0.76));
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.month-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.36),
    0 0 34px rgba(240, 200, 90, 0.12);
}

.month-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.month-top b {
  max-width: 72%;
  color: #fff4bd;
  font-size: 19px;
  line-height: 1.35;
  text-align: right;
}

.score-line {
  display: grid;
  gap: 8px;
}

.score-line strong {
  font-size: 21px;
  line-height: 1;
  color: #fff4bd;
}

.score-line em {
  width: fit-content;
  padding: 6px 10px;
  color: #fff0a6;
  background: rgba(240, 200, 90, 0.1);
  border: 1px solid rgba(240, 200, 90, 0.14);
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
}

.month-card p {
  font-size: 15px;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.summary-grid article {
  display: grid;
  gap: 14px;
  padding: 26px;
}

.notice {
  padding: 18px 0 0;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 920px) {
  .hero,
  .insight-band,
  .score-panel,
  .loading-panel,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 32px;
  }

  .birth-form {
    align-self: auto;
  }

  .score-orb {
    width: 140px;
  }

  .bazi-grid,
  .month-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-title {
    display: block;
  }

  .section-title p {
    margin-top: 8px;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .hero {
    padding: 24px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-text {
    font-size: 16px;
  }

  .result-header {
    display: grid;
  }

  .date-picker {
    grid-template-columns: 1fr;
  }

  .date-picker select {
    min-height: 62px;
  }

  .result-actions {
    justify-content: space-between;
  }

  .bazi-grid,
  .month-grid {
    grid-template-columns: 1fr;
  }

  .insight-band,
  .annual-detail,
  .summary-grid article,
  .result-header {
    padding: 22px;
  }
}
