/* ========== CSS 变量 ========== */
:root {
  --pink: #ff6b9d;
  --pink-light: #ffc2d9;
  --lavender: #a78bfa;
  --lavender-light: #ddd6fe;
  --sky: #7dd3fc;
  --sky-light: #bae6fd;
  --mint: #6ee7b7;
  --gold: #fbbf24;
  --ink: #3a2d4a;
  --ink-soft: #6b5d7a;
  --ink-mute: #9b8eaa;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-shadow: rgba(180, 120, 200, 0.18);
  --bg-grad: linear-gradient(135deg, #fce7f3 0%, #ede9fe 35%, #dbeafe 70%, #fef3c7 100%);
  --card-radius: 24px;
  --glow-pink: 0 0 30px rgba(255, 107, 157, 0.35);
  --glow-lavender: 0 0 30px rgba(167, 139, 250, 0.35);
  --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --ink: #e8e0f0;
  --ink-soft: #b8acc8;
  --ink-mute: #8b7e9e;
  --glass: rgba(40, 30, 60, 0.55);
  --glass-border: rgba(167, 139, 250, 0.25);
  --glass-shadow: rgba(120, 80, 160, 0.3);
  --bg-grad: linear-gradient(135deg, #1a1033 0%, #2d1b4e 35%, #1e1b4b 70%, #1a1230 100%);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans SC', 'Quicksand', sans-serif;
  color: var(--ink);
  background: var(--bg-grad);
  background-size: 200% 200%;
  min-height: 100vh;
  overflow-x: hidden;
  transition: color 0.4s ease;
}

/* 仅桌面端启用自定义光标和背景动画 */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
}

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

/* ========== 樱花画布 ========== */
#sakura-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 2;
  will-change: transform;
}

/* ========== 滚动进度条 ========== */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, var(--pink), var(--lavender), var(--sky));
  z-index: 999;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px var(--pink);
  will-change: width;
}

/* ========== 自定义光标 ========== */
#cursor-dot, #cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
}
#cursor-dot {
  width: 8px; height: 8px;
  margin-left: -4px;
  margin-top: -4px;
  background: var(--pink);
}
#cursor-ring {
  width: 36px; height: 36px;
  margin-left: -18px;
  margin-top: -18px;
  border: 2px solid var(--lavender);
  opacity: 0.6;
  transition: width 0.3s, height 0.3s, border-color 0.3s, background 0.3s;
}
#cursor-ring.expand {
  width: 56px; height: 56px;
  margin-left: -28px;
  margin-top: -28px;
  border-color: var(--pink);
  background: rgba(255, 107, 157, 0.1);
}

/* ========== 浮动装饰（仅桌面端，移动端隐藏省性能） ========== */
.float-deco {
  position: fixed;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
}
.float-deco svg { display: block; }
.deco-1 { top: 8%; left: 5%; animation: float1 8s ease-in-out infinite; }
.deco-2 { top: 20%; right: 8%; animation: float2 10s ease-in-out infinite; }
.deco-3 { bottom: 15%; left: 7%; animation: float1 9s ease-in-out infinite 2s; }
.deco-4 { bottom: 30%; right: 5%; animation: float2 11s ease-in-out infinite 1s; }
@media (max-width: 768px) {
  .float-deco { display: none; }
}

@keyframes float1 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-25px) rotate(15deg); }
}
@keyframes float2 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(20px) rotate(-15deg); }
}

/* ========== 主题切换按钮 ========== */
.theme-toggle {
  position: fixed;
  top: 24px; right: 24px;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 24px;
  cursor: none;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 4px 20px var(--glass-shadow);
}
.theme-toggle:hover {
  transform: scale(1.15) rotate(20deg);
  box-shadow: var(--glow-pink);
}
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* ========== 粒子切换按钮 ========== */
.particle-toggle {
  position: fixed;
  top: 24px; right: 88px;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 22px;
  cursor: none;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 4px 20px var(--glass-shadow);
}
.particle-toggle:hover {
  transform: scale(1.15) rotate(-20deg);
  box-shadow: var(--glow-lavender);
}

