/* ============ 追星手账星球 · 全局样式 ============ */
:root {
  --bg-0: #0d0b1f;
  --bg-1: #16122e;
  --bg-2: #221b47;
  --ink: #f5f3ff;
  --muted: #a9a3c9;
  --primary: #8b7cff;
  --pink: #ff6ec7;
  --orange: #ffb86b;
  --cyan: #5eead4;
  --red: #ff5d7a;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.14);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --radius-sm: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --grad: linear-gradient(120deg, #8b7cff, #ff6ec7);
  --grad-soft: linear-gradient(120deg, rgba(139, 124, 255, 0.35), rgba(255, 110, 199, 0.35));
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg-0);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 背景光斑 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 15% 0%, rgba(139, 124, 255, 0.28), transparent 60%),
    radial-gradient(55% 45% at 85% 10%, rgba(255, 110, 199, 0.22), transparent 60%),
    radial-gradient(70% 60% at 50% 100%, rgba(94, 234, 212, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 55%, var(--bg-2));
}

/* 星星点缀 */
.stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1.6px 1.6px at 20% 30%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.2px 1.2px at 45% 12%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.8px 1.8px at 70% 22%, rgba(255,255,255,0.65), transparent),
    radial-gradient(1.1px 1.1px at 85% 45%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1.5px 1.5px at 12% 65%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1.3px 1.3px at 55% 78%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.7px 1.7px at 90% 80%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.1px 1.1px at 33% 90%, rgba(255,255,255,0.4), transparent);
  animation: twinkle 6s ease-in-out infinite alternate;
}

@keyframes twinkle {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; color: var(--ink); }
ul { list-style: none; }

/* ============ 顶部导航 ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  background: rgba(13, 11, 31, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.logo .logo-badge {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--grad);
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 8px 24px rgba(139, 124, 255, 0.45);
  animation: float 3.5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-links a {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14.5px;
  transition: color 0.25s, background 0.25s;
}

.nav-links a:hover { color: var(--ink); background: var(--glass); }

.nav-links a.active {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 8px 20px rgba(139, 124, 255, 0.4);
}

.nav-cta {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--ink);
  font-size: 14px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  white-space: nowrap;
}

.nav-cta:hover {
  transform: translateY(-2px);
  border-color: var(--pink);
  box-shadow: 0 10px 26px rgba(255, 110, 199, 0.3);
}

.menu-btn {
  display: none;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--ink);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 20px;
}

@media (max-width: 860px) {
  .menu-btn { display: grid; place-items: center; margin-left: auto; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 16px 24px 22px;
    background: rgba(13, 11, 31, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px 14px; text-align: center; }
}

/* ============ 通用容器 / 区块 ============ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

section { padding: 64px 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.section-kicker {
  color: var(--pink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.section-title { font-size: 30px; font-weight: 800; letter-spacing: 1px; margin-top: 6px; }

.section-title .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.section-more {
  color: var(--muted);
  font-size: 14px;
  padding: 8px 16px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass);
  transition: 0.25s;
}

.section-more:hover { color: #fff; border-color: var(--primary); transform: translateY(-2px); }

/* ============ Hero ============ */
.hero {
  position: relative;
  padding: 96px 0 70px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(34px, 6vw, 60px);
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.2;
}

.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  background-size: 200% 200%;
  animation: hue 8s ease infinite;
}

@keyframes hue {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero .sub {
  max-width: 620px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 17px;
}

.hero-ctas { display: flex; gap: 14px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 14px 34px rgba(139, 124, 255, 0.45);
}

.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 42px rgba(255, 110, 199, 0.5); }

.btn-ghost {
  background: var(--glass);
  color: var(--ink);
  border: 1px solid var(--glass-border);
}

.btn-ghost:hover { transform: translateY(-3px); border-color: var(--cyan); }

.hero-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 58px;
}

/* 通用卡片 */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: transform 0.35s, box-shadow 0.35s, border-color 0.35s;
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(139, 124, 255, 0.55);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(139, 124, 255, 0.25);
}

.works-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }

