/* ============================================================
 * AIOVTUE 导航站 · 主样式
 * 视觉母题：樱花 + 玻璃拟态 + 温柔圆角
 * ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-display);
  background:
    radial-gradient(ellipse 65% 55% at 12% 8%, var(--hero-grad-1), transparent 70%),
    radial-gradient(ellipse 60% 55% at 88% 92%, var(--hero-grad-2), transparent 70%),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}
::selection { background: var(--primary-soft); color: var(--text); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ---------- 加载动画 ---------- */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; transition: opacity 0.2s, visibility 0.2s;
}
.loader.done { opacity: 0; visibility: hidden; display: none; }
.loader-sakura { width: 44px; height: 44px; position: relative; animation: loaderSpin 2.4s linear infinite; }
.loader-sakura svg { width: 100%; height: 100%; }
.loader-text { font-size: 13px; color: var(--text-soft); letter-spacing: 3px; }
@keyframes loaderSpin { to { transform: rotate(360deg); } }

/* 原来 .hero::before 单独定义在背景装饰块，删除避免重复（已合并到 .hero 自身） */

/* ---------- 顶栏 ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.nav-inner {
  max-width: 1320px; margin: 0 auto; padding: 0 22px;
  height: 62px; display: flex; align-items: center; gap: 18px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: 0.5px; }
.nav-logo svg { width: 26px; height: 26px; flex-shrink: 0; }
.nav-logo .sakura-dot { color: var(--primary); }
.nav-menu { display: flex; gap: 4px; margin-left: 8px; }
.nav-item {
  padding: 7px 14px; border-radius: 999px; font-size: 14px; color: var(--text-soft);
  transition: all var(--transition); border: none; background: transparent;
}
.nav-item:hover { color: var(--text); background: var(--chip-bg); }
.nav-item.active { color: var(--primary-strong); background: var(--primary-soft); font-weight: 600; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-search { position: relative; width: 230px; }
.nav-search input {
  width: 100%; padding: 8px 14px 8px 36px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--bg-card);
  color: var(--text); font-size: 13px; outline: none;
  transition: border var(--transition), box-shadow var(--transition);
}
.nav-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.nav-search .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-faint); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text-soft);
  transition: all var(--transition);
}
.icon-btn:hover { color: var(--primary-strong); border-color: var(--primary); transform: translateY(-1px); }
.icon-btn svg { width: 17px; height: 17px; }

/* 主题切换面板 */
.theme-pop {
  position: absolute; top: 50px; right: 0; z-index: 120;
  background: var(--bg-card-solid); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow);
  padding: 14px; width: 260px; opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all var(--transition);
}
.theme-pop.open { opacity: 1; visibility: visible; transform: translateY(0); }
.theme-pop-title { font-size: 12px; color: var(--text-faint); margin-bottom: 10px; letter-spacing: 1px; }
.theme-option {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px;
  cursor: pointer; transition: background var(--transition);
}
.theme-option:hover { background: var(--bg-soft); }
.theme-option.active { background: var(--primary-soft); }
.theme-swatch { width: 34px; height: 24px; border-radius: 6px; border: 1px solid var(--border-strong); flex-shrink: 0; }
.theme-option-name { font-size: 13px; font-weight: 600; }
.theme-option-sub { font-size: 11px; color: var(--text-faint); }

