:root {
  color-scheme: dark;
  --bg: #08131f;
  --bg-soft: #102438;
  --card: rgba(8, 22, 35, 0.8);
  --line: rgba(149, 186, 219, 0.28);
  --text: #e9f3ff;
  --muted: #a5bdd1;
  --primary: #5cf2d6;
  --accent: #ffb65d;
  --ok: #8df7a2;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 12% 8%, #1f445f 0%, transparent 37%),
    radial-gradient(circle at 88% 22%, #704224 0%, transparent 36%),
    linear-gradient(135deg, #08131f, var(--bg-soft) 56%, #15283a);
  overflow-x: hidden;
}

#starfield {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

.aurora {
  position: fixed;
  width: 48vmax;
  height: 48vmax;
  filter: blur(62px);
  opacity: 0.42;
  z-index: 1;
  pointer-events: none;
  animation: float 14s ease-in-out infinite alternate;
}

.aurora-left {
  top: -14vmax;
  left: -16vmax;
  background: radial-gradient(circle at 35% 35%, #59f1d6 0%, #2c9fbd 48%, transparent 72%);
}

.aurora-right {
  right: -16vmax;
  bottom: -16vmax;
  background: radial-gradient(circle at 70% 40%, #ffbf63 0%, #e88447 44%, transparent 74%);
  animation-delay: 2.2s;
}

.shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.2rem 1.2rem 4.6rem;
}

.card {
  width: min(960px, 95vw);
  padding: 2.1rem;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(155deg, rgba(10, 26, 42, 0.9), rgba(13, 33, 50, 0.72));
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 72px rgba(4, 10, 18, 0.48), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transform-style: preserve-3d;
  transition: transform 180ms ease;
}

.card > * {
  opacity: 0;
  animation: rise 620ms ease forwards;
}

.card > *:nth-child(1) {
  animation-delay: 0.08s;
}

.card > *:nth-child(2) {
  animation-delay: 0.12s;
}

.card > *:nth-child(3) {
  animation-delay: 0.16s;
}

.card > *:nth-child(4) {
  animation-delay: 0.22s;
}

.card > *:nth-child(5) {
  animation-delay: 0.26s;
}

.card > *:nth-child(6) {
  animation-delay: 0.3s;
}

.card > *:nth-child(7) {
  animation-delay: 0.34s;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  margin: 0;
  color: #bde4ff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #63ffb8;
  box-shadow: 0 0 14px #63ffb8;
}

.title {
  margin: 0.9rem 0 0;
  line-height: 1.1;
  font-size: clamp(2rem, 4.3vw, 3.55rem);
  font-weight: 900;
}

.title span {
  background: linear-gradient(90deg, var(--primary), #83d7ff, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  margin: 0.92rem 0 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.9vw, 1.14rem);
}

.intro-view {
  margin-top: 1.15rem;
  border: 1px solid rgba(158, 191, 222, 0.28);
  border-radius: 16px;
  padding: 1rem;
  background: linear-gradient(160deg, rgba(8, 19, 31, 0.7), rgba(10, 28, 41, 0.58));
}

.intro-view p {
  margin: 0;
  color: #c6d9e9;
  line-height: 1.58;
}

.intro-view .btn {
  margin-top: 0.84rem;
}

.intro-view.is-hidden {
  display: none;
}

.interactive-view {
  margin-top: 1.16rem;
}

.interactive-view.is-hidden {
  display: none;
}

.interactive-view.is-visible {
  opacity: 1;
  animation: rise 560ms ease forwards;
}

.card > .interactive-view {
  opacity: 1;
  animation: none;
}

.meta {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.72rem;
}

.meta-item {
  border: 1px solid rgba(157, 191, 222, 0.24);
  border-radius: 15px;
  padding: 0.95rem;
  background: rgba(8, 18, 31, 0.46);
}

.meta-label {
  display: block;
  margin-bottom: 0.16rem;
  color: #8eadc5;
  font-size: 0.81rem;
}

.meta-item strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.02rem;
  letter-spacing: 0.03em;
}

.ok {
  color: var(--ok);
}

.panel {
  margin-top: 1rem;
  border: 1px solid rgba(158, 191, 222, 0.2);
  border-radius: 16px;
  padding: 1rem 1rem 1.08rem;
  background: linear-gradient(160deg, rgba(8, 19, 31, 0.58), rgba(10, 28, 41, 0.48));
}

.panel-kicker {
  margin: 0;
  font-size: 0.76rem;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.13em;
  color: #9dc0d8;
  text-transform: uppercase;
}

#spotlight-title {
  margin: 0.42rem 0 0;
  font-size: clamp(1.1rem, 2.35vw, 1.45rem);
}

#spotlight-desc {
  margin: 0.46rem 0 0;
  color: var(--muted);
  line-height: 1.58;
}

.tag-row {
  margin-top: 0.86rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.52rem;
}

.tag-btn {
  border: 1px solid rgba(127, 158, 183, 0.38);
  border-radius: 999px;
  background: rgba(10, 23, 36, 0.62);
  color: #d9e9f7;
  padding: 0.42rem 0.84rem;
  font-size: 0.84rem;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.tag-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(181, 216, 244, 0.62);
}

.tag-btn.is-active {
  border-color: rgba(255, 192, 107, 0.72);
  background: rgba(255, 182, 93, 0.18);
  color: #fff0dc;
}

.challenge {
  margin-top: 0.78rem;
}

.challenge-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.challenge-question {
  margin: 0.5rem 0 0;
  color: #d8e7f3;
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.5;
}

.challenge-answer {
  margin: 0.62rem 0 0;
  color: #ffdfb2;
  line-height: 1.58;
}

.actions {
  margin-top: 1.18rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.74rem;
}

.btn {
  border: 1px solid rgba(255, 183, 98, 0.48);
  color: #111f2e;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.75rem 1.26rem;
  background: linear-gradient(90deg, #6df3d9, #ffc978);
  box-shadow: 0 10px 25px rgba(12, 22, 33, 0.34);
  transition: transform 150ms ease, box-shadow 150ms ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 29px rgba(12, 22, 33, 0.42);
}

.btn.ghost {
  background: rgba(10, 23, 36, 0.76);
  color: #dceaf8;
  border-color: rgba(165, 197, 224, 0.42);
  box-shadow: none;
}

.btn.subtle {
  padding: 0.48rem 0.84rem;
  font-size: 0.84rem;
}

.hint {
  margin: 0.96rem 0 0;
  color: #a4bccf;
  font-size: 0.9rem;
}

.site-footer {
  position: fixed;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 20;
  color: #f2f8ff;
  font-size: 13px;
  letter-spacing: 0.01em;
  background: rgba(5, 15, 24, 0.74);
  border: 1px solid rgba(170, 204, 228, 0.38);
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  backdrop-filter: blur(9px);
  box-shadow: 0 10px 28px rgba(4, 10, 16, 0.42);
  white-space: nowrap;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: color 160ms ease, border-color 160ms ease;
}

.site-footer a:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.68);
}

body.burst .card {
  animation: pulse 880ms ease;
}

body.burst .panel {
  border-color: rgba(255, 191, 110, 0.45);
}

body.burst .aurora {
  filter: blur(78px) saturate(1.4);
  opacity: 0.55;
}

@keyframes float {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(4vmax, -2vmax, 0) scale(1.12);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 rgba(135, 223, 255, 0);
  }
  35% {
    box-shadow: 0 0 52px rgba(255, 194, 122, 0.24);
  }
  100% {
    box-shadow: 0 24px 72px rgba(4, 10, 18, 0.48);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .meta {
    grid-template-columns: 1fr;
  }

  .challenge-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .shell {
    padding: 0.9rem 0.9rem 4.2rem;
  }

  .card {
    padding: 1.3rem;
  }

  .actions {
    gap: 0.58rem;
  }

  .btn {
    width: 100%;
  }

  .btn.subtle {
    width: auto;
  }

  .site-footer {
    font-size: 12px;
    padding: 0.34rem 0.62rem;
  }
}
