:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #eff6ff;
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --muted-2: #94a3b8;
    --line: #e2e8f0;
    --line-soft: #f1f5f9;
    --bg: #f5f8fc;
    --card: #ffffff;
    --danger: #dc2626;
    --danger-soft: #fef2f2;
    --success: #16a34a;
    --warning: #d97706;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
    --sidebar: #0b1220;
    --sidebar-2: #101a30;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

button, input, select {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

svg {
    display: block;
}

/* ---------- 通用控件 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 11px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.btn svg {
    width: 17px;
    height: 17px;
}

.btn.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 8px 20px rgba(37, 99, 235, .24);
}

.btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(37, 99, 235, .3);
}

.btn.ghost {
    color: var(--ink-2);
    background: #fff;
    border: 1px solid var(--line);
}

.btn.ghost:hover {
    background: var(--line-soft);
}

.btn.danger {
    color: #fff;
    background: var(--danger);
}

.btn.danger-ghost {
    color: var(--danger);
    background: #fff;
    border: 1px solid #fecaca;
}

.btn.danger-ghost:hover {
    background: var(--danger-soft);
    border-color: #fca5a5;
}

.btn.block {
    width: 100%;
}

.btn:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

.select, .input {
    width: 100%;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 0 12px;
    color: var(--ink);
    background: #fff;
    outline: none;
    transition: border .18s ease, box-shadow .18s ease;
}

.select {
    width: auto;
    min-width: 130px;
    padding-right: 32px;
}

.select.block {
    width: 100%;
}

.input:focus, .select:focus {
    border-color: #93b4f7;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}

.field-label {
    display: block;
    margin: 14px 0 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
}

.field-label:first-child {
    margin-top: 0;
}

.alert {
    border-radius: 10px;
    padding: 10px 13px;
    font-size: 13px;
    margin-bottom: 14px;
    line-height: 1.5;
}

.alert.error {
    color: #b91c1c;
    background: var(--danger-soft);
    border: 1px solid #fecaca;
}

.alert.success {
    color: #15803d;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

/* ---------- 登录页 ---------- */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: radial-gradient(circle at 15% 20%, #e0ecff 0, transparent 42%),
    radial-gradient(circle at 85% 85%, #e6fbf7 0, transparent 45%),
    #f7faff;
    overflow-x: hidden;
    position: relative;
}

.login-glow {
    position: fixed;
    border-radius: 999px;
    filter: blur(10px);
    opacity: .6;
    pointer-events: none;
}

.login-glow-a {
    width: 420px;
    height: 420px;
    left: -140px;
    bottom: -180px;
    background: radial-gradient(circle, rgba(37, 99, 235, .22), transparent 65%);
}

.login-glow-b {
    width: 380px;
    height: 380px;
    right: -120px;
    top: -140px;
    background: radial-gradient(circle, rgba(14, 165, 233, .18), transparent 65%);
}

.login-shell {
    position: relative;
    z-index: 1;
    width: min(1040px, 100%);
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 60px;
    align-items: center;
}

.login-intro {
    padding: 20px 10px;
}

.login-brand, .share-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 19px;
    font-weight: 700;
    color: var(--ink);
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 10px 24px rgba(37, 99, 235, .28);
    flex: 0 0 auto;
}

.brand-mark svg {
    width: 24px;
    height: 24px;
}

.login-intro h1 {
    margin: 30px 0 18px;
    font-size: clamp(34px, 4vw, 48px);
    line-height: 1.2;
    letter-spacing: -.5px;
}

.login-intro h1::after {
    content: "";
    display: block;
    width: 64px;
    height: 5px;
    margin-top: 22px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), #38bdf8);
}

.login-desc {
    max-width: 460px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
    margin: 0 0 26px;
}

.login-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
    color: var(--ink-2);
    font-size: 14px;
}

.login-points li {
    display: flex;
    align-items: center;
    gap: 11px;
}

.point-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: #fff;
    border: 1px solid #dbeafe;
}

.point-icon svg {
    width: 17px;
    height: 17px;
}

.login-card {
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 24px;
    padding: 40px 36px 30px;
    box-shadow: 0 26px 70px rgba(15, 23, 42, .12);
}

.login-card-head h2 {
    margin: 0 0 6px;
    font-size: 26px;
    letter-spacing: -.3px;
}

.login-card-head p {
    margin: 0 0 26px;
    color: var(--muted);
    font-size: 14px;
}

.login-form label {
    display: block;
    margin: 16px 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
}

