:root {
  --bg: #0E1116;
  --card: #181C22;
  --card-2: #1F242C;
  --line: #2A313B;
  --text: #E6EAF0;
  --text-2: #9AA4B2;
  --text-3: #6B7686;
  --accent: #2D6CDF;
  --accent-soft: #d6e4fb;
  --danger: #E5484D;
  --r-card: 12px;
  --r-btn: 8px;
  --shadow: 0 8px 30px rgba(0,0,0,.35);
}
[data-theme="light"] {
  --bg: #F4F6FA;
  --card: #FFFFFF;
  --card-2: #EEF2F7;
  --line: #DCE3EC;
  --text: #1B2230;
  --text-2: #5A6676;
  --text-3: #8A94A4;
  --accent: #2D6CDF;
  --accent-soft: #d6e4fb;
  --shadow: 0 8px 30px rgba(20,40,80,.12);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 13px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font-family: inherit; cursor: pointer; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

#app {
  display: grid;
  grid-template-columns: 200px 1fr;
  grid-template-rows: 1fr auto;
  grid-template-areas: "side main" "bottom bottom";
  height: 100vh;
}

/* ---------- 侧边栏 ---------- */
#sidebar {
  grid-area: side;
  background: var(--card);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: 16px 12px;
}
.brand { display: flex; align-items: center; gap: 8px; padding: 4px 8px 18px; }
.brand-logo { width: 28px; height: 28px; border-radius: 8px; }
.brand-name { font-size: 15px; font-weight: 600; }
#nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  background: transparent; border: 0; color: var(--text-2);
  padding: 10px 12px; border-radius: var(--r-btn); font-size: 13px; text-align: left;
}
.nav-item:hover { background: var(--card-2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item .ico { font-size: 15px; }
.nav-sep { height: 1px; background: var(--line); margin: 6px 8px; }

/* ---------- 导入进度浮层 ---------- */
.import-overlay {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.45); backdrop-filter: blur(2px);
}
.import-overlay[hidden] { display: none; }
.import-card {
  width: 340px; max-width: 86vw; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 22px 22px 20px; box-shadow: var(--shadow);
}
.import-title { font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.import-label { font-size: 13px; color: var(--text-2); margin-bottom: 4px; }
.import-count { font-size: 12px; color: var(--text-3); margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.import-bar { height: 8px; background: var(--card-2); border-radius: 6px; overflow: hidden; }
.import-bar-fill {
  height: 100%; width: 0%; background: var(--accent);
  border-radius: 6px; transition: width .18s ease;
}
.sidebar-foot { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.ghost-btn {
  background: var(--card-2); border: 1px solid var(--line); color: var(--text);
  padding: 9px; border-radius: var(--r-btn); font-size: 12px;
}
.ghost-btn:hover { border-color: var(--accent); color: var(--accent); }
.ghost-btn.accent { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.ghost-btn.accent:hover { background: var(--accent); color: #fff; }

/* ---------- 主区 ---------- */
#main { grid-area: main; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
#topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
}
.search-box { flex: 1; }
.search-box input {
  width: 100%; background: var(--card-2); border: 1px solid var(--line); color: var(--text);
  padding: 9px 14px; border-radius: 20px; font-size: 13px; outline: none;
}
.search-box input:focus { border-color: var(--accent); }

#menu-toggle { display: none; font-size: 18px; }
#view { flex: 1; overflow-y: auto; padding: 20px; min-height: 0; }

/* ---------- 媒体库网格 ---------- */
.section-title { font-size: 15px; font-weight: 600; margin: 4px 0 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }

/* 最近播放：卡片底部续播进度条 + 悬浮进度提示 */
.recent-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.10); z-index: 1; }
.recent-progress > span { display: block; height: 100%; background: var(--accent); }
.recent-tip { position: absolute; left: 8px; bottom: 8px; font-size: 10px; color: var(--text-3); background: rgba(0,0,0,.4); padding: 1px 6px; border-radius: 6px; opacity: 0; transition: opacity .15s; pointer-events: none; z-index: 2; }
.card:hover .recent-tip { opacity: 1; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  overflow: hidden; cursor: pointer; transition: transform .12s, border-color .12s; position: relative;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card .thumb {
  aspect-ratio: 1/1; background: linear-gradient(135deg, var(--card-2), var(--card));
  display: flex; align-items: center; justify-content: center; font-size: 34px; position: relative;
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .meta { padding: 9px 11px; }
.card .meta .name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .meta .sub { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .fav { position: absolute; top: 8px; right: 8px; font-size: 15px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.card.lost { filter: grayscale(1); opacity: .72; cursor: default; }
.card.lost:hover { transform: none; border-color: var(--line); }
.card .lost-badge { position: absolute; top: 8px; left: 8px; z-index: 2; background: var(--danger, #d9534f); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 6px; }
.card .lost-actions { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; gap: 6px; padding: 8px; background: linear-gradient(transparent, rgba(0,0,0,.7)); }
.card .lost-actions .ghost-btn { flex: 1; padding: 4px 0; font-size: 11px; margin: 0; }
.ghost-btn.danger { color: var(--danger, #d9534f); border-color: var(--danger, #d9534f); }

/* ---------- 多选 / 批量操作 ---------- */
.card .chk { position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.42); color: #fff; display: none; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; border: 2px solid rgba(255,255,255,.85); box-sizing: border-box; z-index: 3; }
.grid.selecting .card .chk { display: flex; }
.grid.selecting .card { cursor: pointer; }
.card.sel { outline: 2px solid var(--accent); outline-offset: -2px; }
.card.sel .chk { background: var(--accent); border-color: #fff; }
.selbar { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; box-shadow: 0 10px 34px rgba(0,0,0,.45); z-index: 60; }
.selbar .selcount { color: var(--text-3); font-size: 13px; min-width: 56px; text-align: center; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--text-3); }
.empty .big { font-size: 52px; margin-bottom: 12px; }
.empty .cta { display: inline-block; margin-top: 16px; background: var(--accent); color: #fff; padding: 11px 22px; border-radius: 22px; font-size: 14px; border: 0; }
.empty .cta:hover { filter: brightness(1.08); }

/* ---------- 音乐页 / 视频页（左侧媒体库 + 右侧播放器，音乐视频完全分开） ---------- */
.music-page, .video-page { display: grid; gap: 24px; height: 100%; min-height: 0; }
.music-page { grid-template-columns: 280px 1fr; }
.video-page { grid-template-columns: 260px 1fr; }
.media-lib { min-height: 0; overflow-y: auto; padding-right: 4px; }
.media-lib .grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.lib-head { margin-bottom: 12px; }
.lib-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.music-player { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.music-player .album-wrap { flex: none; }
.music-player .lyrics { flex: 1; min-height: 0; height: auto; }

.video-player { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.album-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.album-art {
  width: 300px; max-width: 100%; height: 300px; border-radius: 16px; background: var(--card-2);
  display: flex; align-items: center; justify-content: center; font-size: 60px; overflow: hidden;
  box-shadow: var(--shadow);
}
.album-art img { width: 100%; height: 100%; object-fit: cover; }
#spectrum { width: 300px; max-width: 100%; height: 70px; background: var(--card); border-radius: 10px; }
.track-info { text-align: center; }
.track-info .t { font-size: 17px; font-weight: 600; }
.track-info .a { font-size: 13px; color: var(--text-2); }
.lyrics {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 18px; overflow-y: auto; height: 100%; scroll-behavior: smooth;
}
.lyrics .line { padding: 7px 4px; color: var(--text-3); cursor: pointer; border-radius: 6px; transition: color .2s; }
.lyrics .line:hover { color: var(--text); }
.lyrics .line.active { color: var(--accent); font-weight: 600; font-size: 15px; }
.lyrics .none { color: var(--text-3); text-align: center; padding-top: 40px; }

/* ---------- 视频播放区 ---------- */
.video-stage {
  position: relative; background: #000; border-radius: var(--r-card); overflow: hidden;
  flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
}
.video-stage video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.video-opts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.video-opts .opt { background: var(--card-2); border: 1px solid var(--line); color: var(--text); padding: 7px 13px; border-radius: var(--r-btn); font-size: 12px; }
.video-opts .opt:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 底栏 ---------- */
#bottombar {
  grid-area: bottom; background: var(--card); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 260px 1fr 200px; align-items: center;
  gap: 16px; padding: 10px 18px;
}
.bb-now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bb-now .cover { width: 46px; height: 46px; border-radius: 8px; background: var(--card-2); display: flex; align-items: center; justify-content: center; font-size: 20px; overflow: hidden; flex-shrink: 0; }
.bb-now .cover img { width: 100%; height: 100%; object-fit: cover; }
.bb-now .txt { min-width: 0; }
.bb-now .txt .n { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-now .txt .s { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-center { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.bb-controls { display: flex; align-items: center; gap: 14px; }
.icon-btn { background: transparent; border: 0; color: var(--text-2); font-size: 18px; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--card-2); color: var(--text); }
.icon-btn.primary { background: var(--accent); color: #fff; }
.icon-btn.primary:hover { filter: brightness(1.1); color: #fff; }
.icon-btn.on { color: var(--accent); }
.progress-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.time { font-size: 11px; color: var(--text-3); min-width: 38px; text-align: center; }
.seek { flex: 1; -webkit-appearance: none; appearance: none; height: 5px; border-radius: 3px; background: var(--line); outline: none; cursor: pointer; }
.seek::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); }
.seek::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: var(--accent); }
.seek-wrap { position: relative; flex: 1; display: flex; align-items: center; }
.chapters { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); height: 14px; pointer-events: none; }
.chapters .ch { position: absolute; top: 0; width: 2px; height: 14px; background: var(--text-2); transform: translateX(-1px); pointer-events: auto; cursor: pointer; border-radius: 1px; }
.chapters .ch:hover { background: var(--accent); }
.chapters .ch.active { background: var(--accent); }
.bb-right { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.vol-row { display: flex; align-items: center; gap: 8px; }
.vol { width: 90px; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 3px; background: var(--line); outline: none; }
.vol::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--text); }
.mode-badge { font-size: 11px; color: var(--text-3); cursor: pointer; }
.mode-wrap { position: relative; display: inline-flex; }
.mode-menu { position: absolute; right: 0; bottom: calc(100% + 8px); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; z-index: 45; min-width: 116px; }
.mode-menu[hidden] { display: none !important; }
.mode-menu button { background: transparent; border: 0; color: var(--text-2); text-align: left; padding: 8px 12px; border-radius: 6px; font-size: 12px; }

/* ---------- 投屏面板（DLNA） ---------- */
.cast-panel { position: fixed; right: 16px; bottom: 76px; width: 280px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; z-index: 60; display: flex; flex-direction: column; gap: 10px; }
.cast-panel[hidden] { display: none !important; }
.cast-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text); font-weight: 600; }
.cast-close { background: transparent; border: 0; color: var(--text-3); font-size: 14px; cursor: pointer; }
.cast-actions { display: flex; gap: 8px; }
.cast-scan, .cast-stop, .cast-mirror { flex: 1; background: var(--card-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 8px; font-size: 12px; cursor: pointer; }
.cast-mirror { border-color: #2D8A6D; }
.cast-mirror:hover { border-color: #2D8A6D; color: #34C99A; }
.cast-scan:hover, .cast-stop:hover { border-color: var(--accent); color: var(--accent); }
.cast-stop[hidden] { display: none !important; }
.cast-list { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.cast-dev { background: var(--card-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 10px; font-size: 13px; text-align: left; cursor: pointer; }
.cast-dev:hover { border-color: var(--accent); color: var(--accent); }
.cast-empty { color: var(--text-3); font-size: 12px; line-height: 1.6; padding: 4px 2px; }
.mode-menu button:hover { background: var(--card-2); color: var(--text); }
.mode-menu button.active { color: var(--accent); font-weight: 600; }
.seek-tip { position: absolute; bottom: calc(100% + 8px); transform: translateX(-50%); background: var(--card); border: 1px solid var(--line); color: var(--text); padding: 3px 8px; border-radius: 6px; font-size: 11px; pointer-events: none; opacity: 0; transition: opacity .12s; white-space: nowrap; z-index: 20; }
.seek-tip.show { opacity: 1; }

/* ---------- 抽屉（队列） ---------- */
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: 340px; max-width: 86vw;
  background: var(--card); border-left: 1px solid var(--line); box-shadow: var(--shadow);
  transform: translateX(100%); transition: transform .25s; z-index: 40; display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer .dh { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--line); }
.drawer .dh h3 { margin: 0; font-size: 15px; }
.drawer .q-search {
  margin: 10px 12px 0; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: var(--r-btn);
  background: var(--card-2); color: var(--text);
  font-size: 13px; outline: none;
}
.drawer .q-search:focus { border-color: var(--accent); }
.drawer .q-search::placeholder { color: var(--text-3); }
.drawer .q-count { display: block; padding: 6px 14px 0; color: var(--text-3); font-size: 11px; }
.drawer .dlist { flex: 1; overflow-y: auto; padding: 8px; }
.q-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r-btn); cursor: pointer; }
.q-item:hover { background: var(--card-2); }
.q-item.active { background: var(--accent-soft); }
.q-item .qi { width: 28px; height: 28px; border-radius: 6px; background: var(--card-2); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.q-item .qt { flex: 1; min-width: 0; }
.q-item .qt .n { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-item .qt .s { font-size: 11px; color: var(--text-3); }
.q-item .qx { color: var(--text-3); font-size: 16px; }
.q-item .qx:hover { color: var(--danger); }
/* 歌单详情内的拖拽重排反馈 */
.q-item.pl-row { cursor: grab; }
.q-item.pl-row:active { cursor: grabbing; }
.q-item.dragging { opacity: .4; }
.q-item.dragover { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.q-item.missing .n { color: var(--text-3); font-style: italic; }
.q-item.pl-dim { opacity: .45; pointer-events: none; }
.q-item.playing { background: var(--accent-soft); }
.q-item.playing .n { color: var(--accent); }
.q-item.in-queue .qx:nth-of-type(1) { color: var(--accent); }
.mb .dlist { max-height: 56vh; overflow-y: auto; }

/* ---------- 模态 / 设置 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { background: var(--card); border: 1px solid var(--line); border-radius: 16px; width: 520px; max-width: 92vw; max-height: 86vh; overflow-y: auto; box-shadow: var(--shadow); }
.modal .mh { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal .mh h3 { margin: 0; font-size: 16px; }
.modal .mb { padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.setting-row label { font-size: 13px; }
.setting-row .desc { font-size: 11px; color: var(--text-3); }
.seg { display: flex; gap: 6px; }
.seg button { background: var(--card-2); border: 1px solid var(--line); color: var(--text-2); padding: 7px 13px; border-radius: var(--r-btn); font-size: 12px; }
.seg button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.eq-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; align-items: end; }
.eq-band { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.eq-band input { writing-mode: vertical-lr; direction: rtl; width: 28px; height: 90px; }
.eq-band .hz { font-size: 9px; color: var(--text-3); }
.storage-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.storage-bar > span { display: block; height: 100%; background: var(--accent); }

/* ---------- 使用说明 ---------- */
.help-body { font-size: 13px; }
.help-hero { display: flex; align-items: center; gap: 14px; margin: -2px 0 4px; }
.help-hero-logo { width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.help-hero-title { font-size: 17px; font-weight: 700; }
.help-hero-sub { font-size: 12px; color: var(--text-3); }
.help-sec { margin-bottom: 18px; }
.help-sec:last-child { margin-bottom: 0; }
.help-body h4 { margin: 0 0 9px; font-size: 14px; color: var(--text); padding-left: 10px; border-left: 3px solid var(--accent); line-height: 1.3; }
.help-body p { margin: 6px 0; color: var(--text-2); }
.help-body ol.help-steps { margin: 4px 0 0; padding-left: 22px; color: var(--text-2); }
.help-body ol.help-steps li { margin: 5px 0; }
.help-body ul { margin: 4px 0; padding-left: 20px; color: var(--text-2); }
.help-body ul li { margin: 5px 0; }
.help-body b { color: var(--text); font-weight: 600; }
.help-body code { background: var(--card-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 12px; color: var(--accent); }
.help-body table.help-kbd { width: 100%; border-collapse: collapse; margin: 4px 0; }
.help-body table.help-kbd th, .help-body table.help-kbd td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--text-2); }
.help-body table.help-kbd th { color: var(--text-3); font-weight: 500; }
.help-body table.help-kbd kbd { background: var(--card-2); border: 1px solid var(--line); border-radius: 5px; padding: 2px 8px; font-size: 12px; color: var(--text); }

/* ---------- Toast ---------- */
#toast-host { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--card-2); border: 1px solid var(--line); color: var(--text); padding: 10px 18px; border-radius: 22px; font-size: 13px; box-shadow: var(--shadow); animation: pop .2s; }
.toast.err { border-color: var(--danger); color: #ffd9da; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- 云盘（我的云盘） ---------- */
.cloud-card { max-width: 420px; margin: 8% auto 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; box-shadow: var(--shadow); }
.cloud-hero { text-align: center; margin-bottom: 16px; }
.cloud-hero-ico { font-size: 40px; }
.cloud-hero h2 { margin: 8px 0 4px; font-size: 19px; }
.cloud-hero p { margin: 0; color: var(--text-3); font-size: 12px; }
.cloud-tabs { margin-bottom: 14px; }
.cloud-tabs button { flex: 1; }
.cloud-form { display: flex; flex-direction: column; gap: 10px; }
.cloud-inp { width: 100%; background: var(--card-2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 11px 13px; font-size: 14px; box-sizing: border-box; }
.cloud-inp:focus { border-color: var(--accent); outline: none; }
.cloud-err { color: var(--danger); font-size: 12px; min-height: 14px; }
.cloud-tip { margin: 14px 0 0; color: var(--text-3); font-size: 11px; line-height: 1.6; text-align: center; }

.cloud-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.cloud-head-info { flex: 1; min-width: 0; }
.cloud-user { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.cloud-quota-bar { height: 9px; border-radius: 5px; background: var(--line); overflow: hidden; }
.cloud-quota-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #56b3ff); transition: width .4s; }
.cloud-quota-text { font-size: 11px; color: var(--text-3); margin-top: 5px; }

.cloud-drop { border: 1.5px dashed var(--line); border-radius: 14px; padding: 26px 16px; text-align: center; color: var(--text-2); font-size: 13px; }
.cloud-drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.cloud-list { display: flex; flex-direction: column; gap: 8px; }
.cloud-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; }
.cloud-row-main { flex: 1; min-width: 0; }
.cloud-row-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cloud-row-meta { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.cloud-row-act { display: flex; gap: 4px; flex-shrink: 0; }

/* ---------- 移动端 ---------- */
@media (max-width: 760px) {
  #app { grid-template-columns: 1fr; grid-template-areas: "main" "bottom"; }
  #menu-toggle { display: inline-flex; }
  #sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 200px; z-index: 60; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow); }
  #sidebar.open { transform: translateX(0); }
  #topbar { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .search-box { order: 3; flex-basis: 100%; }
  .music-page, .video-page { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; min-height: 0; overflow-y: auto; }
  .media-lib { overflow: visible; }
  .album-art { width: 200px; height: 200px; }
  #spectrum { width: 200px; }
  #bottombar { grid-template-columns: 1fr auto; grid-template-rows: auto auto; padding: 8px 12px; }
  .bb-now { min-width: 0; grid-row: 1; }
  .bb-right { grid-row: 1; }
  .bb-center { display: flex; grid-column: 1 / -1; grid-row: 2; }
  .bb-right .vol-row, .mode-badge, .bb-right .sleep { display: none; }
}

/* 转码进度覆盖层（HEVC/10bit → H.264，C# 回传实时百分比） */
.transcode-progress {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  width: 60%;
  max-width: 360px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
  text-align: center;
  font-size: 13px;
}
.transcode-progress .tc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  color: #333;
}
.transcode-progress .tc-pct { color: #888; font-variant-numeric: tabular-nums; }
.transcode-progress .tc-bar {
  height: 6px;
  border-radius: 3px;
  background: #f0f0f0;
  overflow: hidden;
}
.transcode-progress .tc-fill {
  height: 100%;
  width: 0%;
  background: #4c8dff;
  border-radius: 3px;
  transition: width .25s ease;
}

/* ---------- 主控台落地页：三段式极简暗黑 · 居中 Logo+搜索 ---------- */
.hub-home {
  min-height: calc(100vh - 250px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
}
.hub-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  padding: 60px 30px;
  text-align: center;
  width: 100%;
}
.hub-logo {
  font-size: clamp(56px, 10vw, 92px);
  font-weight: 800;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 0 46px rgba(120, 170, 255, .35);
  line-height: 1;
  user-select: none;
}
.hub-search {
  position: relative;
  width: min(520px, 82vw);
}
.hub-sicon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  opacity: .55;
  pointer-events: none;
}
.hub-input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 18px 13px 50px;
  font-size: 15px;
  color: #fff;
  background: #15181d;
  border: 1px solid #2a2f37;
  border-radius: 999px;
  outline: none;
  transition: border-color .2s;
}
.hub-input::placeholder { color: #6a707b; }
.hub-input:focus { border-color: #3d6df2; }
.hub-foot {
  font-size: 12px;
  color: #555b64;
  letter-spacing: .5px;
  opacity: .8;
}

/* ---------- 影像（视频）窗口：全屏内容播放器 ---------- */
body.win-video #sidebar { display: none; }
body.win-video #view { padding: 0; overflow: hidden; }

.vp-page {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 96px);
  background: #0b0d10;
  overflow: hidden;
}
/* 空态：视频内容网格铺满 */
.vp-page .media-lib { width: 100%; height: 100%; box-sizing: border-box; padding: 18px 22px 16px; }
/* 播放态：画面铺满整屏，裁剪边缘不留黑边；覆盖在网格之上 */
.vp-stage {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: #000;
  z-index: 5;
}
.vp-stage video { width: 100%; height: 100%; object-fit: cover; }
/* 影像窗增强控制条：画面底部半透明浮层 */
.vp-opts {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 12px 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .85));
  z-index: 6;
}
.vp-opts .opt {
  background: rgba(30, 34, 42, .85);
  border: 1px solid rgba(255, 255, 255, .14);
  color: var(--text);
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
}
.vp-opts select.opt { cursor: pointer; }
.vp-opts .opt:hover { border-color: var(--accent); color: var(--accent); }
.vp-opts .ab-label { pointer-events: none; opacity: .85; color: var(--accent); }
