:root {
  --bg-primary: #101018;
  --bg-secondary: #16161d;
  --bg-card: #1a1a22;
  --bg-card-hover: #212129;
  --border-color: #2e2e3a;
  --text-primary: #e8e8ed;
  --text-secondary: #9898a0;
  --text-muted: #7c7c88;
  --accent-purple: #8b5cf6;
  --accent-blue: #3b82f6;
  --accent-pink: #ec4899;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  --gradient-primary: linear-gradient(135deg, #8b5cf6, #3b82f6);
  --gradient-warm: linear-gradient(135deg, #ec4899, #f59e0b);
  --gradient-cool: linear-gradient(135deg, #06b6d4, #8b5cf6);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-bg-scrolled: rgba(16, 16, 24, 0.85);
  --text-soft: #c9c9d3;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

html {
  background: var(--bg-primary);
  transition: background-color 0.35s ease;
}

body {
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  display: block;
}

::selection {
  background: rgba(139, 92, 246, 0.3);
  color: #fff;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== NAV ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
}

.nav.scrolled {
  background: var(--nav-bg-scrolled);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(42, 42, 48, 0.5);
  padding: 12px 0;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.45);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--text-primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: transparent;
  border: 0;
  font: inherit;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 120px 24px 80px;
  overflow: hidden;
}

/* 左文右图两栏；移动端自动堆叠 */
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(125, 196, 255, 0.09) 0%, transparent 50%),
    radial-gradient(circle at 70% 50%, rgba(139, 92, 246, 0.07) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(125, 196, 255, 0.05) 0%, transparent 50%);
  animation: heroGlow 15s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-2%, -2%) rotate(3deg); }
}

.hero-content {
  position: relative;
  max-width: 640px;
  text-align: left;
}

/* 看板立绘：白底图放白色相框里，冰蓝微光呼应瞳色 */
.hero-portrait {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.portrait-frame {
  position: relative;
  width: min(340px, 72vw);
  border-radius: 32px;
  padding: 10px;
  background: linear-gradient(160deg, #ffffff, #eef4fb);
  box-shadow:
    0 24px 60px rgba(124, 196, 255, 0.25),
    0 0 0 1px rgba(124, 196, 255, 0.35),
    0 8px 32px rgba(0, 0, 0, 0.35);
  animation: portraitFloat 6s ease-in-out infinite;
}

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

.portrait-frame img {
  display: block;
  width: 100%;
  border-radius: 24px;
}

.portrait-caption {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-content {
    text-align: center;
    max-width: none;
  }

  .hero-portrait {
    order: -1;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--accent-purple);
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -1px;
  animation: fadeInUp 0.8s ease 0.1s both;
}

.hero h1 .gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 0 36px;
  line-height: 1.8;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  animation: fadeInUp 0.8s ease 0.3s both;
}

@media (max-width: 900px) {
  .hero p { margin: 0 auto 36px; }
  .hero-actions { justify-content: center; }
}

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

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

/* ========== STATS ========== */
.stats {
  padding: 60px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-item {
  padding: 24px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ========== SECTION ========== */
.section {
  padding: 88px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--accent-purple);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 16px auto 0;
  line-height: 1.8;
}

/* ========== FEATURE CARDS (Homepage) ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========== TOOL PAGE ========== */
.tool-hero {
  padding: 140px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tool-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.tool-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 16px;
  position: relative;
}

.tool-hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.8;
  position: relative;
}

/* Search */
.tool-search {
  max-width: 560px;
  margin: 36px auto 0;
  position: relative;
}

.tool-search input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

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

.tool-search input:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.tool-search .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

/* Filter Tabs */
.tool-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 40px 0;
  padding: 0 24px;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #fff;
}

/* Tool Grid */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  padding-bottom: 100px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.tool-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.tool-card-info {
  flex: 1;
  min-width: 0;
}