.field {
    position: relative;
}

.field svg {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--muted-2);
    pointer-events: none;
}

.field input {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 0 14px 0 42px;
    outline: none;
    transition: border .18s ease, box-shadow .18s ease;
}

.field input:focus {
    border-color: #93b4f7;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}

.login-submit {
    height: 48px;
    margin-top: 26px;
    font-size: 15px;
    letter-spacing: 6px;
}

.login-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.login-link {
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
}

.login-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.login-foot {
    margin: 22px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--muted-2);
}

/* ---------- 网盘主布局 ---------- */
.drive-body {
    background: var(--bg);
}

.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 248px;
    flex: 0 0 248px;
    display: flex;
    flex-direction: column;
    padding: 24px 18px 18px;
    color: #cbd5e1;
    background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 30;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 6px;
    color: #fff;
}

.brand .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
}

.brand .brand-mark svg {
    width: 22px;
    height: 22px;
}

.brand-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .5px;
}

.brand-sub {
    font-size: 9px;
    letter-spacing: 2px;
    color: #64748b;
    margin-top: 2px;
}

.upload-btn {
    margin: 26px 4px 10px;
    height: 46px;
    border: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 10px 24px rgba(37, 99, 235, .35);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.upload-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(37, 99, 235, .45);
}

.upload-btn.folder {
    margin: 0 4px 18px;
    color: #bfdbfe;
    background: rgba(59, 130, 246, .14);
    border: 1px solid rgba(96, 165, 250, .32);
    box-shadow: none;
}

.upload-btn.folder:hover {
    background: rgba(59, 130, 246, .24);
    box-shadow: 0 10px 24px rgba(37, 99, 235, .22);
}

.upload-btn svg {
    width: 18px;
    height: 18px;
}

.nav {
    display: grid;
    gap: 5px;
    margin-top: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    border: 0;
    background: transparent;
    color: #94a3b8;
    border-radius: 11px;
    padding: 11px 13px;
    font-size: 14px;
    text-align: left;
    transition: background .18s ease, color .18s ease;
}

.nav-item svg {
    width: 19px;
    height: 19px;
}

.nav-item:hover {
    color: #e2e8f0;
    background: rgba(148, 163, 184, .09);
}

.nav-item.active {
    color: #fff;
    background: rgba(59, 130, 246, .18);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .22);
}

.storage-card {
    margin-top: auto;
    padding: 15px;
    border-radius: 14px;
    background: rgba(148, 163, 184, .08);
    border: 1px solid rgba(148, 163, 184, .1);
}

.storage-top {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #cbd5e1;
}

.storage-track {
    height: 6px;
    border-radius: 999px;
    margin: 11px 0 9px;
    background: rgba(148, 163, 184, .18);
    overflow: hidden;
}

.storage-track span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #38bdf8, #3b82f6);
    transition: width .4s ease;
}

.storage-text {
    display: flex;
    gap: 3px;
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
}

.storage-sep {
    opacity: .6;
}

.sidebar-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 6px 2px;
    margin-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, .12);
}

.avatar, .top-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    border-radius: 50%;
}

.avatar {
    width: 34px;
    height: 34px;
    font-size: 14px;
    flex: 0 0 auto;
}

.side-user {
    min-width: 0;
    flex: 1;
}

.side-user div {
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-user small {
    display: block;
    color: #64748b;
    font-size: 11px;
    margin-top: 2px;
}

.logout-btn {
    border: 0;
    background: transparent;
    color: #64748b;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn:hover {
    color: #e2e8f0;
    background: rgba(148, 163, 184, .12);
}

.logout-btn svg {
    width: 18px;
    height: 18px;
}

.sidebar-mask {
    display: none;
}

.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 30px;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.icon-btn {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .18s ease, color .18s ease;
}

.icon-btn:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.icon-btn svg {
    width: 18px;
    height: 18px;
}

.menu-btn {
    display: none;
}

.breadcrumb {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    color: var(--muted);
    overflow: hidden;
}

.crumb {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 4px 6px;
    border-radius: 7px;
}

.crumb:last-child {
    color: var(--ink);
    font-weight: 600;
}

.crumb:hover {
    background: var(--line-soft);
    color: var(--primary);
}

.crumb-sep {
    color: var(--muted-2);
    font-size: 12px;
    user-select: none;
}

.topbar-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 260px;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #f8fafc;
    transition: background .18s ease, border .18s ease, box-shadow .18s ease;
}

