/* ===== 设计 Token ===== */
:root {
  --bg-deep: #050A05;
  --bg-card: #0F2B0F;
  --bg-card-2: #163316;
  --bg-elevated: #1A3A1A;
  --accent: #4ADE80;
  --accent-bright: #86EFAC;
  --accent-dim: #2D7A4A;
  --text-primary: #E8F5E9;
  --text-secondary: #81C784;
  --text-muted: #4A7A52;
  --border: rgba(74, 222, 128, 0.15);
  --radius-pill: 9999px;
  --radius-card: 24px;
  --radius-btn: 16px;
  --shadow-glow: 0 0 30px rgba(74, 222, 128, 0.25);
  --font: 'Porsche Next', 'Porsche', 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html, body {
  height: 100%;
  background: var(--bg-deep);
  font-family: var(--font);
  color: var(--text-primary);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== 粒子画布背景（保留兼容） ===== */
#particle-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  display: none;
}

/* ===== 霓虹背景动画 ===== */
:root {
  --nx: 0;
  --ny: 0;
}

.neon-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  transform: translate3d(calc(var(--nx) * -30px), calc(var(--ny) * -30px), 0);
}

.glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
}

.glow-blob-1 {
  top: -30%; left: -20%;
  width: 90vmin; height: 90vmin;
  background: radial-gradient(circle,
    rgba(74, 222, 128, 0.35) 0%,
    rgba(22, 101, 52, 0.25) 30%,
    rgba(147, 51, 234, 0.12) 60%,
    transparent 80%);
  animation: neon-blob1 22s ease-in-out infinite;
}

.glow-blob-2 {
  top: 80%; left: 80%;
  width: 85vmin; height: 85vmin;
  background: radial-gradient(circle,
    rgba(147, 51, 234, 0.3) 0%,
    rgba(88, 28, 135, 0.2) 40%,
    rgba(74, 222, 128, 0.1) 70%,
    transparent 85%);
  animation: neon-blob2 26s ease-in-out infinite;
}

.glow-blob-3 {
  top: 50%; left: 50%;
  margin: -35vmin 0 0 -35vmin;
  width: 70vmin; height: 70vmin;
  background: radial-gradient(circle,
    rgba(56, 189, 248, 0.25) 0%,
    rgba(74, 222, 128, 0.18) 50%,
    rgba(147, 51, 234, 0.1) 70%,
    transparent 85%);
  animation: neon-blob3 19s ease-in-out infinite;
}

@keyframes neon-blob1 {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  20%  { transform: translate3d(70vw, 80vh, 0) scale(1.2); }
  40%  { transform: translate3d(90vw, 30vh, 0) scale(0.9); }
  60%  { transform: translate3d(40vw, 90vh, 0) scale(1.1); }
  80%  { transform: translate3d(20vw, 50vh, 0) scale(1.15); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes neon-blob2 {
  0%   { transform: translate3d(0, 0, 0) scale(1.1); }
  25%  { transform: translate3d(-80vw, -90vh, 0) scale(0.85); }
  50%  { transform: translate3d(-50vw, -40vh, 0) scale(1.25); }
  75%  { transform: translate3d(-20vw, -70vh, 0) scale(0.95); }
  100% { transform: translate3d(0, 0, 0) scale(1.1); }
}

@keyframes neon-blob3 {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  15%  { transform: translate3d(-40vw, 20vh, 0) scale(1.15); }
  30%  { transform: translate3d(10vw, 10vh, 0) scale(0.85); }
  45%  { transform: translate3d(20vw, -30vh, 0) scale(1.2); }
  60%  { transform: translate3d(-30vw, -40vh, 0) scale(1.05); }
  75%  { transform: translate3d(-10vw, 30vh, 0) scale(0.8); }
  90%  { transform: translate3d(30vw, -5vh, 0) scale(1.1); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

.neon-embers {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  transform: translate3d(calc(var(--nx) * 12px), calc(var(--ny) * 12px), 0);
}

.neon-stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  transform: translate3d(calc(var(--nx) * 16px), calc(var(--ny) * 16px), 0);
}

.neon-star {
  position: absolute;
  width: 3px; height: 3px;
  background: rgba(74, 222, 128, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.9);
  animation: neon-twinkle 2s infinite;
}

.neon-star.white {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
}

.neon-star.violet {
  background: rgba(168, 85, 247, 0.9);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.9);
}

.neon-star.cyan {
  background: rgba(56, 189, 248, 0.9);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.9);
}

@keyframes neon-twinkle {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.5); }
}

