/* =========================================================
   火影手游战力玩家计算工具 · 设计系统 v5
   字体：MiSans（全站统一）  背景：弥散渐变（浅色·简约大气）
   原则：
     - 严格 8px 栅格，所有间距、字号、行高可推导
     - 小圆角（≤12px），无左侧色描边
     - 按钮、容器、文字在所有断点下专业规范
     - 主站 + 工具页 + 关于页 共用一套设计系统
   ========================================================= */

:root {
  /* —— 字体 —— */
  --font-body: 'MiSans', system-ui, -apple-system, 'PingFang SC',
               'Microsoft YaHei', 'Noto Sans SC', sans-serif;

  /* —— 色彩（浅色·高级感）—— */
  --bg:            #eef1f8;
  --surface:       #ffffff;
  --surface-2:     #f6f8fc;
  --surface-3:     #eef2f8;
  --ink:           #1c2230;
  --ink-2:         #5a6478;
  --ink-3:         #98a1b3;
  --line:          rgba(20, 28, 48, 0.08);
  --line-strong:   rgba(20, 28, 48, 0.14);

  --brand:         #ff6a3d;
  --brand-2:       #ff8c42;
  --brand-dark:    #e85a2f;
  --brand-ink:     #c2410c;
  --accent:        #5b6cff;
  --mint:          #21cba3;

  /* —— 字阶 —— */
  --fs-display: clamp(32px, 5vw, 44px);
  --fs-h1:       18px;
  --fs-h2:       20px;
  --fs-h3:       15px;
  --fs-body:     14px;
  --fs-sm:       13px;
  --fs-xs:       12px;

  /* —— 行高 —— */
  --lh-tight:  1.35;
  --lh-normal: 1.55;
  --lh-relaxed: 1.7;

  /* —— 圆角 —— */
  --r-card:  10px;
  --r-ctrl:  8px;
  --r-sm:    6px;
  --r-pill:  999px;

  /* —— 阴影 —— */
  --shadow-sm: 0 1px 2px rgba(16, 24, 48, 0.05);
  --shadow-md: 0 6px 20px rgba(16, 24, 48, 0.06);
  --shadow-lg: 0 14px 36px rgba(16, 24, 48, 0.09);

  /* —— 玻璃质感（容器精致透明度）—— */
  --glass-bg:      rgba(255, 255, 255, 0.68);
  --glass-border:  rgba(255, 255, 255, 0.62);
  --glass-blur:    16px;

  /* —— 间距（8px 栅格）—— */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;

  /* —— 布局 —— */
  --container-max: 1160px;
  --container-pad: 24px;
  --header-height: 64px;
}

/* ===== 基础重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-normal);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: transparent; }

/* ===== 弥散渐变背景 ===== */
.tech-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(46% 56% at 10% 12%, rgba(255, 122, 69, 0.20), transparent 62%),
    radial-gradient(42% 50% at 90% 8%,  rgba(91, 108, 255, 0.16), transparent 62%),
    radial-gradient(50% 58% at 86% 92%, rgba(33, 203, 163, 0.14), transparent 62%),
    radial-gradient(42% 48% at 14% 94%, rgba(255, 138, 61, 0.14), transparent 62%);
  filter: blur(36px) saturate(120%);
}
.tech-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.60), rgba(255, 255, 255, 0) 40%);
}

/* ===== 布局容器 ===== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* 顶部 header 后的第一个容器，留出与固定/粘性 header 的呼吸间距 */
header + .container {
  padding-top: var(--space-lg);
}

/* ===== 顶部导航 ===== */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-md);
}
#site-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-h1);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
  margin: 0;
}
.site-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--r-ctrl);
  object-fit: contain;
  flex: 0 0 auto;
}
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* ===== 通用按钮 ===== */
.btn,
.nav-button,
.copy-btn,
.join-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
  padding: 9px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
              background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn:hover,
.nav-button:hover,
.copy-btn:hover,
.join-btn:hover {
  transform: translateY(-1px);
  background: var(--surface-2);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  color: var(--brand-ink);
}
.btn:active,
.nav-button:active,
.copy-btn:active,
.join-btn:active { transform: translateY(0); }
.btn:focus-visible,
.nav-button:focus-visible,
.copy-btn:focus-visible,
.join-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* 导航按钮 */
.nav-button .ico {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  min-width: 18px;
  min-height: 18px;
}

