/* ============================================================
   VRChat 相册 · 白色半透明磨砂风格（Glassmorphism）
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* hidden 属性兜底：防止被 display 等 CSS 规则覆盖 */
[hidden] {
    display: none !important;
}

html, body {
    height: 100%;
}

body {
    font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============ 背景 ============ */
.bg-image {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: url("../photos/Bg1.png") center / cover no-repeat;
}

.bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(12, 12, 24, 0.42);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* ============ 手机端：汉堡菜单按钮（默认隐藏，≤768px 显示） ============ */
.hamburger {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 320;
    width: 44px;
    height: 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: transform 0.25s, opacity 0.25s;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* 抽屉打开时汉堡图标变为 X */
.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============ 手机端：抽屉遮罩（默认隐藏，抽屉打开时显示） ============ */
.drawer-mask {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 290;
    background: rgba(8, 8, 16, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

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

/* ============ 磨砂面板通用 ============ */
.glass {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 16px;
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

/* ============ 左侧导航栏 ============ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 248px;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: rgba(255, 255, 255, 0.12);
    border-right: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    z-index: 10;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 6px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.sidebar-brand h1 {
    font-size: 20px;
    letter-spacing: 1px;
}

.sidebar-brand p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    transform: translateX(2px);
}

.nav-btn.active {
    background: rgba(255, 255, 255, 0.34);
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff;
    box-shadow: 0 4px 18px rgba(255, 255, 255, 0.15);
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
    transition: all 0.2s;
}

.nav-btn.active .nav-dot {
    background: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
}

.sidebar-footer {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* ============ 侧边栏管理者工具入口 ============ */
.sidebar-tool {
    margin-bottom: 12px;
    padding: 0 6px;
}

.tool-entry-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tool-entry-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15);
}

/* ============ 主内容区 ============ */
.main {
    margin-left: 248px;
    min-height: 100vh;
    padding: 36px 40px;
}

.page-header {
    margin-bottom: 28px;
}

.header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.logout-btn {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.page-header h2 {
    font-size: 30px;
    font-weight: 600;
    letter-spacing: 1px;
}

.page-header p {
    margin-top: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
}

/* ============ 首页 ============ */
.hero-card {
    padding: 34px 36px;
    margin-bottom: 28px;
}

.hero-card h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
}

.hero-card p {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
}

.stat-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.stat-card {
    flex: 1;
    min-width: 150px;
    padding: 20px 24px;
    text-align: center;
}

.stat-card .num {
    font-size: 32px;
    font-weight: 700;
}

.stat-card .label {
    margin-top: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 8px 0 16px;
    padding-left: 10px;
    border-left: 3px solid rgba(255, 255, 255, 0.7);
}

/* ============ 排序栏 ============ */
.sort-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.sort-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-right: 4px;
}

.sort-btn {
    padding: 7px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.sort-btn:hover {
    background: rgba(255, 255, 255, 0.26);
}

.sort-btn.active {
    background: rgba(255, 255, 255, 0.38);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

/* ============ 照片网格 ============ */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    margin-bottom: 20px;
}

.photo-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.2s;
}

.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}

.photo-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.photo-card .card-body {
    padding: 14px 16px;
}

.photo-card .card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    font-size: 12px;
    padding: 3px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.9);
}

.feature-tag {
    background: rgba(255, 200, 80, 0.28);
    border-color: rgba(255, 200, 80, 0.55);
    color: #ffe9b8;
}

/* 精选模式下右键选中的绿色边框 */
.photo-card.selected {
    border-color: #4ade80 !important;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.65), 0 14px 40px rgba(0, 0, 0, 0.4);
}

/* ============ 删除模式 ============ */
.delete-x {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.92);
    border: 2px solid rgba(255, 255, 255, 0.85);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
    transition: transform 0.15s, background 0.15s;
}

.delete-x:hover {
    background: rgba(220, 38, 38, 1);
    transform: scale(1.12);
}

/* ============ 管理者工具弹窗（右上角） ============ */
.tool-badge {
    position: fixed;
    top: 18px;
    right: 24px;
    z-index: 90;
    width: 268px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 16px;
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.35);
    color: #fff;
    transition: background 0.3s, border-color 0.3s;
}

/* 删除模式：红色 */
.tool-badge.danger {
    background: rgba(220, 38, 38, 0.78);
    border-color: rgba(255, 255, 255, 0.45);
}

/* 精选模式：金色 */
.tool-badge.gold {
    background: rgba(202, 155, 52, 0.82);
    border-color: rgba(255, 224, 150, 0.65);
}

.tool-badge-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tool-badge-head span {
    font-size: 14px;
    font-weight: 600;
}

.tool-badge-close {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.tool-badge-close:hover {
    background: rgba(255, 255, 255, 0.38);
}

.tool-tip {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 12px;
    line-height: 1.7;
}

.tool-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-btn {
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.34);
}

