/* ============ 基础 ============ */
:root {
  --bg: #eef0f4;
  --bg-soft: #f6f7fa;
  --card: #ffffff;
  --ink: #111827;
  --ink-2: #4b5563;
  --ink-3: #8a93a4;
  --line: #e6e8ee;
  --line-soft: #eef0f4;
  --brand: #6366f1;
  --brand-2: #8b5cf6;
  --brand-deep: #4f46e5;
  --brand-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --brand-soft: rgba(99,102,241,.10);
  --teal: #14b8a6;
  --danger: #ef4444;
  --warn: #d97706;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-xs: 0 1px 2px rgba(17,24,39,.04);
  --shadow: 0 1px 3px rgba(17,24,39,.06), 0 4px 12px rgba(17,24,39,.05);
  --shadow-lg: 0 12px 40px rgba(17,24,39,.16), 0 4px 12px rgba(17,24,39,.08);
  --ease: cubic-bezier(.4,0,.2,1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  background-image: radial-gradient(1200px 480px at 50% -200px, rgba(99,102,241,.10), transparent 70%);
  background-attachment: fixed;
  color: var(--ink);
  min-height: 100vh; font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font: inherit; }
img { display: block; }
::selection { background: rgba(99,102,241,.22); }
.hidden { display: none !important; }

/* ============ 顶栏 ============ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.78);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1320px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--ink); white-space: nowrap; letter-spacing: -.01em; }
.brand-logo {
  width: 32px; height: 32px; border-radius: 9px; background: var(--brand-grad);
  display: flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: 0 4px 12px rgba(99,102,241,.35);
}
.stat-badge {
  font-size: 11px; font-weight: 600; color: var(--ink-2);
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px;
  font-variant-numeric: tabular-nums;
}
.toolbar { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 11px;
  padding: 0 12px; height: 38px; min-width: 220px; flex: 1 1 240px; max-width: 360px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.search-box:focus-within {
  border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 4px rgba(99,102,241,.14);
}
.search-box svg { color: var(--ink-3); flex: none; transition: color .18s; }
.search-box:focus-within svg { color: var(--brand); }
.search-box input { border: none; outline: none; background: none; width: 100%; color: var(--ink); }
.search-box input::placeholder { color: var(--ink-3); }
.search-clear { color: var(--ink-3); font-size: 18px; line-height: 1; padding: 2px 4px; border-radius: 6px; transition: color .15s; }
.search-clear:hover { color: var(--ink); }
.sort-select, #speedSelect {
  height: 38px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--bg-soft); padding: 0 10px; color: var(--ink); outline: none; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.sort-select:hover, #speedSelect:hover { border-color: var(--brand-2); }
.sort-select:focus, #speedSelect:focus { border-color: var(--brand); background: #fff; }
.view-toggle { display: flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.icon-btn {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-3); border-radius: 8px; transition: all .18s var(--ease);
}
.icon-btn:hover { color: var(--ink); background: rgba(17,24,39,.05); }
.icon-btn.active { background: #fff; color: var(--brand-deep); box-shadow: var(--shadow-xs); }

/* 面包屑 */
.dir-bar {
  max-width: 1320px; margin: 0 auto; padding: 0 20px 12px;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin;
}
.dir-bar::-webkit-scrollbar { height: 0; }
.dir-chip {
  flex: none; padding: 6px 14px; border-radius: 99px; font-size: 13px; font-weight: 500;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2);
  white-space: nowrap; transition: all .18s var(--ease);
  display: inline-flex; align-items: center; gap: 5px;
}
.dir-chip:hover { border-color: var(--brand-2); color: var(--brand-deep); transform: translateY(-1px); }
.dir-chip.active {
  background: var(--brand-grad); border-color: transparent; color: #fff;
  box-shadow: 0 4px 12px rgba(99,102,241,.3);
}
.dir-chip .chip-count { opacity: .7; font-size: 11px; margin-left: 3px; font-variant-numeric: tabular-nums; }

