/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #fafafa;
  color: #1a1a2e;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.navbar-inner {
  width: 100%;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #7c3aed, #00d4ff);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.3);
}

.logo-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo-text {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #0f172a;
  position: relative;
}

@keyframes logoShine {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

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

.nav-link {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: #4a4a6a;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover {
  color: #1a1a2e;
}

.badge-soon {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}


.nav-search {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #888;
  background: #f3f4f6;
  padding: 8px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: auto;
  min-width: 140px;
  white-space: nowrap;
}

.nav-search:hover {
  background: #e5e7eb;
  color: #555;
}

.nav-changelog {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #888;
  background: none;
  border: none;
  transition: all 0.2s;
  flex-shrink: 0;
  text-decoration: none;
  margin-left: 6px;
}

.nav-changelog:hover {
  color: #555;
}

.nav-social {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-github,
.nav-xiaohongshu {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #888;
  transition: all 0.2s;
}

.nav-github:hover,
.nav-xiaohongshu:hover {
  background: #e5e7eb;
  color: #333;
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 100%, rgba(59, 130, 246, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 10% 80%, rgba(249, 115, 22, 0.04) 0%, transparent 50%),
    #fafafa;
}

/* 背景网格 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-bg-blur {
  position: absolute;
  top: -200px;
  left: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(59, 130, 246, 0.06) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: blobFloat 20s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.10) 0%, rgba(236, 72, 153, 0.04) 40%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: blobFloat 25s ease-in-out infinite reverse;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
  padding: 6px 18px;
  border-radius: 20px;
  margin-bottom: 24px;
  border: 1px solid rgba(99, 102, 241, 0.15);
  letter-spacing: 0.3px;
}

.hero-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
  animation: tagDotPulse 2s ease-in-out infinite;
}

@keyframes tagDotPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(34, 197, 94, 0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 12px rgba(34, 197, 94, 0.8); }
}

.tag-icon {
  font-size: 14px;
}

.hero-title {
  font-size: 56px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
  color: #0f172a;
}

.hero-title-gradient {
  background: linear-gradient(135deg, #3b82f6, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 16px;
  color: #64748b;
  line-height: 1.8;
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-subtitle {
  font-size: 15px;
  color: #94a3b8;
  letter-spacing: 3px;
  margin-bottom: 28px;
  font-weight: 500;
}

/* Hero CTA Buttons */
.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}

.hero-btn {
  padding: 12px 28px;
  font-size: 15px;
  border-radius: 12px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  border: 1.5px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  color: #475569;
}

.btn-ghost:hover {
  border-color: #cbd5e1;
  background: #fff;
  color: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* ===== Hero Inline Stats ===== */
.hero-stats-inline {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 0;
}

.hero-stat-inline {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.hero-stat-num {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.hero-stat-txt {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
}

.hero-stat-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #cbd5e1;
}

/* ===== Floating Tech Tags ===== */
.hero-float-tags {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.float-tag {
  position: absolute;
  left: calc(50% + var(--x));
  top: calc(50% + var(--y));
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.75);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: floatTag 8s ease-in-out infinite;
  animation-delay: var(--delay);
  opacity: 0;
  animation-fill-mode: forwards;
  transition: transform 0.3s;
}

@keyframes floatTag {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 0.5; }
  50% { transform: translateY(-10px); opacity: 0.7; }
  90% { opacity: 0.5; }
  100% { transform: translateY(0); opacity: 0; }
}

.hero-buttons {
  display: flex;
  gap: 16px;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s;
}

.hero-scroll-hint:hover {
  color: #6366f1;
}

.hero-scroll-hint svg {
  animation: bounceDown 1.5s ease-in-out infinite;
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: #fff;
  color: #f97316;
  border: 1.5px solid #f97316;
}

.btn-outline:hover {
  background: #fff7ed;
  transform: translateY(-1px);
}

/* ===== Hero Stats ===== */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 48px;
  padding: 28px 48px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 32px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hero-stat-number {
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.hero-stat-label {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: #e5e7eb;
  flex-shrink: 0;
}

/* ===== Explore Section (Homepage) ===== */
.explore-section {
  padding: 36px 0 80px;
  background: #fff;
  scroll-margin-top: 80px;
}

.explore-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.explore-header {
  text-align: center;
  margin-bottom: 32px;
}

.explore-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
  padding: 6px 18px;
  border-radius: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(99, 102, 241, 0.12);
}

.explore-title {
  font-size: 36px;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.explore-desc {
  font-size: 16px;
  color: #64748b;
  line-height: 1.8;
  max-width: 560px;
  margin: 0 auto;
}

/* --- Explore Grid --- */
.explore-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* --- Explore Card --- */
.explore-card {
  position: relative;
  border-radius: 16px;
  padding: 28px;
  background: #fff;
  border: 1px solid #e8ecf1;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
  overflow: hidden;
}

.explore-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.explore-card-glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.3s;
}

.explore-card-tools .explore-card-glow {
  background: radial-gradient(circle, rgba(249, 115, 22, 0.12) 0%, transparent 70%);
}

.explore-card-papers .explore-card-glow {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
}

.explore-card-articles .explore-card-glow {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
}

.explore-card-flashcards .explore-card-glow {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
}

.explore-card-stat-intuition .explore-card-glow {
  background: radial-gradient(circle, rgba(244, 63, 94, 0.12) 0%, transparent 70%);
}

.explore-card:hover .explore-card-glow {
  opacity: 1;
}

.explore-card-content {
  position: relative;
  z-index: 1;
}

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

.explore-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.explore-card-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}

.explore-card-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: #3b82f6;
  margin-bottom: 0;
}