.tool-card-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-card-info h3 .free-badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border-radius: 100px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.tool-card-info .tool-url {
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.tool-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tool-tag {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(139, 92, 246, 0.08);
  color: var(--accent-purple);
  font-weight: 500;
}

.tool-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-purple);
  font-size: 0.85rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.tool-card:hover .tool-arrow {
  background: var(--gradient-primary);
  color: #fff;
  transform: translateX(2px);
}

/* Category colors */
.cat-ai .tool-icon { background: rgba(139, 92, 246, 0.12); }
.cat-dev .tool-icon { background: rgba(59, 130, 246, 0.12); }
.cat-design .tool-icon { background: rgba(236, 72, 153, 0.12); }
.cat-efficiency .tool-icon { background: rgba(245, 158, 11, 0.12); }
.cat-resource .tool-icon { background: rgba(6, 182, 212, 0.12); }
.cat-media .tool-icon { background: rgba(16, 185, 129, 0.12); }

.cat-ai .tool-tag { background: rgba(139, 92, 246, 0.08); color: var(--accent-purple); }
.cat-dev .tool-tag { background: rgba(59, 130, 246, 0.08); color: var(--accent-blue); }
.cat-design .tool-tag { background: rgba(236, 72, 153, 0.08); color: var(--accent-pink); }
.cat-efficiency .tool-tag { background: rgba(245, 158, 11, 0.08); color: var(--accent-orange); }
.cat-resource .tool-tag { background: rgba(6, 182, 212, 0.08); color: var(--accent-cyan); }
.cat-media .tool-tag { background: rgba(16, 185, 129, 0.08); color: var(--accent-green); }

/* ========== FOOTER ========== */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 48px 0;
  text-align: center;
}

.footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer a {
  color: var(--accent-purple);
}

.footer a:hover {
  color: var(--text-primary);
}

/* ========== ABOUT SECTION ========== */
.about-section {
  padding: 100px 0;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h2 {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.about-text p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-visual {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.05));
}

.about-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.about-visual .avatar-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  z-index: 1;
}

/* ========== CTA ========== */
.cta-section {
  padding: 100px 0;
}

.cta-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 80px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.cta-box h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 900;
  margin-bottom: 16px;
  position: relative;
}

.cta-box p {
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.8;
  position: relative;
}

/* ========== ANIMATIONS ========== */
/* 渐进增强：默认可见；只有 JS 可用（html.js）才启用"滚动淡入"，
   避免脚本失效/被拦截时作品卡片永久空白 */
.fade-in {
  opacity: 1;
  transform: none;
}

.js .fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .js .fade-in { opacity: 1; transform: none; transition: none; }
}

/* ========== NO RESULTS ========== */
.no-results {
  text-align: center;
  padding: 80px 20px;
  display: none;
}

.no-results.show {
  display: block;
}

.no-results .emoji {
  font-size: 3rem;
  margin-bottom: 16px;
}

.no-results h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.no-results p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-visual {
    max-width: 400px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 11, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    z-index: 999;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.3rem;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

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

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

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

  .hero-actions {
    flex-direction: column;
  }

  .section {
    padding: 60px 0;
  }

  .tool-hero {
    padding: 120px 0 40px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .tool-filters {
    gap: 8px;
  }

  .filter-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
  }
}

/* ─────────── 我的作品 / Projects ─────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent, var(--gradient-primary));
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover {
  border-color: var(--card-accent-soft, rgba(139, 92, 246, 0.3));
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-card:hover::before {
  opacity: 1;
}

.project-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.project-badge {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.project-badge.released {
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.12);
}

.project-badge.incubating {
  color: var(--accent-orange);
  background: rgba(245, 158, 11, 0.12);
}

.project-badge.open {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.14);
}

.project-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tag {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 3px 10px;
  border-radius: 999px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent-purple);
  margin-top: 2px;
  transition: var(--transition);
}

.project-card:hover .project-link {
  gap: 12px;
}

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

/* ─────────── CTA actions ─────────── */
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
}

/* ─────────── 随笔 / Blog ─────────── */
.blog-hero {
  padding: 150px 0 10px;
  text-align: center;
}