/* ---------- Hero（铺满整个视口，无左右空白、无边框线，内容垂直水平居中） ---------- */
.hero {
  width: 100%; margin: 0; padding: 40px 22px;
  text-align: center; position: relative; z-index: 1;
  min-height: calc(100vh - 56px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-sizing: border-box;
}

/* ---------- 子页面头部（page-hero） ---------- */
.page-hero {
  max-width: 1320px; margin: 0 auto; padding: 40px 22px 18px;
  display: flex; align-items: center; gap: 18px;
}
.page-hero-icon {
  width: 62px; height: 62px; flex-shrink: 0; border-radius: 18px;
  background: var(--primary-soft); color: var(--primary-strong);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform var(--transition);
}
.page-hero-icon:hover { transform: scale(1.05) rotate(-3deg); }
.page-hero-icon svg { width: 30px; height: 30px; }
.page-hero-title {
  font-size: 28px; font-weight: 800; letter-spacing: 0.5px;
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  color: var(--text);
}
.page-hero-count {
  font-size: 14px; font-weight: 500; color: var(--text-soft);
  background: var(--bg-card); padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--border);
}
.page-hero-count b { color: var(--primary-strong); font-weight: 700; font-size: 15px; margin: 0 2px; }
.page-hero-sub { font-size: 13.5px; color: var(--text-soft); margin-top: 6px; }

/* 子页内嵌搜索框 */
.page-search { max-width: 1320px; margin: 0 auto; padding: 0 22px 24px; }
.page-search-wrap {
  position: relative; display: flex; align-items: center; max-width: 520px;
}
.page-search-wrap .search-icon {
  position: absolute; left: 14px; color: var(--text-faint);
  pointer-events: none; display: inline-flex;
}
.page-search-wrap .search-icon svg { width: 18px; height: 18px; }
.page-search-wrap input {
  width: 100%; padding: 11px 16px 11px 42px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--bg-card-solid);
  color: var(--text); font-size: 14px; outline: none;
  transition: all var(--transition);
}
.page-search-wrap input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 999px; font-size: 12px;
  background: var(--chip-bg); color: var(--text-soft);
  border: 1px solid var(--border);
}
.hero-tag .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.hero-scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--text-faint); font-size: 11px; letter-spacing: 2px;
  cursor: pointer; transition: color var(--transition);
  animation: scrollHint 2s ease-in-out infinite;
}
.hero-scroll svg { width: 16px; height: 16px; }
.hero-scroll:hover { color: var(--primary-strong); }
@keyframes scrollHint {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.7; }
  50% { transform: translateX(-50%) translateY(5px); opacity: 1; }
}
.hero h1 {
  margin-top: 22px; font-size: clamp(34px, 6vw, 56px); font-weight: 800;
  letter-spacing: 1px; line-height: 1.2; color: var(--text);
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--primary-strong), var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent;
}
.hero-sub { margin-top: 14px; font-size: 15px; color: var(--text-soft); }
.hero-quote {
  margin: 26px auto 0; max-width: 560px;
  font-family: var(--font-serif); font-size: 16px; color: var(--text-soft);
  min-height: 28px; position: relative;
}
.hero-quote::before { content: '「'; color: var(--primary); }
.hero-quote::after { content: '」'; color: var(--primary); }
.hero-stats {
  margin-top: 34px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;
}
.stat-chip {
  padding: 8px 20px; border-radius: 999px; font-size: 13px;
  background: var(--bg-card); border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.stat-chip b { color: var(--primary-strong); font-weight: 700; margin-right: 4px; }
.hero-actions { margin-top: 30px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 26px; border-radius: 999px; font-size: 14px; font-weight: 600;
  transition: all var(--transition);
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px var(--primary-soft); }
.btn-primary:hover { background: var(--primary-strong); transform: translateY(-2px); }
.btn-ghost { background: var(--bg-card); border: 1px solid var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-strong); transform: translateY(-2px); }
.btn-icon { padding: 8px 10px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text); }
.btn-icon:hover { color: var(--primary-strong); border-color: var(--primary); }
.btn-icon svg { width: 16px; height: 16px; }

/* ---------- 区块 ---------- */
.section { max-width: 1320px; margin: 0 auto; padding: 34px 22px 10px; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; }
.section-title { font-size: 24px; font-weight: 800; letter-spacing: 0.5px; }
.section-title .en { font-size: 12px; color: var(--text-faint); font-weight: 400; margin-left: 8px; letter-spacing: 2px; }
.section-sub { font-size: 13px; color: var(--text-soft); }
.section-more { margin-left: auto; font-size: 13px; color: var(--text-faint); cursor: pointer; transition: color var(--transition); }
.section-more:hover { color: var(--primary-strong); }