.search-box:focus-within {
    background: #fff;
    border-color: #93b4f7;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .08);
}

.search-box svg {
    width: 17px;
    height: 17px;
    color: var(--muted-2);
    flex: 0 0 auto;
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 13px;
    color: var(--ink);
}

.top-avatar {
    width: 38px;
    height: 38px;
    font-size: 14px;
    flex: 0 0 auto;
}

.content {
    padding: 28px 30px 40px;
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
}

.content-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.content-head h1 {
    margin: 0 0 5px;
    font-size: 26px;
    letter-spacing: -.4px;
}

.content-head p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.content-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ---------- 视图切换 ---------- */
.view-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
}

.view-btn {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background: transparent;
    transition: background .18s ease, color .18s ease;
}

.view-btn svg {
    width: 17px;
    height: 17px;
}

.view-btn:hover {
    color: var(--ink-2);
    background: var(--line-soft);
}

.view-btn.active {
    color: var(--primary);
    background: var(--primary-soft);
}

/* ---------- 文件列表 ---------- */
.file-card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    min-height: 360px;
}

.file-table-head, .file-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px 160px 190px;
    align-items: center;
    gap: 12px;
    padding: 0 22px;
}

.file-table-head {
    height: 46px;
    font-size: 12px;
    color: var(--muted-2);
    letter-spacing: .3px;
    background: #fbfdff;
    border-bottom: 1px solid var(--line-soft);
}

.file-table-head .head-actions {
    text-align: right;
}

.bulk-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: sticky;
    top: 68px;
    z-index: 19;
    margin-bottom: 12px;
    padding: 10px 16px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.bulk-bar.show {
    display: flex;
}

.bulk-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-dark);
}

.bulk-actions {
    display: flex;
    gap: 8px;
}

.bulk-actions .btn {
    padding: 8px 14px;
}

.select-here {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 65;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 999px;
    padding: 11px 22px;
    background: rgba(15, 23, 42, .92);
    color: #f8fafc;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .3);
    transition: opacity .18s ease, transform .18s ease;
}

.select-here svg {
    width: 16px;
    height: 16px;
}

.select-here.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    pointer-events: auto;
}

.select-here:hover {
    background: rgba(15, 23, 42, 1);
}

.file-list {
    min-height: 280px;
}

.file-row {
    min-height: 62px;
    border-bottom: 1px solid var(--line-soft);
    transition: background .15s ease;
}

.file-row:last-child {
    border-bottom: 0;
}

.file-row:hover {
    background: #f8fbff;
}

.file-row.selected,
.file-row.selected:hover {
    background: #eff6ff;
}

.head-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.row-check {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.file-row .name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.file-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .4px;
    color: #fff;
    user-select: none;
}

.file-icon svg {
    width: 21px;
    height: 21px;
}