/* 主按钮 / 打赏按钮（渐变橙） */
.donate-btn,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border: 1px solid transparent;
  border-radius: var(--r-ctrl);
  padding: 10px 18px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.donate-btn:hover,
.btn-primary:hover {
  transform: translateY(-1px);
  color: #fff;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  box-shadow: 0 8px 22px rgba(255, 106, 61, 0.34);
  filter: brightness(1.02);
}
.donate-btn:active,
.btn-primary:active { transform: translateY(0); }
.donate-btn:focus-visible,
.btn-primary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* 复制 / 加入等次要按钮 */
.copy-btn,
.join-btn {
  min-height: 40px;
  padding: 9px 16px;
}

/* ===== Banner 轮播 ===== */
.banner-slider {
  position: relative;
  width: 100%;
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-lg);
  background: var(--surface-3);
}
.banner-slides {
  position: relative;
  width: 100%;
}
.banner {
  display: none;
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: var(--surface-3);
}
.banner.active { display: block; }
.banner-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.banner-text {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 22px 28px;
  color: #fff;
  background: linear-gradient(to top, rgba(10, 12, 20, 0.70), rgba(10, 12, 20, 0.10) 60%, transparent);
}
.banner-text h2 { font-size: clamp(18px, 2.2vw, 22px); font-weight: 600; margin: 0 0 6px; letter-spacing: 0.01em; line-height: var(--lh-tight); }
.banner-text p  { font-size: var(--fs-sm); margin: 0; opacity: 0.92; line-height: var(--lh-normal); }
.banner-dots { position: absolute; bottom: 14px; right: 18px; display: flex; gap: 8px; }
.dot {
  width: 8px; height: 8px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.45); cursor: pointer; transition: 0.2s ease;
}
.dot.active { background: #fff; width: 24px; }

/* ===== 大容器卡片（区域统一包裹） ===== */
.section-card,
.system-block {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-card);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-lg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}
.section-card:last-child,
.system-block:last-child { margin-bottom: 0; }
.block-header { margin-bottom: var(--space-md); }
.block-header h2 { font-size: var(--fs-h2); font-weight: 600; margin: 0 0 6px; letter-spacing: 0.01em; line-height: var(--lh-tight); }
.block-header p  { font-size: var(--fs-sm); color: var(--ink-3); margin: 0; line-height: var(--lh-normal); }

/* ===== 页面标题区（统一规范 · 容器化）===== */
.page-head {
  margin: 0 0 var(--space-lg);
  padding: var(--space-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-sm);
}
.page-title {
  margin: 0;
  font-size: var(--fs-h1);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: 0.01em;
  color: var(--ink);
}
/* 工具页导语（置于标题下方） */
.page-lead {
  margin: var(--space-xs) 0 0;
  max-width: 760px;
  color: var(--ink-2);
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
}

/* ===== 工具卡片网格：统一 4 列，等高 ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}
.feature-card {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  row-gap: 0;
  align-items: start;
  background:
    radial-gradient(220px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(255, 106, 61, 0.10), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line-strong);
}
.card-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-ctrl);
  background: linear-gradient(135deg, rgba(255, 122, 69, 0.14), rgba(91, 108, 255, 0.12));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0;
  grid-row: 1 / 3;
  align-self: start;
}
.card-icon img { width: 30px; height: 30px; object-fit: contain; }
.feature-card h2 { grid-column: 2; font-size: var(--fs-h3); font-weight: 600; margin: 0 0 6px; line-height: var(--lh-tight); }
.feature-card p  {
  grid-column: 2;
  font-size: var(--fs-sm); line-height: var(--lh-normal); color: var(--ink-3); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ===== 创作者 ===== */