.tool-btn.danger-btn {
    background: rgba(220, 38, 38, 0.4);
}

.tool-btn.danger-btn:hover {
    background: rgba(220, 38, 38, 0.62);
}

.tool-btn.gold-btn {
    background: rgba(202, 155, 52, 0.55);
    border-color: rgba(255, 224, 150, 0.7);
}

.tool-btn.gold-btn:hover {
    background: rgba(202, 155, 52, 0.78);
}

/* 编辑模式：蓝色 */
.tool-badge.info {
    background: rgba(59, 130, 246, 0.82);
    border-color: rgba(147, 197, 253, 0.65);
}

.tool-btn.info-btn {
    background: rgba(59, 130, 246, 0.55);
    border-color: rgba(147, 197, 253, 0.7);
}

.tool-btn.info-btn:hover {
    background: rgba(59, 130, 246, 0.78);
}

/* ============ 模态弹窗 ============ */
.modal-mask {
    position: fixed;
    inset: 0;
    z-index: 700;
    background: rgba(8, 8, 16, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal {
    width: 100%;
    max-width: 400px;
    padding: 30px;
    text-align: center;
}

.modal h3 {
    font-size: 19px;
    margin-bottom: 10px;
}

.modal p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.7;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-ghost {
    padding: 10px 22px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.28);
}

.btn-danger {
    padding: 10px 22px;
    border-radius: 12px;
    background: rgba(220, 38, 38, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: rgba(220, 38, 38, 0.95);
}

/* ============ 管理者面板 ============ */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.admin-card {
    padding: 26px;
    margin-bottom: 20px;
}

.admin-card h3 {
    font-size: 17px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 15px;
    outline: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: border-color 0.2s, background 0.2s;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.form-input:focus {
    border-color: rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.24);
}

.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

select.form-input option {
    color: #222;
    background: #fff;
}

.file-input {
    padding: 10px;
}

.file-input::-webkit-file-upload-button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    color: #fff;
    padding: 6px 14px;
    margin-right: 10px;
    cursor: pointer;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.check-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #e9a13b;
    cursor: pointer;
}

.check-row label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
}

.form-hint {
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
}