.blog-hero .section-desc {
  max-width: 560px;
  margin: 16px auto 0;
}

.essay-toc {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.essay-toc a {
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 999px;
  transition: var(--transition);
}

.essay-toc a:hover {
  color: var(--accent-purple);
  border-color: rgba(139, 92, 246, 0.4);
}

.essays {
  padding: 40px 0 100px;
}

.essay {
  max-width: 760px;
  margin: 0 auto 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  transition: var(--transition);
}

.essay:hover {
  border-color: rgba(139, 92, 246, 0.3);
}

.essay:target {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: var(--shadow-md);
}

.essay-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 20px;
}

.essay-num {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.essay-title-wrap h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.4;
}

.essay-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.essay-src {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 2px 10px;
  border-radius: 999px;
}

.essay-body p {
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.9;
  margin-bottom: 14px;
}

.essay-body p:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .blog-hero {
    padding-top: 120px;
  }

  .essay {
    padding: 26px 22px;
  }

  .essay-head {
    gap: 14px;
  }
}

/* ─────────── 主题切换 / Theme ─────────── */


.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}

[data-theme="light"] {
  --bg-primary: #f3efe9;
  --bg-secondary: #ebe6dd;
  --bg-card: #faf8f4;
  --bg-card-hover: #f1ece3;
  --border-color: #ddd5c8;
  --text-primary: #3f3a33;
  --text-secondary: #625b51;
  --text-muted: #6e675c;
  --text-soft: #5f594f;
  --nav-bg-scrolled: rgba(243, 239, 233, 0.88);
  --accent-purple: #7b6fa6;
  --accent-blue: #5f86b5;
  --accent-pink: #b98b8b;
  --accent-cyan: #5b9ea3;
  --accent-green: #7fa183;
  --accent-orange: #bd8f5c;
  --gradient-primary: linear-gradient(135deg, #7b6fa6, #5f86b5);
  --gradient-warm: linear-gradient(135deg, #b98b8b, #bd8f5c);
  --gradient-cool: linear-gradient(135deg, #5b9ea3, #7b6fa6);
  --shadow-sm: 0 2px 8px rgba(63, 58, 51, 0.08);
  --shadow-md: 0 4px 16px rgba(63, 58, 51, 0.1);
  --shadow-lg: 0 8px 32px rgba(63, 58, 51, 0.14);
}

/* ─────────── 二次元鼠标指针 ─────────── */
body {
  cursor: url('/assets/img/cursor-paw.png') 5 3, auto;
}

a, button, .filter-btn {
  cursor: url('/assets/img/cursor-heart.png') 13 11, pointer;
}

input, textarea {
  cursor: text;
}

/* ─────────── 弹幕 ─────────── */
.danmaku-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 40;
}

.danmaku {
  position: absolute;
  left: 100%;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 500;
  color: rgba(238, 240, 252, 0.92);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
  animation: danmaku-move linear forwards;
}

[data-theme="light"] .danmaku {
  color: rgba(214, 100, 145, 0.9);
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.9);
}

@keyframes danmaku-move {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100vw - 100%)); }
}

/* ─────────── Hero 背景视频（已停用，hero 改用看板立绘）─────────── */

/* ─────────── 一言 / 运势 / 音乐盒 ─────────── */
.footer-extras {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 22px;
}

/* 小玩意折叠区：运势/BGM/音效/打卡/氛围/弹幕收进一个胶囊里 */
.mini-games {
  margin-top: 22px;
}