.explore-card-desc {
  font-size: 14px;
  color: #64748b;
  line-height: 1.7;
  margin-bottom: 16px;
}

/* --- Mini Tags --- */
.explore-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.explore-mini-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 500;
  color: var(--tag-color, #64748b);
  background: color-mix(in srgb, var(--tag-color, #64748b) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--tag-color, #64748b) 15%, transparent);
  padding: 4px 12px;
  border-radius: 16px;
  white-space: nowrap;
}

/* --- Card Arrow / CTA --- */
.explore-card-arrow {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: #3b82f6;
  transition: all 0.2s;
}

.explore-card:hover .explore-card-arrow {
  color: #2563eb;
  gap: 4px;
}

/* --- Coming Soon Card --- */
.explore-card-coming {
  opacity: 0.65;
  cursor: default;
}

.explore-card-coming:hover {
  transform: none;
  box-shadow: none;
  border-color: #e8ecf1;
}

.explore-card-badge-soon {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #94a3b8, #64748b);
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 1px;
  margin-top: 12px;
}

/* --- Full-width last card --- */
.explore-grid > .explore-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

/* --- Three-column grid --- */
.explore-grid-3 {
  grid-template-columns: repeat(3, 1fr) !important;
}

.explore-grid-3 > .explore-card:last-child:nth-child(odd) {
  grid-column: auto;
}

/* ===== Nav link active state ===== */
.nav-link.active {
  color: #3b82f6;
  font-weight: 600;
}

/* ===== Home Sections (贡献与反馈 / 更新日志) ===== */
.home-section {
  padding: 48px 0 0;
}

.home-section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

.home-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.home-section-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  color: #fff;
}

.home-section-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 16px;
}

.home-section-subtitle {
  font-size: 13px;
  color: #94a3b8;
}

.home-section-desc {
  font-size: 14px;
  color: #475569;
  line-height: 1.8;
  margin-bottom: 24px;
}

/* --- 贡献卡片 --- */
.home-contribute-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.home-contribute-card {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-contribute-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.home-contribute-icon {
  margin-bottom: 14px;
}

.home-contribute-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.home-contribute-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.home-contribute-link {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #3b82f6;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  word-break: break-all;
  width: 100%;
  margin-top: auto;
}

.home-contribute-link-a {
  text-decoration: none;
}

.home-contribute-link-a:hover {
  text-decoration: underline;
}

/* --- NEW 徽章 --- */
.new-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: #ef4444;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  vertical-align: super;
  line-height: 1;
  margin-left: 4px;
}