/* ========== 主容器 ========== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  position: relative;
  z-index: 10;
}

/* ========== 英雄区 ========== */
.hero {
  position: relative;
  text-align: center;
  padding: 60px 0 50px;
  border-radius: 28px;
  overflow: hidden;
  animation: heroFadeIn 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 英雄区背景层 */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

/* 背景图片/GIF（方式一：直接用 CSS 背景图或 <img> 标签） */
.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

/* 背景视频（方式二：<video> 标签自动循环播放） */
.hero-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

/* 遮罩层：轻微半透明，确保文字可读但不磨砂 */
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(253, 242, 248, 0.2) 0%,
    rgba(253, 242, 248, 0.35) 50%,
    rgba(253, 242, 248, 0.5) 100%
  );
}

/* 英雄区内容层级在背景之上 */
.hero > *:not(.hero-bg) {
  position: relative;
  z-index: 1;
}

/* 深色主题遮罩调整 */
[data-theme="dark"] .hero-bg-overlay {
  background: linear-gradient(
    180deg,
    rgba(26, 26, 46, 0.25) 0%,
    rgba(26, 26, 46, 0.4) 50%,
    rgba(26, 26, 46, 0.55) 100%
  );
}

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

.avatar-wrapper {
  position: relative;
  width: 160px; height: 160px;
  margin: 0 auto 24px;
}

.avatar-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--pink), var(--lavender), var(--sky), var(--mint), var(--pink));
  animation: spin 6s linear infinite;
  opacity: 0.8;
}
.avatar-ring::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--bg-grad);
}

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

.avatar-img {
  position: relative;
  width: 160px; height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--glass-border);
  box-shadow: 0 8px 40px rgba(255, 107, 157, 0.4);
  z-index: 2;
  transition: var(--transition);
}
.avatar-img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 50px rgba(167, 139, 250, 0.6);
}

.avatar-badge {
  position: absolute;
  bottom: 8px; right: 8px;
  width: 32px; height: 32px;
  background: var(--mint);
  border-radius: 50%;
  border: 3px solid var(--glass-border);
  z-index: 3;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(110, 231, 183, 0.6); }
  50% { box-shadow: 0 0 0 8px rgba(110, 231, 183, 0); }
}

.hero h1 {
  font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif;
  font-size: 2.8rem;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--pink), var(--lavender), var(--sky));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
}

.hero .title-emoji {
  display: inline-block;
  animation: wave 2.5s ease-in-out infinite;
  transform-origin: 70% 70%;
}

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(14deg); }
  50% { transform: rotate(-4deg); }
  60% { transform: rotate(10deg); }
}

.hero .tagline {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
  min-height: 1.8em;
  font-weight: 400;
}

.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background: var(--pink);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.hero .subtitle {
  font-size: 0.92rem;
  color: var(--ink-mute);
  margin-bottom: 24px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.social-link {
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1.5px solid var(--glass-border);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 20px;
  transition: var(--transition);
  box-shadow: 0 4px 16px var(--glass-shadow);
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .social-link {
  background: rgba(40, 30, 60, 0.6);
}
.social-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--pink), var(--lavender));
  opacity: 0;
  transition: opacity 0.4s;
  z-index: -1;
}
.social-link:hover {
  transform: translateY(-6px) scale(1.1);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--glow-pink);
}
.social-link:hover::before { opacity: 1; z-index: 0; }
.social-link svg { position: relative; z-index: 1; }

/* ========== 卡片网格 ========== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 20px;
}

.card {
  background: rgba(255, 255, 255, 0.72);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--card-radius);
  padding: 28px;
  box-shadow: 0 8px 32px var(--glass-shadow);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s;
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(50px);
}
.card.visible {
  opacity: 1;
  transform: translateY(0);
}
[data-theme="dark"] .card {
  background: rgba(40, 30, 60, 0.72);
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--pink), var(--lavender), var(--sky));
  opacity: 0;
  transition: opacity 0.4s;
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px var(--glass-shadow), var(--glow-lavender);
  border-color: var(--pink-light);
}
.card:hover::before { opacity: 1; }

.card-full { grid-column: 1 / -1; }

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

.card-icon {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 22px;
  flex-shrink: 0;
}
.icon-pink { background: var(--pink-light); }
.icon-lavender { background: var(--lavender-light); }
.icon-sky { background: var(--sky-light); }
.icon-mint { background: #a7f3d0; }
.icon-gold { background: #fef3c7; }
[data-theme="dark"] .icon-pink { background: rgba(255,107,157,0.2); }
[data-theme="dark"] .icon-lavender { background: rgba(167,139,250,0.2); }
[data-theme="dark"] .icon-sky { background: rgba(125,211,252,0.2); }
[data-theme="dark"] .icon-mint { background: rgba(110,231,183,0.2); }
[data-theme="dark"] .icon-gold { background: rgba(251,191,36,0.2); }

.card-title {
  font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif;
  font-size: 1.3rem;
  color: var(--ink);
  letter-spacing: 1px;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--ink-mute);
  margin-top: 2px;
}

/* ========== 关于我卡片 ========== */
.about-text {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--ink-soft);
}
.about-text p { margin-bottom: 12px; }
.about-text p:last-child { margin-bottom: 0; }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  background: linear-gradient(135deg, var(--pink-light), var(--lavender-light));
  color: var(--ink);
  border: 1px solid transparent;
  transition: var(--transition);
  cursor: none;
}
.tag:hover {
  transform: scale(1.1);
  box-shadow: var(--glow-pink);
}
[data-theme="dark"] .tag {
  background: linear-gradient(135deg, rgba(255,107,157,0.2), rgba(167,139,250,0.2));
  color: var(--ink);
}