.kind-folder {
    background: linear-gradient(135deg, #60a5fa, #2563eb);
}

.kind-image {
    background: linear-gradient(135deg, #fb7185, #e11d48);
}

.kind-video {
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
}

.kind-audio {
    background: linear-gradient(135deg, #2dd4bf, #0d9488);
}

.kind-pdf {
    background: linear-gradient(135deg, #f87171, #dc2626);
}

.kind-doc {
    background: linear-gradient(135deg, #60a5fa, #1d4ed8);
}

.kind-text {
    background: linear-gradient(135deg, #94a3b8, #475569);
}

.kind-archive {
    background: linear-gradient(135deg, #fbbf24, #d97706);
}

.kind-other {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
}

.file-name {
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 0;
    text-align: left;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

button.file-name:hover {
    color: var(--primary);
}

.file-size, .file-time {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

.file-size {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.video-tag {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .2px;
    color: #2563eb;
    background: rgba(37, 99, 235, .08);
    border-radius: 4px;
    padding: 1px 5px;
    align-self: flex-start;
}

.file-time {
    color: var(--muted-2);
}

.file-actions {
    display: flex;
    justify-content: flex-end;
    gap: 3px;
    opacity: .45;
    transition: opacity .15s ease;
}

.file-row:hover .file-actions,
.file-row:focus-within .file-actions {
    opacity: 1;
}

.action-btn {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.action-btn.danger:hover {
    color: var(--danger);
    background: var(--danger-soft);
}

.action-btn svg {
    width: 16px;
    height: 16px;
}

/* ---------- 图标 / 相册视图 ---------- */
.grid-toolbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 20px;
    border-bottom: 1px solid var(--line-soft);
    background: #fbfdff;
    font-size: 12px;
    color: var(--muted-2);
}

.grid-select-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-2);
    cursor: pointer;
}

.file-card.grid-view .grid-toolbar {
    display: flex;
}

.file-card.grid-view .file-table-head {
    display: none;
}

.file-card.grid-view .file-list {
    display: grid;
    align-content: start;
    align-items: start;
    gap: 16px;
    padding: 20px;
}

.file-card.grid-xl .file-list {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 18px;
}

.file-card.grid-lg .file-list {
    grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
    gap: 14px;
}

.file-card.grid-sm .file-list {
    grid-template-columns: repeat(auto-fill, minmax(106px, 1fr));
    gap: 10px;
    padding: 14px;
}

.file-card.grid-view .file-row.tile {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.file-card.grid-view .file-row.tile:hover {
    background: transparent;
}

.tile-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #f8fbff, #eef2f8);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .05);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

.file-row.tile:hover .tile-thumb {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, .16);
}

.tile-thumb .tile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tile-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tile-ph .file-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    font-size: 13px;
}

.tile-ph .file-icon svg {
    width: 32px;
    height: 32px;
}

.file-card.grid-lg .tile-ph .file-icon {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    font-size: 11px;
}

.file-card.grid-lg .tile-ph .file-icon svg {
    width: 26px;
    height: 26px;
}

.file-card.grid-sm .tile-ph .file-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 9px;
}

.file-card.grid-sm .tile-ph .file-icon svg {
    width: 21px;
    height: 21px;
}

.tile-thumb .row-check {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 4;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .3);
}

.tile-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    pointer-events: none;
}

.tile-play svg {
    width: 34px;
    height: 34px;
    padding: 9px;
    box-sizing: content-box;
    border-radius: 50%;
    background: rgba(15, 23, 42, .45);
    backdrop-filter: blur(4px);
}

.file-card.grid-sm .tile-play svg {
    width: 22px;
    height: 22px;
    padding: 7px;
}

.tile-quality {
    position: absolute;
    left: 8px;
    bottom: 8px;
    z-index: 3;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .2px;
    color: #fff;
    background: rgba(15, 23, 42, .6);
    border-radius: 5px;
    padding: 2px 6px;
}

.tile-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 0 2px;
}

.tile-meta .file-name {
    font-size: 12.5px;
}

.tile-sub {
    font-size: 11px;
    color: var(--muted-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-row.tile.selected .tile-thumb {
    box-shadow: inset 0 0 0 3px var(--primary);
}

.file-row.tile.selected .file-name {
    color: var(--primary-dark);
}

.empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 40px 20px;
    text-align: center;
    color: var(--muted-2);
}

.empty-state.show {
    display: flex;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: #c7d7ef;
    margin-bottom: 14px;
}

.empty-state h3 {
    margin: 0 0 7px;
    color: var(--ink-2);
    font-size: 16px;
}

.empty-state p {
    margin: 0;
    font-size: 13px;
}

.drop-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(239, 246, 255, .88);
    backdrop-filter: blur(4px);
    border: 2px dashed #60a5fa;
    border-radius: var(--radius);
}

.file-card.dragging .drop-overlay {
    display: flex;
}

.drop-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--primary-dark);
}

.drop-inner svg {
    width: 42px;
    height: 42px;
}

.drop-inner strong {
    font-size: 17px;
}

.drop-inner span {
    font-size: 12px;
    color: var(--muted);
}

/* ---------- 分享列表 ---------- */
.share-list {
    padding: 8px 0;
}

.share-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--line-soft);
}

.share-item:last-child {
    border-bottom: 0;
}

.share-item-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: var(--primary-soft);
}

.share-item-icon svg {
    width: 20px;
    height: 20px;
}

.share-item-main {
    flex: 1;
    min-width: 0;
}

.share-item-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-item-link {
    margin-top: 4px;
    font-size: 12px;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 5px;
    font-size: 11px;
    color: var(--muted-2);
}

.share-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.mini-btn {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-2);
    border-radius: 9px;
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 500;
}

.mini-btn:hover {
    border-color: #bfdbfe;
    color: var(--primary);
    background: var(--primary-soft);
}

.mini-btn.danger:hover {
    border-color: #fecaca;
    color: var(--danger);
    background: var(--danger-soft);
}

.badge {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    background: var(--line-soft);
    color: var(--muted);
}

.badge.lock {
    color: #b45309;
    background: #fffbeb;
}