.creators-block .block-header { margin-bottom: var(--space-md); }
.creators-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}
.creator-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-card);
  padding: 20px;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-sm);
}
.creator-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  overflow: hidden; flex: 0 0 auto; border: 1px solid var(--line);
  background: var(--surface-2);
}
.creator-avatar img { width: 100%; height: 100%; object-fit: cover; }
.creator-info { min-width: 0; }
.creator-name { font-size: var(--fs-h3); font-weight: 600; margin: 0 0 4px; line-height: var(--lh-tight); }
.creator-description { font-size: var(--fs-sm); color: var(--ink-3); margin: 0 0 10px; line-height: var(--lh-normal); }
.creator-social { display: flex; gap: 8px; flex-wrap: wrap; }
.social-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2);
  padding: 5px 11px; border: 1px solid var(--line);
  border-radius: var(--r-ctrl); transition: 0.18s ease;
  line-height: var(--lh-normal);
}
.social-link:hover { background: var(--surface-2); color: var(--brand-ink); }

/* ===== 特别鸣谢 ===== */
.fans-block { text-align: center; margin-bottom: var(--space-2xl); }
.fans-block h2 { font-size: var(--fs-h2); font-weight: 600; margin: 0 0 6px; line-height: var(--lh-tight); }
.fans-block > p { font-size: var(--fs-sm); color: var(--ink-3); margin: 0 0 18px; line-height: var(--lh-normal); }
.fans-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 980px; margin: 0 auto; }
.fan-name {
  font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-ctrl); padding: 6px 13px;
  line-height: var(--lh-normal);
}

/* ===== 帮助中心 ===== */
.help-block { margin-bottom: var(--space-2xl); }
.help-block h2 { font-size: var(--fs-h2); font-weight: 600; margin: 0 0 6px; line-height: var(--lh-tight); }
.help-block > p { font-size: var(--fs-sm); color: var(--ink-3); margin: 0 0 18px; line-height: var(--lh-normal); }
.help-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}
.help-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: var(--r-card); padding: 20px;
  min-height: 92px;
  box-shadow: var(--shadow-sm); transition: 0.2s ease;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}
.help-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.help-item span { font-size: var(--fs-h3); font-weight: 600; line-height: var(--lh-tight); }
.help-item p { font-size: var(--fs-sm); color: var(--ink-3); margin: 0; line-height: var(--lh-normal); }