/* ===== 首页渐变标题 ===== */
.hero-title-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #4ade80 30%, #38bdf8 60%, #a855f7 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: hero-gradient-shift 5s ease infinite;
  text-shadow: none;
  filter: drop-shadow(0 0 20px rgba(74, 222, 128, 0.3));
}

@keyframes hero-gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===== 手机容器 ===== */
.phone-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ===== 状态栏 ===== */
.status-bar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 14px 24px 8px;
  flex-shrink: 0;
  opacity: 0;
  animation: fadeDown 0.6s ease 0.2s forwards;
}
.status-bar .left { display: flex; align-items: center; gap: 8px; }
.status-bar .pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
  animation: pulse 2s ease-in-out infinite;
}
.status-bar #clock {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== 主内容区 ===== */
.content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 20px 110px;
  scrollbar-width: none;
}
.content::-webkit-scrollbar { display: none; }

/* ===== 视图切换 ===== */
.view { display: none; animation: viewIn 0.4s ease; }
.view.active { display: block; }

@keyframes viewIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===== Hero 标题区 ===== */
.hero {
  text-align: center;
  padding: 32px 0 24px;
  opacity: 0;
  animation: heroIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-bright);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}
.hero-badge .live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.5s ease-in-out infinite;
}
.hero h1 {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.15;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-bright) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}
.hero p {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto;
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== 首页统计卡片 ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 24px 0;
  opacity: 0;
  animation: cardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
}
.stat-item {
  text-align: center;
  padding: 12px 4px;
  background: linear-gradient(145deg, var(--bg-card), var(--bg-card-2));
  border: 1px solid var(--border);
  border-radius: 14px;
}
.stat-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-bright);
  line-height: 1.2;
}
.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== 余额卡片 ===== */
.balance-card {
  width: 100%;
  background: linear-gradient(145deg, var(--bg-card), var(--bg-card-2));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 20px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: cardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.85s forwards;
  margin-bottom: 20px;
}
.balance-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.05), transparent);
  animation: shimmer 4s ease-in-out infinite;
}
.balance-header { margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.balance-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}
.balance-amount {
  display: flex;
  align-items: baseline;
  gap: 3px;
}
.balance-currency {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
}
.balance-value {
  font-size: 32px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  letter-spacing: -0.5px;
}

/* ===== 多账号余额网格 ===== */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.account-item {
  text-align: center;
  padding: 10px 6px;
  background: rgba(74, 222, 128, 0.06);
  border: 1px solid rgba(74, 222, 128, 0.1);
  border-radius: 12px;
}
.account-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}
.account-balance {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent-bright);
  line-height: 1.2;
}
.account-balance .acc-currency {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  margin-right: 1px;
}
.account-balance.status-unknown {
  color: #f87171;
  font-size: 13px;
  font-weight: 600;
}
.account-balance.status-error {
  color: #f87171;
  font-size: 13px;
  font-weight: 600;
}

/* ===== 首页每日一句 ===== */
.daily-sentence {
  text-align: center;
  padding: 16px 20px;
  opacity: 0;
  animation: cardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
}
.daily-sentence .quote-mark {
  color: var(--accent-dim);
  font-size: 18px;
}
.daily-sentence .sentence-text {
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.7;
}

/* ===== 页面标题 ===== */
.page-header {
  padding: 20px 0 16px;
  opacity: 0;
  animation: heroIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}
.page-header h2 {
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}
.page-header p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===== 搜索栏 ===== */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
  opacity: 0;
  animation: cardIn 0.5s ease 0.4s forwards;
  transition: border-color 0.2s;
}
.search-bar:focus-within { border-color: var(--accent); }
.search-bar svg { width: 16px; height: 16px; fill: none; stroke: var(--text-muted); stroke-width: 2.5; flex-shrink: 0; }
.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font);
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar kbd {
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font);
}

