/* ============================================================
   云盘视频站 · 全局样式
   ============================================================ */

:root {
  --bg: #0a0c12;
  --panel: #12161f;
  --panel-2: #171c27;
  --panel-3: #1e2431;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);
  --tx: #e9edf6;
  --tx-2: #98a2b6;
  --tx-3: #6a7488;
  --brand: #5b8cff;
  --brand-2: #8b6bff;
  --brand-dim: rgba(91, 140, 255, .14);
  --ok: #35c07d;
  --danger: #ef5f57;
  --warn: #e8b13a;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --shadow: 0 14px 44px -14px rgba(0, 0, 0, .7);
  --topbar-h: 60px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  color: var(--tx);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(900px 520px at 12% -12%, rgba(91, 140, 255, .17), transparent 62%),
    radial-gradient(760px 420px at 96% -4%, rgba(139, 107, 255, .13), transparent 58%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 40px;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: #8db2ff; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
img { border: 0; }
::selection { background: rgba(91, 140, 255, .35); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a3142; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3a4357; }

.muted { color: var(--tx-2); }
.grow { flex: 1; }

/* ---------- 布局 ---------- */
.wrap { max-width: 1320px; margin: 0 auto; padding: 22px 20px 60px; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 14px;
  height: var(--topbar-h); padding: 0 22px;
  background: rgba(12, 15, 22, .82);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 700; color: var(--tx); letter-spacing: .2px;
  white-space: nowrap;
}
.brand:hover { color: var(--tx); }
.brand .logo {
  width: 28px; height: 28px; border-radius: 9px;
  display: grid; place-items: center; font-size: 15px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 14px -4px rgba(91, 140, 255, .8);
}
.topbar .meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  color: var(--tx-3); font-size: 12.5px; min-width: 0;
}
.topbar .meta b { color: var(--tx-2); font-weight: 500; }
.topbar .meta .sep { opacity: .4; }
.topbar .actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* 兼容旧 header.top */
header.top {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 13px 18px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); margin-bottom: 18px;
}
header.top .brand { font-size: 16px; }
header.top .meta { color: var(--tx-2); font-size: 13px; }
header.top .spacer { flex: 1; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 15px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; font-size: 13.5px; font-weight: 550; line-height: 1.3;
  color: #fff; background: linear-gradient(135deg, var(--brand), #4a79e8);
  transition: filter .15s, background .15s, border-color .15s, color .15s, transform .06s;
  text-decoration: none; white-space: nowrap; font-family: inherit;
}
.btn:hover { filter: brightness(1.1); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.ghost {
  background: rgba(255, 255, 255, .04); border-color: var(--line-2); color: var(--tx);
}
.btn.ghost:hover { background: rgba(91, 140, 255, .12); border-color: rgba(91, 140, 255, .5); color: #cfe0ff; }
.btn.danger { background: transparent; border-color: rgba(239, 95, 87, .45); color: #ff9490; }
.btn.danger:hover { background: rgba(239, 95, 87, .12); border-color: var(--danger); }
.btn.small { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.icon-btn {
  width: 36px; height: 36px; flex: none; border-radius: 10px;
  display: inline-grid; place-items: center;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--tx-2);
  cursor: pointer; transition: .15s;
}
.icon-btn:hover { background: rgba(91, 140, 255, .14); border-color: rgba(91, 140, 255, .45); color: #cfe0ff; }
.icon-btn svg { width: 17px; height: 17px; }

/* 分段控件 */
.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: rgba(255, 255, 255, .045); border: 1px solid var(--line); border-radius: 10px;
}
.seg button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 0; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--tx-3); font-size: 12.5px; font-family: inherit;
  transition: .15s;
}
.seg button svg { width: 15px; height: 15px; }
.seg button:hover { color: var(--tx-2); }
.seg button.active { background: rgba(91, 140, 255, .18); color: #cfdfff; box-shadow: inset 0 0 0 1px rgba(91, 140, 255, .3); }

/* ---------- 工具条 ---------- */
.page-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 6px 0 14px;
}
.crumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; min-width: 0; }
.crumb a { color: var(--tx-2); padding: 2px 4px; border-radius: 6px; }
.crumb a:hover { background: rgba(255, 255, 255, .06); color: var(--tx); }
.crumb .sep { color: var(--tx-3); opacity: .6; font-size: 12px; }
.crumb b { color: var(--tx); font-weight: 600; }

.tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }

.search {
  position: relative; display: flex; align-items: center;
}
.search svg {
  position: absolute; left: 11px; width: 15px; height: 15px;
  color: var(--tx-3); pointer-events: none;
}
.search input {
  width: 240px; padding: 8px 12px 8px 34px; border-radius: 10px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04);
  color: var(--tx); font-size: 13px; outline: none; font-family: inherit;
  transition: border-color .15s, background .15s, width .2s;
}
.search input:focus { border-color: rgba(91, 140, 255, .6); background: rgba(91, 140, 255, .07); }
.search input::placeholder { color: var(--tx-3); }

select.sel {
  padding: 8px 30px 8px 11px; border-radius: 10px; font-family: inherit;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04);
  color: var(--tx-2); font-size: 12.5px; outline: none; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2398a2b6' stroke-width='2'><path d='M3 4.5 6 7.5 9 4.5'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center;
}
select.sel:focus { border-color: rgba(91, 140, 255, .6); }

/* 统计条 */
.statbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  color: var(--tx-3); font-size: 12.5px; margin-bottom: 12px; min-height: 18px;
}
.statbar b { color: var(--tx-2); font-weight: 600; }
.statbar .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--tx-3); opacity: .6; }

/* ---------- 网格视图 ---------- */
.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
}
.tile {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: var(--panel); border: 1px solid var(--line);
  cursor: pointer; transition: transform .16s, border-color .16s, box-shadow .16s;
  display: flex; flex-direction: column;
}
.tile:hover {
  transform: translateY(-3px);
  border-color: rgba(91, 140, 255, .38);
  box-shadow: 0 16px 34px -18px rgba(0, 0, 0, .9), 0 0 0 1px rgba(91, 140, 255, .12);
}
.tile-thumb {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: linear-gradient(150deg, #1b2230, #12161f 65%);
  display: grid; place-items: center;
}
.tile-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .35s cubic-bezier(.2, .7, .3, 1);
  background: #0d1017;
}
.tile:hover .tile-thumb img { transform: scale(1.045); }
.tile-ico {
  width: 54px; height: 54px; display: grid; place-items: center;
  border-radius: 15px; color: #cfe0ff;
  background: rgba(91, 140, 255, .13); border: 1px solid rgba(91, 140, 255, .22);
  transition: transform .2s;
}
.tile-ico svg { width: 25px; height: 25px; }
.tile-thumb.folder .tile-ico { width: 64px; height: 64px; border-radius: 19px; }
.tile-thumb.folder .tile-ico svg { width: 30px; height: 30px; }
.tile:hover .tile-ico { transform: scale(1.04); }
.tile-thumb.folder .tile-ico { color: #ffd479; background: rgba(255, 199, 74, .12); border-color: rgba(255, 199, 74, .22); }
.tile-badge {
  position: absolute; left: 9px; top: 9px; z-index: 2;
  padding: 2px 7px; border-radius: 6px; font-size: 11px; font-weight: 600;
  letter-spacing: .3px; text-transform: uppercase;
  background: rgba(8, 10, 15, .68); color: #dbe4f5;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.tile-badge.img { color: #9fe8c3; }
.tile-badge.vid { color: #a9c6ff; }
.tile-badge.aud { color: #f0c6ff; }

.tile-info { padding: 10px 12px 11px; min-width: 0; }
.tile-name {
  font-size: 13px; font-weight: 560; color: var(--tx);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-all; line-height: 1.45;
}
.tile-meta {
  margin-top: 5px; font-size: 11.5px; color: var(--tx-3);
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.tile-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .55; }

.tile-acts {
  position: absolute; right: 8px; top: 8px; z-index: 3;
  display: flex; gap: 6px; opacity: 0; transform: translateY(-3px);
  transition: opacity .16s, transform .16s;
}
.tile:hover .tile-acts, .tile:focus-within .tile-acts { opacity: 1; transform: none; }
.tile-acts .mini {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .14); background: rgba(8, 10, 15, .66);
  color: #dbe4f5; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: .15s;
}
.tile-acts .mini:hover { background: rgba(91, 140, 255, .8); border-color: transparent; color: #fff; }
.tile-acts .mini svg { width: 14px; height: 14px; }

/* 骨架 */
.skel {
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line);
  background: var(--panel);
}
.skel .sk-thumb { aspect-ratio: 16 / 9; background: linear-gradient(100deg, #171c27 30%, #202736 50%, #171c27 70%); background-size: 220% 100%; animation: sk 1.3s infinite linear; }
.skel .sk-line { height: 10px; margin: 11px 12px; border-radius: 5px; background: #1c2230; }
.skel .sk-line.short { width: 45%; margin-top: -4px; margin-bottom: 12px; }
@keyframes sk { from { background-position: 130% 0; } to { background-position: -30% 0; } }

/* ---------- 列表视图 ---------- */
.file-list {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--panel); overflow: hidden;
}
.fl-head, .fl-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 132px 74px;
  align-items: center; gap: 12px; padding: 10px 16px;
}
.fl-head {
  color: var(--tx-3); font-size: 12px; letter-spacing: .02em;
  border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .015);
}
.fl-head .r, .fl-row .r { text-align: right; }
.fl-row { border-bottom: 1px solid var(--line); cursor: pointer; transition: background .13s; }
.fl-row:last-child { border-bottom: 0; }
.fl-row:hover { background: rgba(91, 140, 255, .07); }
.fl-name { display: flex; align-items: center; gap: 11px; min-width: 0; }
.fl-ico {
  width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center;
  background: rgba(91, 140, 255, .11); color: #b9cdf5; border: 1px solid rgba(91, 140, 255, .16);
  overflow: hidden;
}
.fl-ico svg { width: 16px; height: 16px; }
.fl-ico.folder { background: rgba(255, 199, 74, .1); color: #ffd479; border-color: rgba(255, 199, 74, .18); }
.fl-ico img { width: 100%; height: 100%; object-fit: cover; }
.fl-txt { min-width: 0; }
.fl-title { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-sub { display: none; }
.fl-meta { color: var(--tx-3); font-size: 12.5px; }
.fl-act {
  width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; margin-left: auto;
  border: 1px solid transparent; background: transparent; color: var(--tx-3); cursor: pointer;
  opacity: 0; transition: .14s;
}
.fl-row:hover .fl-act { opacity: 1; }
.fl-act:hover { background: rgba(255, 255, 255, .07); border-color: var(--line-2); color: var(--tx); }
.fl-act svg { width: 15px; height: 15px; }

/* ---------- 空状态 ---------- */
.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 74px 20px; text-align: center;
  border: 1px dashed var(--line-2); border-radius: var(--r-xl);
  background: rgba(255, 255, 255, .012);
}
.empty-state .es-ico {
  width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center;
  background: rgba(91, 140, 255, .1); border: 1px solid rgba(91, 140, 255, .18); color: #a9c2f0;
}
.empty-state .es-ico svg { width: 28px; height: 28px; }
.empty-state h3 { font-size: 15px; }
.empty-state p { margin: 0; color: var(--tx-3); font-size: 13px; max-width: 380px; }

/* ---------- 分页 ---------- */
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pager .info { color: var(--tx-3); font-size: 12.5px; }
.pager .btn { min-width: 34px; }

/* ---------- 卡片 / 旧样式 ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px; margin-bottom: 16px;
}
.card h2 { margin: 0 0 6px; font-size: 16px; }
.card .desc { color: var(--tx-2); font-size: 13px; margin-bottom: 14px; line-height: 1.75; }

input[type=text], input[type=password], input[type=file], textarea {
  width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .04); color: var(--tx); outline: none; font-size: 14px;
  font-family: inherit; transition: border-color .15s;
}
input[type=text]:focus, input[type=password]:focus, textarea:focus {
  border-color: rgba(91, 140, 255, .6); background: rgba(91, 140, 255, .06);
}
input::placeholder { color: var(--tx-3); }
label.f { display: block; margin: 12px 0 6px; color: var(--tx-2); font-size: 13px; }

table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.list th { color: var(--tx-2); font-weight: 500; font-size: 13px; }
table.list tr.row:hover { background: var(--panel-2); }
table.list .name { cursor: pointer; word-break: break-all; }
table.list .name.f { font-weight: 600; }
table.list .acts { white-space: nowrap; text-align: right; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.toolbar input[type=text] { width: 260px; }
.empty { text-align: center; color: var(--tx-3); padding: 46px 0; }

/* toast */
.toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%) translateY(-6px);
  background: #1b2130; border: 1px solid var(--line-2); color: var(--tx);
  padding: 10px 18px; border-radius: 11px; z-index: 9999;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .55); max-width: 84vw; word-break: break-all;
  font-size: 13.5px; animation: toastIn .18s ease-out forwards;
}
@keyframes toastIn { to { transform: translateX(-50%) translateY(0); } }
.toast.err { border-color: rgba(239, 95, 87, .55); color: #ffb4b0; }
.toast.ok { border-color: rgba(53, 192, 125, .55); color: #b6edc9; }

/* 进度 / 上传 */
.progress-wrap { background: var(--panel-3); border-radius: 6px; height: 7px; overflow: hidden; margin-top: 6px; }
.progress { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); width: 0%; transition: width .2s; border-radius: 6px; }
.upload-item { padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); margin-bottom: 10px; }
.upload-item .u-top { display: flex; align-items: center; gap: 10px; }
.upload-item .u-name { flex: 1; word-break: break-all; font-size: 13.5px; }
.upload-item .u-size { color: var(--tx-3); font-size: 12px; }
.upload-item.done .progress { background: var(--ok); }
.upload-item.error .progress { background: var(--danger); }

.badge {
  display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 12px;
  background: var(--panel-3); border: 1px solid var(--line-2); color: var(--tx-2);
}
.badge.ok { color: var(--ok); border-color: rgba(53, 192, 125, .5); }
.badge.err { color: #ff9490; border-color: rgba(239, 95, 87, .5); }

.dropzone {
  border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); padding: 40px 24px;
  text-align: center; color: var(--tx-2); cursor: pointer; margin-bottom: 14px;
  transition: .16s; background: rgba(255, 255, 255, .012); font-size: 13.5px;
}
.dropzone:hover, .dropzone.hover { border-color: rgba(91, 140, 255, .6); color: #cfe0ff; background: rgba(91, 140, 255, .06); }

.modal-mask {
  position: fixed; inset: 0; background: rgba(5, 7, 11, .72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; z-index: 200; padding: 20px;
}
.modal {
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  padding: 22px; width: min(480px, 92vw); box-shadow: var(--shadow);
}
.modal h3 { margin: 0 0 12px; }
.steps { display: flex; gap: 8px; margin-bottom: 18px; }
.steps .step { flex: 1; text-align: center; padding: 8px; border-radius: 8px; background: var(--panel-2); color: var(--tx-2); font-size: 13px; }
.steps .step.active { background: var(--brand); color: #fff; }
.steps .step.done { color: var(--ok); }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.inline-form > div { flex: 1; min-width: 200px; }

/* 扫码绑定 */
.qr-wrap {
  display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--panel-2); margin-bottom: 16px;
}
.qr-left { text-align: center; }
.qr-box {
  width: 150px; height: 150px; background: #fff; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.qr-box img, .qr-box canvas { display: block; }
.qr-right { flex: 1; min-width: 220px; }
.qr-title { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.qr-status { font-size: 13px; margin-top: 10px; color: var(--tx-2); }
.qr-status.ok { color: var(--ok); }
.qr-status.bad { color: var(--danger); }
.qr-status.wait { color: var(--brand); }
.qr-divider { display: flex; align-items: center; gap: 10px; color: var(--tx-3); font-size: 12px; margin: 4px 0 14px; }
.qr-divider::before, .qr-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ============================================================
   全局媒体查看器（视频 / 图片 / 音频）
   ============================================================ */
.mv {
  position: fixed; inset: 0; z-index: 9000;
  display: none; grid-template-rows: auto minmax(0, 1fr) auto;
  background: #04060a;
  opacity: 0; transition: opacity .18s ease;
  --mv-pad: 0px;
}
.mv.show { display: grid; }
.mv.visible { opacity: 1; }

.mv-top {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px; min-height: 58px;
  background: linear-gradient(to bottom, rgba(4, 6, 10, .92), rgba(4, 6, 10, 0));
  position: relative; z-index: 4;
}
.mv-title { min-width: 0; flex: 1; }
.mv-name {
  font-size: 14px; font-weight: 600; color: #f0f4fb;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mv-sub { font-size: 12px; color: #86909f; margin-top: 1px; display: flex; gap: 8px; align-items: center; }

.mv-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.mv-btn {
  height: 36px; min-width: 36px; padding: 0 11px; border-radius: 10px;
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .06);
  color: #dbe4f5; font-size: 12.5px; cursor: pointer; font-family: inherit;
  transition: .14s; text-decoration: none;
}
.mv-btn:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .22); color: #fff; }
.mv-btn svg { width: 16px; height: 16px; }
.mv-btn.mv-close:hover { background: rgba(239, 95, 87, .8); border-color: transparent; }

.mv-stage {
  position: relative; min-height: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 0 8px;
}
.mv-content { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; position: relative; }

/* 图片 */
.mv-img {
  max-width: 100%; max-height: 100%; display: block;
  user-select: none; -webkit-user-drag: none; touch-action: none;
  will-change: transform; cursor: zoom-in;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .9);
  border-radius: 2px;
}
.mv-img.zoomable { cursor: grab; }
.mv-img.dragging { cursor: grabbing; }
.mv-img.smooth { transition: transform .17s cubic-bezier(.2, .7, .3, 1); }

/* 视频 */
.mv-video {
  width: 100%; height: 100%; max-height: 100%;
  object-fit: contain; background: #000; outline: none; border-radius: 8px;
}
.mv-audio-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  padding: 40px 20px; width: min(520px, 90vw);
}
.mv-audio-art {
  width: 168px; height: 168px; border-radius: 24px; display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(91, 140, 255, .22), rgba(139, 107, 255, .16));
  border: 1px solid rgba(255, 255, 255, .1); color: #b9cdf5;
  box-shadow: 0 20px 50px -22px rgba(91, 140, 255, .7);
}
.mv-audio-art svg { width: 58px; height: 58px; }
.mv-audio-wrap audio { width: 100%; }

/* 不支持的类型 */
.mv-fallback {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 40px; text-align: center; color: #98a2b6;
}
.mv-fallback .fb-ico {
  width: 78px; height: 78px; border-radius: 24px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); color: #b9cdf5;
}
.mv-fallback .fb-ico svg { width: 34px; height: 34px; }
.mv-fallback h3 { color: #e9edf6; font-size: 15px; }
.mv-fallback p { margin: 0; font-size: 13px; }

/* 左右切换 */
.mv-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .12); background: rgba(10, 13, 19, .6);
  color: #dbe4f5; cursor: pointer; transition: .15s;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.mv-nav:hover { background: rgba(91, 140, 255, .82); border-color: transparent; color: #fff; transform: translateY(-50%) scale(1.06); }
