:root {
  --bg: #05060d;
  --card: rgba(255, 255, 255, 0.06);
  --card-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(234, 190, 106, 0.2);
  --text: rgba(245, 237, 220, 0.94);
  --text-soft: rgba(245, 237, 220, 0.5);
  --accent: #e9b14b;
  --accent-2: #ffdc8f;
  --accent-soft: rgba(233, 177, 75, 0.12);
  --glow: rgba(233, 177, 75, 0.26);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

button {
  font: inherit;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 177, 75, 0.14), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(94, 104, 255, 0.12), transparent 26%),
    radial-gradient(circle at 50% 100%, rgba(20, 89, 150, 0.18), transparent 32%),
    var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  position: relative;
  overflow-x: hidden;
}

canvas.page-stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.9;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 28px 18px 40px;
}

.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 28px 20px 24px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(9, 12, 21, 0.9);
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle, rgba(255, 218, 143, 0.16), transparent 20%),
    radial-gradient(circle, rgba(110, 118, 255, 0.1), transparent 25%);
  transform: rotate(8deg);
  pointer-events: none;
}

.hero-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar-ring {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  flex-shrink: 0;
}

.avatar-ring::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), rgba(255, 255, 255, 0.55), transparent 45%, var(--accent));
  animation: spin 5s linear infinite;
}

.avatar-core {
  position: absolute;
  inset: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(233, 177, 75, 0.16));
  font-size: 34px;
}

.avatar-core img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-copy {
  min-width: 0;
  flex: 1;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--text-soft);
}

.hero-title {
  margin-top: 6px;
  font-size: 25px;
  font-weight: 700;
}

.hero-subtitle {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-soft);
}

.stats {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stat-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--accent-2);
  font-size: 13px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.intro-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mini-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 12px;
  background: var(--card);
}

.mini-label {
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--text-soft);
}

.mini-value {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 600;
}

.section {
  margin-top: 18px;
}

.section-title {
  margin-bottom: 12px;
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--text-soft);
}

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

.module-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px 8px 14px;
  background: var(--card);
  text-align: center;
  transform: translateY(18px);
  opacity: 0;
  animation: riseIn 0.5s ease forwards;
  cursor: pointer;
}

.module-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), transparent 65%);
  pointer-events: none;
}

.module-card:active {
  transform: scale(0.97);
}

.module-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--accent-soft);
  font-size: 24px;
}

.module-name {
  font-size: 13px;
  font-weight: 700;
}

.module-index {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-soft);
}

.preview-panel {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 18px 16px;
  background: var(--card-strong);
  box-shadow: var(--shadow);
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preview-name {
  font-size: 18px;
  font-weight: 700;
}

.preview-badge {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--accent-2);
  font-size: 11px;
}

.preview-body {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.9;
  color: rgba(245, 237, 220, 0.82);
}

.action-row {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}

.ghost-btn,
.primary-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 13px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--border);
}

.primary-btn {
  flex: 1;
  color: #22150c;
  background: linear-gradient(135deg, #f0cb74, #e5a948);
  box-shadow: 0 10px 24px rgba(233, 177, 75, 0.22);
}

.floating-tip {
  position: fixed;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%) translateY(24px);
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(10, 12, 20, 0.88);
  color: var(--text);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: 0.35s ease;
  z-index: 10;
}

.floating-tip.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes riseIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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