/* ---------- 导航卡片 ---------- */
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.link-card {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: var(--radius-md);
  background: var(--bg-card); border: 1px solid var(--border);
  backdrop-filter: blur(8px); overflow: hidden;
  transition: all var(--transition);
}
.link-card::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 3px;
  background: var(--link-color, var(--primary)); opacity: 0; transition: opacity var(--transition);
}
.link-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--border-strong);
}
.link-card:hover::after { opacity: 1; }
.link-avatar {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: var(--bg-soft); border: 1px solid var(--border);
  font-weight: 700; font-size: 18px; color: var(--link-color, var(--primary));
}
.link-avatar img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.link-info { min-width: 0; flex: 1; }
.link-name { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-desc { font-size: 12px; color: var(--text-faint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-go { margin-left: auto; width: 26px; height: 26px; flex-shrink: 0; color: var(--text-faint); opacity: 0; transform: translateX(-4px); transition: all var(--transition); }
.link-card:hover .link-go { opacity: 1; transform: translateX(0); color: var(--primary-strong); }

/* ---------- 工具卡片 ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.tool-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px; border-radius: var(--radius-md);
  background: var(--bg-card); border: 1px solid var(--border);
  cursor: pointer; transition: all var(--transition);
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--tool-color, var(--primary)); }
.tool-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--tool-color, var(--primary)); color: #fff;
}
.tool-icon svg { width: 21px; height: 21px; }
.tool-name { font-size: 14.5px; font-weight: 600; }
.tool-desc { font-size: 12px; color: var(--text-faint); line-height: 1.5; }

/* ---------- 工具弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 22px; opacity: 0; visibility: hidden; transition: all 0.25s;
}
.modal-mask.open { opacity: 1; visibility: visible; }
.modal {
  width: min(680px, 94vw); max-height: 88vh; overflow-y: auto;
  background: var(--bg-card-solid); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow-hover);
  transform: translateY(14px) scale(0.98); transition: transform 0.25s;
  display: flex; flex-direction: column;
}
.modal-mask.open .modal { transform: translateY(0) scale(1); }
.modal-head {
  display: flex; align-items: center; gap: 12px; padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-head .tool-icon { width: 34px; height: 34px; border-radius: 9px; }
.modal-head .tool-icon svg { width: 17px; height: 17px; }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close {
  margin-left: auto; width: 30px; height: 30px; border-radius: 50%;
  border: none; background: var(--bg-soft); color: var(--text-soft);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--err); color: #fff; }
.modal-body { padding: 22px 24px; flex: 1; }

/* 工具通用控件 */
.tool-input, .tool-textarea, .tool-select {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--bg-soft);
  color: var(--text); font-size: 13px; outline: none; transition: all var(--transition);
}
.tool-textarea { min-height: 130px; resize: vertical; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; }
.tool-input:focus, .tool-textarea:focus, .tool-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field { margin-bottom: 16px; }
.field-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-soft); margin-bottom: 7px; letter-spacing: 0.5px; }
.tool-output {
  margin-top: 14px; padding: 14px; border-radius: 10px;
  background: var(--code-bg); border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-all; max-height: 260px; overflow-y: auto;
  display: none;
}
.tool-output.show { display: block; }
.tool-output.ok { border-color: var(--ok); }
.tool-output.err { border-color: var(--err); color: var(--err); }
.tool-hint { font-size: 11px; color: var(--text-faint); margin-top: 8px; }
.tool-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tool-row .grow { flex: 1; min-width: 160px; }
.swatch-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.swatch { width: 52px; height: 52px; border-radius: 10px; border: 1px solid var(--border-strong); cursor: pointer; transition: transform var(--transition); }
.swatch:hover { transform: scale(1.08); }
.color-code { font-family: var(--font-mono); font-size: 12px; color: var(--text-soft); margin-top: 8px; }
.qr-box { display: flex; justify-content: center; padding: 16px 0; }
.qr-box canvas { border-radius: 10px; background: #fff; padding: 10px; }
.md-preview {
  margin-top: 14px; padding: 18px; border-radius: 10px;
  background: var(--bg-card-solid); border: 1px solid var(--border);
}
.md-preview h1, .md-preview h2, .md-preview h3 { margin: 14px 0 8px; line-height: 1.4; }
.md-preview h1 { font-size: 22px; } .md-preview h2 { font-size: 18px; } .md-preview h3 { font-size: 15px; }
.md-preview p { margin: 8px 0; }
.md-preview ul, .md-preview ol { padding-left: 22px; margin: 8px 0; }
.md-preview code { background: var(--code-bg); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 12px; }
.md-preview pre { background: var(--code-bg); padding: 14px; border-radius: 10px; overflow-x: auto; margin: 10px 0; }
.md-preview pre code { background: none; padding: 0; }
.md-preview blockquote { border-left: 3px solid var(--primary); padding-left: 14px; color: var(--text-soft); margin: 10px 0; }
.md-preview a { color: var(--primary-strong); text-decoration: underline; }
.md-preview table { border-collapse: collapse; margin: 10px 0; }
.md-preview th, .md-preview td { border: 1px solid var(--border-strong); padding: 6px 12px; font-size: 13px; }

/* ---------- 关于 / 配置说明 ---------- */
.about-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 28px 32px; backdrop-filter: blur(8px);
}
.about-card h3 {
  font-size: 15px; font-weight: 700; margin: 22px 0 10px;
  padding-left: 12px; border-left: 3px solid var(--primary);
}
.about-card h3:first-child { margin-top: 0; }
.about-card p { font-size: 13.5px; color: var(--text-soft); margin-bottom: 8px; line-height: 1.85; }
.about-card em { color: var(--primary-strong); font-style: normal; font-weight: 600; }
.about-card code { background: var(--code-bg); padding: 2px 7px; border-radius: 4px; font-family: var(--font-mono); font-size: 12.5px; color: var(--primary-strong); }
.about-card pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin: 12px 0; overflow-x: auto; }
.about-card pre code { background: none; padding: 0; color: var(--text); font-size: 12.5px; line-height: 1.7; }
.about-card a { color: var(--primary-strong); text-decoration: underline; }
.about-card a:hover { color: var(--primary); }

