/* ============================================================
   云网盘 · 科技感主题
   ============================================================ */
:root {
    --bg: #070b16;
    --bg2: #0b1224;
    --panel: rgba(15, 23, 46, .78);
    --panel2: rgba(21, 32, 61, .92);
    --border: rgba(90, 150, 255, .18);
    --border-hi: rgba(0, 212, 255, .55);
    --primary: #3d8bff;
    --primary2: #00d4ff;
    --grad: linear-gradient(135deg, #3d8bff 0%, #00d4ff 100%);
    --grad-soft: linear-gradient(135deg, rgba(61, 139, 255, .16), rgba(0, 212, 255, .16));
    --text: #e8eefc;
    --text2: #b6c4e4;
    --muted: #6d7ea6;
    --danger: #ff5c7a;
    --warning: #ffb020;
    --ok: #2ee6a8;
    --radius: 12px;
    --shadow: 0 8px 32px rgba(0, 0, 0, .45);
    --glow: 0 0 22px rgba(0, 212, 255, .25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}
/* 背景：光晕 + 网格 */
body::before {
    content: '';
    position: fixed; inset: 0; z-index: -2;
    background:
        radial-gradient(1100px 600px at 12% -8%, rgba(61, 139, 255, .18), transparent 60%),
        radial-gradient(900px 520px at 92% 108%, rgba(0, 212, 255, .13), transparent 60%),
        radial-gradient(700px 500px at 78% -10%, rgba(124, 77, 255, .10), transparent 55%),
        var(--bg);
}
body::after {
    content: '';
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background-image:
        linear-gradient(rgba(90, 150, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(90, 150, 255, .045) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(ellipse 90% 80% at 50% 20%, #000 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 20%, #000 30%, transparent 100%);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; outline: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(90, 150, 255, .28); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 212, 255, .5); }

/* ---------- 布局 ---------- */
.app { display: flex; height: 100vh; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }

/* ---------- 侧边栏 ---------- */
.sidebar {
    width: 232px;
    flex-shrink: 0;
    display: flex; flex-direction: column;
    background: var(--panel);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-right: 1px solid var(--border);
    z-index: 50;
}
.logo {
    display: flex; align-items: center; gap: 10px;
    padding: 22px 20px 18px;
}
.logo-icon svg { display: block; filter: drop-shadow(0 0 10px rgba(0, 212, 255, .55)); }
.logo-text {
    font-size: 19px; font-weight: 700; letter-spacing: .5px;
    background: linear-gradient(90deg, #7db8ff, #00d4ff);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.side-nav { flex: 1; padding: 6px 12px; overflow-y: auto; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; margin-bottom: 4px;
    border-radius: 10px; color: var(--text2);
    font-size: 14px; cursor: pointer;
    border: 1px solid transparent;
    transition: all .18s ease;
    position: relative;
}
.nav-item .nav-ic { display: flex; align-items: center; opacity: .85; }
.nav-item:hover { background: rgba(61, 139, 255, .10); color: var(--text); }
.nav-item.active {
    color: #fff;
    background: var(--grad-soft);
    border-color: var(--border-hi);
    box-shadow: var(--glow), inset 0 0 18px rgba(0, 212, 255, .08);
}
.nav-item.active::before {
    content: ''; position: absolute; left: 0; top: 22%; bottom: 22%; width: 3px;
    border-radius: 2px; background: var(--grad);
}
.side-bottom { padding: 14px 16px 18px; border-top: 1px solid var(--border); }
.quota-card {
    background: rgba(61, 139, 255, .07);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px; margin-bottom: 12px;
}
.quota-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text2); }
.quota-head b { font-size: 14px; color: #fff; font-variant-numeric: tabular-nums; }
.quota-bar {
    height: 6px; border-radius: 3px; margin: 9px 0 7px;
    background: rgba(255, 255, 255, .08); overflow: hidden;
}
.quota-bar i {
    display: block; height: 100%; border-radius: 3px;
    background: var(--grad); box-shadow: 0 0 10px rgba(0, 212, 255, .6);
    transition: width .5s ease;
}
.quota-foot { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.user-card {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 10px; border-radius: 10px; cursor: pointer;
    border: 1px solid transparent; transition: all .18s;
    position: relative;
}
.user-card:hover { background: rgba(61, 139, 255, .10); border-color: var(--border); }
.avatar {
    width: 34px; height: 34px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; font-size: 15px; font-weight: 600; color: #fff;
    background: var(--grad); box-shadow: 0 0 12px rgba(0, 212, 255, .4);
}
.user-meta { flex: 1; min-width: 0; }
.user-meta b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { font-size: 11px; color: var(--muted); }
.chevron { color: var(--muted); display: flex; }
.user-menu {
    position: absolute; bottom: 58px; left: 16px; right: 16px;
    background: var(--panel2); border: 1px solid var(--border);
    border-radius: 12px; box-shadow: var(--shadow);
    padding: 6px; display: none; z-index: 60;
}
.user-menu.show { display: block; animation: pop .15s ease; }
.user-menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 8px; color: var(--text2); font-size: 13px;
}
.user-menu a:hover { background: rgba(61, 139, 255, .12); color: #fff; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
.sidebar-mask { display: none; }

/* ---------- 顶栏 ---------- */
.topbar {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--border);
    background: rgba(9, 14, 28, .55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10;
}
.menu-btn { display: none; }
.breadcrumb { flex: 1; display: flex; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; white-space: nowrap; }
.crumb {
    color: var(--text2); font-size: 15px; cursor: pointer;
    padding: 3px 8px; border-radius: 7px; transition: all .15s;
}
.crumb:hover { color: #fff; background: rgba(61, 139, 255, .14); }
.crumb:first-child {
    font-weight: 600; color: #fff; font-size: 16px;
    background: linear-gradient(90deg, #7db8ff, #00d4ff);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.crumb-sep { color: var(--muted); opacity: .5; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.search-box {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border);
    border-radius: 10px; padding: 0 12px; height: 38px;
    width: 220px; color: var(--muted);
    transition: all .2s;
}
.search-box:focus-within { border-color: var(--border-hi); box-shadow: var(--glow); width: 260px; }
.search-box input {
    flex: 1; min-width: 0; background: transparent; border: none;
    color: var(--text); font-size: 13px;
}
.search-box input::placeholder { color: var(--muted); }
.search-clear { display: none; cursor: pointer; color: var(--muted); }
.search-clear.show { display: flex; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 38px; padding: 0 18px; border-radius: 10px;
    border: 1px solid var(--border); background: rgba(255, 255, 255, .05);
    color: var(--text); font-size: 13px; transition: all .18s;
}
.btn:hover { border-color: var(--border-hi); background: rgba(61, 139, 255, .12); }
.btn-primary {
    background: var(--grad); border: none; color: #fff; font-weight: 600;
    box-shadow: 0 4px 18px rgba(0, 150, 255, .35);
}
.btn-primary:hover { filter: brightness(1.12); box-shadow: 0 6px 24px rgba(0, 180, 255, .5); }
.btn-block { width: 100%; }
.icon-btn {
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    border-radius: 10px; border: 1px solid var(--border);
    background: rgba(255, 255, 255, .05); color: var(--text2);
    transition: all .18s;
}
.icon-btn:hover { border-color: var(--border-hi); color: #fff; box-shadow: var(--glow); }

/* ---------- 工具栏 ---------- */
.content { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.toolbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 22px 4px; gap: 12px; flex-wrap: wrap;
}
.toolbar-left { display: flex; align-items: center; gap: 10px; }
.check-all {
    display: flex; align-items: center; gap: 7px;
    font-size: 13px; color: var(--text2); cursor: pointer; user-select: none;
}
.check-all input { accent-color: var(--primary); width: 15px; height: 15px; cursor: pointer; }
.sel-actions { display: none; gap: 8px; align-items: center; }
.sel-actions.show { display: flex; animation: pop .15s ease; }
.t-btn {
    display: inline-flex; align-items: center; gap: 6px;
    height: 32px; padding: 0 13px; border-radius: 8px;
    border: 1px solid var(--border); background: rgba(255, 255, 255, .04);
    color: var(--text2); font-size: 12.5px; transition: all .15s;
}
.t-btn:hover { border-color: var(--border-hi); color: #fff; background: rgba(61, 139, 255, .12); }
.t-btn.danger:hover { border-color: rgba(255, 92, 122, .6); color: #ff859c; background: rgba(255, 92, 122, .1); }
.toolbar-right { display: flex; align-items: center; gap: 10px; }
.count-info { font-size: 12px; color: var(--muted); }
.sort-box { display: flex; align-items: center; gap: 6px; }
.sort-box select {
    height: 32px; padding: 0 10px; border-radius: 8px;
    border: 1px solid var(--border); background: rgba(255, 255, 255, .05);
    color: var(--text2); font-size: 12.5px;
}
.sort-box select:focus { border-color: var(--border-hi); }
.sort-box option { background: var(--bg2); color: var(--text); }

/* ---------- 文件区 ---------- */
.file-area {
    flex: 1; overflow-y: auto; padding: 16px 22px 90px;
    display: grid; gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    align-content: start;
}
.file-area.list { display: flex; flex-direction: column; gap: 8px; }
.file-item {
    position: relative;
    background: rgba(255, 255, 255, .028);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 12px 12px;
    cursor: pointer;
    transition: all .18s ease;
    overflow: hidden;
}
.file-area.grid .file-item { display: flex; flex-direction: column; align-items: center; text-align: center; }
.file-item:hover {
    background: rgba(61, 139, 255, .07);
    border-color: var(--border-hi);
    transform: translateY(-2px);
    box-shadow: var(--glow);
}
.file-item.selected {
    background: rgba(0, 212, 255, .10);
    border-color: var(--primary2);
    box-shadow: inset 0 0 0 1px var(--primary2), var(--glow);
}
.f-check {
    position: absolute; top: 9px; left: 9px; z-index: 2;
    width: 20px; height: 20px; border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, .35);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; color: transparent;
    transition: all .15s;
}
.file-item.selected .f-check {
    background: var(--grad); border-color: transparent; color: #fff;
    box-shadow: 0 0 10px rgba(0, 212, 255, .6);
}
.f-thumb {
    width: 84px; height: 84px; margin: 6px 0 10px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 14px;
    background: radial-gradient(circle at 30% 25%, rgba(61, 139, 255, .14), rgba(10, 16, 34, .6));
    border: 1px solid rgba(90, 150, 255, .10);
    overflow: hidden;
}
.f-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.file-item:hover .f-thumb img { transform: scale(1.06); }
.f-thumb svg { width: 52px; height: 52px; }
.f-name {
    width: 100%; font-size: 13px; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    word-break: break-all;
}
.f-meta { font-size: 11px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 列表模式 */
.file-area.list .file-item {
    display: flex; align-items: center; gap: 14px;
    padding: 8px 14px; border-radius: 10px;
}
.file-area.list .f-thumb { width: 42px; height: 42px; margin: 0; border-radius: 10px; }
.file-area.list .f-thumb svg { width: 26px; height: 26px; }
.file-area.list .f-name { flex: 1; }
.file-area.list .f-meta { flex-shrink: 0; min-width: 120px; text-align: right; }

/* ---------- 空状态 / 加载 ---------- */
.empty-tip {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: var(--muted); pointer-events: none;
}
.empty-ic svg { width: 90px; height: 90px; opacity: .5; filter: drop-shadow(0 0 18px rgba(61, 139, 255, .35)); }
.empty-tip p { margin-top: 10px; font-size: 15px; }
.empty-tip .empty-sub { font-size: 12.5px; color: var(--muted); opacity: .75; }
.loading {
    position: absolute; inset: 0; z-index: 5;
    display: flex; align-items: center; justify-content: center;
    background: rgba(7, 11, 22, .45); backdrop-filter: blur(3px);
}
.spinner {
    width: 34px; height: 34px; border-radius: 50%;
    border: 3px solid rgba(61, 139, 255, .2);
    border-top-color: var(--primary2);
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 移动端底部操作栏 ---------- */
.mobile-bar { display: none; }
.fab {
    position: fixed; right: 20px; bottom: 22px; z-index: 40;
    width: 54px; height: 54px; border-radius: 50%;
    background: var(--grad); border: none; color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 26px rgba(0, 150, 255, .5);
    transition: transform .2s;
}
.fab:hover { transform: scale(1.08); }
.fab-menu {
    position: fixed; right: 20px; bottom: 86px; z-index: 41;
    background: var(--panel2); border: 1px solid var(--border);
    border-radius: 14px; box-shadow: var(--shadow);
    padding: 8px; display: none; flex-direction: column; gap: 2px;
}
.fab-menu.show { display: flex; animation: pop .15s ease; }
.fab-menu button {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 16px; border: none; background: transparent;
    color: var(--text2); font-size: 13.5px; border-radius: 9px;
}
.fab-menu button:hover { background: rgba(61, 139, 255, .12); color: #fff; }

/* ---------- 上传居中浮层 ---------- */
.upload-overlay {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center;
    background: rgba(4, 8, 18, .62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: fadein .18s ease;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.upload-panel {
    width: min(560px, 92vw);
    max-height: 74vh;
    background: linear-gradient(160deg, rgba(22, 34, 66, .96), rgba(12, 19, 40, .97));
    border: 1px solid var(--border-hi);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6), var(--glow);
    padding: 20px 22px 18px;
    display: flex; flex-direction: column;
    animation: rise .22s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.upload-panel.done { border-color: rgba(46, 230, 168, .5); box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 26px rgba(46, 230, 168, .25); }
.up-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.up-head b { font-size: 17px; background: linear-gradient(90deg, #7db8ff, #00d4ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.up-count { font-size: 12px; color: var(--muted); flex: 1; }
.up-close {
    width: 30px; height: 30px; border-radius: 8px;
    border: 1px solid var(--border); background: rgba(255, 255, 255, .05);
    color: var(--muted); font-size: 17px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
}
.up-close:hover { color: #fff; border-color: var(--danger); background: rgba(255, 92, 122, .12); }
.up-global { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.up-bar {
    flex: 1; height: 9px; border-radius: 5px;
    background: rgba(255, 255, 255, .07); overflow: hidden;
}
.up-bar i {
    display: block; height: 100%; border-radius: 5px;
    background: var(--grad);
    box-shadow: 0 0 12px rgba(0, 212, 255, .7);
    transition: width .25s ease;
    width: 0;
}
.upload-panel.done .up-bar i { background: linear-gradient(90deg, #2ee6a8, #7df7cd); box-shadow: 0 0 12px rgba(46, 230, 168, .7); }
.up-global .up-pct { font-size: 15px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; min-width: 42px; text-align: right; }
.up-stats { display: flex; gap: 18px; font-size: 12px; color: var(--text2); margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.up-stats span { display: flex; align-items: center; gap: 5px; }
.up-stats span::before {
    content: ''; width: 5px; height: 5px; border-radius: 50%;
    background: var(--primary2); box-shadow: 0 0 8px var(--primary2);
}
.up-body { overflow-y: auto; max-height: 40vh; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }
.up-item {
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--border);
    border-radius: 11px; padding: 10px 12px;
    transition: border-color .2s;
}
.up-item.done { border-color: rgba(46, 230, 168, .35); }
.up-item.fail { border-color: rgba(255, 92, 122, .45); }
.up-item.cancel { opacity: .55; }
.up-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.up-name {
    flex: 1; min-width: 0; font-size: 13px; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.up-status { font-size: 11.5px; color: var(--muted); flex-shrink: 0; }
.up-status.hash { color: var(--warning); }
.up-status.up { color: var(--primary2); }
.up-status.done { color: var(--ok); }
.up-status.fail { color: var(--danger); }
.up-status.cancel { color: var(--muted); }
.up-cancel {
    width: 22px; height: 22px; flex-shrink: 0;
    border: none; background: transparent; color: var(--muted);
    font-size: 15px; border-radius: 6px; line-height: 1;
}
.up-cancel:hover { color: var(--danger); background: rgba(255, 92, 122, .12); }
.up-item.done .up-cancel, .up-item.fail .up-cancel, .up-item.cancel .up-cancel { display: none; }
.up-item .up-bar { height: 6px; }
.up-meta { display: flex; gap: 14px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 6px; }
.up-meta .up-pct { color: var(--text2); font-weight: 600; min-width: 38px; }

/* ---------- 视图切换条 ---------- */
.view-tabs {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 20px 0;
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
}
.view-tabs::-webkit-scrollbar { display: none; }
.vt {
    display: inline-flex; align-items: center; gap: 6px;
    height: 34px; padding: 0 14px;
    border: 1px solid transparent; border-radius: 9px;
    background: transparent; color: var(--text2);
    font-size: 13px; cursor: pointer; white-space: nowrap;
    transition: all .15s;
}
.vt svg { flex-shrink: 0; width: 17px; height: 17px; }
.vt:hover { color: #fff; background: rgba(255, 255, 255, .05); border-color: var(--border); }
.vt.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(0, 180, 255, .16), rgba(61, 139, 255, .12));
    border-color: rgba(0, 212, 255, .55);
    box-shadow: 0 0 18px rgba(0, 180, 255, .18), inset 0 0 12px rgba(0, 212, 255, .06);
}
@media (max-width: 720px) {
    .view-tabs { padding: 8px 12px 0; gap: 4px; }
    .vt { padding: 0 10px; height: 32px; font-size: 12px; }
    .vt span { display: none; }
}

/* ---------- 预览层（居中窗口） ---------- */
.preview-mask {
    position: fixed; inset: 0; z-index: 300;
    display: flex; align-items: center; justify-content: center;
    background: rgba(3, 6, 15, .78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadein .16s ease;
}
.pv-window {
    position: relative;
    width: min(84vw, 980px);
    height: min(78vh, 660px);
    display: flex; flex-direction: column;
    background: linear-gradient(165deg, rgba(19, 30, 58, .98), rgba(9, 15, 32, .99));
    border: 1px solid var(--border-hi);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .7), var(--glow);
    overflow: hidden;
    animation: rise .2s ease;
}
.pv-top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px; gap: 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(9, 14, 28, .6);
    flex-shrink: 0;
}
.pv-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
#pvName { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-meta { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.pv-ops { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pv-btn {
    display: inline-flex; align-items: center; gap: 6px;
    height: 34px; padding: 0 14px; border-radius: 9px;
    border: 1px solid var(--border); background: rgba(255, 255, 255, .05);
    color: var(--text2); font-size: 12.5px; transition: all .15s;
}
.pv-btn:hover { color: #fff; border-color: var(--border-hi); box-shadow: var(--glow); }
.pv-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 305; width: 44px; height: 76px;
    border-radius: 11px; border: 1px solid var(--border);
    background: rgba(20, 30, 58, .55); color: #fff;
    font-size: 30px; display: flex; align-items: center; justify-content: center;
    transition: all .15s; display: none;
}
.pv-nav:hover { border-color: var(--border-hi); background: rgba(0, 212, 255, .15); box-shadow: var(--glow); }
.pv-prev { left: 14px; }
.pv-next { right: 14px; }
.pv-body {
    flex: 1; min-height: 0; overflow: auto;
    display: flex; align-items: center; justify-content: center;
    padding: 14px;
}
.pv-body img, .pv-body video {
    max-width: 100%; max-height: 100%;
    border-radius: 10px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, .6);
    object-fit: contain;
}
.pv-img-wrap { display: flex; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; }
.pv-tip {
    position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
    font-size: 12px; color: var(--muted);
    background: rgba(12, 19, 40, .7); border: 1px solid var(--border);
    padding: 7px 16px; border-radius: 20px; white-space: nowrap;
    z-index: 306;
}
.pv-audio { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.pv-audio-ic {
    width: 120px; height: 120px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--grad-soft); border: 1px solid var(--border-hi);
    box-shadow: 0 0 40px rgba(0, 212, 255, .35);
    animation: pulse 2.4s ease infinite;
}
.pv-audio-ic svg { width: 64px; height: 64px; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 26px rgba(0, 212, 255, .3); } 50% { box-shadow: 0 0 46px rgba(0, 212, 255, .55); } }
.pv-audio audio { width: min(420px, 84vw); }
.pv-pdf { width: 100%; height: 100%; border: none; border-radius: 8px; background: #fff; }
.pv-text {
    width: 100%; max-width: 920px; height: 100%; overflow: auto;
    background: rgba(10, 16, 34, .75); border: 1px solid var(--border);
    border-radius: 12px; padding: 20px 24px;
    font-family: "Cascadia Code", Consolas, "Courier New", monospace;
    font-size: 13px; line-height: 1.7; color: #cfe3ff;
    white-space: pre-wrap; word-break: break-all;
}
.pv-docx {
    width: 100%; max-width: 860px; max-height: 100%; overflow: auto;
    background: #fff; color: #1d2733;
    border-radius: 8px; padding: 42px 52px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, .55);
    font-family: "Times New Roman", "SimSun", serif;
}
.pv-docx h1, .pv-docx h2, .pv-docx h3 { color: #16324f; margin: .8em 0 .4em; }
.pv-docx p { margin: .5em 0; line-height: 1.7; }
.pv-docx img { max-width: 100%; }
.pv-docx table { border-collapse: collapse; }
.pv-docx td, .pv-docx th { border: 1px solid #c5cdd8; padding: 4px 8px; }
.pv-xlsx {
    width: 100%; max-height: 100%; overflow: auto;
    background: #fff; border-radius: 8px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, .55);
}
.pv-xlsx table { border-collapse: collapse; font-size: 13px; color: #1d2733; font-family: inherit; }
.pv-xlsx td, .pv-xlsx th {
    border: 1px solid #d4dae3; padding: 6px 10px; white-space: nowrap;
}
.pv-xlsx th { background: #eef3fb; font-weight: 600; position: sticky; top: 0; }
.pv-loading {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    color: var(--muted); font-size: 14px;
}

/* ---------- 右键菜单 ---------- */
.ctx-menu {
    position: fixed; z-index: 400; min-width: 168px;
    background: var(--panel2); border: 1px solid var(--border);
    border-radius: 12px; box-shadow: var(--shadow);
    padding: 6px; display: none;
}
.ctx-menu.show { display: block; animation: pop .13s ease; }
.ctx-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 9px 12px; border: none; background: transparent;
    color: var(--text2); font-size: 13px; border-radius: 8px; text-align: left;
}
.ctx-item:hover { background: rgba(61, 139, 255, .12); color: #fff; }
.ctx-item.danger:hover { background: rgba(255, 92, 122, .12); color: #ff859c; }
.ctx-sep { height: 1px; background: var(--border); margin: 5px 8px; }

/* ---------- 弹窗 ---------- */
.modal-mask {
    position: fixed; inset: 0; z-index: 350;
    display: flex; align-items: center; justify-content: center;
    background: rgba(4, 8, 18, .62); backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: fadein .18s ease;
}
.modal {
    width: min(440px, 92vw); max-height: 86vh; overflow-y: auto;
    background: linear-gradient(160deg, rgba(22, 34, 66, .96), rgba(12, 19, 40, .97));
    border: 1px solid var(--border-hi);
    border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6), var(--glow);
    animation: rise .2s ease;
}
.modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px 12px;
}
.modal-head h3 { font-size: 16px; }
.modal-close {
    width: 30px; height: 30px; border-radius: 8px; border: none;
    background: rgba(255, 255, 255, .05); color: var(--muted);
    font-size: 16px; line-height: 1;
}
.modal-close:hover { color: #fff; background: rgba(255, 92, 122, .15); }
.modal-body { padding: 6px 20px 20px; }
.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-size: 12.5px; color: var(--text2); margin-bottom: 7px; }
.form-item input {
    width: 100%; height: 40px; padding: 0 12px;
    border: 1px solid var(--border); border-radius: 10px;
    background: rgba(255, 255, 255, .05); color: var(--text); font-size: 13.5px;
    transition: all .18s;
}
.form-item input:focus { border-color: var(--border-hi); box-shadow: var(--glow); }
.form-item input::placeholder { color: var(--muted); }
.folder-tree { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 8px; }
.ft-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border-radius: 8px; cursor: pointer;
    color: var(--text2); font-size: 13px;
}
.ft-item:hover { background: rgba(61, 139, 255, .1); }
.ft-item.active { background: var(--grad-soft); color: #fff; border: 1px solid var(--border-hi); }
.ft-ic { display: flex; }
.select {
    appearance: none; -webkit-appearance: none;
    background: rgba(255, 255, 255, .05) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236d7ea6' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
    color: var(--text);
}
.select option { background: var(--bg2); color: var(--text); }

/* ---------- 移动端弹层 ---------- */
.sheet-mask {
    position: fixed; inset: 0; z-index: 360;
    display: flex; align-items: flex-end; justify-content: center;
    background: rgba(4, 8, 18, .6);
}
.sheet {
    width: 100%; max-width: 560px;
    background: linear-gradient(180deg, rgba(22, 34, 66, .98), rgba(12, 19, 40, .99));
    border: 1px solid var(--border); border-radius: 18px 18px 0 0;
    padding: 14px 16px calc(18px + env(safe-area-inset-bottom));
    animation: rise .2s ease;
}
.sheet-title { font-size: 14px; color: var(--muted); padding: 6px 4px 12px; }
.sheet-item {
    display: flex; align-items: center; gap: 12px;
    width: 100%; padding: 13px 12px; border: none; background: transparent;
    color: var(--text); font-size: 14px; border-radius: 10px; text-align: left;
}
.sheet-item:hover { background: rgba(61, 139, 255, .1); }
.sheet-item.danger { color: var(--danger); }
.sheet-cancel {
    width: 100%; margin-top: 10px; padding: 13px;
    border: 1px solid var(--border); background: rgba(255, 255, 255, .04);
    color: var(--text2); font-size: 14px; border-radius: 10px;
}

/* ---------- Toast ---------- */
.toast {
    position: fixed; top: 24px; left: 50%; transform: translateX(-50%) translateY(-80px);
    z-index: 500; padding: 10px 22px; border-radius: 24px;
    background: rgba(15, 23, 46, .95); border: 1px solid var(--border-hi);
    color: var(--text); font-size: 13.5px;
    box-shadow: var(--shadow), var(--glow);
    opacity: 0; transition: all .25s ease; pointer-events: none;
    max-width: 84vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: rgba(255, 92, 122, .6); color: #ffa3b5; box-shadow: 0 8px 32px rgba(255, 92, 122, .2); }

/* ---------- 登录 / 注册页 ---------- */
.auth-body { overflow: auto; display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-wrap { width: min(400px, 92vw); padding: 40px 0; }
.auth-card {
    background: linear-gradient(165deg, rgba(22, 34, 66, .9), rgba(11, 18, 38, .94));
    border: 1px solid var(--border-hi);
    border-radius: 20px; padding: 34px 32px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .6), var(--glow);
    animation: rise .3s ease;
}
.auth-brand { text-align: center; margin-bottom: 26px; }
.auth-logo { display: inline-flex; }
.auth-logo svg {
    width: 58px; height: 58px;
    filter: drop-shadow(0 0 16px rgba(0, 212, 255, .6));
}
.auth-brand h1 {
    margin-top: 12px; font-size: 22px;
    background: linear-gradient(90deg, #7db8ff, #00d4ff);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.auth-brand p { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.auth-card .btn-primary { margin-top: 4px; }
.btn-app {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; margin-top: 16px; height: 42px;
    border-radius: 10px; font-size: 13.5px; color: var(--primary2);
    border: 1px dashed rgba(0, 212, 255, .45);
    background: rgba(0, 212, 255, .06);
    transition: all .18s ease;
}
.btn-app:hover { background: rgba(0, 212, 255, .14); border-style: solid; box-shadow: var(--glow); }
.btn-app svg { width: 17px; height: 17px; }
.auth-links { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; font-size: 12.5px; }
.auth-links .hint { color: var(--danger); flex: 1; }
.auth-links a { color: var(--primary2); }
.auth-links a:hover { text-decoration: underline; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 12px; color: var(--muted); }
.captcha-row input { letter-spacing: 4px; }
.field-hint { font-size: 11.5px; color: var(--warning); margin-top: 5px; min-height: 14px; }
.cap-refresh { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--primary2); cursor: pointer; }
.cap-refresh:hover { text-decoration: underline; }

/* ---------- 分享落地页 ---------- */
.share-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 30px 16px; }
.share-card {
    width: min(480px, 100%);
    background: linear-gradient(165deg, rgba(22, 34, 66, .9), rgba(11, 18, 38, .94));
    border: 1px solid var(--border-hi);
    border-radius: 20px; padding: 30px 28px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .6), var(--glow);
    animation: rise .3s ease;
}
.share-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.share-logo svg { width: 44px; height: 44px; filter: drop-shadow(0 0 14px rgba(0, 212, 255, .6)); }
.share-tag {
    font-size: 12px; color: var(--primary2);
    border: 1px solid var(--border-hi); border-radius: 20px;
    padding: 3px 12px; background: rgba(0, 212, 255, .08);
}
.share-lock { margin-bottom: 16px; }
.lock-ic { text-align: center; margin: 14px 0 18px; color: var(--primary2); display: flex; justify-content: center; }
.lock-ic svg { width: 42px; height: 42px; filter: drop-shadow(0 0 12px rgba(0, 212, 255, .5)); }
.share-file { display: flex; align-items: center; gap: 16px; padding: 18px; margin-bottom: 18px;
    background: rgba(255, 255, 255, .04); border: 1px solid var(--border); border-radius: 14px; }
.sf-ic { flex-shrink: 0; display: flex; }
.sf-ic svg { width: 56px; height: 56px; }
.sf-info { flex: 1; min-width: 0; }
.sf-info b { display: block; font-size: 15px; word-break: break-all; }
.sf-info span { font-size: 12px; color: var(--muted); }
.share-actions { display: flex; gap: 10px; }
.share-crumbs { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text2); margin-bottom: 12px; }
.share-list { display: flex; flex-direction: column; gap: 6px; }
.share-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px; border-radius: 10px;
    border: 1px solid var(--border); background: rgba(255, 255, 255, .03);
    transition: all .15s;
}
.share-item:hover { border-color: var(--border-hi); background: rgba(61, 139, 255, .08); box-shadow: var(--glow); }
.si-ic { display: flex; }
.si-name { flex: 1; min-width: 0; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-meta { font-size: 11.5px; color: var(--muted); flex-shrink: 0; }
.share-empty { text-align: center; padding: 30px 0; color: var(--muted); font-size: 13px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed; left: 0; top: 0; bottom: 0;
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: 20px 0 60px rgba(0, 0, 0, .5);
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-mask {
        position: fixed; inset: 0; z-index: 45;
        background: rgba(4, 8, 18, .55);
        display: none;
    }
    .sidebar-mask.show { display: block; }
    .menu-btn { display: flex; }
}
@media (max-width: 720px) {
    .topbar { padding: 10px 12px; gap: 8px; }
    .search-box { width: 130px; }
    .search-box:focus-within { width: 170px; }
    .content .toolbar { padding: 8px 12px 2px; }
    .file-area { padding: 12px 12px 110px; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); }
    .f-thumb { width: 66px; height: 66px; }
    .f-thumb svg { width: 40px; height: 40px; }
    .btn span { display: none; }
    .btn-primary { padding: 0 12px; }
    .mobile-bar { display: block; }
    .top-actions .sort-box { display: none; }
    .toolbar-right { display: none !important; }
    .pv-window { width: 100vw; height: 100vh; border-radius: 0; border: none; }
    .pv-nav { width: 38px; height: 64px; font-size: 24px; }
    .pv-prev { left: 8px; }
    .pv-next { right: 8px; }
    .pv-top { padding: 10px 12px; }
    .pv-btn { padding: 0 10px; }
    .pv-meta { display: none; }
    .pv-docx { padding: 20px 16px; }
    .up-stats { flex-wrap: wrap; gap: 10px; }
    .logo { padding: 18px 16px 14px; }
}

/* ---------- 分享成功展示 / 复制 ---------- */
.share-url-row { display: flex; gap: 8px; }
.share-url-input {
    flex: 1; min-width: 0; height: 38px; padding: 0 10px;
    border: 1px solid var(--border); border-radius: 8px;
    background: rgba(255, 255, 255, .06); color: #cfe3ff;
    font-size: 12.5px; font-family: inherit;
}
.share-url-input:focus { border-color: var(--border-hi); box-shadow: var(--glow); }
.share-pwd-row { display: flex; align-items: center; gap: 10px; }
.share-pwd-badge {
    font-size: 20px; font-weight: 700; letter-spacing: 6px; color: #7df7cd;
    background: rgba(46, 230, 168, .08); border: 1px dashed rgba(46, 230, 168, .45);
    border-radius: 8px; padding: 4px 16px 4px 20px;
}
.share-promo {
    margin-top: 4px; padding: 10px 12px;
    background: rgba(61, 139, 255, .07); border-left: 3px solid var(--primary2);
    border-radius: 0 8px 8px 0;
    font-size: 12.5px; color: var(--text2); line-height: 1.6;
}

/* ---------- 登录/注册页粒子背景 ---------- */
#particleCanvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.auth-wrap { position: relative; z-index: 1; }
.share-wrap { position: relative; z-index: 1; }


/* ---------- 移动端底部导航（百度网盘风格：上图标下文字） ---------- */
.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    display: none; align-items: stretch; justify-content: space-around;
    background: rgba(10, 18, 36, .94);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(120, 170, 255, .18);
    padding-bottom: env(safe-area-inset-bottom);
}
.bn-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 9px 0 7px; border: none; background: transparent;
    color: var(--text2); font-size: 11px; cursor: pointer;
    border-top: 2px solid transparent; transition: color .15s;
}
.bn-item svg { width: 21px; height: 21px; flex-shrink: 0; }
.bn-item.active { color: #4ea8ff; border-top-color: #4ea8ff; }
.bn-item:active { transform: scale(.96); }

/* 移动端：视图分类改为「上图标下文字」宫格 + 底部导航显示 */
@media (max-width: 720px) {
    .bottom-nav { display: flex; }
    .file-area { padding: 12px 12px 132px; }
    .fab { bottom: 82px; }
    .fab-menu { bottom: 146px; }
    .view-tabs { padding: 8px 8px 0; gap: 6px; }
    .vt { flex-direction: column; height: auto; padding: 7px 6px 5px; gap: 3px; font-size: 11px; }
    .vt span { display: block; }
    .vt svg { width: 19px; height: 19px; }
}


/* ---------- 公告弹窗 ---------- */
.ann-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ann-body { font-size: 13.5px; line-height: 1.8; color: var(--text2); white-space: pre-wrap; max-height: 46vh; overflow-y: auto; padding: 4px 2px; }
.ann-ops { display: flex; gap: 10px; margin-top: 16px; }
.ann-ops .btn { flex: 1; }

/* 手机版：预览弹窗隐藏下载按钮；文件卡片大缩略图+文件名上下排布 */
@media (max-width: 720px) {
    #pvDownload { display: none !important; }
    .file-area.grid .file-item { padding: 8px; }
    .file-area.grid .f-thumb { width: 100%; height: auto; aspect-ratio: 1 / 1; margin: 0 0 8px; border-radius: 12px; }
    .file-area.grid .f-thumb img { position: static; }
    .file-area.grid .f-name { font-size: 12px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; overflow: hidden; min-height: 2.7em; }
    .file-area.grid .f-meta { font-size: 10.5px; }
}