/* ============ 内容区 ============ */
.content { max-width: 1320px; margin: 0 auto; padding: 18px 20px 100px; }
.grid-view { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.list-view { display: flex; flex-direction: column; gap: 6px; }

/* 封面通用 */
.card-cover {
  aspect-ratio: 16/10; position: relative; background: #0b0f1a; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.card-cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.55) 100%);
  pointer-events: none; opacity: .85; transition: opacity .25s;
}
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.cover-fallback {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: rgba(255,255,255,.9); z-index: 1;
}
.cover-fallback .fb-icon { font-size: 32px; line-height: 1; opacity: .9; }
.cover-fallback .fb-text {
  font-size: 12px; padding: 0 14px; text-align: center; opacity: .75;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-duration {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  background: rgba(0,0,0,.6); color: #fff; border-radius: 6px;
  font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; padding: 2px 8px;
  backdrop-filter: blur(4px);
}
.card-badge {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  display: inline-flex; align-items: center; gap: 3px;
  background: rgba(255,255,255,.18); color: #fff; border-radius: 6px;
  font-size: 10.5px; font-weight: 600; padding: 2px 8px;
  backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.15);
}
.card-badge.risky { background: rgba(217,119,6,.85); border-color: transparent; }
.card-progress {
  position: absolute; left: 0; bottom: 0; height: 3px; background: var(--brand-grad);
  z-index: 3; border-radius: 0 2px 2px 0;
}
/* hover 播放浮层 */
.play-overlay {
  position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.18); opacity: 0; transition: opacity .25s var(--ease);
  pointer-events: none;
}
.play-overlay .play-btn {
  width: 52px; height: 52px; border-radius: 50%; background: var(--brand-grad);
  display: flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.35); transform: scale(.8); transition: transform .25s var(--ease);
}

/* 文件网格卡 */
.media-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); cursor: pointer; position: relative;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
  display: flex; flex-direction: column; border: 1px solid var(--line-soft);
}
.media-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.media-card:hover .card-cover img { transform: scale(1.06); }
.media-card:hover .card-cover::after { opacity: 1; }
.media-card:hover .play-overlay { opacity: 1; }
.media-card:hover .play-overlay .play-btn { transform: scale(1); }
.media-card:active { transform: translateY(-2px) scale(.99); }
.card-info { padding: 11px 13px 13px; }
.card-name {
  font-size: 13px; font-weight: 600; line-height: 1.45; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-all; letter-spacing: -.005em;
}
.card-sub { margin-top: 5px; font-size: 11.5px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card-sub .dir-tag { color: var(--brand-deep); font-weight: 500; }
.card-sub .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); opacity: .5; }

/* 文件列表行 */
.media-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border-radius: var(--radius-sm); padding: 8px 14px;
  border: 1px solid var(--line-soft); cursor: pointer; transition: all .18s var(--ease);
}
.media-row:hover { background: var(--bg-soft); border-color: var(--line); transform: translateX(2px); }
.row-thumb {
  width: 72px; height: 46px; border-radius: 8px; flex: none;
  background: #0b0f1a; overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.85); font-size: 18px;
}
.row-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.media-row:hover .row-thumb img { transform: scale(1.08); }
.row-thumb .rt-type { position: absolute; left: 3px; top: 3px; font-size: 9.5px; font-weight: 600; background: rgba(0,0,0,.55); border-radius: 4px; padding: 1px 5px; color: #fff; backdrop-filter: blur(4px); }
.row-name { flex: 1; min-width: 0; }
.row-name .r-main { font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: break-all; letter-spacing: -.005em; }
.row-name .r-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta { flex: none; text-align: right; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.row-meta .r-dur { color: var(--brand-deep); font-weight: 600; font-size: 13px; }
.row-meta .r-date { color: var(--ink-3); font-size: 11px; margin-top: 2px; }

/* 空态 / 加载 */
.empty-state { text-align: center; padding: 90px 20px; color: var(--ink-3); grid-column: 1 / -1; }
.empty-state svg { opacity: .35; }
.empty-state p { margin-top: 14px; font-size: 14px; }
.sentinel { height: 1px; }
.load-more { text-align: center; padding: 24px; color: var(--ink-3); font-size: 13px; }

/* 目录网格卡（封面覆盖式信息） */
.dir-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); cursor: pointer; position: relative;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
  border: 1px solid var(--line-soft);
}
.dir-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.dir-card:hover .card-cover img { transform: scale(1.06); }
.dir-card:hover .card-cover::after { opacity: 1; }
.dir-card:active { transform: translateY(-2px) scale(.99); }
.dir-card .card-cover { aspect-ratio: 3/4; }
.dir-card .card-info {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 14px; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.85));
}
.dir-card .card-name {
  font-size: 14.5px; font-weight: 700; color: #fff; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-all; letter-spacing: -.01em;
  text-shadow: 0 1px 8px rgba(0,0,0,.4);
}
.dir-card .card-sub { margin-top: 6px; color: rgba(255,255,255,.78); }
.dir-card .card-badge { background: rgba(255,255,255,.22); }