.photo-grid.mini {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

/* ============ 管理者登入 ============ */
.login-wrap {
    display: flex;
    justify-content: center;
    padding-top: 60px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 40px 38px;
}

.login-card h3 {
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 6px;
}

.login-card .login-sub {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 28px;
}

.login-btn {
    width: 100%;
    margin-top: 8px;
    padding: 13px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.login-btn:hover {
    background: rgba(255, 255, 255, 0.42);
    box-shadow: 0 6px 24px rgba(255, 255, 255, 0.18);
}

.login-tip {
    margin-top: 18px;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* ============ 空状态 ============ */
.empty-tip {
    text-align: center;
    padding: 60px 0;
    color: rgba(255, 255, 255, 0.65);
    font-size: 15px;
}

/* ============ 灯箱 ============ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 600;
    background: rgba(8, 8, 16, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 40px;
}

.lightbox img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-info {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* ============ 响应式 ============ */
@media (max-width: 1100px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .sidebar {
        width: 200px;
        padding: 20px 14px;
    }
    .main {
        margin-left: 200px;
        padding: 24px 20px;
    }
    .sidebar-brand h1 {
        font-size: 17px;
    }
}

/* ============ 手机（≤768px）：汉堡按钮 + 抽屉式导航 ============ */
@media (max-width: 768px) {
    /* 汉堡按钮显示 */
    .hamburger {
        display: flex;
    }
    /* 侧边栏变为左侧抽屉：默认 translateX(-100%) 移出屏幕，.open 滑入 */
    .sidebar {
        top: 0;
        left: 0;
        right: auto;
        bottom: 0;
        width: 264px;
        max-width: 82vw;
        height: 100vh;
        min-height: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        padding: 26px 18px;
        border-right: 1px solid rgba(255, 255, 255, 0.28);
        border-bottom: none;
        transform: translateX(-100%);
        transition: transform 0.28s ease;
        z-index: 300;
        overflow-y: auto;
        overflow-x: hidden;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-brand {
        flex-shrink: 0;
        gap: 10px;
        padding: 2px 4px;
    }
    .brand-mark {
        width: 40px;
        height: 40px;
        font-size: 20px;
        border-radius: 12px;
    }
    .sidebar-brand h1 {
        font-size: 17px;
    }
    .sidebar-brand p {
        display: none;
    }
    .sidebar-nav {
        flex-direction: column;
        flex: 1;
        gap: 10px;
        width: 100%;
        overflow-x: visible;
        -webkit-overflow-scrolling: touch;
    }
    .nav-btn {
        width: 100%;
        white-space: nowrap;
        min-height: 46px;
        padding: 12px 16px;
        font-size: 14px;
        justify-content: flex-start;
    }
    .nav-btn:hover {
        transform: none;
    }
    .sidebar-tool {
        margin: 0;
        padding: 0;
        flex-shrink: 0;
    }
    .tool-entry-btn {
        width: 100%;
        min-height: 46px;
        padding: 12px 16px;
        font-size: 14px;
    }
    .sidebar-footer {
        display: block;
        padding-top: 12px;
    }
    .main {
        margin-left: 0;
        padding: 16px 16px 28px;
    }
    .page-header h2 {
        font-size: 24px;
    }
    .page-header p {
        font-size: 13px;
    }
    /* 相册网格：固定 2 列（minmax(0,1fr) 防止内容撑破轨道，保证不横向溢出） */
    .photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .photo-card {
        min-width: 0;
    }
    .photo-grid.mini {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .photo-card .card-body {
        padding: 10px 12px;
    }
    .photo-card .card-title {
        font-size: 14px;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    /* 工具弹窗 / 弹窗 / 登录卡：宽度自适应 */
    .tool-badge {
        width: auto;
        max-width: 92vw;
        right: 14px;
        top: 18px;
    }
    .modal {
        max-width: 92vw;
        padding: 24px 20px;
    }
    .login-card {
        max-width: 92vw;
    }
    .admin-card {
        padding: 20px 18px;
    }
    /* 灯箱：图片最大宽 100vw */
    .lightbox {
        padding: 20px;
    }
    .lightbox img {
        max-width: 100vw;
        max-height: 78vh;
    }
    .lightbox-close {
        top: 14px;
        right: 14px;
        width: 44px;
        height: 44px;
    }
    .stat-row {
        gap: 12px;
    }
    .stat-card {
        min-width: 130px;
        padding: 16px 18px;
    }
    .sort-bar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .sort-bar::-webkit-scrollbar {
        display: none;
    }
    .sort-btn {
        white-space: nowrap;
        min-height: 40px;
        padding: 8px 16px;
    }
    .hero-card {
        padding: 24px 22px;
    }
    .hero-card h3 {
        font-size: 19px;
    }
    .btn-ghost,
    .btn-danger,
    .login-btn {
        min-height: 46px;
    }
}

/* ============ 手机（≤480px）：紧凑布局 + 触控尺寸 ============ */
@media (max-width: 480px) {
    .sidebar {
        padding: 20px 14px;
        gap: 16px;
    }
    .brand-mark {
        width: 36px;
        height: 36px;
        font-size: 18px;
        border-radius: 10px;
    }
    .sidebar-brand h1 {
        font-size: 15px;
    }
    .sidebar-nav {
        flex-wrap: nowrap;
        width: 100%;
        flex: 1;
        overflow-x: visible;
    }
    .nav-btn {
        min-height: 44px;
        padding: 10px 14px;
        font-size: 13px;
        gap: 8px;
    }
    .sidebar-tool {
        margin: 0;
        padding: 0;
    }
    .tool-entry-btn {
        min-height: 44px;
        padding: 10px 14px;
        font-size: 13px;
    }
    .nav-dot {
        width: 6px;
        height: 6px;
    }
    .main {
        padding: 12px 10px 20px;
    }
    .page-header {
        margin-bottom: 18px;
    }
    .page-header h2 {
        font-size: 21px;
    }
    .photo-grid {
        gap: 8px;
    }
    .photo-grid.mini {
        gap: 8px;
    }
    .photo-card .card-body {
        padding: 8px 10px;
    }
    .photo-card .card-title {
        font-size: 13px;
        margin-bottom: 6px;
    }
    .tag {
        font-size: 11px;
        padding: 2px 10px;
    }
    .tool-badge {
        max-width: 94vw;
        right: 10px;
        top: 18px;
        padding: 14px;
    }
    .tool-btn {
        min-height: 42px;
        font-size: 14px;
    }
    .modal-mask {
        padding: 12px;
    }
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    .modal-actions .btn-ghost,
    .modal-actions .btn-danger {
        width: 100%;
    }
    .stat-card {
        min-width: calc(50% - 6px);
        padding: 14px;
    }
    .stat-card .num {
        font-size: 26px;
    }
    .hero-card {
        padding: 18px 16px;
    }
    .hero-card p {
        font-size: 13px;
    }
    .section-title {
        font-size: 16px;
        margin: 6px 0 12px;
    }
    .admin-grid {
        gap: 12px;
    }
    .form-input {
        padding: 12px 14px;
    }
    .login-wrap {
        padding-top: 30px;
    }
    .login-card {
        padding: 28px 20px;
    }
    .login-card h3 {
        font-size: 20px;
    }
    .lightbox {
        padding: 12px;
    }
    .lightbox img {
        max-height: 70vh;
        border-radius: 8px;
    }
    .lightbox-info {
        font-size: 13px;
    }
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 22px;
    }
}