/* ========== 技能卡片 ========== */
.skill-item {
  margin-bottom: 18px;
}
.skill-item:last-child { margin-bottom: 0; }

.skill-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.skill-name {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-percent {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--pink);
  font-family: 'Quicksand', sans-serif;
}

.skill-bar {
  height: 10px;
  background: rgba(167, 139, 250, 0.15);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.skill-fill {
  height: 100%;
  border-radius: 10px;
  width: 0;
  position: relative;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.skill-emoji { font-size: 1.1rem; }

/* ========== 统计卡片 ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-item {
  text-align: center;
  padding: 16px 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.3);
  transition: var(--transition);
  border: 1px solid transparent;
}
[data-theme="dark"] .stat-item {
  background: rgba(167, 139, 250, 0.08);
}
.stat-item:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.5);
  border-color: var(--glass-border);
}
[data-theme="dark"] .stat-item:hover {
  background: rgba(167, 139, 250, 0.15);
}

.stat-number {
  font-family: 'Quicksand', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--pink), var(--lavender));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--ink-mute);
  margin-top: 4px;
}

.stat-suffix {
  font-size: 1.2rem;
  background: linear-gradient(135deg, var(--pink), var(--lavender));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ========== 友情链接卡片 ========== */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.3);
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: var(--transition);
  cursor: none;
  overflow: hidden;
  min-width: 0;
}
[data-theme="dark"] .link-item {
  background: rgba(167, 139, 250, 0.08);
}
.link-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.6);
  border-color: var(--glass-border);
  box-shadow: 0 8px 28px var(--glass-shadow);
}
[data-theme="dark"] .link-item:hover {
  background: rgba(167, 139, 250, 0.18);
}