.new-badge-nav {
  position: absolute;
  top: -8px;
  right: -22px;
  z-index: 2;
  margin-left: 0;
  vertical-align: baseline;
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 20px;
}

/* --- 更新日志 --- */
.home-changelog-scroll {
  max-height: 300px;
  overflow-y: auto;
  padding: 4px 0;
}

.home-changelog-scroll::-webkit-scrollbar {
  width: 4px;
}

.home-changelog-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.home-changelog-scroll::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.home-changelog-entry {
  font-size: 13px;
  color: #475569;
  line-height: 1.8;
  margin: 0 0 12px;
}

.home-changelog-entry:last-child {
  margin-bottom: 0;
}

.home-changelog-date {
  color: #94a3b8;
  font-weight: 500;
  margin-right: 6px;
}

@media (max-width: 768px) {
  .home-contribute-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .home-contribute-card {
    padding: 16px 10px;
    border-radius: 12px;
  }

  .home-contribute-icon svg {
    width: 24px;
    height: 24px;
  }

  .home-contribute-title {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .home-contribute-desc {
    display: none;
  }

  .home-contribute-link {
    font-size: 11px;
    padding-top: 10px;
    word-break: break-all;
  }

  .home-section-inner {
    padding: 0 16px;
  }
}

/* ===== Search Modal ===== */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 999;
}

.search-overlay.active {
  display: block;
}

.search-modal {
  display: none;
  position: fixed;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  max-width: calc(100% - 32px);
  max-height: 70vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  overflow: hidden;
  display: none;
  flex-direction: column;
}

.search-modal.active {
  display: flex;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
}

.search-input-icon {
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: inherit;
  color: #0f172a;
  background: transparent;
}

.search-input::placeholder {
  color: #94a3b8;
}

.search-kbd {
  flex-shrink: 0;
  font-size: 11px;
  font-family: inherit;
  color: #94a3b8;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
  line-height: 1;
}

.search-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.search-empty {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
  font-size: 15px;
}

.search-empty-hint {
  font-size: 12px;
  margin-top: 8px;
  color: #cbd5e1;
}

.search-result-item {
  display: block;
  padding: 14px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}

.search-result-item:hover {
  background: #f8fafc;
}

.search-result-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.search-result-type {
  font-size: 11px;
  font-weight: 600;
  color: #3b82f6;
}

.search-result-tag {
  font-size: 11px;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
}

.search-result-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
  line-height: 1.4;
}

.search-result-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.search-highlight {
  background: #fef08a;
  color: #0f172a;
  border-radius: 2px;
  padding: 0 1px;
}

@media (max-width: 768px) {
  .search-modal {
    top: 5%;
    max-height: 80vh;
    border-radius: 12px;
  }
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid #f1f5f9;
  background: #fafafa;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.footer-brand-icon {
  width: 28px;
  height: 28px;
  background: #0f172a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-brand-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-slogan {
  font-size: 13px;
  color: #94a3b8;
  text-align: center;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: #3b82f6;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #94a3b8;
  transition: all 0.2s;
}

.footer-social a:hover {
  background: #f1f5f9;
  color: #475569;
}

.footer-divider {
  width: 100%;
  max-width: 400px;
  height: 1px;
  background: #f1f5f9;
}

.footer-copy {
  font-size: 12px;
  color: #cbd5e1;
}

/* ===== Back to Top Button ===== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 90;
  color: #64748b;
  -webkit-tap-highlight-color: transparent;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: rgba(255, 255, 255, 1);
  border-color: #3b82f6;
  color: #3b82f6;
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

.back-to-top:active {
  transform: translateY(0);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 70px;
    right: 18px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
}

/* ===== Loading Skeleton ===== */
.loading-skeleton {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 0;
}

