/* 12-project-manager.css · 源 测试版v.6b79.html 第 6042-6421 行（原样搬运，仅 url 路径退两级） */
/* ========== 项目管理器 ========== */
#projectManager {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background:
        radial-gradient(1100px 620px at 10% -12%, rgba(99, 102, 241, 0.10), transparent 62%),
        radial-gradient(900px 540px at 92% 4%, rgba(56, 189, 248, 0.13), transparent 60%),
        radial-gradient(700px 460px at 50% 108%, rgba(45, 212, 191, 0.08), transparent 65%),
        linear-gradient(180deg, #f8fbfe 0%, #eef3f9 100%);
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
    color: #1e293b;
    overflow: hidden;
}
/* 左下角装饰：两个叠放的灰色正三角形（正三角形 = 宽:高 ≈ 1 : 0.866） */
#projectManager::before,
#projectManager::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 0;
}
#projectManager::before {
    left: -90px;
    bottom: -110px;
    width: 420px;
    height: 364px;
    background: rgba(100, 116, 139, 0.10);
    clip-path: polygon(0 100%, 100% 100%, 0 0);
}
#projectManager::after {
    left: 40px;
    bottom: -150px;
    width: 300px;
    height: 260px;
    background: rgba(100, 116, 139, 0.07);
    clip-path: polygon(0 100%, 100% 100%, 0 0);
}
.pm-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: linear-gradient(180deg, rgba(233, 241, 255, 0.94), rgba(248, 251, 255, 0.86));
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(191, 219, 254, 0.85);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 6px 18px -14px rgba(37, 99, 235, 0.55);
}
.pm-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pm-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.pm-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pm-title {
    font-size: 19px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.2px;
}
.pm-subtitle {
    font-size: 12.5px;
    color: #64748b;
}
.pm-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pm-theme-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    color: #f59e0b;
    transition: background 0.15s;
}
.pm-theme-btn:hover { background: rgba(148, 163, 184, 0.16); }
.pm-version {
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: 12px;
    color: #64748b;
    background: #fff;
}
.pm-body {
    position: relative;
    z-index: 1;
    flex: 1;
    overflow-y: auto;
    width: 100%;
    padding: 26px 28px 48px;
}
.pm-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}
.pm-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}
.pm-section-title::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 18px;
    background: linear-gradient(180deg, #6366f1, #38bdf8);
    border-radius: 2px;
}
.pm-project-count {
    font-size: 12px;
    color: #475569;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(191, 219, 254, 0.9);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.pm-offline-hint {
    display: none;
    font-size: 11.5px;
    line-height: 1.4;
    color: #94a3b8;
    margin: -14px 0 16px 13px;
}
.pm-offline-hint.is-on { display: block; }
.pm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    align-items: start;
}
.pm-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 28px -18px rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(226, 232, 240, 0.95);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    position: relative;
}
.pm-card:hover {
    transform: translateY(-4px);
    border-color: rgba(147, 197, 253, 0.95);
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.04), 0 20px 40px -20px rgba(37, 99, 235, 0.45);
}
.pm-card-thumb {
    width: 100%;
    /* 用 padding-bottom 百分比强制 4:3 横向比例（75% = 3/4 宽度），比 aspect-ratio 更可靠 */
    padding-bottom: 75%;
    height: 0;
    background: #e2e8f0;
    background-size: cover;
    background-position: center;
    position: relative;
    line-height: 0;
    overflow: hidden;
}
.pm-card-thumb-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.pm-card:hover .pm-card-thumb-img { transform: scale(1.04); }
.pm-card-thumb-empty { padding-bottom: 75%; height: 0; }
.pm-card-title-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px 12px 8px;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pm-card-meta {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pm-card-update-label {
    font-size: 11.5px;
    color: #94a3b8;
}
.pm-card-update-time {
    font-size: 11.5px;
    color: #475569;
    font-weight: 500;
}
.pm-card-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.15s;
}
.pm-card:hover .pm-card-actions { opacity: 1; }
.pm-card-action {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.pm-card-action:hover {
    background: #f1f5f9;
    color: #0f172a;
}
/* 新建卡：只留「一圈虚线 + 加号 + 文字」，其余（渐变底/圆形图标/阴影）全部去掉 */
.pm-new-card {
    border: 1px dashed #d3dbe6;
    background: transparent;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 190px;
    color: #8b96a8;
    transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.pm-new-card:hover {
    border-color: #93c5fd;
    color: #3b82f6;
    background: rgba(239, 246, 255, 0.45);
    box-shadow: none;
}
/* 加号：裸字符，无底座 —— 圆形/描边/投影全部显式清 0，防止任何旧规则把它画成徽章 */
.pm-new-icon {
    width: auto;
    height: auto;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 300;
    line-height: 1;
}
.pm-new-label {
    font-size: 13.5px;
    font-weight: 400;
}
.pm-footer {
    text-align: center;
    padding: 18px;
    font-size: 12px;
    color: #94a3b8;
}
.pm-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    color: #94a3b8;
    font-size: 13px;
}
.pm-rename-input {
    position: absolute;
    left: 10px;
    right: 34px;
    bottom: 6px;
    padding: 4px 8px;
    border: 1px solid #3b82f6;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    background: rgba(255,255,255,0.95);
}
.pm-delete-confirm {
    position: fixed;
    inset: 0;
    z-index: 10002;
    background: rgba(15,23,42,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
}
.pm-delete-confirm-box {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    width: 320px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}
.pm-delete-confirm-box h4 {
    margin: 0 0 10px;
    font-size: 16px;
}
.pm-delete-confirm-box p { margin: 0 0 18px; font-size: 13px; color: #64748b; }
.pm-delete-confirm-btns { display: flex; justify-content: flex-end; gap: 10px; }
.pm-delete-confirm-btns button {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
}
.pm-delete-confirm-btns button.pm-confirm-del {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}
@media (max-width: 600px) {
    /* 手机端改两列：缩略图只有半屏宽，单屏能看到更多项目 */
    .pm-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .pm-body { padding: 20px 16px 40px; }
    .pm-card-thumb,
    .pm-card-thumb-empty { padding-bottom: 62%; }
    .pm-card-title-overlay { padding: 14px 8px 5px; font-size: 11px; }
    .pm-card-meta { padding: 6px 8px; }
    .pm-card-update-label { display: none; }
    .pm-card-update-time { font-size: 10px; }
    .pm-card-actions { gap: 3px; }
    .pm-card-action { width: 19px; height: 19px; font-size: 11px; border-radius: 4px; }
    .pm-new-card { min-height: 120px; gap: 6px; }
    .pm-new-icon { font-size: 24px; }
    .pm-new-label { font-size: 12px; }
}

/* 暗色模式：跟随 body.light-mode 开关 */
body:not(.light-mode) #projectManager {
    background: #0a0f1a;
    color: #cbd5e6;
}
body:not(.light-mode) .pm-header {
    background: linear-gradient(180deg, rgba(18, 32, 58, 0.96), rgba(13, 22, 38, 0.92));
    border-bottom-color: #1e2f4d;
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08), 0 6px 18px -14px rgba(0, 0, 0, 0.9);
}
body:not(.light-mode) #projectManager::before { background: rgba(148, 163, 184, 0.07); }
body:not(.light-mode) #projectManager::after { background: rgba(148, 163, 184, 0.05); }
body:not(.light-mode) .pm-project-count {
    background: rgba(22, 33, 54, 0.92);
    border-color: #2a3a5a;
    color: #cbd5e6;
}
body:not(.light-mode) .pm-title { color: #e2e8f0; }
body:not(.light-mode) .pm-subtitle { color: #94a3b8; }
body:not(.light-mode) .pm-version {
    background: #162136;
    border-color: #2a3a5a;
    color: #cbd5e6;
}
body:not(.light-mode) .pm-theme-btn {
    background: transparent;
    border: none;
    color: #cbd5e6;
}
body:not(.light-mode) .pm-theme-btn:hover { background: rgba(148, 163, 184, 0.18); }
body:not(.light-mode) .pm-section-title { color: #e2e8f0; }
body:not(.light-mode) .pm-offline-hint { color: #64748b; }
body:not(.light-mode) .pm-project-count { color: #94a3b8; }
body:not(.light-mode) .pm-card {
    background: #162136;
    border-color: #2a3a5a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
body:not(.light-mode) .pm-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}
body:not(.light-mode) .pm-card-thumb { background-color: #1e293b; }
body:not(.light-mode) .pm-card-update-label { color: #94a3b8; }
body:not(.light-mode) .pm-card-update-time { color: #cbd5e6; }
body:not(.light-mode) .pm-card-action {
    background: #162136;
    border-color: #2a3a5a;
    color: #94a3b8;
}
body:not(.light-mode) .pm-card-action:hover {
    background: #1e293b;
    color: #e2e8f0;
}
/* 暗色：同样只留一圈虚线（放在 .pm-card 之后才能压掉它的底色/阴影） */
body:not(.light-mode) .pm-new-card {
    background: transparent;
    border-color: rgba(148, 163, 184, 0.38);
    box-shadow: none;
    color: #94a3b8;
}
body:not(.light-mode) .pm-new-card:hover {
    border-color: #3b82f6;
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.08);
    box-shadow: none;
}
body:not(.light-mode) .pm-empty { color: #64748b; }
body:not(.light-mode) .pm-rename-input {
    background: #162136;
    color: #e2e8f0;
    border-color: #3b82f6;
}
body:not(.light-mode) .pm-delete-confirm { background: rgba(0,0,0,0.55); }
body:not(.light-mode) .pm-delete-confirm-box {
    background: #162136;
    color: #e2e8f0;
    box-shadow: 0 12px 32px rgba(0,0,0,0.45);
}
body:not(.light-mode) .pm-delete-confirm-box p { color: #94a3b8; }
body:not(.light-mode) .pm-delete-confirm-btns button {
    background: #162136;
    border-color: #2a3a5a;
    color: #cbd5e6;
}

/* ===== 项目加载遮罩（打开大项目时显示，等待材质纹理下载完成） ===== */
.project-loading {
    position: fixed; inset: 0; z-index: 11000;
    display: none; flex-direction: column; align-items: center; justify-content: center;
    gap: 18px; background: rgba(8, 12, 22, 0.82);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.pl-spinner {
    width: 54px; height: 54px; border-radius: 50%;
    border: 5px solid rgba(255,255,255,0.18);
    border-top-color: #3b82f6;
    animation: pl-spin 0.9s linear infinite;
}
@keyframes pl-spin { to { transform: rotate(360deg); } }
.pl-text { color: #e2e8f0; font-size: 16px; letter-spacing: 0.05em; }
.pl-progress { width: 240px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.12); overflow: hidden; }
.pl-progress-bar { width: 0%; height: 100%; background: linear-gradient(90deg,#3b82f6,#60a5fa); transition: width 0.2s ease; }
.pl-percent { color: #94a3b8; font-size: 13px; font-variant-numeric: tabular-nums; }
body.light-mode .project-loading { background: rgba(240,244,248,0.86); }
body.light-mode .pl-text { color: #1e293b; }
body.light-mode .pl-percent { color: #64748b; }
body.light-mode .pl-spinner { border-color: rgba(0,0,0,0.12); border-top-color: #2563eb; }
body.light-mode .pl-progress { background: rgba(0,0,0,0.1); }

