@import url('/fonts/lxgwwenkai.css');

:root {
  --ds-primary: #4176E6;
  --ds-primary-hover: #3260C7;
  --ds-primary-soft: rgba(65, 118, 230, 0.12);
  --ds-bg: #F9F8F8;
  --ds-text-primary: #1E232C;
  --ds-text-secondary: #57606A;
  --ds-text-muted: #8C95A0;
  --header-h: 56px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

html, body {
  background-color: #F9F8F8;
  color: #1E232C;
  overflow-x: clip;
  margin: 0;
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  min-height: 100%;
}

.font-display {
  font-family: 'LXGW WenKai', system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif !important;
  font-synthesis: none;
}

.font-brand {
  font-family: 'LXGW WenKai', system-ui, "PingFang SC", "Microsoft YaHei", sans-serif !important;
}

.tabular-numbers, .font-mono {
  font-variant-numeric: tabular-nums;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

::selection {
  background: #EEF4FF;
  color: #4176E6;
}

:focus-visible {
  outline: 2px solid var(--ds-primary);
  outline-offset: 3px;
  border-radius: 6px;
}

/* 顶部固定 Header 与滚动收窄 */
#mainHeader {
  background: rgba(249, 248, 248, 0.75);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

html.is-scrolled #mainHeader {
  background: rgba(249, 248, 248, 0.94);
  box-shadow: 0 1px 0 rgba(30, 35, 44, 0.04), 0 10px 28px -18px rgba(30, 35, 44, 0.28);
}

.ds-header-inner {
  height: var(--header-h);
  transition: height 0.3s var(--ease-out-expo);
}

/* 品牌字标 */
.brand-mark {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  color: var(--ds-primary);
}

.brand-text {
  font-family: 'LXGW WenKai', system-ui, "PingFang SC", "Microsoft YaHei", sans-serif !important;
  font-weight: 400;
  font-size: 19px;
  letter-spacing: 0.02em;
  color: var(--ds-primary);
}

/* 顶部滚动进度条 */
#scrollProgressBar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, #4176E6, #60A5FA, #38BDF8);
  transform: scaleX(0);
  transform-origin: left center;
  z-index: 60;
  will-change: transform;
}

/* 环境光 */
.ambient-base {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(70% 48% at 50% -8%, #DCE8F8 0%, rgba(249, 248, 248, 0) 72%), #F9F8F8;
}

.ambient-blob {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  will-change: transform;
}

.ambient-blob.a {
  width: 760px; height: 760px; margin: -380px 0 0 -380px;
  background: radial-gradient(circle at center, rgba(65, 118, 230, 0.13), rgba(65, 118, 230, 0) 62%);
  transform: translate3d(50vw, 26vh, 0);
}

.ambient-blob.b {
  width: 1180px; height: 1180px; margin: -590px 0 0 -590px;
  background: radial-gradient(circle at center, rgba(56, 189, 248, 0.10), rgba(56, 189, 248, 0) 66%);
  transform: translate3d(50vw, 34vh, 0);
}

/* 自定义双层鼠标光标 */
.cursor-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

#cursorArrow, #cursorGhost {
  position: fixed;
  left: 0; top: 0;
  width: 26px; height: 32px;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
  transform-origin: 0 0;
  z-index: 9999;
  transition: opacity 0.18s linear;
}

#cursorGhost { z-index: 9998; filter: blur(0.7px); }
#cursorGhost .cursor-path { opacity: 0.34; }
#cursorArrow svg, #cursorGhost svg { display: block; width: 100%; height: 100%; overflow: visible; }
#cursorArrow { filter: drop-shadow(0 1px 3px rgba(30, 35, 44, 0.22)) drop-shadow(0 0 9px rgba(65, 118, 230, 0.45)); }
#cursorArrow.is-visible, #cursorGhost.is-visible { opacity: 1; }
#cursorArrow.is-hover { filter: drop-shadow(0 1px 3px rgba(30, 35, 44, 0.25)) drop-shadow(0 0 14px rgba(34, 211, 238, 0.75)); }
#cursorArrow.is-hover .cursor-path { stroke-width: 2.3; }
#cursorArrow.is-down .cursor-path { stroke-width: 2.4; }
.cursor-path { transition: stroke-width 0.18s ease; }

html.has-cursor,
html.has-cursor body,
html.has-cursor a,
html.has-cursor button,
html.has-cursor input,
html.has-cursor .interactive-item { cursor: none !important; }

@media (hover: none), (pointer: coarse) {
  #cursorArrow, #cursorGhost { display: none; }
}

/* DeepSeek 极简卡片 + 3D 倾斜 + 局部聚光 */
.ds-card {
  --x: -1000px;
  --y: -1000px;
  position: relative;
  background-color: rgba(255, 255, 255, 0.88);
  background-image: radial-gradient(420px circle at var(--x) var(--y), var(--ds-primary-soft), rgba(65, 118, 230, 0) 62%);
  background-repeat: no-repeat;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 10px 32px -4px rgba(30, 35, 44, 0.05), 0 2px 6px rgba(30, 35, 44, 0.02);
  transition: box-shadow 0.35s var(--ease-out-expo), border-color 0.35s var(--ease-out-expo);
}

.ds-card.is-hovered {
  box-shadow: 0 20px 48px -8px rgba(65, 118, 230, 0.12), 0 4px 12px rgba(30, 35, 44, 0.04);
  border-color: rgba(65, 118, 230, 0.3);
}

/* 滚动错位入场动画 */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
  transition-delay: calc(var(--d, 0) * 70ms);
}
.reveal.is-in { opacity: 1; transform: none; }

/* 手风琴平滑展开与折叠 */
.expand-details {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.38s var(--ease-out-expo), opacity 0.3s ease;
}

.expand-details-inner {
  overflow: hidden;
}

.interactive-item:hover .expand-details, .ds-card:hover .expand-details {
  grid-template-rows: 1fr;
  opacity: 1;
}

/* 封面放大微动效 */
.cover-zoom {
  transition: transform 0.5s var(--ease-out-expo);
}
.group:hover .cover-zoom {
  transform: scale(1.05);
}

/* 磁性与筛选药丸 */
.filter-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  border: 1.5px solid rgba(229, 231, 235, 0.95);
  background: rgba(255, 255, 255, 0.9);
  color: #57606A;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  flex-shrink: 0;
  line-height: 1.2;
}

.filter-pill:hover {
  border-color: var(--ds-primary);
  color: var(--ds-primary);
  box-shadow: 0 2px 8px rgba(65, 118, 230, 0.12);
}

.filter-pill.active {
  background: var(--ds-primary);
  color: white;
  border-color: var(--ds-primary);
  box-shadow: 0 4px 12px rgba(65, 118, 230, 0.25);
}

/* 彻底隐藏滚动条但保留滑动能力 */
.scrollbar-none {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.scrollbar-none::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

#backToTopBtn {
  transition: opacity 0.3s ease, transform 0.3s var(--ease-out-expo), border-color 0.2s ease;
}