.badge.expired {
    color: var(--danger);
    background: var(--danger-soft);
}

/* ---------- 上传面板 ---------- */
.upload-panel {
    position: fixed;
    right: 26px;
    bottom: 24px;
    z-index: 60;
    width: 360px;
    max-height: 62vh;
    overflow-y: auto;
    display: grid;
    gap: 10px;
    padding-right: 2px;
    pointer-events: auto;
}

.upload-panel-head {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 12px;
    background: rgba(15, 23, 42, .92);
    color: #e2e8f0;
    font-size: 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .22);
}

.upload-panel-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.upload-count {
    color: #93c5fd;
}

.upload-panel-head .mini-btn.danger {
    border-color: rgba(248, 113, 113, .4);
    color: #fca5a5;
}

.upload-panel-head .mini-btn.danger:hover:not(:disabled) {
    background: rgba(248, 113, 113, .16);
    color: #fff;
}

.upload-panel-head .mini-btn:disabled {
    opacity: .4;
    cursor: default;
}

.upload-item {
    pointer-events: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .14);
    animation: slideUp .25s ease;
}

.upload-info {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--ink-2);
    margin-bottom: 9px;
}

.upload-name {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-status {
    flex: 0 0 auto;
    color: var(--primary);
    font-weight: 600;
}

.upload-track {
    height: 5px;
    border-radius: 999px;
    background: var(--line-soft);
    overflow: hidden;
}

.upload-track span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #38bdf8, #2563eb);
    transition: width .2s ease;
}

.upload-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 9px;
}

.upload-meta {
    min-width: 0;
    color: var(--muted-2);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
}

.upload-actions .mini-btn {
    height: 27px;
    padding: 0 9px;
    font-size: 11px;
}

.upload-item.paused {
    border-color: #fde68a;
}

.upload-item.paused .upload-status {
    color: #b45309;
}

.upload-item.paused .upload-track span {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.upload-item.error {
    border-color: #fecaca;
}

.upload-item.error .upload-status {
    color: var(--danger);
}

.upload-item.done {
    border-color: #bbf7d0;
}

.upload-item.done .upload-status {
    color: var(--success);
}

.upload-item.done .upload-track span {
    background: linear-gradient(90deg, #34d399, #10b981);
}

/* ---------- 弹窗 ---------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, .42);
    backdrop-filter: blur(5px);
}

.modal-backdrop.show {
    display: flex;
}

.modal {
    width: min(460px, 100%);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, .28);
    animation: modalIn .22s ease;
}

.modal-sm {
    width: min(400px, 100%);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 12px;
}

.modal-head h3 {
    margin: 0;
    font-size: 17px;
}

.modal-close {
    border: 0;
    background: transparent;
    color: var(--muted-2);
    font-size: 24px;
    line-height: 1;
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

.modal-close:hover {
    color: var(--ink);
    background: var(--line-soft);
}

.modal-body {
    padding: 4px 22px 18px;
}

.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 22px 20px;
}

.modal-file {
    margin: 0 0 4px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--line-soft);
    font-size: 13px;
    color: var(--ink-2);
    word-break: break-all;
}

.confirm-text {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.share-result {
    display: none;
    margin-top: 16px;
    padding-top: 4px;
    border-top: 1px dashed var(--line);
}

.share-result.show {
    display: block;
}

.share-link-row {
    display: flex;
    gap: 8px;
}

.share-link-row .input {
    flex: 1;
    min-width: 0;
    color: var(--primary);
    font-size: 12px;
}

.preview-backdrop {
    padding: 32px;
}

.preview-modal {
    position: relative;
    width: min(980px, 100%);
    height: min(760px, 90vh);
    display: flex;
    flex-direction: column;
}

.preview-nav {
    position: absolute;
    top: 50%;
    z-index: 6;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(15, 23, 42, .72);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .14);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
    transition: opacity .18s ease, background .18s ease, transform .18s ease;
}

.preview-nav.show {
    opacity: 1;
    pointer-events: auto;
}

.preview-nav:hover:not(:disabled) {
    background: rgba(37, 99, 235, .9);
    transform: translateY(-50%) scale(1.06);
}

.preview-nav:disabled {
    opacity: .28;
    pointer-events: none;
}

.preview-nav.prev {
    left: 4px;
}

.preview-nav.next {
    right: 4px;
}

.preview-nav svg {
    width: 22px;
    height: 22px;
}

.preview-modal .modal-body {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    margin: 0 22px;
    border-radius: 12px;
    padding: 0;
    overflow: auto;
}

.preview-body img, .preview-body video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.preview-body iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

.preview-body audio {
    width: min(520px, 90%);
}

/* ---------- 图片 / 视频预览全屏（电脑端与手机端一致） ---------- */
.preview-backdrop.image-fullscreen {
    padding: 0;
    background: #000;
    backdrop-filter: none;
}

.preview-backdrop.image-fullscreen .preview-modal {
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 0;
    box-shadow: none;
    background: #000;
    animation: none;
}

.preview-backdrop.image-fullscreen .preview-modal .modal-head {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 8;
    padding: 16px 26px;
    border-bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0));
}