/* ===== 弹窗（统一规范） ===== */
.modal {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  /* 更柔的暗色磨砂底，让玻璃卡片透出层次 */
  background: rgba(16, 20, 34, 0.40);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.24s ease;
}
.modal.show,
.modal[style*="flex"] {
  display: flex;
  opacity: 1;
}
.modal-content {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 30px 28px 28px;
  text-align: center;
  border-radius: 22px;
  /* 玻璃拟态：半透明白 + 强模糊 + 淡淡的弥散渐变 */
  background:
    radial-gradient(130% 100% at 50% -12%, rgba(255, 122, 69, 0.16), transparent 58%),
    radial-gradient(120% 95% at 108% 116%, rgba(91, 108, 255, 0.13), transparent 55%),
    rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 24px 60px rgba(16, 20, 34, 0.20),
    0 8px 24px rgba(16, 20, 34, 0.12);
  transform: translateY(10px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease;
}
.modal.show .modal-content,
.modal[style*="flex"] .modal-content {
  transform: translateY(0) scale(1);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  text-align: left;
}
.modal-title {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  line-height: var(--lh-tight);
  letter-spacing: 0.01em;
}
.modal-sub {
  margin: 8px 0 0;
  font-size: var(--fs-sm);
  color: var(--ink-3);
  line-height: var(--lh-normal);
}
/* 顶部圆形徽标：弥散渐变焦点，内部图标统一反白保证可读性 */
.modal-badge {
  width: 60px; height: 60px;
  margin: 2px auto 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 22px rgba(255, 106, 61, 0.32);
}
.modal-badge .ico { width: 30px; height: 30px; }
.modal-badge svg.ico { stroke: #fff; fill: none; }
.modal-badge img.ico { filter: brightness(0) invert(1) drop-shadow(0 1px 1px rgba(0,0,0,.12)); }
/* 打赏二维码容器 */
.modal-qr {
  margin: 20px auto 4px;
  padding: 14px;
  width: fit-content;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
  box-shadow: var(--shadow-sm);
}
.modal-qr img {
  display: block;
  width: 200px; height: 200px;
  object-fit: contain;
  border-radius: 8px;
}
/* 加群群号展示 */
.modal-group-no {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin: 18px 0 2px;
  padding: 12px 16px;
  background: rgba(16, 20, 34, 0.045);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-ctrl);
}
.modal-group-no .label { font-size: var(--fs-sm); color: var(--ink-3); }
.modal-group-no .num {
  font-size: 20px; font-weight: 700; color: var(--ink);
  letter-spacing: 0.06em; font-variant-numeric: tabular-nums;
}
.modal-body {
  text-align: left;
  font-size: var(--fs-body);
  color: var(--ink-2);
  line-height: var(--lh-normal);
}
.modal-body p { margin: 0 0 16px; }
.modal-body p:last-child { margin-bottom: 0; }

/* ===== 轻量提示 Toast（替代原生 alert） ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%) translateY(14px);
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(90vw, 360px);
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
  box-shadow: var(--shadow-md);
  color: var(--ink);
  font-size: var(--fs-body);
  font-weight: 500;
  letter-spacing: 0.01em;
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .26s ease, transform .26s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast-ico {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  min-width: 18px;
  min-height: 18px;
  fill: none;
  stroke: var(--brand);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.toast.error .toast-ico { stroke: #e23b3b; }
.modal-content img {
  max-width: 100%;
  height: auto;
  display: block;
}
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1;
  color: var(--ink-3);
  background: rgba(16, 20, 34, 0.05);
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.18s ease;
  z-index: 2;
}
.modal-close:hover {
  color: var(--ink);
  background: rgba(16, 20, 34, 0.10);
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: center;
}
.modal-actions .ico { width: 18px; height: 18px; flex: 0 0 18px; }
}
.modal-actions .copy-btn,
.modal-actions .join-btn { flex: 1; justify-content: center; }

/* 打赏 / 加群弹窗共用玻璃容器，padding 见 .modal-content 基础规则 */

/* ===== 页脚 ===== */
footer { margin-top: auto; padding: var(--space-xl) 0; border-top: 1px solid var(--line); }
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.donate-buttons { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.copyright p { font-size: var(--fs-xs); color: var(--ink-3); margin: 0; line-height: var(--lh-normal); }

/* ===== 图标系统（内联 SVG）===== */
.ico {
  width: 16px; height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  min-width: 16px;
  min-height: 16px;
}
.ico svg, .ico use { display: block; }
.ico-stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico-fill   { fill: currentColor; stroke: none; }

/* ===== 背景音乐播放器（毛细玻璃卡片 · 进度条 + 点赞） ===== */
music-player {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 150;            /* 低于弹窗(200)，弹窗开启时自然被遮罩覆盖 */
  display: block;
  font-family: var(--font-body);
  -webkit-user-select: none; user-select: none;
}
.mp-card {
  display: flex; align-items: center; gap: 12px;
  width: 340px; max-width: calc(100vw - 28px);
  padding: 12px 14px;
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.70);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 12px 34px rgba(20, 28, 48, 0.18);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.mp-card:hover { box-shadow: 0 16px 42px rgba(20, 28, 48, 0.24); }
.mp-toggle {
  flex: 0 0 auto; width: 46px; height: 46px;
  border-radius: 50%; display: grid; place-items: center;
  color: #fff; cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 18px rgba(255, 106, 61, 0.34);
  transition: transform 0.18s ease, filter 0.18s ease;
}
.mp-toggle:hover { transform: translateY(-1px); filter: brightness(1.04); }
.mp-toggle:active { transform: scale(0.96); }
.mp-toggle .mp-svg { width: 22px; height: 22px; fill: #fff; }
.mp-ico { display: none; grid: place-items: center; }
.mp-card.playing .mp-ico--play { display: none; }
.mp-card.playing .mp-ico--pause { display: grid; }
.mp-card:not(.playing) .mp-ico--play { display: grid; }
.mp-card:not(.playing) .mp-ico--pause { display: none; }
.mp-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.mp-row1 { display: flex; align-items: center; gap: 8px; }
.mp-left { display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1 1 auto; }
.mp-title {
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.01em;
}
.mp-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; }
.mp-eq i { width: 2px; height: 30%; background: var(--brand); border-radius: 2px; opacity: 0.45; }
.mp-card.playing .mp-eq i { opacity: 1; animation: mpBounce 0.9s ease-in-out infinite; }
.mp-card.playing .mp-eq i:nth-child(2) { animation-delay: 0.15s; }
.mp-card.playing .mp-eq i:nth-child(3) { animation-delay: 0.30s; }
.mp-card.playing .mp-eq i:nth-child(4) { animation-delay: 0.45s; }
@keyframes mpBounce { 0%, 100% { height: 30%; } 50% { height: 100%; } }
.mp-like {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px;
  cursor: pointer; color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600;
  padding: 4px 7px; border-radius: var(--r-pill);
  transition: color 0.18s ease, background 0.18s ease;
}
.mp-like:hover { background: rgba(255, 255, 255, 0.5); color: var(--brand); }
.mp-like .mp-svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.mp-like.liked { color: #ff4d6d; }
.mp-like.liked .mp-svg { fill: #ff4d6d; stroke: #ff4d6d; }
.mp-like.pop { animation: mpPop 0.32s ease; }
@keyframes mpPop { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
.mp-bar-row { display: flex; align-items: center; gap: 8px; }
.mp-time { font-size: 11px; font-variant-numeric: tabular-nums; color: var(--ink-2); min-width: 34px; text-align: center; }
.mp-bar {
  position: relative; flex: 1 1 auto; height: 14px;
  display: flex; align-items: center; cursor: pointer; touch-action: none;
}
.mp-bar::before {
  content: ""; position: absolute; left: 0; right: 0; height: 4px;
  border-radius: 4px; background: rgba(20, 28, 48, 0.12);
}
.mp-fill {
  position: absolute; left: 0; height: 4px; width: 0; border-radius: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}
.mp-thumb {
  position: absolute; left: 0; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand);
  box-shadow: 0 2px 6px rgba(255, 106, 61, 0.4); transform: translateX(-50%);
}
.mp-bar:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

/* 收起按钮（卡片内，贴右） */
.mp-collapse {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: var(--ink-2);
  background: rgba(255, 255, 255, 0.36); border: 1px solid rgba(255, 255, 255, 0.5);
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.mp-collapse:hover { background: rgba(255, 255, 255, 0.55); color: var(--brand); }
.mp-collapse:active { transform: scale(0.94); }
.mp-collapse .mp-svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 收缩态小圆钮（贴边） */
.mp-fab {
  display: none;
  position: fixed; right: 22px; bottom: 22px;
  width: 52px; height: 52px; border-radius: 50%;
  align-items: center; justify-content: center;
  cursor: pointer; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 24px rgba(255, 106, 61, 0.38);
  transition: transform .18s ease, filter .18s ease;
}
.mp-fab:hover { transform: translateY(-1px); filter: brightness(1.04); }
.mp-fab:active { transform: scale(0.96); }
.mp-fab .mp-svg { width: 22px; height: 22px; fill: #fff; }
.mp-fab .mp-ico { display: none; grid: place-items: center; }
.mp-fab .mp-ico--play { display: grid; }
.mp-fab .mp-ico--pause { display: none; }
.mp-fab.playing .mp-ico--play { display: none; }
.mp-fab.playing .mp-ico--pause { display: grid; }
.mp-fab-eq { display: none; align-items: flex-end; gap: 2px; height: 14px; margin-left: 2px; }
.mp-fab.playing .mp-fab-eq { display: inline-flex; }
.mp-fab-eq i { width: 2px; height: 30%; background: #fff; border-radius: 2px; opacity: 0.7; }
.mp-fab.playing .mp-fab-eq i { animation: mpBounce 0.9s ease-in-out infinite; }
.mp-fab.playing .mp-fab-eq i:nth-child(2) { animation-delay: 0.15s; }
.mp-fab.playing .mp-fab-eq i:nth-child(3) { animation-delay: 0.30s; }
.mp-fab.playing .mp-fab-eq i:nth-child(4) { animation-delay: 0.45s; }

/* 收缩态：隐藏卡片，显示小圆钮 */
music-player.collapsed .mp-card { display: none; }
music-player.collapsed .mp-fab { display: flex; }

/* ===== 滚动条：1px 无感 ===== */
html { scrollbar-width: thin; scrollbar-color: rgba(20, 28, 48, 0.16) transparent; }
::-webkit-scrollbar { width: 1px; height: 1px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(20, 28, 48, 0.16); border-radius: 1px; }
::-webkit-scrollbar-thumb:hover { background: rgba(20, 28, 48, 0.28); }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .help-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  :root { --container-pad: 16px; --header-height: 58px; }

  #site-name { font-size: 17px; }
  .site-logo { width: 30px; height: 30px; }
  .nav-button { padding: 8px 12px; font-size: var(--fs-sm); }
  .nav-button .ico { width: 16px; height: 16px; flex: 0 0 16px; min-width: 16px; min-height: 16px; }

  .banner { height: 200px; }
  .banner-text { padding: 18px 16px; }
  .banner-text h2 { font-size: 17px; }

  .section-card, .system-block { padding: 22px 18px; }
  .page-head { padding: 22px 18px; }
  .block-header h2, .fans-block h2, .help-block h2 { font-size: 19px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .creators-grid { grid-template-columns: 1fr; gap: 12px; }
  .help-grid { grid-template-columns: 1fr; gap: 12px; }

  /* 播放器：小屏略缩，避免遮挡内容 */
  music-player { right: 14px; bottom: 14px; }
  .mp-card { width: 300px; padding: 10px 12px; gap: 10px; }
  .mp-toggle { width: 42px; height: 42px; }
  .mp-toggle .mp-svg { width: 20px; height: 20px; }
  /* 页脚给右下角播放器留位，避免打赏按钮被遮挡 */
  footer { padding-bottom: 90px; }
  /* 收缩小圆钮定位与卡片一致 */
  .mp-fab { right: 14px; bottom: 14px; }
}

@media (max-width: 480px) {
  :root { --container-pad: 14px; }

  /* 长品牌名在固定高度 header 内不能换行，改为优雅截断，避免溢出 */
  #site-name { white-space: nowrap; font-size: 14px; min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
  .site-logo { width: 28px; height: 28px; }
  .nav-actions { gap: 8px; }
  .nav-button { padding: 7px 10px; font-size: 12px; }
  .nav-button .ico { width: 15px; height: 15px; flex: 0 0 15px; min-width: 15px; min-height: 15px; }
  .donate-btn, .btn-primary { padding: 8px 12px; font-size: 12px; }

  .banner { height: 160px; }
  .banner-text { padding: 14px 16px; }
  .banner-text h2 { font-size: 15px; }
  .banner-text p { font-size: 12px; }
  .banner-dots { right: 12px; bottom: 10px; }

  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 18px; }
  .card-icon { width: 44px; height: 44px; }
  .card-icon img { width: 28px; height: 28px; }

  .section-card, .system-block { padding: 20px 16px; }
  .page-head { padding: 20px 16px; }
  .creator-card { padding: 16px; gap: 12px; }
  .creator-avatar { width: 52px; height: 52px; }

  .modal-content { padding: 26px 20px 22px; border-radius: 18px; }
  .modal-badge { width: 54px; height: 54px; border-radius: 16px; margin-bottom: 14px; }
  .modal-badge .ico { width: 27px; height: 27px; }
  .modal-qr img { width: 172px; height: 172px; }
  .modal-actions { flex-direction: column; }
  .modal-actions .copy-btn,
  .modal-actions .join-btn { width: 100%; }

  /* 播放器：手机上铺满底部，专业不遮挡 */
  music-player { left: 12px; right: 12px; bottom: 12px; }
  .mp-card { width: auto; max-width: none; padding: 10px 12px; }
  .mp-toggle { width: 40px; height: 40px; }
  .mp-toggle .mp-svg { width: 18px; height: 18px; }
  /* 页脚给铺满的播放器留位，避免打赏按钮被遮挡 */
  footer { padding-bottom: 96px; }
  /* 收缩小圆钮定位与卡片一致 */
  .mp-fab { right: 12px; bottom: 12px; }
}

@media (max-width: 360px) {
  .banner { height: 130px; }
  .feature-grid { gap: 10px; }
  .feature-card { padding: 16px; }
  .card-icon { width: 40px; height: 40px; }
  .card-icon img { width: 26px; height: 26px; }
  .donate-buttons { gap: 8px; }
  .donate-btn, .btn-primary { width: 100%; }
}

/* 尊重减弱动效偏好（播放器均衡器/点赞动画一并收敛） */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}