.mv-nav:disabled { opacity: .18; cursor: default; }
.mv-nav:disabled:hover { background: rgba(10, 13, 19, .6); transform: translateY(-50%); }
.mv-nav svg { width: 22px; height: 22px; }
.mv-nav.prev { left: 16px; }
.mv-nav.next { right: 16px; }

/* 底部工具条 */
.mv-bottom {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 18px 18px; flex-wrap: wrap;
  background: linear-gradient(to top, rgba(4, 6, 10, .92), rgba(4, 6, 10, 0));
  position: relative; z-index: 4;
}
.mv-tools {
  display: flex; align-items: center; gap: 4px; padding: 4px;
  border-radius: 12px; background: rgba(20, 24, 33, .82);
  border: 1px solid rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.mv-tools .mv-btn { border: 0; background: transparent; height: 32px; min-width: 32px; padding: 0 8px; }
.mv-tools .mv-btn:hover { background: rgba(255, 255, 255, .1); }
.mv-tools .mv-btn.on { color: #9fc0ff; background: rgba(91, 140, 255, .18); }
.mv-tools .val { font-size: 12px; color: #98a2b6; min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; }
.mv-counter {
  font-size: 12px; color: #86909f; padding: 5px 11px; border-radius: 20px;
  background: rgba(20, 24, 33, .72); border: 1px solid rgba(255, 255, 255, .08);
  font-variant-numeric: tabular-nums;
}

/* 加载中 */
.mv-spin {
  position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .14); border-top-color: #6f9bff;
  animation: mvspin .8s linear infinite; display: none; z-index: 2;
}
.mv-spin.on { display: block; }
@keyframes mvspin { to { transform: rotate(360deg); } }

body.mv-open { overflow: hidden; }

/* ---------- 悬浮菜单 ---------- */
.ctx {
  position: fixed; z-index: 9500; min-width: 168px; padding: 6px;
  background: #171c27; border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .8); display: none;
  animation: ctxIn .12s ease-out;
}
@keyframes ctxIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.ctx.open { display: block; }
.ctx button, .ctx a {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: 8px; background: transparent;
  color: var(--tx); font-size: 13px; text-align: left; cursor: pointer; font-family: inherit;
  text-decoration: none;
}
.ctx button:hover, .ctx a:hover { background: rgba(91, 140, 255, .16); color: #d7e5ff; }
.ctx button.danger { color: #ff9490; }
.ctx button.danger:hover { background: rgba(239, 95, 87, .14); }
.ctx svg { width: 15px; height: 15px; opacity: .85; }
.ctx .div { height: 1px; background: var(--line); margin: 5px 4px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 11px; }
  .fl-head { display: none; }
  .fl-row { grid-template-columns: minmax(0, 1fr) 34px; padding: 11px 13px; }
  .fl-row .fl-meta { display: none; }
  .fl-act { opacity: 1; }
  .search input { width: 150px; }
  .search input:focus { width: 190px; }
}

@media (max-width: 640px) {
  :root { --topbar-h: 54px; }
  .wrap { padding: 16px 13px 48px; }
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar .meta { display: none; }
  .brand span.bn { display: none; }
  .brand .logo { width: 30px; height: 30px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .tile-info { padding: 8px 9px 9px; }
  .tile-name { font-size: 12.5px; -webkit-line-clamp: 2; }
  .tile-meta { font-size: 10.5px; }
  .tile-acts { opacity: 1; transform: none; }
  .tile-acts .mini { width: 26px; height: 26px; }
  .tile-ico { width: 46px; height: 46px; border-radius: 13px; }
  .tile-ico svg { width: 21px; height: 21px; }
  .tile-thumb.folder .tile-ico { width: 54px; height: 54px; border-radius: 16px; }
  .tile-thumb.folder .tile-ico svg { width: 26px; height: 26px; }
  #mkdirBtn span { display: none; }
  #mkdirBtn { padding: 8px 11px; }
  .tools { width: 100%; margin-left: 0; }
  .search { flex: 1; }
  .search input, .search input:focus { width: 100%; }
  .seg button span { display: none; }
  .mv-top { padding: 10px 12px; min-height: 52px; }
  .mv-name { font-size: 13px; }
  .mv-btn span.txt { display: none; }
  .mv-btn { min-width: 36px; padding: 0 9px; }
  .mv-nav { width: 40px; height: 40px; }
  .mv-nav.prev { left: 8px; }
  .mv-nav.next { right: 8px; }
  .mv-bottom { padding: 10px 12px 16px; gap: 7px; }
  .mv-tools { gap: 0; }
  .mv-tools .mv-btn { min-width: 30px; padding: 0 6px; height: 30px; }
}

@media (max-width: 420px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .mv-tools .val { min-width: 40px; }
}

/* ---------- 细节修正 ---------- */
[hidden] { display: none !important; }
i[data-icon] {
  display: inline-flex; align-items: center; justify-content: center;
  font-style: normal; line-height: 0;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn i[data-icon] svg { width: 16px; height: 16px; }
.statbar a { color: var(--brand); }
.tile:focus-visible, .fl-row:focus-visible { outline: 2px solid rgba(91,140,255,.6); outline-offset: 2px; }

/* 视频封面色彩层次 */
.tile-thumb.v0 { background: linear-gradient(150deg, #1c2942, #111a2c 68%); }
.tile-thumb.v1 { background: linear-gradient(150deg, #2a2144, #171426 68%); }
.tile-thumb.v2 { background: linear-gradient(150deg, #12303a, #0f1c24 68%); }
.tile-thumb.v3 { background: linear-gradient(150deg, #352439, #1c1420 68%); }
.tile-thumb.v4 { background: linear-gradient(150deg, #2c2a1c, #1b1a12 68%); }
.tile-thumb.v5 { background: linear-gradient(150deg, #1d3448, #111e28 68%); }
.tile-thumb.v0 .tile-ico, .tile-thumb.v5 .tile-ico { background: rgba(120, 170, 255, .16); border-color: rgba(120, 170, 255, .26); }
.tile-thumb.v1 .tile-ico, .tile-thumb.v3 .tile-ico { background: rgba(178, 140, 255, .15); border-color: rgba(178, 140, 255, .25); }
.tile-thumb.v2 .tile-ico { background: rgba(90, 210, 200, .14); border-color: rgba(90, 210, 200, .24); }
.tile-thumb.v4 .tile-ico { background: rgba(240, 200, 100, .13); border-color: rgba(240, 200, 100, .22); }

/* 移动端媒体查看器：标题栏只留文件名，避免信息挤成多行 */
@media (max-width: 640px) {
  .mv-sub { display: none; }
  .mv-nav { width: 34px; height: 34px; opacity: .72; }
  .mv-nav svg { width: 17px; height: 17px; }
  .mv-nav.prev { left: 4px; }
  .mv-nav.next { right: 4px; }
  .mv-top { min-height: 50px; align-items: flex-start; padding-top: 11px; }
  .mv-name { font-size: 13px; line-height: 1.4; max-height: 2.8em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; }
}

/* 列表图标类型色 */
.fl-ico.t-video { background: rgba(91, 140, 255, .12); color: #b9cdf5; border-color: rgba(91, 140, 255, .18); }
.fl-ico.t-image { background: rgba(53, 192, 125, .1); color: #8fe0b8; border-color: rgba(53, 192, 125, .18); }
.fl-ico.t-audio { background: rgba(178, 140, 255, .11); color: #d9c2ff; border-color: rgba(178, 140, 255, .2); }