.mini-games > summary {
  list-style: none;
  display: inline-block;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.mini-games > summary::-webkit-details-marker {
  display: none;
}

.mini-games > summary:hover {
  color: var(--accent-pink);
  border-color: rgba(248, 158, 192, 0.5);
}

.mini-games[open] > summary {
  color: var(--accent-pink);
}

.mini-games-body {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.fortune-btn, .music-btn {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: url('/assets/img/cursor-heart.png') 13 11, pointer;
  transition: var(--transition);
}

.fortune-btn:hover, .music-btn:hover {
  color: var(--accent-pink);
  border-color: rgba(248, 158, 192, 0.5);
}

.hitokoto {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.fortune-card {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(480px, 88vw);
  height: fit-content;
  background: linear-gradient(160deg, #fff5f8, #fdeef4);
  border: 2px solid rgba(247, 158, 190, 0.7);
  border-radius: 24px;
  padding: 42px 36px;
  text-align: center;
  z-index: 200;
  box-shadow: 0 20px 60px rgba(214, 100, 145, 0.35);
  animation: fortune-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fortune-card .fortune-close {
  position: absolute;
  top: 14px;
  right: 20px;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
}

.fortune-title {
  font-size: 1.7rem;
  font-weight: 900;
  color: #d6557f;
  margin-bottom: 18px;
}

.fortune-msg {
  font-size: 1rem;
  line-height: 1.9;
  color: #4a3f45;
  margin-bottom: 14px;
}

.fortune-item {
  font-size: 0.9rem;
  color: #b06a8c;
}

.fortune-tip {
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

@keyframes fortune-pop {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ─────────── 点赞 chip / 打卡 chip ─────────── */
.like-chip {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 60;
  background: rgba(22, 22, 26, 0.85);
  color: rgba(242, 242, 248, 0.9);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.78rem;
  pointer-events: none;
  backdrop-filter: blur(6px);
}

.like-chip.pop {
  animation: like-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes like-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); border-color: rgba(248, 158, 192, 0.7); }
  100% { transform: scale(1); }
}

[data-theme="light"] .like-chip {
  background: rgba(250, 248, 244, 0.9);
  color: rgba(63, 58, 51, 0.9);
}

.streak-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  color: var(--accent-green);
  background: rgba(129, 230, 176, 0.1);
  border: 1px solid rgba(129, 230, 176, 0.35);
  border-radius: 999px;
  padding: 6px 14px;
}

/* ─────────── 金色弹幕 / 弹幕输入条 ─────────── */
.danmaku.gold {
  color: rgba(255, 214, 130, 0.95);
  text-shadow: 0 1px 6px rgba(180, 120, 20, 0.6);
  font-weight: 700;
}

[data-theme="light"] .danmaku.gold {
  color: rgba(200, 120, 30, 0.95);
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
}

.danmaku-input {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  display: flex;
  gap: 8px;
  width: min(420px, calc(100vw - 32px));
}

.danmaku-input input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 0.85rem;
  color: var(--text-primary);
  outline: none;
  backdrop-filter: blur(8px);
}

.danmaku-input input:focus {
  border-color: rgba(139, 92, 246, 0.5);
}

.danmaku-input button {
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: url('/assets/img/cursor-heart.png') 13 11, pointer;
}

/* ─────────── 画廊 ─────────── */
.gallery-grid {
  /* 固定 3 列：9 张图正好 3×3，不会出现末行孤卡 */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

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

.g-card {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: url('/assets/img/cursor-heart.png') 13 11, pointer;
  transition: var(--transition);
}

.g-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.g-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.g-card figcaption {
  padding: 16px 18px;
}

.g-card strong {
  display: block;
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 4px;
}

.g-card span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.gallery-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 0;
}

.g-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.92);
  z-index: 300;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  cursor: pointer;
}

.g-lightbox.open {
  display: flex;
}

.g-lightbox img {
  max-width: min(86vw, 900px);
  max-height: 78vh;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.g-lightbox p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ─────────── 自习室 / Study ─────────── */
.study-section {
  padding: 16px 0 0;
}

.study-count {
  min-height: 1.2em;
  margin-top: -20px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.study-mindmap-cta {
  margin-top: 26px;
  text-align: center;
}

/* 卡片由 study.js 动态插入，不能用 .fade-in（main.js 的 observer 不会二次扫描） */
.study-card {
  animation: fadeInUp 0.5s ease backwards;
}

/* 按课程分组：每门课一个区块，标题 + 学期 + 数量，下面挂该课的资料卡片 */
.course-groups {
  padding-bottom: 90px;
}

.course-group + .course-group {
  margin-top: 54px;
}

.course-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding-left: 16px;
  border-left: 3px solid var(--accent-purple);
}

.course-head h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.course-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.course-semester {
  padding: 2px 10px;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  white-space: nowrap;
}

.course-group .tool-grid {
  /* 弹性 + 居中：每组卡片数量不等（1~4 张），flex 让最后一行自动居中，
     避免 grid 布局留下悬空的空位 */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding-bottom: 0;
}

.course-group .tool-grid > .study-card {
  flex: 1 1 320px;
  max-width: calc((100% - 40px) / 3);
}

@media (max-width: 900px) {
  .course-group .tool-grid > .study-card {
    flex-basis: calc((100% - 20px) / 2);
    max-width: calc((100% - 20px) / 2);
  }
}

@media (max-width: 768px) {
  .course-group .tool-grid > .study-card {
    flex-basis: 100%;
    max-width: 100%;
  }
}

.study-card--plain {
  cursor: default;
}

.study-card .tool-card-info h3 {
  flex-wrap: wrap;
}

.study-badge {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
}

.study-material .tool-icon { background: rgba(139, 92, 246, 0.12); }
.study-notes .tool-icon { background: rgba(6, 182, 212, 0.12); }
.study-homework .tool-icon { background: rgba(16, 185, 129, 0.12); }

.study-material .study-badge { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.study-notes .study-badge { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.study-homework .study-badge { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }

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

  .study-count {
    margin-top: -12px;
  }
}

/* ─────────── 无障碍辅助 ─────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 尊重系统"减弱动态效果"设置：关掉装饰动画，内容照常可读 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─────────── 原神风 UI 皮肤（2026-11-14）─────────── */
/* 提多莫（Teyvat）金：暗色板 + 金色描边 + 菱形角饰。只动按钮/卡片/标签的观感，不动布局。 */
:root {
  --genshin-gold: #d3bc8e;
  --genshin-gold-bright: #ecdcb4;
  --genshin-gold-dim: rgba(211, 188, 142, 0.35);
}

[data-theme="light"] {
  --genshin-gold: #a08a5c;
  --genshin-gold-bright: #6f5c33;
  --genshin-gold-dim: rgba(154, 127, 78, 0.45);
}

/* 按钮：提瓦特式深蓝底 + 双层金描边 + 起浮 */
.btn, .filter-btn {
  border-radius: 6px;
  border: 1px solid var(--genshin-gold-dim);
  background: linear-gradient(180deg, rgba(46, 58, 84, 0.92), rgba(24, 32, 50, 0.92));
  color: var(--genshin-gold-bright);
  box-shadow: inset 0 0 0 1px rgba(211, 188, 142, 0.22), 0 2px 12px rgba(0, 0, 0, 0.3);
  position: relative;
}

.btn:hover, .filter-btn:hover {
  border-color: var(--genshin-gold);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(211, 188, 142, 0.45), 0 6px 20px rgba(211, 188, 142, 0.22);
}

.btn-primary {
  background: linear-gradient(180deg, rgba(126, 102, 56, 0.95), rgba(78, 62, 32, 0.95));
  border-color: var(--genshin-gold);
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(180deg, rgba(158, 128, 70, 0.98), rgba(104, 82, 42, 0.98));
}

.filter-btn.active {
  background: linear-gradient(180deg, rgba(126, 102, 56, 0.95), rgba(78, 62, 32, 0.95));
  border-color: var(--genshin-gold);
  color: #fff;
}

/* 主按钮菱形角饰 */
.btn-primary::before {
  content: '◆';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 8px;
  color: rgba(236, 220, 180, 0.75);
  pointer-events: none;
}

/* 卡片：金色发丝边 + 右上角菱形角饰 */
.project-card, .study-card, .tool-card, .essay, .feature-card {
  position: relative;
  border-color: rgba(211, 188, 142, 0.22);
}

.project-card::after, .study-card::after, .tool-card::after, .essay::after, .feature-card::after {
  content: '◆';
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 9px;
  color: rgba(211, 188, 142, 0.5);
  pointer-events: none;
}

/* 分区标签：金框小铭牌 */
.section-tag {
  background: rgba(211, 188, 142, 0.08);
  border: 1px solid rgba(211, 188, 142, 0.45);
  color: var(--genshin-gold-bright);
  border-radius: 4px;
}

/* 导航激活下划线：金 */
.nav-links a::after {
  background: linear-gradient(90deg, transparent, var(--genshin-gold), transparent);
}

/* 跳转主内容链接：平时隐藏，键盘聚焦时浮现 */
.skip-link {
  position: fixed;
  top: -60px;
  left: 14px;
  z-index: 2000;
  padding: 10px 18px;
  border-radius: 6px;
  background: var(--genshin-gold);
  color: #141a28;
  font-weight: 700;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
  outline: 2px solid #fff;
}

/* ─────────── 原神化深化 ─────────── */
/* 渐变标题：紫蓝 → 提瓦特金 */
.gradient-text,
.hero h1 .gradient-text,
.section-header .gradient-text {
  background-image: linear-gradient(135deg, #f4ead0 0%, #d3bc8e 45%, #b99a52 70%, #ecdcb4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .gradient-text,
[data-theme="light"] .hero h1 .gradient-text {
  background-image: linear-gradient(135deg, #8a6d2f 0%, #b99a52 50%, #8a6d2f 100%);
}

/* 分区标题下的金色装饰线 */
.section-header .section-title::after {
  content: '';
  display: block;
  width: 72px;
  height: 2px;
  margin: 16px auto 0;
  background: linear-gradient(90deg, transparent, var(--genshin-gold), transparent);
}

/* hero 徽章：金框金点 */
.hero-badge {
  background: rgba(211, 188, 142, 0.08);
  border: 1px solid rgba(211, 188, 142, 0.4);
}

.hero-badge .dot {
  background: var(--genshin-gold);
}

/* hero 立绘相框：冰蓝 → 白金 */
.portrait-frame {
  background: linear-gradient(160deg, #f7f1e3, #e9dcc0);
  box-shadow: 0 24px 60px rgba(211, 188, 142, 0.26), 0 0 0 1px rgba(211, 188, 142, 0.4), 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* 404 数字 / 统计数字：金渐变（用 background-image，避免重置 background-clip） */
.nf-num {
  background-image: linear-gradient(180deg, #ecdcb4, #b99a52);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-number {
  background-image: linear-gradient(180deg, #ecdcb4, #b99a52);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 暗色底色整体再往提瓦特深蓝靠（浅色主题不受影响） */
:root:not([data-theme="light"]) {
  --bg-primary: #0f1420;
  --bg-secondary: #151b28;
  --bg-card: #171e2c;
  --bg-card-hover: #1d2536;
  --border-color: #2c3446;
  --nav-bg-scrolled: rgba(15, 20, 32, 0.85);
}

/* ── 原神化深化 II：角括号 + 标签金色统一 ── */
/* 卡片左上角金角括号（原神对话框式） */
.project-card::before, .study-card::before, .tool-card::before, .essay::before, .feature-card::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  width: 18px;
  height: 18px;
  border-top: 2px solid rgba(211, 188, 142, 0.55);
  border-left: 2px solid rgba(211, 188, 142, 0.55);
  border-top-left-radius: 8px;
  pointer-events: none;
}

/* 随笔编号：金渐变 */
.essay-num {
  background-image: linear-gradient(180deg, #ecdcb4, #b99a52);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 随笔来源 chip：金 */
.essay-src {
  color: var(--genshin-gold-bright);
  background: rgba(211, 188, 142, 0.1);
}

/* 自习室类型徽章：统一金色 */
.study-material .study-badge,
.study-notes .study-badge,
.study-homework .study-badge {
  background: rgba(211, 188, 142, 0.14);
  color: var(--genshin-gold-bright);
}

/* 页脚顶部金色发丝线 */
.footer {
  border-top-color: rgba(211, 188, 142, 0.22);
}

/* 导航 Logo：奶油金字 */
.nav-logo {
  color: var(--genshin-gold-bright);
}

/* ── 原神化深化 III：浅色主题按钮清晰度 + 七元素徽章 ── */
[data-theme="light"] .btn,
[data-theme="light"] .filter-btn {
  background: linear-gradient(180deg, rgba(255, 252, 244, 0.95), rgba(246, 239, 224, 0.95));
  color: #4a3f28;
  border-color: rgba(154, 127, 78, 0.55);
  font-weight: 600;
}

[data-theme="light"] .btn:hover,
[data-theme="light"] .filter-btn:hover {
  background: linear-gradient(180deg, #fdf9ee, #f3ecda);
  color: #2e2617;
  border-color: rgba(154, 127, 78, 0.9);
}

[data-theme="light"] .btn-primary,
[data-theme="light"] .filter-btn.active {
  background: linear-gradient(180deg, #b99a52, #9a7f4e);
  color: #fff;
  border-color: #8a7340;
}

[data-theme="light"] .section-tag {
  border-color: rgba(154, 127, 78, 0.6);
  color: #6f5c33;
}

[data-theme="light"] .tool-search input {
  background: rgba(255, 253, 248, 0.9);
}

/* 七元素徽章行（hero 装饰） */
.genshin-elements {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 20px;
}

.hero-content .genshin-elements {
  justify-content: flex-start;
}

.genshin-elements .el {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.genshin-elements .el i {
  font-style: normal;
  color: var(--el, var(--genshin-gold));
  font-size: 0.72rem;
}

/* ═══════════ 共建页 ═══════════ */
.contribute-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}

.contribute-h2 {
  font-size: 1.35rem;
  margin: 46px 0 18px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.contribute-h2::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--gradient-primary);
}

.contribute-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.contribute-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: var(--transition);
}

.contribute-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-purple);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
}

.contribute-icon {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.contribute-card h3 {
  font-size: 1.05rem;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.contribute-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0 0 14px;
  flex: 1;
}

.contribute-go {
  font-size: 0.85rem;
  color: var(--accent-purple);
  font-weight: 600;
}

.contribute-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.contribute-step {
  padding: 20px 22px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.step-num {
  font-family: Consolas, 'JetBrains Mono', monospace;
  font-size: 1.45rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.contribute-step h3 {
  font-size: 1rem;
  margin: 6px 0;
  color: var(--text-primary);
}

.contribute-step p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

.contribute-step code {
  font-family: Consolas, 'JetBrains Mono', monospace;
  font-size: 0.85em;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 0 5px;
  color: var(--accent-orange);
}

.contribute-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: -8px 0 14px;
}

.contributors {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.contributor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 78px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.contributor img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  transition: var(--transition);
}

.contributor:hover img {
  border-color: var(--accent-purple);
  transform: scale(1.06);
}

.contributor span {
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.contributors-loading {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.contributors-loading a {
  color: var(--accent-blue);
}

.contribute-rules {
  margin: 0;
  padding-left: 1.4em;
}

.contribute-rules li {
  margin-bottom: 8px;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-soft);
}

/* ═══════════ 笔记页 / 随笔页 评论区 ═══════════ */
.note-comments {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.note-comments h2 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.note-comments-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 18px;
  line-height: 1.7;
}

.note-comments-hint a {
  color: var(--accent-blue);
}

#comments {
  min-height: 120px;
}

@media (max-width: 480px) {
  .contribute-card { padding: 18px; }
  .contribute-h2 { font-size: 1.2rem; margin-top: 36px; }
  .contributor { width: 68px; }
  .contributor img { width: 48px; height: 48px; }
  .note-comments { margin-top: 36px; padding-top: 24px; }
}
