* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f5f2ea;
  color: #263b32;
  font-family:
    system-ui,
    -apple-system,
    'Microsoft YaHei',
    sans-serif;
}
header,
main,
footer {
  max-width: 1120px;
  margin: auto;
}
header {
  padding: 30px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #dce0d5;
}
header strong {
  font-size: 24px;
  font-weight: 600;
}
a {
  color: inherit;
}
header a {
  font-size: 14px;
  text-decoration: none;
}
main {
  padding: 32px 26px;
}
h1 {
  font-size: 32px;
  margin: 0 0 8px;
}
.intro {
  font-size: 14px;
  color: #83907e;
  margin: 0 0 22px;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.search {
  border: 1px solid #d4dccd;
  background: transparent;
  border-radius: 24px;
  padding: 11px 16px;
  color: #263b32;
  width: 210px;
  font: inherit;
  font-size: 14px;
}
.cosmos {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 24px;
  background: #0e1c20;
  min-height: 530px;
  padding: 32px 24px;
  box-shadow: 0 14px 35px #263b3217;
}
.nebula {
  position: absolute;
  inset: -35%;
  z-index: -2;
  background:
    radial-gradient(ellipse at 25% 45%, #285e568c, transparent 40%),
    radial-gradient(ellipse at 72% 58%, #28506999, transparent 35%),
    radial-gradient(ellipse at 58% 25%, #4e466733, transparent 40%);
  filter: blur(22px);
  animation: cloud 32s ease-in-out infinite alternate;
}
.nebula:after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 60%, #69947a44, transparent 40%);
  transform: rotate(-30deg);
}
canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
.worlds {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 35px 15px;
}
.world {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  padding: 12px 5px;
  border-radius: 18px;
  color: #e5ebdf;
  transition: background 0.25s;
}
.world:hover,
.world:focus-visible {
  background: #c4ddca0a;
  outline: 1px solid #93b3a044;
}
.planet-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  animation: float 7s ease-in-out infinite;
  animation-delay: var(--delay);
}
.planet {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 25%, #edf4de99, transparent 36%),
    repeating-linear-gradient(165deg, transparent 0 9px, #fff1 10px 13px, transparent 14px 25px),
    radial-gradient(circle at 30% 30%, var(--color), #10242b 90%);
  box-shadow:
    inset -18px -9px 22px #07101499,
    0 0 30px color-mix(in srgb, var(--color) 20%, transparent),
    0 12px 25px #0005;
  transition: transform 0.3s;
}
.world:hover .planet {
  transform: scale(1.08);
}
.orbit {
  position: absolute;
  width: 137px;
  height: 40px;
  border: 2px solid color-mix(in srgb, var(--color) 50%, transparent);
  border-radius: 50%;
  transform: rotate(-25deg);
  box-shadow: 0 0 5px #fff1;
}
.w1 .orbit,
.w3 .orbit,
.w5 .orbit,
.w7 .orbit {
  display: none;
}
.w1 .planet {
  width: 68px;
  height: 68px;
}
.w2 .planet {
  width: 78px;
  height: 78px;
}
.w3 .planet {
  background: radial-gradient(circle at 30% 25%, #f2ddab, var(--color) 30%, #473828 90%);
}
.w5 .planet {
  background: radial-gradient(circle at 28% 25%, #b5e3dc, var(--color) 35%, #19343c 88%);
}
.w7 .planet {
  width: 73px;
  height: 73px;
}
.world strong {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  margin: 5px 0 7px;
}
.world small {
  font-size: 12px;
  line-height: 1.5;
  color: #a1b2a9;
}
.world[hidden] {
  display: none;
}
.note {
  font-size: 12px;
  color: #879280;
  line-height: 1.8;
  margin: 20px 0 0;
}
footer {
  border-top: 1px solid #dce0d5;
  padding: 24px 26px;
  font-size: 12px;
  color: #8a9585;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}
footer a {
  text-decoration: none;
}
@keyframes float {
  50% {
    transform: translateY(-7px);
  }
}
@keyframes cloud {
  to {
    transform: translate(5%, 3%) rotate(9deg) scale(1.07);
  }
}
@media (max-width: 650px) {
  header {
    padding: 22px 20px;
  }
  header strong {
    font-size: 21px;
  }
  main {
    padding: 24px 16px;
  }
  .top {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
  .search {
    width: 100%;
    margin-bottom: 20px;
  }
  h1 {
    font-size: 27px;
  }
  .cosmos {
    padding: 22px 10px;
    border-radius: 18px;
  }
  .worlds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 6px;
  }
  .planet-wrap {
    width: 125px;
    height: 125px;
  }
  .world strong {
    font-size: 14px;
  }
  .world small {
    font-size: 11px;
  }
  .planet {
    width: 73px;
    height: 73px;
  }
  .orbit {
    width: 121px;
    height: 35px;
  }
  footer {
    padding: 24px 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nebula,
  .planet-wrap {
    animation: none;
  }
  .planet {
    transition: none;
  }
}