/* 目录列表行 */
.dir-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border-radius: var(--radius-sm); padding: 8px 14px;
  border: 1px solid var(--line-soft); cursor: pointer; transition: all .18s var(--ease);
}
.dir-row:hover { background: var(--bg-soft); border-color: var(--line); transform: translateX(2px); }
.dir-row .dr-thumb {
  width: 56px; height: 56px; border-radius: 10px; flex: none;
  background: var(--brand-grad); overflow: hidden; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.95); font-size: 22px; position: relative;
}
.dir-row .dr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dir-row .row-name .r-main { font-size: 14px; font-weight: 600; }
.dir-row .dr-arrow { color: var(--ink-3); flex: none; transition: transform .18s, color .18s; }
.dir-row:hover .dr-arrow { color: var(--brand); transform: translateX(3px); }

/* ============ 登录遮罩 ============ */
.auth-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: radial-gradient(900px 500px at 30% 20%, rgba(99,102,241,.25), transparent 60%),
              radial-gradient(700px 400px at 80% 80%, rgba(139,92,246,.22), transparent 60%),
              linear-gradient(160deg, #0b1020, #161b2e);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.auth-card {
  background: rgba(255,255,255,.96); border-radius: 20px; padding: 40px 32px 32px; width: 100%; max-width: 380px;
  text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.6);
  animation: authIn .4s var(--ease);
}
@keyframes authIn { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: none; } }
.auth-logo {
  width: 56px; height: 56px; border-radius: 16px; background: var(--brand-grad); margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: 0 12px 28px rgba(99,102,241,.4);
}
.auth-card h2 { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.auth-tip { color: var(--ink-3); margin: 8px 0 22px; font-size: 13px; }
.auth-card input {
  width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 12px;
  padding: 0 16px; outline: none; text-align: center; font-size: 15px; transition: all .18s;
  background: var(--bg-soft);
}
.auth-card input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(99,102,241,.14); }
.auth-error { color: var(--danger); font-size: 13px; margin-top: 14px; min-height: 18px; }

/* ============ 按钮 ============ */
.btn {
  border-radius: 11px; padding: 9px 18px; font-weight: 600; font-size: 13.5px;
  transition: all .18s var(--ease); display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  white-space: nowrap;
}
.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: 0 4px 12px rgba(99,102,241,.3); }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(99,102,241,.42); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(.98); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-deep); background: var(--brand-soft); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-block { width: 100%; margin-top: 18px; height: 46px; font-size: 15px; }

/* ============ 播放器 ============ */
.player-modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8,11,20,.78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fadeIn .22s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.player-shell {
  width: 100%; max-width: 1120px; max-height: calc(100vh - 48px);
  background: #0b0f1a; border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.5);
  border: 1px solid rgba(255,255,255,.06);
  animation: playerIn .28s var(--ease);
}
@keyframes playerIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
.player-stage { position: relative; background: #000; }
#videoEl, #audioEl { display: block; width: 100%; max-height: 60vh; background: #000; }
#audioEl { display: none; padding: 32px 24px 8px; filter: invert(.93) hue-rotate(180deg); }
.player-stage.audio-mode #videoEl { display: none; }
.player-stage.audio-mode #audioEl { display: block; }
.audio-cover-bg {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center; pointer-events: none;
  background: radial-gradient(circle at 50% 40%, rgba(99,102,241,.18), transparent 60%);
}
.player-stage.audio-mode .audio-cover-bg { display: flex; }
.audio-cover-bg img {
  width: 200px; height: 200px; border-radius: 20px; object-fit: cover;
  box-shadow: 0 20px 50px rgba(0,0,0,.55);
}
.player-close {
  position: absolute; right: 14px; top: 14px; z-index: 5;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); transition: all .18s var(--ease);
  border: 1px solid rgba(255,255,255,.12);
}
.player-close:hover { background: rgba(239,68,68,.85); transform: rotate(90deg); }