/* ===== 工具分类区 ===== */
.cat-section {
  margin-bottom: 24px;
  opacity: 0;
  animation: cardIn 0.5s ease forwards;
}
.cat-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-left: 4px;
}
.cat-accent {
  width: 3px;
  height: 16px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ===== 工具卡片网格 ===== */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.tool-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: linear-gradient(145deg, var(--bg-card), var(--bg-card-2));
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.tool-card:hover {
  border-color: rgba(74, 222, 128, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.tool-card:active { transform: scale(0.97); }
.tool-card-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 0 2px 2px 0;
}
.tool-icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.tool-info { flex: 1; min-width: 0; }
.tool-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.tool-desc {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tool-card.hidden { display: none; }

/* ===== 大卡片（文件/分享页） ===== */
.large-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.large-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  background: linear-gradient(145deg, var(--bg-card), var(--bg-card-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: var(--text-primary);
  text-align: center;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.large-card:hover {
  border-color: rgba(74, 222, 128, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.large-card:active { transform: scale(0.97); }
.large-card .lc-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
.large-card .lc-name {
  font-size: 15px;
  font-weight: 700;
}
.large-card .lc-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ===== 关于页 ===== */
.about-intro {
  background: linear-gradient(145deg, var(--bg-card), var(--bg-card-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  margin-bottom: 20px;
  opacity: 0;
  animation: cardIn 0.5s ease 0.4s forwards;
}
.about-intro p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 10px;
}
.about-intro p:last-child { margin-bottom: 0; }
.about-intro strong { color: var(--accent-bright); }
.about-slogan {
  text-align: center;
  font-size: 14px !important;
  color: var(--accent) !important;
  font-weight: 500;
  letter-spacing: 1px;
  margin-top: 14px !important;
}

.about-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  margin: 20px 0 12px;
  padding-left: 4px;
  opacity: 0;
  animation: cardIn 0.5s ease forwards;
}

/* ===== 快捷键列表 ===== */
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  opacity: 0;
  animation: cardIn 0.5s ease 0.6s forwards;
}
.shortcut-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.shortcut-item kbd {
  background: rgba(74, 222, 128, 0.12);
  color: var(--accent-bright);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  min-width: 28px;
  text-align: center;
}
.shortcut-item span {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ===== 底部导航 ===== */
.bottom-nav {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 10px 16px 20px;
  background: transparent;
  z-index: 10;
}
.nav-container {
  display: flex;
  background: rgba(15, 43, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 2px;
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-btn:focus { outline: none; }
.nav-btn:active { transform: scale(0.92); }
.nav-btn svg { width: 18px; height: 18px; fill: currentColor; }
.nav-btn.active {
  background: var(--bg-elevated);
  color: var(--accent-bright);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

/* ===== Toast 提示 ===== */
.toast {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--accent-bright);
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-glow);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== 通用动画 ===== */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

/* ===== 响应式 ===== */
@media (max-width: 380px) {
  .hero h1 { font-size: 34px; }
  .tool-grid { gap: 8px; }
  .tool-card { padding: 10px; }
  .stat-num { font-size: 16px; }
}

/* ===== 左下角胶囊音乐播放器 ===== */
.music-player {
  position: absolute;
  bottom: 92px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px 7px 7px;
  background: rgba(15, 43, 15, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  z-index: 20;
  max-width: 280px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  opacity: 0;
  transform: translateY(16px);
  animation: mpSlideIn 0.6s cubic-bezier(0.16,1,0.3,1) 1.1s forwards;
}
@keyframes mpSlideIn {
  to { opacity: 1; transform: translateY(0); }
}
.mp-disc {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle, #2a2a2a 0%, #181818 30%, #0a0a0a 70%);
  border: 1px solid rgba(74,222,128,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.mp-disc.playing {
  animation: mpSpin 4s linear infinite;
}
.mp-disc::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.05);
}
.mp-disc-inner {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(74,222,128,0.6);
  z-index: 1;
}
@keyframes mpSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.mp-info {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 110px;
  overflow: hidden;
}
.mp-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.mp-title.marquee {
  display: inline-block;
  animation: mpMarquee 8s linear infinite;
  padding-right: 40px;
}
@keyframes mpMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.mp-artist {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.mp-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-top: 1px;
}
.mp-lyric {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 9px;
  color: var(--text-muted);
  line-height: 1.2;
}
.mp-lyric-track {
  display: inline-block;
  white-space: nowrap;
  animation: mpLyricScroll 10s linear infinite;
  padding-right: 30px;
}
@keyframes mpLyricScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.mp-wave {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.3;
  transition: opacity 0.3s;
}
.mp-wave.active { opacity: 1; }
.mp-wave span {
  width: 2.5px;
  background: var(--accent);
  border-radius: 1px;
  height: 30%;
}
.mp-wave.active span {
  animation: mpWave 0.8s ease-in-out infinite;
}
.mp-wave.active span:nth-child(1) { animation-delay: 0s; height: 60%; }
.mp-wave.active span:nth-child(2) { animation-delay: 0.1s; height: 100%; }
.mp-wave.active span:nth-child(3) { animation-delay: 0.2s; height: 40%; }
.mp-wave.active span:nth-child(4) { animation-delay: 0.15s; height: 80%; }
.mp-wave.active span:nth-child(5) { animation-delay: 0.05s; height: 50%; }
@keyframes mpWave {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}
.mp-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(74,222,128,0.12);
  color: var(--accent-bright);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  padding: 0;
}
.mp-btn:hover {
  background: rgba(74,222,128,0.25);
  transform: scale(1.08);
}
.mp-btn:active { transform: scale(0.92); }
.mp-btn svg { width: 14px; height: 14px; fill: currentColor; }
.mp-btn .mp-ico-pause { display: none; }
.mp-btn.playing .mp-ico-play { display: none; }
.mp-btn.playing .mp-ico-pause { display: block; }

.mp-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  max-width: 68px;
  opacity: 1;
  transition: max-width 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
              opacity 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) 0.1s,
              gap 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  flex-shrink: 0;
}
.music-player.controls-hidden .mp-controls {
  max-width: 0;
  opacity: 0;
  gap: 0;
  transition: max-width 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
              opacity 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
              gap 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.music-player.controls-hidden .mp-controls .mp-btn {
  pointer-events: none;
}

.mp-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(74, 222, 128, 0.1);
  overflow: hidden;
}
.mp-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  transition: width 0.3s linear;
}

/* 搜索歌曲面板 */
.search-panel {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.search-panel.show { display: flex; }
.search-panel-mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.search-panel.show .search-panel-mask { opacity: 1; }
.search-panel-box {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, var(--bg-card-2), var(--bg-deep));
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  padding: 16px 16px 24px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}
.search-panel.show .search-panel-box { transform: translateY(0); }
.search-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.search-panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.search-panel-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
}
.search-panel-close:hover { background: rgba(255,255,255,0.12); color: #fff; }
.search-panel-close svg { width: 16px; height: 16px; }
.search-panel-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.search-panel-input-row input {
  flex: 1;
  padding: 10px 14px;
  font-size: 14px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  outline: none;
  font-family: var(--font);
  transition: border-color 0.2s;
}
.search-panel-input-row input:focus { border-color: var(--accent); }
.search-panel-input-row input::placeholder { color: var(--text-muted); }
.search-panel-input-row button {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  color: #052E10;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--font);
  transition: transform 0.15s;
}
.search-panel-input-row button:active { transform: scale(0.96); }
.search-panel-results {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
}
.search-panel-results::-webkit-scrollbar { display: none; }
.search-placeholder {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 30px 0;
}
.search-song-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.search-song-item:hover { background: rgba(74, 222, 128, 0.08); }
.search-song-item:active { background: rgba(74, 222, 128, 0.15); }
.search-song-item .ss-idx {
  font-size: 12px;
  color: var(--text-muted);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.search-song-item .ss-info { flex: 1; min-width: 0; }
.search-song-item .ss-name {
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-song-item .ss-artist {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-song-item.playing .ss-name { color: var(--accent-bright); }

/* ===== 减少动效偏好 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== 留言板（原始风格） ===== */
.message-board {
  background: #2a2a2a;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 12px;
}
.board-label {
  padding: 12px 18px 8px;
  font-size: 16px; font-weight: 600; color: #888;
}
.danmaku-container {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.danmaku-item {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1e1e1e;
  border-radius: 999px;
  padding: 2px 14px 2px 2px;
  white-space: nowrap;
  will-change: transform;
  pointer-events: none;
}
.danmaku-item.no-avatar {
  padding: 2px 14px;
}
.danmaku-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.danmaku-username {
  font-size: 13px; font-weight: 600;
  flex-shrink: 0;
}
.danmaku-colon { color: #888; font-size: 13px; flex-shrink: 0; }
.danmaku-text {
  font-size: 13px; color: #f0f0f0;
  flex-shrink: 0;
}

/* ===== 留言输入 ===== */
.message-input-bar {
  background: #2a2a2a;
  border-radius: 18px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.input-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.input-avatar:hover { border-color: #1e88e5; }
.input-avatar.no-avatar {
  border: 2px dashed #555;
  background: #1a1a1a;
  position: relative;
}
.input-avatar.no-avatar::after {
  content: '+';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: #888;
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
}
.input-name {
  width: 72px; flex-shrink: 0;
  background: #1e1e1e; border: none; outline: none;
  color: #e8e8e8; font-size: 12px;
  padding: 6px 10px; border-radius: 10px;
}
.input-name::placeholder { color: #666; }
.input-content {
  flex: 1; min-width: 0;
  background: #1e1e1e; border: none; outline: none;
  color: #e8e8e8; font-size: 13px;
  padding: 7px 10px; border-radius: 10px;
}
.input-content::placeholder { color: #777; }
.input-send {
  background: #1e88e5; color: #fff; border: none;
  padding: 7px 14px; border-radius: 10px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  flex-shrink: 0;
}
.input-send:active { opacity: 0.8; }

/* ===== 确认对话框 ===== */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: none; align-items: center; justify-content: center;
  z-index: 200;
}
.modal-mask.show { display: flex; }
.modal-box {
  background: #2a2a2a; border-radius: 16px;
  padding: 22px 24px 16px;
  width: 280px;
  text-align: center;
}
.modal-title {
  font-size: 16px; font-weight: 600; color: #fff;
  margin-bottom: 8px;
}
.modal-desc {
  font-size: 13px; color: #999;
  margin-bottom: 18px; line-height: 1.5;
}
.modal-btns {
  display: flex; gap: 10px;
}
.modal-btn {
  flex: 1; padding: 9px 0;
  border-radius: 10px; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.modal-btn.cancel {
  background: #3a3a3a; color: #ccc;
}
.modal-btn.confirm {
  background: #1e88e5; color: #fff;
}

/* ===== 工具分类切换栏 ===== */
.tool-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  padding: 6px;
  background: rgba(15, 43, 15, 0.6);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}
.tool-filter-bar::-webkit-scrollbar { display: none; }
.filter-btn {
  flex-shrink: 0;
  padding: 7px 16px;
  border: none;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}
.filter-btn:hover {
  color: var(--text);
  background: rgba(74, 222, 128, 0.12);
}
.filter-btn:active {
  transform: scale(0.92);
}
.filter-btn.active {
  background: linear-gradient(135deg, #4ADE80, #2DD4BF);
  color: #050A05;
  box-shadow: 0 2px 12px rgba(74, 222, 128, 0.3);
}
.filter-count {
  font-size: 10px;
  opacity: 0.7;
  font-weight: 500;
}

/* 拖拽滚动时禁止选中文本 */
.tool-filter-bar {
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.tool-filter-bar:active {
  cursor: grabbing;
}

/* 工具卡片响应式 */
@media (max-width: 600px) {
  .filter-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}
