/* 文件管理器 */
.toolbar {
    display: flex; align-items: center; gap: 10px;
    flex-wrap: wrap; margin-bottom: 18px;
}
.btn-tool {
    padding: 9px 20px; font-size: 0.82rem; font-weight: 600;
    font-family: inherit; letter-spacing: 1px; cursor: pointer;
    border-radius: 50px; border: 1px solid rgba(120,80,200,0.2);
    background: rgba(255,255,255,0.65); color: var(--purple);
    transition: all 0.35s var(--ease);
}
.btn-tool:hover { background: #fff; transform: translateY(-2px); }
.btn-tool:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-tool.primary {
    background: var(--grad); color: #fff; border: none;
    box-shadow: 0 8px 22px rgba(108,92,231,0.3);
}
.btn-tool.primary:hover { box-shadow: 0 12px 30px rgba(108,92,231,0.42); }

/* 面包屑 */
.crumbs {
    display: flex; align-items: center; gap: 6px;
    flex-wrap: wrap; font-size: 0.84rem;
    margin-bottom: 16px; color: var(--text-mid);
}
.crumbs a {
    color: var(--purple); text-decoration: none; font-weight: 600;
    cursor: pointer; padding: 3px 8px; border-radius: 8px;
    transition: background 0.25s;
}
.crumbs a:hover { background: rgba(108,92,231,0.1); }
.crumbs .sep { opacity: 0.35; }
.crumbs .current { font-weight: 700; color: var(--text); }

/* 文件列表 */
.file-list { display: flex; flex-direction: column; gap: 8px; }

.file-row {
    display: flex; align-items: center; gap: 14px;
    padding: 13px 18px;
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(120,80,200,0.1);
    border-radius: 14px;
    transition: all 0.3s var(--ease);
}
.file-row:hover {
    background: rgba(255,255,255,0.82);
    transform: translateX(3px);
    box-shadow: 0 4px 18px rgba(120,80,200,0.1);
}
.file-icon {
    width: 38px; height: 38px; flex-shrink: 0;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem;
}
.file-icon.dir   { background: rgba(74,158,255,0.14); }
.file-icon.image { background: rgba(196,77,255,0.14); }
.file-icon.video { background: rgba(255,107,157,0.14); }
.file-icon.audio { background: rgba(46,204,113,0.14); }
.file-icon.doc   { background: rgba(108,92,231,0.14); }
.file-icon.zip   { background: rgba(243,156,18,0.14); }
.file-icon.file  { background: rgba(150,150,170,0.14); }

.file-info { flex: 1; min-width: 0; }
.file-name {
    font-size: 0.9rem; font-weight: 600; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    cursor: pointer;
}
.file-name:hover { color: var(--purple); }
.file-meta {
    font-size: 0.72rem; color: var(--text-light);
    margin-top: 3px; letter-spacing: 0.3px;
}

.file-actions { display: flex; gap: 6px; flex-shrink: 0; }
.act-btn {
    width: 32px; height: 32px; border-radius: 9px;
    border: 1px solid rgba(120,80,200,0.14);
    background: rgba(255,255,255,0.7);
    cursor: pointer; font-size: 0.82rem;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.28s var(--ease); color: var(--text-mid);
}
.act-btn:hover { background: #fff; transform: translateY(-2px); color: var(--purple); }
.act-btn.danger:hover { color: #c0392b; border-color: rgba(231,76,60,0.3); }

/* 上传进度 */
.upload-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.upload-item {
    padding: 11px 16px;
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(120,80,200,0.1);
    border-radius: 12px;
}
.upload-head {
    display: flex; justify-content: space-between;
    font-size: 0.78rem; margin-bottom: 7px; color: var(--text-mid);
}
.upload-bar {
    height: 6px; border-radius: 50px;
    background: rgba(120,80,200,0.1); overflow: hidden;
}
.upload-fill {
    height: 100%; width: 0%; border-radius: 50px;
    background: var(--grad); transition: width 0.25s ease;
}
.upload-item.done .upload-fill { background: #27ae60; }
.upload-item.fail .upload-fill { background: #c0392b; }

/* 拖拽上传提示 */
.drop-hint {
    display: none;
    padding: 30px; margin-bottom: 16px;
    border: 2px dashed rgba(108,92,231,0.4);
    border-radius: 18px; text-align: center;
    background: rgba(108,92,231,0.05);
    color: var(--purple); font-size: 0.9rem; font-weight: 600;
}
.drop-hint.show { display: block; }

/* ========== SVG 图标尺寸与配色 ========== */
.file-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.8;
}
.file-row:hover .file-icon svg { stroke-width: 2; }

/* 按类型着色（描边色跟随 currentColor） */
.file-icon.dir   { background: rgba(74,158,255,0.12);  color: #4a9eff; }
.file-icon.image { background: rgba(196,77,255,0.12);  color: #c44dff; }
.file-icon.video { background: rgba(255,107,157,0.12); color: #ff6b9d; }
.file-icon.audio { background: rgba(46,204,113,0.12);  color: #27ae60; }
.file-icon.zip   { background: rgba(243,156,18,0.12);  color: #f39c12; }
.file-icon.pdf   { background: rgba(231,76,60,0.12);   color: #e74c3c; }
.file-icon.code  { background: rgba(26,188,156,0.12);  color: #16a085; }
.file-icon.doc   { background: rgba(108,92,231,0.12);  color: #6c5ce7; }
.file-icon.file  { background: rgba(140,140,165,0.12); color: #8a8aa5; }

/* 操作按钮里的 SVG */
.act-btn svg {
    width: 15px;
    height: 15px;
    stroke-width: 2;
}
.act-btn { transition: all 0.25s var(--ease); }

/* 工具栏按钮图标 */
.btn-tool svg {
    width: 15px;
    height: 15px;
    stroke-width: 2.2;
    vertical-align: -2px;
    margin-right: 6px;
}

/* 面包屑图标 */
.crumbs svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.2;
    vertical-align: -2px;
    margin-right: 3px;
}

/* 上传/新建文件夹按钮里的图标垂直对齐修正 */
.btn-tool { display: inline-flex; align-items: center; }
.btn-tool svg { margin-right: 6px; margin-bottom: 1px; }

/* ========== 成员管理 ========== */
.member-row {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px; margin-bottom: 10px;
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(120,80,200,0.12);
    border-radius: 16px; cursor: pointer;
    transition: all 0.3s var(--ease);
}
.member-row:hover {
    background: rgba(255,255,255,0.88);
    transform: translateX(4px);
    box-shadow: 0 6px 22px rgba(120,80,200,0.12);
}
.member-avatar {
    width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
    background: var(--grad); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.05rem;
}
.member-avatar.me { background: linear-gradient(135deg, #f39c12, #e74c3c); }
.member-body { flex: 1; min-width: 0; }
.member-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.member-name { font-size: 0.92rem; font-weight: 700; }
.member-badge {
    font-size: 0.62rem; padding: 2px 7px; border-radius: 20px;
    font-weight: 700; letter-spacing: 0.3px;
}
.member-badge.admin { background: rgba(196,77,255,0.14); color: var(--pink); }
.member-badge.off { background: rgba(150,150,170,0.18); color: #888; }
.member-badge.me { background: rgba(243,156,18,0.16); color: #e67e22; }
.member-usage {
    height: 5px; border-radius: 50px;
    background: rgba(120,80,200,0.1);
    overflow: hidden; margin: 6px 0 4px;
}
.member-usage > div {
    height: 100%; border-radius: 50px;
    background: var(--grad); width: 0%;
    transition: width 0.6s var(--ease);
}
.member-sub { font-size: 0.72rem; color: var(--text-light); }

/* ---------- 详情弹窗 ---------- */
.mask {
    display: none; position: fixed; inset: 0; z-index: 900;
    background: rgba(45,27,78,0.35);
    backdrop-filter: blur(6px);
    align-items: flex-start; justify-content: center;
    padding: 48px 20px; overflow-y: auto;
}
.mask.show { display: flex; }
.modal {
    width: 100%; max-width: 660px;
    border-radius: 26px 42px 30px 46px;
    padding: 30px 34px;
    animation: cardIn 0.45s var(--ease) both;
    margin: auto;
}
.modal-head {
    display: flex; align-items: center; gap: 14px;
    padding-bottom: 20px; margin-bottom: 22px;
    border-bottom: 1px solid rgba(120,80,200,0.12);
}
.modal-head .member-avatar { width: 52px; height: 52px; font-size: 1.3rem; border-radius: 16px; }
.modal-title { font-size: 1.25rem; font-weight: 800; letter-spacing: 1px; }
.modal-sub { font-size: 0.76rem; color: var(--text-light); margin-top: 3px; }

.info-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 11px; margin-bottom: 20px;
}
.info-item {
    padding: 11px 15px;
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(120,80,200,0.1);
    border-radius: 12px;
}
.info-key { font-size: 0.68rem; color: var(--text-light); letter-spacing: 0.5px; margin-bottom: 4px; }
.info-val {
    font-size: 0.86rem; font-weight: 600; word-break: break-all;
    font-family: 'Consolas', monospace;
}
.info-val.hash { font-size: 0.74rem; color: var(--text-light); }

.block {
    padding: 18px 20px; margin-bottom: 16px;
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(120,80,200,0.12);
    border-radius: 16px;
    transition: all 0.3s var(--ease);
}
.block.clickable { cursor: pointer; }
.block.clickable:hover {
    background: rgba(255,255,255,0.85);
    box-shadow: 0 6px 22px rgba(120,80,200,0.12);
}
.block-head {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 0.84rem; font-weight: 700; margin-bottom: 12px;
}
.block-head .arrow { transition: transform 0.3s var(--ease); font-size: 0.75rem; color: var(--text-light); }
.block.open .block-head .arrow { transform: rotate(90deg); }

.member-files { margin-top: 14px; display: none; }
.block.open .member-files { display: block; }
.mf-row {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; margin-bottom: 6px;
    background: rgba(255,255,255,0.65);
    border: 1px solid rgba(120,80,200,0.08);
    border-radius: 10px; font-size: 0.82rem;
}
.mf-row .file-icon { width: 30px; height: 30px; border-radius: 8px; }
.mf-row .file-icon svg { width: 15px; height: 15px; }
.mf-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mf-size { font-size: 0.72rem; color: var(--text-light); flex-shrink: 0; }

.modal-actions {
    display: flex; gap: 9px; flex-wrap: wrap;
    padding-top: 18px; border-top: 1px solid rgba(120,80,200,0.12);
}
.btn-danger {
    background: rgba(231,76,60,0.1) !important;
    color: #c0392b !important;
    border-color: rgba(231,76,60,0.3) !important;
}
.btn-danger:hover { background: rgba(231,76,60,0.18) !important; }

/* ========== ZEROSOURCE 官网下拉按钮 ========== */
.site-drop { position: relative; flex-shrink: 0; }

.site-btn {
    padding: 7px 15px; font-size: 0.74rem; font-weight: 700;
    font-family: inherit; letter-spacing: 0.8px; cursor: pointer;
    border-radius: 50px; border: 1px solid rgba(108,92,231,0.28);
    background: rgba(255,255,255,0.75); color: var(--purple);
    transition: all 0.28s var(--ease); white-space: nowrap;
}
.site-btn:hover { background: #fff; border-color: rgba(108,92,231,0.5); }
.site-drop.open .site-btn {
    background: var(--grad); color: #fff; border-color: transparent;
}

.site-menu {
    display: none; position: absolute; right: 0; top: calc(100% + 8px);
    min-width: 232px; z-index: 300;
    padding: 7px;
    border-radius: 16px;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid rgba(120,80,200,0.16);
    box-shadow: 0 16px 44px rgba(80,50,150,0.2);
}
.site-drop.open .site-menu { display: block; animation: menuIn 0.24s var(--ease) both; }

@keyframes menuIn {
    from { opacity: 0; transform: translateY(-7px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.site-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 13px; border-radius: 11px;
    font-size: 0.83rem; font-weight: 600; color: var(--text);
    text-decoration: none; transition: all 0.22s var(--ease);
    cursor: pointer;
}
.site-item:hover { background: rgba(108,92,231,0.09); transform: translateX(3px); }
.site-item .ico {
    width: 28px; height: 28px; border-radius: 9px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
}
.site-item.pc  .ico { background: rgba(74,158,255,0.15);  color: #4a9eff; }
.site-item.mob .ico { background: rgba(196,77,255,0.15);  color: #c44dff; }
.site-item .sub { font-size: 0.66rem; color: var(--text-light); font-weight: 500; margin-top: 2px; }

.site-note {
    margin: 7px 4px 3px;
    padding: 10px 11px 4px;
    border-top: 1px solid rgba(120,80,200,0.12);
    font-size: 0.65rem; line-height: 1.65;
    color: var(--text-light); letter-spacing: 0.2px;
}