/* ---------- 页脚（极简） ---------- */
.footer {
  margin-top: 0; padding: 0 22px;
  border-top: none;
  background: transparent;
}
.footer-inner { max-width: 1320px; margin: 0 auto; text-align: center; min-height: 0; }
.footer-line { font-size: 12.5px; color: var(--text-faint); }
.footer-line b { color: var(--text-soft); font-weight: 600; margin: 0 3px; }
.footer-line a { color: var(--primary-strong); text-decoration: underline; }
.footer-line a:hover { color: var(--primary); }

/* ---------- 音乐播放器 v14（Apple Music 风格：封面+信息并排，圆角卡片） ---------- */
.music-pop {
  position: fixed; left: 20px; bottom: 80px; z-index: 410;
  width: 380px; padding: 0; border-radius: 22px;
  background: var(--bg-card-solid);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  opacity: 0; visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}
.music-pop.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

/* 顶部条 */
.music-pop-head {
  display: flex; align-items: center;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.music-pop-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  letter-spacing: 0.5px; flex: 1;
  display: flex; align-items: center; gap: 8px;
}
.music-pop-title .music-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  animation: pulse 2s infinite;
}
.music-pop-toggle {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-card-solid); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); cursor: pointer;
  transition: all 0.2s;
}
.music-pop-toggle:hover { color: var(--primary-strong); border-color: var(--primary); transform: translateY(-1px); }
.music-pop-toggle svg { width: 14px; height: 14px; }

