:root {
  color-scheme: dark;
  --bg: #05070f;
  --text: #eef7ff;
  --muted: #a9bbca;
  --cyan: #41e5ff;
  --pink: #ff4fd8;
  --green: #72ff9d;
  --amber: #ffd166;
  --glass: rgba(11, 20, 38, 0.62);
  --line: rgba(255, 255, 255, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(65, 229, 255, 0.20), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(255, 79, 216, 0.18), transparent 30%),
    linear-gradient(145deg, #05070f 0%, #10162a 46%, #0a1020 100%);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

#starfield,
#cursorTrail {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#starfield {
  z-index: 0;
}

#cursorTrail {
  z-index: 4;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 28px;
}

.glass {
  border: 1px solid var(--line);
  background: var(--glass);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px);
}

.hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 28px;
  align-items: center;
  padding: clamp(28px, 5vw, 64px);
  border-radius: 8px;
  position: relative;
}

.hero .status-pill {
  position: absolute;
  top: 20px;
  left: 20px;
}

.status-pill,
.hero-actions,
.tags,
.link-grid,
.stat-row,
footer {
  display: flex;
  align-items: center;
}

.status-pill {
  width: fit-content;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(114, 255, 157, 0.32);
  border-radius: 999px;
  background: rgba(114, 255, 157, 0.08);
  color: var(--green);
  font-size: 13px;
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
  animation: pulse 1.5s infinite;
}

.lock {
  color: var(--cyan);
}

.eyebrow,
.label {
  margin: 0;
  color: var(--cyan);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  min-height: 1.1em;
  margin: 18px 0 18px;
  font-size: clamp(42px, 8vw, 92px);
  line-height: 1.04;
  letter-spacing: 0;
  text-shadow: 0 0 28px rgba(65, 229, 255, 0.36);
}

.caret {
  color: var(--pink);
  animation: blink 0.8s steps(2) infinite;
}

.intro {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.hero-actions a,
.error-box a {
  display: inline-flex;
  justify-content: center;
  min-width: 120px;
  padding: 12px 18px;
  border: 1px solid rgba(65, 229, 255, 0.38);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(65, 229, 255, 0.22), rgba(255, 79, 216, 0.18));
  box-shadow: 0 0 24px rgba(65, 229, 255, 0.16);
}

.profile-card {
  min-height: 340px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.avatar {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  color: #06101d;
  font-size: 44px;
  font-weight: 900;
}

.profile-card h2 {
  margin: 24px 0 8px;
  font-size: 30px;
}

.profile-card p {
  margin: 0;
  color: var(--muted);
}

.tags {
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.tags span {
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #d8f7ff;
  font-size: 13px;
}

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

.panel,
.links,
.showcase {
  border-radius: 8px;
  padding: 22px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.panel:hover,
.link-card:hover {
  transform: translateY(-4px);
  border-color: rgba(65, 229, 255, 0.5);
  box-shadow: 0 28px 90px rgba(65, 229, 255, 0.12);
}

.panel strong {
  display: block;
  margin-top: 12px;
  font-size: 34px;
}

.panel p {
  margin: 8px 0 0;
  color: var(--muted);
}

.meter {
  width: 100%;
  height: 10px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green), var(--amber));
  transition: width 0.6s ease;
}

.stats-panel {
  grid-column: span 2;
}

.stat-row {
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--muted);
}

.stat-row:last-child {
  border-bottom: 0;
}

.stat-row strong {
  margin: 0;
  color: var(--text);
  font-size: 18px;
}

.links,
.showcase {
  margin-top: 18px;
}

.section-head h2 {
  margin: 8px 0 22px;
  font-size: 32px;
}

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

.link-card {
  min-height: 116px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.link-card span {
  display: block;
  color: var(--cyan);
  font-size: 13px;
}

.link-card strong {
  display: block;
  margin-top: 22px;
  font-size: 21px;
}

.link-card.qixi-card {
  border-color: rgba(255, 107, 157, 0.5);
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.2), rgba(168, 85, 247, 0.15));
  animation: lovePulse 2s ease-in-out infinite;
}

.link-card.qixi-card span {
  color: #ff6b9d;
}

.link-card.qixi-card:hover {
  border-color: rgba(255, 107, 157, 0.8);
  box-shadow: 0 28px 90px rgba(255, 107, 157, 0.3);
  transform: translateY(-4px) scale(1.02);
}

@keyframes lovePulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 107, 157, 0.2);
  }
  50% {
    box-shadow: 0 0 35px rgba(255, 107, 157, 0.4);
  }
}

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

.showcase-grid article {
  min-height: 170px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.showcase-grid article span {
  color: var(--pink);
  font-size: 13px;
  font-weight: 800;
}

.showcase-grid article h3 {
  margin: 18px 0 10px;
  font-size: 22px;
}

.showcase-grid article p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

footer {
  justify-content: space-between;
  gap: 16px;
  padding: 24px 4px 0;
  color: var(--muted);
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: center;
  gap: 16px;
  background: #05070f;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.loader.hide {
  opacity: 0;
  visibility: hidden;
}

.loader-ring {
  width: 54px;
  height: 54px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 8;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 7, 15, 0.86);
  opacity: 0;
  transform: translateY(14px);
  transition: 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.error-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.error-box {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  padding: 42px;
  border-radius: 8px;
}

.error-box h1 {
  min-height: 0;
  font-size: clamp(34px, 7vw, 64px);
}

@keyframes pulse {
  50% {
    opacity: 0.35;
    transform: scale(1.35);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

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

@media (max-width: 900px) {
  .hero,
  .grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 60px; /* 为状态标签留出空间 */
  }

  .hero .status-pill {
    position: absolute;
    top: 20px;
    left: 20px;
  }

  .stats-panel {
    grid-column: auto;
  }

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

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

@media (max-width: 560px) {
  .hero {
    padding: 20px; /* 恢复正常padding */
  }

  .hero .status-pill {
    position: static; /* 手机版改为正常流式布局 */
    margin-bottom: 20px;
    width: 100%;
    justify-content: center;
  }
  .hero {
    padding: 20px; /* 恢复正常padding */
  }

  .hero .status-pill {
    position: static; /* 手机版改为正常流式布局 */
    margin-bottom: 20px;
    width: 100%;
    justify-content: center;
  }
  .shell {
    width: min(100% - 22px, 1180px);
    padding-top: 22px;
  }

  .hero,
  .panel,
  .links,
  .error-box {
    padding: 20px;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: 40px;
  }

  .intro {
    font-size: 16px;
  }

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

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