/* 手账作品封面（CSS 图形预览） */
.cover {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.cover .cover-emoji { font-size: 46px; filter: drop-shadow(0 10px 22px rgba(0,0,0,0.4)); animation: float 4s ease-in-out infinite; }

.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(45deg, rgba(255,255,255,0.12) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.12) 75%, transparent 75%);
  background-size: 26px 26px;
  opacity: 0.4;
  mix-blend-mode: overlay;
}

.cover .cover-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(13, 11, 31, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 12px;
}

.work-body { padding: 16px 18px 18px; }

.work-title { font-size: 17px; font-weight: 700; }

.work-meta { display: flex; gap: 14px; margin-top: 8px; color: var(--muted); font-size: 13px; align-items: center; }

.work-meta span { display: inline-flex; align-items: center; gap: 5px; }

.work-stars { margin-top: 10px; display: flex; gap: 2px; color: var(--orange); font-size: 14px; }

/* ============ 统计条 ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: -14px 0 0;
}

.stat {
  text-align: center;
  padding: 28px 16px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.stat .num {
  font-size: 34px;
  font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.stat .label { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hero-cards { grid-template-columns: 1fr; }
}

/* ============ 素材卡 ============ */
.material-card .mat-head {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.material-card .mat-cat {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
}

.fav-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--muted);
  font-size: 15px;
  display: grid;
  place-items: center;
  transition: 0.25s;
}

.fav-btn:hover { transform: scale(1.15); color: var(--red); }

.fav-btn.on { color: var(--red); border-color: var(--red); background: rgba(255, 93, 122, 0.15); animation: pop 0.35s; }

@keyframes pop {
  0% { transform: scale(0.7); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.material-card .mat-body { padding: 0 18px 18px; }

.mat-name { font-size: 16.5px; font-weight: 700; }

.mat-desc { color: var(--muted); font-size: 13px; margin-top: 6px; }

.mat-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
}

.download-btn {
  padding: 7px 16px;
  border-radius: 999px;
  border: none;
  background: var(--grad);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: 0.25s;
}

.download-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(139, 124, 255, 0.45); }

/* ============ 滤镜栏 ============ */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
  align-items: center;
}

.chip {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--muted);
  font-size: 14px;
  transition: 0.25s;
}

.chip:hover { color: #fff; transform: translateY(-2px); }

.chip.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 10px 24px rgba(139, 124, 255, 0.4); }

.search-box {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
}

.search-box input { flex: 1; background: transparent; border: none; outline: none; font-size: 14px; }

.search-box input::placeholder { color: var(--muted); }

/* ============ 打卡 ============ */
.checkin-layout { display: grid; grid-template-columns: 380px 1fr; gap: 26px; align-items: start; }

@media (max-width: 920px) {
  .checkin-layout { grid-template-columns: 1fr; }
}

.form-card { padding: 26px; position: sticky; top: 90px; }

.form-card h3 { font-size: 20px; margin-bottom: 18px; }

.field { margin-bottom: 16px; }

.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }

.field textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--glass-border);
  outline: none;
  resize: vertical;
  font-size: 14.5px;
  line-height: 1.7;
  transition: border-color 0.25s;
}

.field textarea:focus, .field select:focus, .field input:focus { border-color: var(--primary); }

.field select, .field input[type="text"], .field input[type="date"] {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--glass-border);
  outline: none;
  font-size: 14px;
  color-scheme: dark;
}

.field select option { background: var(--bg-2); }

.mood-row { display: flex; gap: 10px; flex-wrap: wrap; }

.mood {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  font-size: 20px;
  display: grid;
  place-items: center;
  transition: 0.25s;
}

.mood:hover { transform: translateY(-3px) scale(1.08); }

.mood.active { border-color: var(--pink); background: rgba(255, 110, 199, 0.18); box-shadow: 0 8px 20px rgba(255, 110, 199, 0.35); }

.submit-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--grad);
  color: #fff;
  font-size: 15.5px;
  font-weight: 700;
  transition: 0.25s;
  box-shadow: 0 14px 34px rgba(139, 124, 255, 0.4);
}

.submit-btn:hover { transform: translateY(-3px); box-shadow: 0 18px 42px rgba(255, 110, 199, 0.5); }