/* 主区：封面 + 信息并排 */
.music-main {
  display: flex; gap: 16px; align-items: center;
  padding: 20px 20px 8px;
}
.music-cover {
  width: 108px; height: 108px; border-radius: 18px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; overflow: hidden; position: relative;
  box-shadow: 0 10px 26px rgba(223, 145, 147, 0.3);
}
.music-cover img { width: 100%; height: 100%; object-fit: cover; }
.music-cover svg { width: 40px; height: 40px; opacity: 0.7; }
.music-cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent 45%);
  pointer-events: none;
}

/* 右侧信息 */
.music-side { flex: 1; min-width: 0; }
.music-now {
  font-size: 16px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.music-now-sub {
  font-size: 12px; color: var(--text-faint); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 歌词区（3 行紧凑） */
.music-lyric {
  margin-top: 10px; text-align: left;
  min-height: 54px;
  display: flex; flex-direction: column; justify-content: flex-start; gap: 3px;
  border-left: 2px solid var(--primary-soft); padding-left: 10px;
}
.music-lyric .lyric-prev,
.music-lyric .lyric-next {
  font-size: 11px; color: var(--text-faint); opacity: 0.6;
  height: 15px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.music-lyric .lyric-cur {
  font-size: 12.5px; color: var(--primary-strong); font-weight: 600;
  letter-spacing: 0.3px;
  height: 17px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}

/* 进度条 + 时间 */
.music-progress {
  margin: 0 20px; height: 4px; border-radius: 2px;
  background: var(--bg-soft); cursor: pointer; position: relative; overflow: hidden;
}
.music-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-strong));
  border-radius: 2px; transition: width 0.2s linear; width: 0;
}
.music-progress-time {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--text-faint); font-family: var(--font-mono);
  margin: 4px 20px 8px; letter-spacing: 0.5px;
}

/* 控制按钮 */
.music-controls {
  display: flex; align-items: center; justify-content: center; gap: 22px;
  padding: 0 0 14px;
}
.music-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-soft); border: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-soft); cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.music-btn:hover { color: var(--primary-strong); background: var(--primary-soft); transform: scale(1.08); }
.music-btn:active { transform: scale(0.92); }
.music-btn svg { width: 18px; height: 18px; }
.music-btn.play {
  width: 52px; height: 52px;
  background: var(--primary); color: #fff;
  box-shadow: 0 6px 18px rgba(223, 145, 147, 0.4);
}
.music-btn.play:hover { background: var(--primary-strong); transform: scale(1.06); }
.music-btn.play svg { width: 22px; height: 22px; }

/* 搜索 */
.music-search {
  position: relative;
  display: flex; align-items: center; gap: 0;
  margin: 0 16px 8px;
  padding: 0 8px 0 36px;
  background: var(--bg-soft); border-radius: 12px;
}
.music-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--text-faint);
}
.music-search input {
  flex: 1; padding: 10px 0; min-width: 0;
  border: none; background: transparent;
  color: var(--text); font-size: 13px; outline: none;
}
.music-search input::placeholder { color: var(--text-faint); }
.music-search button {
  padding: 6px 13px; border-radius: 9px; border: none;
  background: var(--primary); color: #fff;
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all 0.2s;
}
.music-search button:hover { background: var(--primary-strong); }

