:root {
  color-scheme: dark;
  --bg: #071115;
  --bg-soft: #0c1b22;
  --card: rgba(13, 31, 39, 0.76);
  --card-strong: rgba(18, 43, 54, 0.92);
  --text: #eefcf4;
  --muted: #a7c7bf;
  --line: rgba(176, 255, 220, 0.18);
  --glow: #9cffd1;
  --glow-2: #74c8ff;
  --acid: #d8ff71;
  --pink: #ff8fe3;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius-lg: 28px;
  --radius-md: 18px;
  --max: 1120px;
  font-family:
    ui-rounded, "SF Pro Rounded", "PingFang SC", "Microsoft YaHei", "Segoe UI",
    system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(116, 200, 255, 0.22), transparent 30rem),
    radial-gradient(circle at 85% 5%, rgba(216, 255, 113, 0.16), transparent 26rem),
    linear-gradient(145deg, #05090c 0%, var(--bg) 44%, #0a1711 100%);
  overflow-x: hidden;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

.orb {
  position: fixed;
  z-index: -2;
  width: 18rem;
  height: 18rem;
  border-radius: 999px;
  filter: blur(20px);
  opacity: 0.34;
  animation: drift 14s ease-in-out infinite alternate;
}

.orb-a {
  top: 10%;
  left: -5rem;
  background: #44ffd0;
}

.orb-b {
  right: -7rem;
  bottom: 18%;
  background: #7aa7ff;
  animation-delay: -4s;
}

.orb-c {
  left: 48%;
  bottom: -9rem;
  background: #f5ff77;
  animation-delay: -8s;
}

.site-header,
.site-footer,
main {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 22px 0 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(156, 255, 209, 0.45);
  border-radius: 50%;
  background:
    radial-gradient(circle at 58% 34%, var(--acid) 0 7px, transparent 8px),
    radial-gradient(circle at 35% 66%, var(--pink) 0 5px, transparent 6px),
    radial-gradient(circle at 50% 50%, rgba(156, 255, 209, 0.42), transparent 62%);
  box-shadow: 0 0 24px rgba(156, 255, 209, 0.22);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero {
  min-height: calc(100vh - 150px);
  align-items: center;
  grid-template-columns: minmax(0, 1.02fr) minmax(300px, 0.8fr);
  gap: 42px;
  padding: 52px 0;
}

.hero.active {
  display: grid;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--acid);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: clamp(2.7rem, 9vw, 6.8rem);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

h2 {
  font-size: clamp(1.8rem, 4.8vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

h3 {
  margin-bottom: 12px;
  color: #dbfff0;
  font-size: 1rem;
}

.hero-text {
  max-width: 690px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.7;
}

.hero-actions,
.share-actions,
.quiz-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.primary-button,
.ghost-button,
.text-link {
  min-height: 46px;
  border-radius: 999px;
  padding: 0 20px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.primary-button {
  border: 0;
  color: #06120f;
  font-weight: 850;
  background: linear-gradient(135deg, var(--glow), var(--acid));
  box-shadow: 0 14px 34px rgba(156, 255, 209, 0.2);
}

.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover {
  transform: translateY(-2px);
  border-color: rgba(156, 255, 209, 0.45);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.petri-card,
.info-panel,
.atlas-panel,
.quiz-shell,
.result-card,
.analysis-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.petri-card {
  display: grid;
  place-items: center;
  min-height: 480px;
  border-radius: 38px;
  overflow: hidden;
}

.petri {
  position: relative;
  width: min(82vw, 380px);
  aspect-ratio: 1;
  border: 2px solid rgba(238, 252, 244, 0.24);
  border-radius: 50%;
  background:
    radial-gradient(circle at 48% 44%, rgba(238, 252, 244, 0.18), transparent 28%),
    radial-gradient(circle at 60% 60%, rgba(116, 200, 255, 0.18), transparent 42%),
    rgba(156, 255, 209, 0.06);
  box-shadow:
    inset 0 0 52px rgba(238, 252, 244, 0.14),
    0 0 80px rgba(156, 255, 209, 0.18);
}

.petri::before,
.petri::after {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px dashed rgba(238, 252, 244, 0.16);
  border-radius: inherit;
}

.petri::after {
  inset: 27%;
}

.microbe {
  position: absolute;
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 20px currentColor;
  animation: bob 4s ease-in-out infinite alternate;
}

.microbe-1 {
  top: 18%;
  left: 21%;
  width: 72px;
  height: 48px;
  border-radius: 50%;
  color: var(--glow);
  background: rgba(156, 255, 209, 0.42);
}

.microbe-2 {
  right: 18%;
  top: 24%;
  width: 44px;
  height: 92px;
  border-radius: 999px;
  color: var(--pink);
  background: rgba(255, 143, 227, 0.35);
  animation-delay: -1s;
}

.microbe-3 {
  left: 36%;
  bottom: 19%;
  width: 104px;
  height: 38px;
  border-radius: 60% 45% 70% 35%;
  color: var(--acid);
  background: rgba(216, 255, 113, 0.35);
  animation-delay: -2s;
}

.microbe-4 {
  right: 26%;
  bottom: 28%;
  width: 52px;
  height: 52px;
  border-radius: 36% 64% 42% 58%;
  color: var(--glow-2);
  background: rgba(116, 200, 255, 0.38);
  animation-delay: -1.4s;
}

.microbe-5 {
  left: 20%;
  bottom: 31%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.56);
  animation-delay: -2.5s;
}

.info-panel {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 28px;
  margin-bottom: 56px;
  padding: 28px;
  border-radius: var(--radius-lg);
}

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

.dimension-pill {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.dimension-pill strong {
  display: block;
  margin-bottom: 6px;
}

.dimension-pill span {
  color: var(--muted);
  font-size: 0.92rem;
}

.atlas-panel {
  margin: 24px 0 56px;
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 34px);
}

.section-heading {
  max-width: 820px;
  margin-bottom: 22px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.7;
}

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

.atlas-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(156, 255, 209, 0.1), transparent 32%),
    rgba(255, 255, 255, 0.04);
}

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

.atlas-blob {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(238, 252, 244, 0.36);
  border-radius: 42% 58% 50% 50%;
  box-shadow: 0 0 30px rgba(156, 255, 209, 0.16);
}

.atlas-card h3 {
  margin: 0 0 3px;
  font-size: 1.22rem;
}

.atlas-card-top p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
}

.atlas-card > p {
  margin: 0;
  color: #d5eee7;
  line-height: 1.68;
}

.quiz {
  min-height: calc(100vh - 120px);
  padding: 42px 0 70px;
}

.quiz-shell {
  max-width: 820px;
  margin-inline: auto;
  border-radius: var(--radius-lg);
  padding: clamp(18px, 4vw, 32px);
}

.quiz-topline {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-weight: 750;
}

.progress-track {
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--glow), var(--acid), var(--pink));
  transition: width 240ms ease;
}