.player-panel { padding: 16px 20px 18px; color: #e8eaf0; border-top: 1px solid rgba(255,255,255,.06); }
.player-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.player-title-wrap { flex: 1; min-width: 200px; }
.player-title-wrap h3 { font-size: 16px; font-weight: 700; word-break: break-all; line-height: 1.4; letter-spacing: -.01em; }
.player-meta { font-size: 12px; color: #7a8294; margin-top: 5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.type-badge {
  display: inline-block; font-size: 10.5px; font-weight: 700; border-radius: 5px;
  padding: 2px 8px; margin-bottom: 6px; vertical-align: middle; letter-spacing: .02em;
}
.type-badge.video { background: rgba(99,102,241,.22); color: #a5b4ff; }
.type-badge.audio { background: rgba(20,184,166,.22); color: #5eead4; }
.player-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.player-actions .btn-ghost { border-color: rgba(255,255,255,.12); color: #b9c0cc; background: rgba(255,255,255,.03); }
.player-actions .btn-ghost:hover { border-color: var(--brand); color: #a5b4ff; background: rgba(99,102,241,.12); }
.speed-wrap { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #b9c0cc; }
.speed-wrap select {
  background: rgba(255,255,255,.05); color: #e8eaf0; border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px; height: 32px; padding: 0 8px; outline: none; cursor: pointer;
}
.speed-wrap select:hover { border-color: var(--brand); }

.queue-panel {
  margin-top: 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; overflow: hidden;
  background: rgba(255,255,255,.02);
}
.queue-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; font-size: 12.5px; font-weight: 600; color: #9aa1ad; background: rgba(255,255,255,.03);
}
#queueList { list-style: none; max-height: 260px; overflow-y: auto; }
#queueList::-webkit-scrollbar { width: 6px; }
#queueList::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }
#queueList li {
  padding: 10px 14px; font-size: 13px; color: #c8cedb; cursor: pointer;
  display: flex; gap: 10px; align-items: center;
  border-top: 1px solid rgba(255,255,255,.05); word-break: break-all; transition: background .15s;
}
#queueList li:hover { background: rgba(255,255,255,.04); }
#queueList li.current { color: #a5b4ff; background: rgba(99,102,241,.14); }
#queueList li.current::before { content: "♪"; color: var(--brand-2); }
#queueList li .q-idx { color: #5a6273; font-size: 11px; flex: none; width: 22px; text-align: right; font-variant-numeric: tabular-nums; }

/* ============ 底部音频栏（mini player） ============ */
.audio-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  background: rgba(20,24,35,.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 16px; padding: 10px 20px;
  color: #e8eaf0;
  box-shadow: 0 -8px 28px rgba(0,0,0,.18);
  animation: barIn .28s var(--ease);
}
@keyframes barIn { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }
#abAudioEl { display: none; }
.ab-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 0 1 240px; }
.ab-cover {
  width: 48px; height: 48px; border-radius: 10px; flex: none; overflow: hidden;
  background: var(--brand-grad); display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.95); font-size: 22px;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.ab-cover img { width: 100%; height: 100%; object-fit: cover; }
.ab-cover-fb { font-size: 22px; }
.ab-info { min-width: 0; }
.ab-title {
  font-size: 13.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  word-break: break-all; letter-spacing: -.005em;
}
.ab-sub { font-size: 11.5px; color: #8a93a4; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ab-center { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 560px; margin: 0 auto; }
.ab-ctrl { display: flex; align-items: center; gap: 14px; }
.ab-btn {
  width: 32px; height: 32px; border-radius: 8px; color: #c8cedb;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s var(--ease); position: relative;
}
.ab-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.ab-btn.ab-play { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-grad); color: #fff; box-shadow: 0 4px 12px rgba(99,102,241,.4); }
.ab-btn.ab-play:hover { transform: scale(1.06); box-shadow: 0 6px 16px rgba(99,102,241,.5); }
#abQueueCount { position: absolute; top: -2px; right: -4px; font-size: 9px; background: var(--brand-2); color: #fff; border-radius: 99px; padding: 0 4px; min-width: 14px; text-align: center; line-height: 14px; }
.ab-progress { display: flex; align-items: center; gap: 10px; width: 100%; }
.ab-time { font-size: 11px; color: #8a93a4; font-variant-numeric: tabular-nums; flex: none; width: 38px; }
.ab-time:last-child { text-align: right; }
.ab-seek { flex: 1; height: 4px; accent-color: var(--brand); cursor: pointer; }

.ab-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.ab-speed {
  background: rgba(255,255,255,.06); color: #e8eaf0; border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; height: 30px; padding: 0 6px; outline: none; cursor: pointer; font-size: 12px;
}
.ab-speed:hover { border-color: var(--brand); }
.ab-vol { width: 70px; height: 4px; accent-color: var(--brand); cursor: pointer; }

/* 音频队列浮层 */
.ab-queue {
  position: fixed; right: 20px; bottom: 84px; z-index: 79;
  width: 320px; max-width: calc(100vw - 40px);
  background: rgba(20,24,35,.96); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.1); border-radius: 14px; overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
  animation: barIn .22s var(--ease);
}
.ab-queue-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; font-size: 13px; font-weight: 600; color: #c8cedb;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
#abQueueList { list-style: none; max-height: 320px; overflow-y: auto; }
#abQueueList::-webkit-scrollbar { width: 6px; }
#abQueueList::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }
#abQueueList li {
  padding: 10px 16px; font-size: 13px; color: #b9c0cc; cursor: pointer;
  display: flex; gap: 10px; align-items: center;
  border-top: 1px solid rgba(255,255,255,.04); word-break: break-all; transition: background .15s;
}
#abQueueList li:hover { background: rgba(255,255,255,.05); }
#abQueueList li.current { color: #a5b4ff; background: rgba(99,102,241,.14); }
#abQueueList li.current::before { content: "♪"; color: var(--brand-2); }
#abQueueList li .q-idx { color: #5a6273; font-size: 11px; flex: none; width: 22px; text-align: right; font-variant-numeric: tabular-nums; }

/* ============ 图片预览 ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 150; background: rgba(5,8,15,.92);
  display: flex; align-items: center; justify-content: center; padding: 40px;
  animation: fadeIn .2s var(--ease);
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 24px 60px rgba(0,0,0,.5); }

/* ============ Toast ============ */
.toast-box { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  background: #1a1f2e; color: #e8eaf0; border-radius: 12px; padding: 13px 20px;
  box-shadow: 0 16px 40px rgba(0,0,0,.35); font-size: 13.5px; display: flex; align-items: center; gap: 14px;
  animation: toastIn .26s var(--ease); max-width: min(92vw, 480px);
  border: 1px solid rgba(255,255,255,.08);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
.toast .btn { flex: none; }
.toast .btn-primary { background: var(--brand-grad); }

/* ============ 响应式 ============ */
@media (max-width: 760px) {
  .topbar-inner { padding: 10px 14px; gap: 8px; }
  .brand { font-size: 15px; }
  .search-box { min-width: 140px; max-width: none; order: 5; flex-basis: 100%; }
  .toolbar { margin-left: auto; }
  .dir-bar { padding: 0 14px 10px; }
  .content { padding: 14px 14px 100px; }
  .grid-view { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-name { font-size: 12px; }
  .dir-card .card-name { font-size: 13px; }
  .player-modal { padding: 0; }
  .player-shell { max-height: 100vh; border-radius: 0; max-width: 100%; border: none; }
  #videoEl { max-height: 36vh; }
  .row-thumb { width: 56px; height: 38px; }
  .dir-row .dr-thumb { width: 48px; height: 48px; }
  .row-meta .r-date { display: none; }
  .play-overlay .play-btn { width: 44px; height: 44px; }
  /* 音频栏移动端紧凑 */
  .audio-bar { padding: 8px 12px; gap: 10px; }
  .ab-left { flex: 0 1 140px; }
  .ab-sub, .ab-vol, .ab-speed { display: none; }
  .ab-center { max-width: none; }
  .ab-time { width: 32px; font-size: 10px; }
  .ab-queue { right: 12px; bottom: 76px; }
}
@media (max-width: 420px) {
  .grid-view { grid-template-columns: 1fr; }
}