/* 搜索结果 */
.music-results { max-height: 168px; overflow-y: auto; margin: 0 10px 6px; }
.music-results-empty {
  padding: 16px 12px; text-align: center; color: var(--text-faint); font-size: 12px; line-height: 1.7;
}
.music-result {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 10px; cursor: pointer;
  transition: background 0.15s;
}
.music-result:hover { background: var(--bg-soft); }
.music-result-cover {
  width: 38px; height: 38px; border-radius: 8px; flex-shrink: 0;
  background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; overflow: hidden;
}
.music-result-cover img { width: 100%; height: 100%; object-fit: cover; }
.music-result-info { flex: 1; min-width: 0; }
.music-result-name {
  font-size: 13px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.music-result-artist {
  font-size: 10.5px; color: var(--text-faint); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.music-result-add {
  flex-shrink: 0; width: 28px; height: 28px; padding: 0;
  border-radius: 50%; font-size: 16px; line-height: 1;
  background: var(--bg-soft); color: var(--text); border: none; cursor: pointer;
  transition: all 0.15s;
}
.music-result-add:hover { background: var(--primary); color: #fff; }
.music-result-add.added { background: var(--ok); color: #fff; }

/* 曲目列表 */
.music-tracks {
  max-height: 110px; overflow-y: auto;
  margin: 0 10px 12px;
  border-top: 1px solid var(--border);
  padding-top: 6px;
}
.music-track {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 8px;
  font-size: 12.5px; color: var(--text-soft); cursor: pointer;
  transition: all 0.15s;
}
.music-track:hover { background: var(--bg-soft); color: var(--text); }
.music-track.active {
  background: var(--primary-soft); color: var(--primary-strong); font-weight: 600;
}
.music-track-num { width: 20px; font-size: 10px; opacity: 0.5; flex-shrink: 0; font-family: var(--font-mono); }
.music-track-info { flex: 1; min-width: 0; }
.music-track-name {
  font-size: 12.5px; font-weight: inherit;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.music-track-artist { font-size: 10px; opacity: 0.7; }

/* 手机适配 */
@media (max-width: 560px) {
  .music-pop { left: 8px; right: 8px; bottom: 70px; width: auto; border-radius: 18px; }
  .music-cover { width: 92px; height: 92px; }
  .music-main { padding: 16px 16px 6px; gap: 12px; }
  .music-progress { margin: 0 16px; }
  .music-progress-time { margin: 4px 16px 6px; }
  .music-controls { gap: 18px; }
}


/* ---------- 下拉框主题化（与整体 UI 一致） ---------- */
select.tool-select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236f6a63' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 34px; cursor: pointer;
}
select.tool-select option {
  background: var(--bg-card-solid); color: var(--text);
}
[data-theme='night'] select.tool-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a7a9c0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
select.tool-select:hover { border-color: var(--primary); }
select.tool-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); outline: none; }

/* ---------- 相册页 ---------- */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.gallery-item {
  position: relative; margin: 0; border-radius: var(--radius-md); overflow: hidden;
  background: var(--bg-soft); border: 1px solid var(--border);
  cursor: zoom-in; aspect-ratio: 4/3;
  transition: all var(--transition);
}
.gallery-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--primary); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item.err { display: flex; align-items: center; justify-content: center; color: var(--text-faint); font-size: 12px; }
.gallery-item.err::after { content: '图片加载失败'; }
.gallery-item.err img { display: none; }
.gallery-item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 24px 12px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  color: #fff; font-size: 12.5px; letter-spacing: 0.5px;
  opacity: 0; transform: translateY(4px); transition: all var(--transition);
}
.gallery-item:hover figcaption { opacity: 1; transform: translateY(0); }