/* 动态流 */
.post { padding: 20px; margin-bottom: 18px; }

.post-head { display: flex; align-items: center; gap: 12px; }

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.18);
}

.post-head .who { font-weight: 700; font-size: 15px; }

.post-head .time { color: var(--muted); font-size: 12.5px; }

.post-head .badge {
  margin-left: auto;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--grad-soft);
  border: 1px solid var(--glass-border);
}

.post-content { margin-top: 12px; font-size: 14.5px; color: #e6e2ff; }

.post-content .quote {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 16px;
  border-left: 3px solid var(--pink);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: var(--muted);
}

.post-foot { display: flex; gap: 18px; margin-top: 14px; }

.post-foot button {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: 0.25s;
}

.post-foot button:hover { color: var(--red); transform: scale(1.06); }

.post-foot button.liked { color: var(--red); }

/* ============ 教程 ============ */
.tut-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }

.tut-card { padding: 24px; }

.tut-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--grad);
  display: grid;
  place-items: center;
  font-size: 24px;
  margin-bottom: 16px;
  box-shadow: 0 12px 28px rgba(139, 124, 255, 0.4);
}

.tut-card h3 { font-size: 18px; margin-bottom: 10px; }

.tut-card p { color: var(--muted); font-size: 14px; }

.steps { margin-top: 14px; padding-left: 4px; }

.steps li { display: flex; gap: 12px; padding: 9px 0; font-size: 14px; color: var(--ink); align-items: flex-start; }

.steps .step-num {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--grad-soft);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

.accordion { margin-top: 20px; }

.acc-item {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: var(--glass);
  margin-bottom: 12px;
  overflow: hidden;
  transition: 0.3s;
}

.acc-item.open { border-color: rgba(139, 124, 255, 0.5); }

.acc-head {
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  border: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
}

.acc-head .arrow { transition: 0.3s; color: var(--pink); }

.acc-item.open .arrow { transform: rotate(180deg); }

.acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.acc-body-inner { padding: 0 20px 18px; color: var(--muted); font-size: 14px; }

/* ============ 我的手账 ============ */
.profile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
  padding: 30px;
  margin-bottom: 30px;
}

.profile .avatar { width: 84px; height: 84px; font-size: 38px; }

.profile h2 { font-size: 24px; }

.profile .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }

.mini-stats { display: flex; gap: 26px; margin-top: 16px; flex-wrap: wrap; }

.mini-stat .num { font-size: 22px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.mini-stat .label { color: var(--muted); font-size: 12.5px; }

.tabs { display: flex; gap: 10px; margin-bottom: 26px; flex-wrap: wrap; }

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius);
}

.empty .big { font-size: 46px; margin-bottom: 12px; }

/* ============ CTA 横幅 / 页脚 ============ */
.cta-banner {
  text-align: center;
  padding: 56px 24px;
  border-radius: 24px;
  background: var(--grad);
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(139, 124, 255, 0.4);
}

.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(255,255,255,0.25), transparent 50%);
}

.cta-banner h2 { font-size: clamp(24px, 4vw, 34px); font-weight: 900; position: relative; }

.cta-banner p { margin-top: 10px; opacity: 0.92; position: relative; }

.cta-banner .btn-light {
  margin-top: 24px;
  background: #fff;
  color: #111;
  position: relative;
}

.cta-banner .btn-light:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25); }

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 44px 0 36px;
  margin-top: 40px;
  color: var(--muted);
  font-size: 13.5px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer .logo { font-size: 17px; }

/* ============ 滚动显现 ============ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }

.reveal.visible { opacity: 1; transform: none; }

/* 轻提示 */
.toast-wrap {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none;
}

.toast {
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(30, 26, 60, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(139, 124, 255, 0.5);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  font-size: 14px;
  animation: toast-in 0.35s ease;
}

.toast.out { animation: toast-out 0.3s ease forwards; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(12px); }
}

/* 进度条装饰 */
.progress { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.1); overflow: hidden; margin-top: 10px; }

.progress i { display: block; height: 100%; border-radius: 999px; background: var(--grad); }