.link-avatar {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif;
  transition: var(--transition);
}
.link-item:hover .link-avatar {
  transform: scale(1.1) rotate(-5deg);
}
.link-1 { background: linear-gradient(135deg, #ff6b9d, #ff9ecd); }
.link-2 { background: linear-gradient(135deg, #a78bfa, #c4b5fd); }
.link-3 { background: linear-gradient(135deg, #7dd3fc, #93c5fd); }
.link-4 { background: linear-gradient(135deg, #fbbf24, #fcd34d); }
.link-5 { background: linear-gradient(135deg, #6ee7b7, #5eead4); }
.link-6 { background: linear-gradient(135deg, #f472b6, #fb923c); }
.link-7 { background: linear-gradient(135deg, #6366f1, #818cf8); }
.link-8 { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.link-9 { background: linear-gradient(135deg, #ec4899, #f472b6); }

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

/* ========== AI工具导航 ========== */
.ai-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.ai-tool-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.3);
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: var(--transition);
  cursor: none;
  overflow: hidden;
  min-width: 0;
}
[data-theme="dark"] .ai-tool-item {
  background: rgba(110, 231, 183, 0.06);
}
.ai-tool-item:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.6);
  border-color: var(--glass-border);
  box-shadow: 0 6px 20px var(--glass-shadow);
}
[data-theme="dark"] .ai-tool-item:hover {
  background: rgba(110, 231, 183, 0.14);
}
.ai-tool-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  color: #fff;
  transition: var(--transition);
}
.ai-tool-item:hover .ai-tool-icon {
  transform: scale(1.1) rotate(5deg);
}
.ai-tool-info { min-width: 0; flex: 1; }
.ai-tool-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-tool-desc {
  font-size: 0.7rem;
  color: var(--ink-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-tools-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  border-radius: 14px;
  border: 1.5px dashed var(--glass-border);
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: none;
  transition: var(--transition);
}
.ai-tools-toggle:hover {
  border-color: var(--mint);
  color: var(--mint);
  background: rgba(110, 231, 183, 0.06);
}
.ai-toggle-icon {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 0.7rem;
}
.link-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-desc {
  font-size: 0.76rem;
  color: var(--ink-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== 音乐播放器卡片 ========== */
.music-player {
  display: flex;
  align-items: center;
  gap: 16px;
}

.music-cover {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--pink), var(--lavender), var(--sky));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  position: relative;
  animation: musicSpin 4s linear infinite;
  animation-play-state: paused;
}
.music-cover.playing { animation-play-state: running; }

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

.music-info { flex: 1; min-width: 0; }
.music-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music-artist {
  font-size: 0.8rem;
  color: var(--ink-mute);
}

.music-progress {
  height: 4px;
  background: rgba(167, 139, 250, 0.2);
  border-radius: 4px;
  margin-top: 8px;
  overflow: hidden;
}
.music-progress-fill {
  height: 100%;
  width: 35%;
  background: linear-gradient(90deg, var(--pink), var(--lavender));
  border-radius: 4px;
  animation: musicProgress 30s linear infinite;
  animation-play-state: paused;
}
.music-progress-fill.playing { animation-play-state: running; }

@keyframes musicProgress {
  from { width: 0%; }
  to { width: 100%; }
}

.music-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.music-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--pink), var(--lavender));
  color: #fff;
  font-size: 16px;
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
}
.music-btn:hover { transform: scale(1.15); }
.music-btn.secondary {
  background: var(--glass);
  color: var(--ink-soft);
  border: 1.5px solid var(--glass-border);
  box-shadow: none;
  width: 36px; height: 36px;
  font-size: 14px;
}

/* ========== 时间线卡片 ========== */
.timeline {
  position: relative;
  padding-left: 24px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--pink), var(--lavender), var(--sky));
}

.timeline-item {
  position: relative;
  padding-bottom: 20px;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -24px; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--glass);
  border: 3px solid var(--pink);
  box-shadow: 0 0 12px rgba(255, 107, 157, 0.4);
}

.timeline-date {
  font-size: 0.78rem;
  color: var(--pink);
  font-weight: 600;
  font-family: 'Quicksand', sans-serif;
  margin-bottom: 4px;
}
.timeline-content {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.6;
}
.timeline-content strong { color: var(--ink); }

/* ========== 时钟卡片 ========== */
.clock-card {
  text-align: center;
}
.clock-time {
  font-family: 'Quicksand', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--pink), var(--lavender), var(--sky));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
  line-height: 1.2;
}
.clock-seconds {
  font-size: 1.6rem;
  opacity: 0.7;
}
.clock-date {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 6px;
}
.clock-greeting {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  background: linear-gradient(135deg, var(--pink-light), var(--lavender-light));
  color: var(--ink);
}
[data-theme="dark"] .clock-greeting {
  background: linear-gradient(135deg, rgba(255,107,157,0.2), rgba(167,139,250,0.2));
}

/* ========== 弹幕留言板 ========== */
.danmaku-stage {
  position: relative;
  height: 300px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(252, 231, 243, 0.35), rgba(237, 233, 254, 0.35), rgba(219, 234, 254, 0.35));
  overflow: hidden;
  border: 1.5px solid var(--glass-border);
}
[data-theme="dark"] .danmaku-stage {
  background: linear-gradient(135deg, rgba(26, 16, 51, 0.4), rgba(45, 27, 78, 0.4), rgba(30, 27, 75, 0.4));
}
.danmaku-stage::before {
  content: '弹幕飞过中...';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.85rem;
  color: var(--ink-mute);
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.3s;
}
.danmaku-stage.has-danmaku::before { opacity: 0; }

.danmaku-track {
  position: absolute;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 3px 12px;
  border-radius: 20px;
  will-change: transform;
  pointer-events: none;
  left: 0;
  border: 1px solid transparent;
}

.danmaku-input-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.danmaku-input {
  flex: 1;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1.5px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
  cursor: none;
}
.danmaku-input::placeholder { color: var(--ink-mute); }
.danmaku-input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.15);
}
.danmaku-send {
  padding: 12px 24px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--pink), var(--lavender));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: none;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
  white-space: nowrap;
}
.danmaku-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 157, 0.5);
}
.danmaku-send:active { transform: translateY(0); }