/* 灯箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 700;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: all 0.25s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-fig { max-width: min(90vw, 1100px); max-height: 88vh; margin: 0; text-align: center; }
.lightbox-fig img { max-width: 100%; max-height: 78vh; border-radius: 12px; box-shadow: var(--shadow-hover); object-fit: contain; }
.lightbox-fig figcaption { color: #ccc; font-size: 13px; margin-top: 12px; letter-spacing: 1px; }
.lightbox-close {
  position: absolute; top: 20px; right: 24px; z-index: 2;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25);
  color: #fff; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); cursor: pointer;
}
.lightbox-close:hover { background: var(--err); }
.lightbox-close svg { width: 18px; height: 18px; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25);
  color: #fff; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); cursor: pointer;
}
.lightbox-nav:hover { background: var(--primary); }
.lightbox-nav svg { width: 20px; height: 20px; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ---------- 书签页（密码门，重做：外层 flex 双轴居中） ---------- */
.bm-gate-wrap {
  /* 卡片垂直居中：nav 占用 56px 起，wrap 高度 100vh-56px=844px */
  /* margin-top: -70px = v21(-28) + v22(-42) + 再上移 28px（与 v21 距离一致） */
  min-height: calc(100vh - 56px);
  margin-top: -70px;
  padding: 20px;
  display: flex; align-items: center; justify-content: center;
}
.bm-gate {
  width: 100%; max-width: 340px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 38px 32px;
  box-shadow: var(--shadow);
  text-align: center;
}
.bm-gate-icon {
  width: 60px; height: 60px; margin: 0 auto 16px;
  border-radius: 18px; background: var(--primary-soft); color: var(--primary-strong);
  display: flex; align-items: center; justify-content: center;
}
.bm-gate-icon svg { width: 28px; height: 28px; }
.bm-gate-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.bm-gate-sub { font-size: 12.5px; color: var(--text-faint); margin-bottom: 22px; }
.bm-gate input {
  width: 100%; box-sizing: border-box;
  padding: 12px 16px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--bg-card);
  color: var(--text); font-size: 14px; outline: none; text-align: center;
  transition: all var(--transition);
}
.bm-gate input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.bm-gate button {
  width: auto; min-width: 140px; box-sizing: border-box;
  margin: 14px auto 0;
  padding: 12px 32px; border-radius: 14px;
  border: none; background: var(--primary); color: #fff;
  font-size: 14px; font-weight: 600; letter-spacing: 4px; text-indent: 4px;
  text-align: center; cursor: pointer;
  box-shadow: 0 4px 14px var(--primary-soft);
  transition: all 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.bm-gate button:hover {
  background: var(--primary-strong);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 22px var(--primary-soft);
}
.bm-gate button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px var(--primary-soft);
}
.bm-gate button:disabled { opacity: 0.5; cursor: not-allowed; }
.bm-gate-err { color: var(--err); font-size: 12.5px; margin-top: 12px; min-height: 18px; }
.bm-gate-hint { color: var(--text-faint); font-size: 12px; margin-top: 10px; line-height: 1.6; }

/* ---------- 页脚图标（无边框无阴影，纯半透明背景） ---------- */
.footer-icons {
  position: fixed; right: 22px; bottom: 22px; z-index: 500;
  display: inline-flex; gap: 12px;
}
.footer-icons a {
  width: 40px; height: 40px; border-radius: 50%;
  background: transparent; border: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-faint); transition: all 0.25s ease;
}
.footer-icons a:hover {
  color: var(--primary-strong);
  background: rgba(223, 145, 147, 0.15);
  transform: scale(1.15);
}
[data-theme='night'] .footer-icons a:hover { background: rgba(232, 161, 184, 0.18); }
.footer-icons svg { width: 18px; height: 18px; }

/* ---------- 音乐悬浮球 ---------- */
.music-ball {
  position: fixed; left: 20px; bottom: 20px; z-index: 600;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg-card-solid); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--primary-strong);
}
.music-ball svg { width: 21px; height: 21px; }
.music-ball.playing { border-color: var(--primary); }
.music-ball .eq { position: absolute; bottom: 7px; display: none; gap: 2px; align-items: flex-end; height: 9px; }
.music-ball .eq i { width: 2.5px; background: var(--primary); border-radius: 1px; animation: eqBounce 1s infinite; }
.music-ball .eq i:nth-child(2) { animation-delay: 0.2s; }
.music-ball .eq i:nth-child(3) { animation-delay: 0.4s; }
@keyframes eqBounce { 0%, 100% { height: 3px; } 50% { height: 9px; } }
.music-ball.playing .eq { display: flex; }