.preview-backdrop.image-fullscreen .modal-head h3 {
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    max-width: 68%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-backdrop.image-fullscreen .modal-close {
    color: #fff;
    background: rgba(255, 255, 255, .16);
}

.preview-backdrop.image-fullscreen .preview-modal .modal-body {
    height: 100%;
    margin: 0;
    border-radius: 0;
    background: #000;
    overflow: hidden;
}

.preview-backdrop.image-fullscreen .preview-body img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
}

.preview-backdrop.image-fullscreen .video-shell {
    width: 100%;
    height: 100%;
    border-radius: 0;
    background: #05070d;
}

.preview-backdrop.image-fullscreen .preview-modal .modal-foot {
    display: none;
}

.preview-backdrop.image-fullscreen .preview-nav {
    z-index: 9;
    background: rgba(0, 0, 0, .5);
}

.preview-backdrop.image-fullscreen .preview-nav.prev {
    left: 18px;
}

.preview-backdrop.image-fullscreen .preview-nav.next {
    right: 18px;
}

.video-shell {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #05070d;
    border-radius: 12px;
    overflow: hidden;
}

.video-shell:fullscreen,
.video-shell:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    background: #000;
}

.video-stage {
    position: relative;
    flex: 1;
    min-height: 0;
    background: radial-gradient(circle at 50% 45%, #131a2a 0%, #05070d 72%);
    overflow: hidden;
}

.video-stage video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: transparent;
    cursor: pointer;
}

.video-center {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 68px;
    height: 68px;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(15, 23, 42, .62);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .12);
    backdrop-filter: blur(6px);
    transform: translate(-50%, -50%) scale(.94);
    transition: opacity .2s ease, transform .2s ease, background .2s ease;
}

.video-center:hover {
    background: rgba(37, 99, 235, .86);
    transform: translate(-50%, -50%) scale(1);
}

.video-center svg {
    width: 30px;
    height: 30px;
}

.video-stage.playing .video-center {
    opacity: 0;
    pointer-events: none;
}

.video-spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, .6);
    transform: translate(-50%, -50%);
}

.video-spinner.show {
    display: flex;
}

.video-spinner span {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .25);
    border-top-color: #60a5fa;
    animation: videoSpin .8s linear infinite;
}

.video-controls {
    flex: 0 0 auto;
    padding: 8px 14px 12px;
    background: linear-gradient(180deg, #111a2b, #0a101c);
    border-top: 1px solid rgba(148, 163, 184, .14);
}

.video-progress {
    position: relative;
    height: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    touch-action: none;
}

.video-progress::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 999px;
    background: rgba(148, 163, 184, .24);
}

.video-buffer,
.video-played {
    position: absolute;
    left: 0;
    height: 4px;
    border-radius: 999px;
    display: block;
}

.video-buffer {
    width: 0;
    background: rgba(96, 165, 250, .35);
}

.video-played {
    width: 0;
    background: linear-gradient(90deg, #38bdf8, #2563eb);
    box-shadow: 0 0 10px rgba(37, 99, 235, .5);
}

.video-knob {
    position: absolute;
    left: 0;
    top: 50%;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
    transform: translateY(-50%) scale(.85);
    transition: transform .15s ease;
}

.video-progress:hover .video-knob,
.video-progress:active .video-knob {
    transform: translateY(-50%) scale(1.15);
}

.video-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
}

.video-btn {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, color .15s ease;
}

.video-btn:hover {
    background: rgba(96, 165, 250, .16);
    color: #fff;
}

.video-btn svg {
    width: 18px;
    height: 18px;
}