/* 违规提示 toast */
.danmaku-toast {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding: 14px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(220, 38, 38, 0.95));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(239, 68, 68, 0.35);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 90vw;
}
.danmaku-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
  .danmaku-input-row { flex-direction: column; }
  .danmaku-send { width: 100%; }
}

/* ========== 鼠标点击特效 ========== */
#click-fx-layer {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9998;
  overflow: hidden;
}
.click-particle {
  position: absolute;
  pointer-events: none;
  will-change: transform, opacity;
  font-size: 14px;
  user-select: none;
}

/* ========== 番剧推荐轮播 ========== */
.anime-carousel {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 280px;
}
.anime-slides {
  position: relative;
  min-height: 280px;
}
.anime-slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 20px;
  border-radius: 18px;
}
.anime-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.anime-slide-bg {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  opacity: 0.12;
  z-index: 0;
}
.anime-cover {
  width: 110px;
  height: 160px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  position: relative;
  z-index: 1;
}
.anime-info {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.anime-title {
  font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif;
  font-size: 1.35rem;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: 1px;
}
.anime-genre {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.anime-genre-tag {
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 500;
  color: #fff;
}
.anime-desc {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.anime-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--ink-mute);
}
.anime-rating-num {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.anime-more {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}
.anime-more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 22px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,107,157,0.12), rgba(167,139,250,0.12));
  border: 1.5px solid rgba(255,107,157,0.2);
  color: var(--pink);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: none;
}
.anime-more-link:hover {
  background: linear-gradient(135deg, var(--pink), var(--lavender));
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,107,157,0.3);
}
.anime-more-link svg {
  transition: transform 0.3s ease;
}
.anime-more-link:hover svg {
  transform: translateX(4px);
}
.anime-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.anime-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.25);
  border: none;
  cursor: none;
  transition: var(--transition);
  padding: 0;
}
.anime-dot.active {
  width: 28px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--pink), var(--lavender));
}
.anime-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink-soft);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  transition: var(--transition);
  z-index: 5;
  box-shadow: 0 4px 16px var(--glass-shadow);
}
.anime-arrow:hover {
  background: linear-gradient(135deg, var(--pink), var(--lavender));
  color: #fff;
  border-color: transparent;
  box-shadow: var(--glow-pink);
}
.anime-arrow-prev { left: 8px; }
.anime-arrow-next { right: 8px; }

@media (max-width: 768px) {
  .anime-slide { flex-direction: column; text-align: center; padding: 16px; }
  .anime-cover { width: 90px; height: 130px; font-size: 2.2rem; }
  .anime-title { font-size: 1.15rem; }
  .anime-genre { justify-content: center; }
  .anime-arrow { width: 34px; height: 34px; font-size: 15px; }
}

/* ========== 页脚 ========== */
.footer {
  text-align: center;
  padding: 40px 20px 20px;
  color: var(--ink-mute);
  font-size: 0.85rem;
  position: relative;
  z-index: 10;
}
.footer .heart {
  color: var(--pink);
  display: inline-block;
  animation: heartbeat 1.2s ease-in-out infinite;
}
.footer-runtime {
  color: var(--ink-soft);
}
.footer-runtime span {
  font-weight: 600;
  color: var(--lavender);
}
.footer-icp {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.icp-link {
  color: var(--ink-mute);
  text-decoration: none;
  font-size: 0.76rem;
  transition: color 0.3s ease;
  cursor: none;
}
.icp-link:hover {
  color: var(--pink);
}
.icp-divider {
  color: var(--ink-mute);
  font-size: 0.76rem;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.3); }
  30% { transform: scale(1); }
  45% { transform: scale(1.25); }
  60% { transform: scale(1); }
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  body { cursor: auto; }
  #cursor-dot, #cursor-ring { display: none; }
  .hero h1 { font-size: 2rem; }
  .avatar-wrapper, .avatar-img { width: 130px; height: 130px; }
  .cards-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .links-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .ai-tools-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .theme-toggle { width: 44px; height: 44px; font-size: 20px; }
  .particle-toggle { width: 44px; height: 44px; font-size: 18px; right: 76px; }
  .card { padding: 22px; }
  .container { padding: 30px 16px 60px; }
}

@media (max-width: 480px) {
  .links-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-number { font-size: 1.6rem; }
  .social-link { width: 42px; height: 42px; font-size: 18px; }
}

/* ========== 滚动条 ========== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--pink), var(--lavender));
  border-radius: 4px;
}

/* ========== 无障碍：屏幕阅读器专用 ========== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