.skeleton-card {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  padding: 24px;
  animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-line {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e8ecf1 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
}

.skeleton-line-short { width: 40%; }
.skeleton-line-medium { width: 65%; }
.skeleton-line-long { width: 90%; }

.skeleton-line + .skeleton-line {
  margin-top: 12px;
}

.skeleton-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e8ecf1 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

.skeleton-title {
  height: 20px;
  width: 50%;
  border-radius: 6px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e8ecf1 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes skeletonPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@media (max-width: 600px) {
  .footer-inner {
    padding: 32px 16px 24px;
    gap: 16px;
  }
  .footer-nav {
    gap: 16px;
  }
  .footer-nav a {
    font-size: 12px;
  }
}

/* ===== Mobile Search Button ===== */
.nav-search-mobile {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #4a4a6a;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.nav-search-mobile:hover {
  background: #f3f4f6;
  color: #1a1a2e;
}

.nav-search-mobile svg {
  width: 20px;
  height: 20px;
}

/* ===== Mobile Hamburger Menu ===== */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #4a4a6a;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.nav-hamburger:hover {
  background: #f3f4f6;
  color: #1a1a2e;
}

.nav-hamburger svg {
  width: 22px;
  height: 22px;
}

/* Mobile menu overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile slide-in menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: linear-gradient(180deg, #fafbff 0%, #ffffff 100%);
  z-index: 200;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.08);
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex-direction: column;
}

.mobile-menu.active {
  display: flex;
  right: 0;
}

/* 品牌头部 */
.mobile-menu-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  background: linear-gradient(135deg, #eff6ff 0%, #f0f4ff 50%, #faf5ff 100%);
  border-bottom: 1px solid rgba(59, 130, 246, 0.08);
}

.mobile-menu-brand-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c3aed, #00d4ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.mobile-menu-brand-name {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.mobile-menu-brand-desc {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 1px;
}

.mobile-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.8);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.mobile-menu-close:active {
  background: #e5e7eb;
  color: #334155;
}

/* 搜索按钮 */
.mobile-search-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 16px 0;
  padding: 11px 14px;
  background: #fff;
  border: 1.5px solid #e8edf5;
  border-radius: 12px;
  cursor: pointer;
  color: #94a3b8;
  font-size: 13px;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.mobile-search-btn:active {
  background: #f8fafc;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.mobile-search-btn svg {
  flex-shrink: 0;
  opacity: 0.6;
}