.video-time {
    flex: 0 0 auto;
    font-size: 12px;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.video-time-sep {
    margin: 0 4px;
    color: #475569;
}

.video-spacer {
    flex: 1;
}

.video-volume {
    -webkit-appearance: none;
    appearance: none;
    width: 84px;
    height: 4px;
    border-radius: 999px;
    background: rgba(148, 163, 184, .3);
    outline: none;
    cursor: pointer;
}

.video-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}

.video-volume::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: #fff;
}

.speed-bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #0a101c;
    border-top: 1px solid rgba(148, 163, 184, .12);
    overflow-x: auto;
    scrollbar-width: none;
}

.speed-bar::-webkit-scrollbar {
    display: none;
}

.speed-label {
    flex: 0 0 auto;
    color: #94a3b8;
    font-size: 12px;
    margin-right: 4px;
}

.speed-btn {
    flex: 0 0 auto;
    min-width: 48px;
    height: 30px;
    border: 1px solid rgba(148, 163, 184, .26);
    border-radius: 8px;
    background: rgba(148, 163, 184, .08);
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 600;
    transition: background .15s ease, border .15s ease, color .15s ease;
}

.speed-btn:hover {
    background: rgba(96, 165, 250, .18);
    color: #fff;
}

.speed-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

@keyframes videoSpin {
    to {
        transform: rotate(360deg);
    }
}

.preview-text {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 22px;
    overflow: auto;
    color: #dbeafe;
    background: #0f172a;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.preview-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #cbd5e1;
    font-size: 14px;
    padding: 40px;
    text-align: center;
}

.preview-hint svg {
    width: 54px;
    height: 54px;
    color: #64748b;
}

.preview-modal .modal-foot {
    align-items: center;
}

/* ---------- 提示 ---------- */
.toast-wrap {
    position: fixed;
    top: 22px;
    right: 24px;
    z-index: 200;
    display: grid;
    gap: 10px;
    pointer-events: none;
}

.toast {
    min-width: 220px;
    max-width: 360px;
    padding: 12px 15px;
    border-radius: 11px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(15, 23, 42, .14);
    font-size: 13px;
    color: var(--ink-2);
    animation: slideDown .22s ease;
    pointer-events: auto;
}

.toast.success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.toast.error {
    border-color: #fecaca;
    background: var(--danger-soft);
    color: #b91c1c;
}

/* ---------- 分享页 ---------- */
.share-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: radial-gradient(circle at 20% 15%, #e0ecff 0, transparent 40%),
    radial-gradient(circle at 80% 90%, #e6fbf7 0, transparent 42%),
    #f7faff;
    position: relative;
    overflow-x: hidden;
}

.share-shell {
    position: relative;
    z-index: 1;
    width: min(480px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.share-brand {
    margin-bottom: 22px;
}

.share-card {
    width: 100%;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 24px;
    padding: 34px 32px 30px;
    box-shadow: 0 26px 70px rgba(15, 23, 42, .12);
    text-align: center;
}

.share-file-badge {
    width: 66px;
    height: 66px;
    margin: 0 auto 18px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .5px;
    background: linear-gradient(135deg, #60a5fa, #1d4ed8);
    box-shadow: 0 12px 26px rgba(37, 99, 235, .28);
}

.share-card h1 {
    margin: 0 0 9px;
    font-size: 21px;
    line-height: 1.4;
    word-break: break-all;
}

.share-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 24px;
}

.share-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--muted-2);
}

.share-form {
    text-align: left;
}

.share-form .input {
    margin-bottom: 16px;
}

.share-download {
    height: 48px;
}

.share-invalid h1 {
    margin-top: 18px;
}

.share-invalid p {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

.share-invalid-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--warning);
    background: #fffbeb;
}

.share-invalid-icon svg {
    width: 32px;
    height: 32px;
}

.share-foot {
    margin-top: 22px;
    color: var(--muted-2);
    font-size: 12px;
}