/* ---------- 返回顶部 ---------- */
.back-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 590;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg-card-solid); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow); color: var(--text-soft);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: all var(--transition);
}
.back-top.show { opacity: 1; visibility: visible; }
.back-top svg { width: 16px; height: 16px; }
.back-top:hover { color: var(--primary-strong); border-color: var(--primary); }
.back-top { bottom: 78px !important; }

@media (max-width: 860px) {
  .footer-icons { right: 14px; bottom: 14px; }
  .footer-icons a { width: 36px; height: 36px; }
  .back-top { bottom: 70px !important; }
  .music-ball { left: 14px; bottom: 14px; width: 42px; height: 42px; }
  .music-pop { left: 14px; bottom: 70px; width: 300px; }
}
/* ============================================================
 * 过渡动画（仅 hover 过渡 / 循环动效，不隐藏任何内容）
 *  - hover：卡片上浮、按钮缩放、图标变色
 *  - 循环：樱花飘落、音乐球呼吸、统计芯片脉冲
 * ============================================================ */

/* 入场动画 */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes floatIn {
  0% { opacity: 0; transform: translateY(40px); }
  60% { opacity: 1; transform: translateY(-4px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(223, 145, 147, 0); }
  50% { box-shadow: 0 0 0 8px rgba(223, 145, 147, 0.15); }
}
@keyframes ballBreath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
@keyframes navShine {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 卡片悬浮效果增强（已存在基础上加） */
.link-card { transition: all 0.3s cubic-bezier(0.2, 0.7, 0.2, 1); }
.link-card:hover { transform: translateY(-5px) scale(1.015); box-shadow: 0 16px 36px var(--primary-soft); }
.tool-card { transition: all 0.3s cubic-bezier(0.2, 0.7, 0.2, 1); }
.tool-card:hover { transform: translateY(-5px) scale(1.02); }

/* 按钮 hover 动效 */
.btn { transition: all 0.25s cubic-bezier(0.2, 0.7, 0.2, 1); }
.btn:hover { transform: translateY(-2px) scale(1.02); }
.btn:active { transform: translateY(0) scale(0.98); }

/* 主题切换按钮 hover 旋转 */
.icon-btn { transition: all 0.3s; }
.icon-btn:hover { transform: rotate(8deg) scale(1.1); }

/* 顶栏滚动阴影（更"高级感"） */
.nav.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  border-bottom-color: var(--border-strong);
}
[data-theme='night'] .nav.scrolled { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4); }

/* 音乐球呼吸（默认轻微脉动） */
.music-ball { animation: ballBreath 3.5s ease-in-out infinite; transition: all 0.3s; }
.music-ball:hover { animation-play-state: paused; transform: scale(1.08); }

/* 统计芯片脉冲光晕（.hero > .hero-stats 用） */
.stat-chip { transition: all 0.25s; }
.stat-chip:hover { transform: translateY(-2px); background: var(--bg-card-solid); animation: glowPulse 1.5s ease-in-out; }

/* 链接 nav-item hover 下划线动画 */
.nav-item { position: relative; }
.nav-item::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px;
  height: 2px; background: var(--primary); border-radius: 1px;
  transform: scaleX(0); transform-origin: center;
  transition: transform 0.25s ease;
}
.nav-item:hover::after, .nav-item.active::after { transform: scaleX(0.7); }

/* 樱花 canvas：fixed 全屏 + 飘在内容之上但不挡交互 */
#petal-canvas {
  position: fixed; inset: 0; z-index: 2;
  opacity: 0; transition: opacity 1.5s;
  pointer-events: none;
}
body.inited #petal-canvas { opacity: 1; }

/* 全站基础 transition（主题切换平滑） */
body, .nav, .link-card, .tool-card, .music-pop, .footer-icons a {
  transition: background 0.35s, color 0.35s, border-color 0.35s, box-shadow 0.35s;
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01s !important;
    transition-duration: 0.01s !important;
  }
}