/* 导航链接 */
.mobile-menu-links {
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-menu-links .mobile-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  color: #4a4a6a;
  text-decoration: none;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.mobile-menu-links .mobile-link:active {
  background: #f1f5f9;
  color: #1a1a2e;
  transform: scale(0.98);
}

.mobile-menu-links .mobile-link.active {
  background: linear-gradient(135deg, #eff6ff, #f5f0ff);
  color: #3b82f6;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
}

.mobile-link-icon {
  width: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.mobile-link-icon svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.mobile-link-text {
  flex: 1;
}

.mobile-menu-links .mobile-link.active .mobile-link-text::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #3b82f6;
  border-radius: 50%;
  margin-left: 8px;
  vertical-align: middle;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* 社交卡片 */
.mobile-menu-social {
  display: flex;
  gap: 10px;
  padding: 8px 16px 12px;
  margin-top: 4px;
}

.mobile-social-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.mobile-social-card:active {
  background: #f1f5f9;
  transform: scale(0.97);
}

/* 底部 */
.mobile-menu-footer {
  margin-top: auto;
  padding: 16px 20px 24px;
  text-align: center;
}

.mobile-menu-footer-deco {
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
  border-radius: 3px;
  margin: 0 auto 12px;
}

.mobile-menu-footer p {
  font-size: 11px;
  color: #cbd5e1;
  margin: 0;
  letter-spacing: 0.3px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero-title {
    font-size: 42px;
  }

  .hero-stats-inline {
    gap: 16px;
  }

  .hero-stat-divider {
    display: none;
  }

  .float-tag {
    display: none;
  }

  .nav-links {
    display: none;
  }

  .nav-social {
    display: none;
  }

  .nav-search {
    display: none;
  }

  .nav-changelog {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-theme-mobile {
    display: flex;
    margin-left: auto;
    margin-right: 0;
  }

  .nav-search-mobile {
    display: flex;
    margin-left: 0;
    margin-right: 2px;
  }

  .mobile-menu-overlay {
    display: block;
  }

  .mobile-menu {
    display: block;
  }

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

  .explore-grid-3 {
    grid-template-columns: 1fr !important;
  }

  .explore-title {
    font-size: 28px;
  }
}

@media (max-width: 600px) {
  .navbar-inner {
    padding: 0 16px;
  }

  /* --- 手机端竖版封面 --- */
  .hero {
    position: relative;
    padding: 0;
    min-height: calc(100svh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    background:
      radial-gradient(ellipse 80% 50% at 50% 0%, rgba(99, 102, 241, 0.12) 0%, transparent 60%),
      radial-gradient(ellipse 60% 40% at 80% 100%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
      radial-gradient(ellipse 50% 50% at 10% 80%, rgba(249, 115, 22, 0.06) 0%, transparent 50%),
      linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
  }

  .hero::before {
    background-size: 40px 40px;
  }

  .hero .hero-bg-blur {
    display: none;
  }

  .hero::after {
    display: none;
  }

  .hero-inner {
    padding: 0 24px;
    width: 100%;
  }

  .hero-center {
    position: relative;
  }

  /* 装饰圆环 */
  .hero-center::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -10px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.10);
    pointer-events: none;
  }

  .hero-center::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.08) 0%, transparent 70%);
    pointer-events: none;
  }

  .hero-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 5px 14px;
    margin-bottom: 24px;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.12);
    color: #6366f1;
    letter-spacing: 0.5px;
  }

  .hero-title {
    font-size: 36px;
    margin-bottom: 10px;
    letter-spacing: -1px;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 13px;
    margin-bottom: 8px;
    color: #94a3b8;
    letter-spacing: 2px;
  }

  .hero-desc {
    font-size: 13px;
    margin-bottom: 24px;
    line-height: 1.7;
  }

  .hero-desc br {
    display: none;
  }

  .hero-cta-group {
    margin-bottom: 32px;
    gap: 10px;
  }

  .hero-btn {
    padding: 10px 22px;
    font-size: 14px;
  }

  .btn-ghost {
    padding: 10px 18px;
    font-size: 14px;
  }

  /* 统计数字 — 三列横排卡片 */
  .hero-stats-inline {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.08);
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.06);
    padding: 20px 8px;
    width: 100%;
  }

  .hero-stat-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
  }

  .hero-stat-num {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
  }

  .hero-stat-txt {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
  }

  .hero-stat-dot {
    width: 1px;
    height: 36px;
    border-radius: 1px;
    background: linear-gradient(180deg, transparent, #cbd5e1, transparent);
    flex-shrink: 0;
    align-self: center;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 280px;
  }

  /* 下滑箭头引导 */
  .hero-scroll-hint {
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 0;
    animation: scrollHintPulse 2.5s ease-in-out infinite;
  }

  .hero-scroll-hint svg {
    animation: bounceDown 1.5s ease-in-out infinite;
  }

  @keyframes scrollHintPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
  }

  /* --- 手机端卡片紧凑 --- */
  .explore-section {
    padding: 20px 0 40px;
  }

  .explore-inner {
    padding: 0 16px;
  }

  .explore-grid {
    gap: 12px;
  }

  .explore-title {
    font-size: 24px;
  }

  .explore-card {
    padding: 16px;
  }

  .explore-card-header {
    gap: 12px;
    margin-bottom: 10px;
  }

  .explore-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 20px;
  }

  .explore-card-info {
    /* no extra margin needed */
  }

  .explore-card-title {
    font-size: 17px;
    margin-bottom: 2px;
  }

  .explore-card-subtitle {
    font-size: 12px;
  }

  .explore-card-desc {
    display: none;
  }

  .explore-card-arrow {
    font-size: 13px;
  }
}