/* ---------- 动画 ---------- */
@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
    .file-table-head, .file-row {
        grid-template-columns: minmax(0, 1fr) 100px 150px 160px;
    }

    .search-box {
        width: 210px;
    }
}

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: 20px 0 60px rgba(15, 23, 42, .25);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-mask {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 25;
        background: rgba(15, 23, 42, .4);
    }

    .sidebar-mask.show {
        display: block;
    }

    .menu-btn {
        display: inline-flex;
    }

    .topbar {
        padding: 0 18px;
        gap: 12px;
    }

    .content {
        padding: 22px 18px 34px;
    }

    .file-table-head, .file-row {
        grid-template-columns: minmax(0, 1fr) 120px;
        padding: 0 16px;
    }

    .file-table-head div:nth-child(2),
    .file-table-head div:nth-child(3),
    .file-size,
    .file-time {
        display: none;
    }

    .file-table-head .head-actions {
        display: block;
        font-size: 0;
    }

    .file-actions {
        opacity: 1;
        gap: 1px;
    }

    .bulk-bar {
        flex-wrap: wrap;
        top: 68px;
        gap: 8px;
        padding: 9px 12px;
        border-radius: 12px;
    }

    .bulk-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 6px;
    }

    .bulk-actions .btn {
        padding: 8px 10px;
        font-size: 12.5px;
        gap: 5px;
    }

    .bulk-actions .btn svg {
        width: 14px;
        height: 14px;
    }

    .bulk-count {
        font-size: 12px;
    }

    .select-here {
        bottom: calc(18px + env(safe-area-inset-bottom));
        padding: 10px 18px;
    }

    .action-btn {
        width: 28px;
        height: 28px;
    }

    .content-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .content-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 8px;
    }

    .view-switch {
        margin-left: auto;
        padding: 2px;
    }

    .view-btn {
        width: 30px;
        height: 30px;
    }

    .grid-toolbar {
        padding: 9px 14px;
    }

    .file-card.grid-xl .file-list {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
        padding: 14px;
    }

    .file-card.grid-lg .file-list {
        grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
        gap: 10px;
        padding: 12px;
    }

    .file-card.grid-sm .file-list {
        grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
        gap: 8px;
        padding: 10px;
    }

    .tile-meta .file-name {
        font-size: 11.5px;
    }

    .file-card.grid-sm .tile-meta .file-name {
        font-size: 10.5px;
    }

    .file-card.grid-sm .tile-sub {
        display: none;
    }

    .search-box {
        width: 42px;
        padding: 0;
        justify-content: center;
        border-color: transparent;
        background: transparent;
    }

    .search-box input {
        display: none;
    }

    .search-box.expanded {
        position: absolute;
        left: 18px;
        right: 18px;
        top: 14px;
        width: auto;
        z-index: 5;
        display: flex;
        padding: 0 12px;
        background: #fff;
        border-color: var(--line);
    }

    .search-box.expanded input {
        display: block;
    }

    .login-shell {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 460px;
    }

    .login-intro {
        text-align: center;
        padding: 0;
    }

    .login-intro h1 {
        font-size: 32px;
    }

    .login-intro h1::after {
        margin-left: auto;
        margin-right: auto;
    }

    .login-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .login-points {
        display: none;
    }

    .login-card {
        padding: 30px 24px 24px;
    }

    .upload-panel {
        left: 16px;
        right: 16px;
        width: auto;
    }

    .share-item {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .share-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 560px) {
    .top-avatar {
        display: none;
    }

    .content-head h1 {
        font-size: 22px;
    }

    .file-actions .action-btn[data-action="share"],
    .file-actions .action-btn[data-action="move"] {
        display: none;
    }

    .modal {
        border-radius: 16px;
    }

    .preview-backdrop {
        padding: 12px;
    }

    .preview-backdrop:not(.image-fullscreen) .preview-modal {
        height: 92vh;
    }

    .preview-nav {
        width: 40px;
        height: 40px;
    }

    .preview-nav.prev {
        left: 0;
    }

    .preview-nav.next {
        right: 0;
    }

    .preview-nav svg {
        width: 19px;
        height: 19px;
    }

    .speed-bar {
        gap: 5px;
        padding: 8px 10px;
    }

    .speed-label {
        margin-right: 2px;
    }

    .speed-btn {
        min-width: 44px;
        height: 32px;
    }

    .video-controls {
        padding: 6px 10px 10px;
    }

    .video-volume {
        width: 62px;
    }

    .video-time {
        font-size: 11px;
    }
}

/* ---------- 触屏设备：相册卡片 ---------- */
@media (hover: none) {
    .file-card.grid-view .file-row.tile {
        background: #fff;
        border: 1px solid var(--line-soft);
        border-radius: 14px;
        padding-bottom: 4px;
    }

    .file-card.grid-view .file-row.tile:hover {
        background: #fff;
    }

    .file-card.grid-view .tile-thumb {
        border-radius: 13px 13px 0 0;
        box-shadow: none;
    }

    .file-row.tile:hover .tile-thumb {
        transform: none;
        box-shadow: none;
    }

    .tile-meta {
        padding: 0 8px;
    }
}