.question-card {
  padding: 34px 0 24px;
}

.question-card h2 {
  margin-bottom: 24px;
}

.option-list {
  display: grid;
  gap: 12px;
}

.option-button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
}

.option-button:hover,
.option-button.selected {
  border-color: rgba(156, 255, 209, 0.7);
  background: rgba(156, 255, 209, 0.12);
}

.option-kicker {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 28px;
  height: 28px;
  margin-right: 10px;
  border-radius: 50%;
  color: #071115;
  font-weight: 900;
  background: var(--acid);
}

.result {
  padding: 42px 0 74px;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 22px;
}

.result-card,
.analysis-card {
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 34px);
}

.result-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.result-heading h2 {
  margin-bottom: 5px;
}

.result-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.result-icon {
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  border-radius: 40% 60% 48% 52%;
  border: 2px solid rgba(238, 252, 244, 0.42);
  background:
    radial-gradient(circle at 32% 34%, #fff 0 5px, transparent 6px),
    radial-gradient(circle at 62% 34%, #fff 0 5px, transparent 6px),
    radial-gradient(circle at 50% 68%, rgba(7, 17, 21, 0.35) 0 12px, transparent 13px),
    linear-gradient(135deg, var(--glow), var(--glow-2));
  box-shadow: 0 0 42px rgba(156, 255, 209, 0.26);
}

.keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.keyword {
  border: 1px solid rgba(216, 255, 113, 0.35);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--acid);
  background: rgba(216, 255, 113, 0.08);
  font-size: 0.9rem;
}

.result-copy {
  color: #d5eee7;
  font-size: 1.06rem;
  line-height: 1.78;
}

.result-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.result-columns ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  line-height: 1.65;
}

.analysis-card {
  display: grid;
  align-content: start;
  gap: 26px;
}

.bar-list,
.match-list {
  display: grid;
  gap: 12px;
}

.bar-item {
  display: grid;
  gap: 6px;
}

.bar-meta,
.match-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar span {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--glow-2), var(--glow), var(--acid));
}

.match-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.match-item strong {
  display: block;
  margin-bottom: 6px;
}

.like-panel p {
  margin-bottom: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.copy-status {
  min-height: 1.5rem;
  margin: 12px 0 0;
  color: var(--acid);
}

.site-footer {
  padding: 22px 0 34px;
  color: rgba(238, 252, 244, 0.62);
  text-align: center;
}

@keyframes bob {
  from {
    transform: translate3d(0, -7px, 0) rotate(-3deg);
  }
  to {
    transform: translate3d(0, 8px, 0) rotate(4deg);
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(35px, -25px, 0) scale(1.08);
  }
}

@media (max-width: 860px) {
  .hero.active,
  .info-panel,
  .microbe-atlas,
  .result-grid,
  .result-columns {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 24px;
    padding-top: 34px;
  }

  .petri-card {
    min-height: 340px;
  }

  .info-panel {
    margin-bottom: 28px;
  }
}

@media (max-width: 560px) {
  .site-header,
  .site-footer,
  main {
    width: min(100% - 22px, var(--max));
  }

  .brand strong {
    font-size: 0.95rem;
  }

  .brand small {
    font-size: 0.75rem;
  }

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

  .hero-actions,
  .share-actions,
  .quiz-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .ghost-button,
  .text-link {
    width: 100%;
  }

  .result-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
