/* =========================================================
   肉丸子个人记录 · 全站样式
   移动端优先，桌面端自动增强
   ========================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    color-scheme: light;
}

:root {
    --primary: #5b5bd6;
    --primary-2: #8b5cf6;
    --primary-soft: #eef0ff;
    --bg: #f6f7fb;
    --card: #ffffff;
    --text: #0f172a;
    --text-2: #334155;
    --muted: #64748b;
    --border: #e8ebf2;
    --danger: #e5484d;
    --warning: #f59e0b;
    --success: #10b981;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 8px rgba(15, 23, 42, .04);
    --shadow: 0 4px 16px rgba(15, 23, 42, .06), 0 12px 32px rgba(15, 23, 42, .05);
    --shadow-lg: 0 18px 48px rgba(15, 23, 42, .12);
    --tabbar-h: 60px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
                 "Segoe UI", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.65;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:hover { text-decoration: none; }
img, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { touch-action: manipulation; }

/* ---------- 容器 ---------- */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 14px;
}

/* ---------- 前台顶部栏 ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(15, 23, 42, .94);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    padding: 10px 0;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.brand::before {
    content: "";
    flex-shrink: 0;
    width: 9px;
    height: 9px;
    border-radius: 3px;
    background: linear-gradient(135deg, #a5b4fc, #e879f9);
    box-shadow: 0 0 10px rgba(165, 180, 252, .8);
}

.navlinks {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.navlinks a {
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 500;
}
.navlinks a:hover { color: #fff; }
.navlinks .user { color: #a5b4fc; font-size: 13px; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn-sm {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff !important;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

/* 移动端主体底部留出 Tab 空间 */
.site-body { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 18px); }

main.container { padding: 16px 14px 20px; }

/* ---------- 页头 ---------- */
.page-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}
.page-head h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.3px;
    line-height: 1.3;
}

/* ---------- 搜索 ---------- */
.search { display: flex; gap: 8px; width: 100%; }
.search input {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}
.search input::placeholder { color: #9aa4b2; }
.search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(91, 91, 214, .12);
}
.search button {
    flex-shrink: 0;
    height: 42px;
    padding: 0 18px;
    border-radius: 999px;
}

/* ---------- 内容流 ---------- */
.feed { display: grid; gap: 12px; }

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow-sm);
}
.card h1, .card h2 { margin-bottom: 8px; }

.feed-item {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeUp .32s ease both;
}
.feed-item:nth-child(2) { animation-delay: .04s; }
.feed-item:nth-child(3) { animation-delay: .08s; }
.feed-item:nth-child(4) { animation-delay: .12s; }

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

/* 标题两行截断 */
.feed-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: -.2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.feed-title a { color: var(--text); }
.feed-title a:hover { color: var(--primary); }

/* 描述三行截断 */
.feed-desc {
    margin-top: 6px;
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* ---------- 媒体 ---------- */
.media {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    overflow: hidden;
    background: #0b1220;
    margin-bottom: 10px;
}
.media img,
.media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.media:active img,
.media:active video { transform: scale(1.02); }

.media.thumb { aspect-ratio: 16 / 9; max-height: 220px; }

.video-badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .58);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .2px;
}

/* 详情页媒体 */
.detail h1 { font-size: 20px; line-height: 1.35; }
.detail-media { margin: 12px 0; }
.detail-media img,
.detail-media video {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 14px;
    background: #0b1220;
}
.content {
    margin-top: 12px;
    font-size: 15.5px;
    line-height: 1.85;
    color: var(--text-2);
    word-break: break-word;
}
.back { margin-top: 14px; font-size: 14px; }

/* ---------- 元信息 ---------- */
.meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin-top: 8px;
    font-size: 12.5px;
    color: var(--muted);
}
.meta span { white-space: nowrap; }
.meta .views { color: var(--primary); font-weight: 600; }

/* ---------- 表单 ---------- */
.form {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}
.form label {
    display: block;
    margin-bottom: 14px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-2);
}
.form input[type=text],
.form input[type=email],
.form input[type=password],
.form input[type=file],
.form textarea {
    display: block;
    width: 100%;
    margin-top: 7px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #f8fafc;
    font-size: 16px; /* 16px 防止 iOS 聚焦自动放大 */
    font-weight: 400;
    outline: none;
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.form textarea { min-height: 110px; resize: vertical; line-height: 1.7; }
.form input:focus,
.form textarea:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(91, 91, 214, .12);
}
.form input[type=file] {
    padding: 10px 12px;
    font-size: 14px;
    background: #fff;
}
.form input[type=file]::file-selector-button {
    margin-right: 10px;
    padding: 7px 14px;
    border: 0;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* ---------- 按钮 ---------- */
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .18s, transform .12s, box-shadow .18s;
    box-shadow: 0 4px 14px rgba(91, 91, 214, .28);
}
button:active, .btn:active { transform: scale(.975); }

button.danger, .btn.danger {
    background: linear-gradient(135deg, #f26d6d, var(--danger));
    box-shadow: 0 4px 14px rgba(229, 72, 77, .28);
}
button.warning, .btn.warning {
    background: linear-gradient(135deg, #fbbf24, var(--warning));
    box-shadow: 0 4px 14px rgba(245, 158, 11, .28);
}
button.ghost, .btn.ghost {
    background: #fff;
    color: var(--text-2);
    border: 1px solid var(--border);
    box-shadow: none;
}

/* 表单主按钮移动端全宽 */
.form > button { width: 100%; margin-top: 4px; }

.inline {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}
.inline button { min-height: 38px; padding: 0 14px; font-size: 13.5px; }

/* ---------- 提示 ---------- */
.flash {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 11px 14px;
    margin: 12px 0;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    animation: fadeUp .28s ease both;
}
.flash.success { background: #ecfdf5; color: #047857; border-left: 3px solid var(--success); }
.flash.error   { background: #fef2f2; color: #b91c1c; border-left: 3px solid var(--danger); }

.hint { margin: 10px 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.empty { padding: 44px 0; text-align: center; color: var(--muted); font-size: 14px; }
.muted { color: var(--muted); }

.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    vertical-align: middle;
}

/* ---------- 页脚 ---------- */
.footer {
    margin-top: 24px;
    padding: 24px 0;
    background: #0f172a;
    color: #94a3b8;
    text-align: center;
    font-size: 13px;
    line-height: 1.7;
}
.footer p { margin: 3px 0; }
.footer a { color: #cbd5e1; }
.footer a:hover { color: #fff; }
.footer .slogan { color: #64748b; font-size: 12px; letter-spacing: .3px; }
.footer .icp { font-size: 12px; }

/* ---------- 底部 Tab ---------- */
.tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    height: calc(var(--tabbar-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
    border-top: 1px solid rgba(15, 23, 42, .07);
}
.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    -webkit-tap-highlight-color: transparent;
    transition: color .18s;
}
.tab-item .icon {
    font-size: 21px;
    line-height: 1;
    transition: transform .2s ease;
}
.tab-item.active { color: var(--primary); }
.tab-item.active .icon { transform: translateY(-1px) scale(1.1); }
.tab-item:active .icon { transform: scale(.92); }

/* ---------- 后台布局 ---------- */
.admin-body {
    background: #f1f3f9;
    font-size: 14px;
}
.admin-body a:hover { text-decoration: none; }

.admin-layout { display: flex; flex-direction: column; min-height: 100vh; }

/* 移动端：侧栏变顶部横向胶囊 */
.sidebar {
    position: sticky;
    top: 0;
    z-index: 25;
    background: #0f172a;
    padding: 10px 0 8px;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-brand::before {
    content: "";
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 3px;
    background: linear-gradient(135deg, #a5b4fc, #e879f9);
}
.sidebar-nav {
    display: flex;
    gap: 8px;
    padding: 0 12px 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.sidebar-nav::-webkit-scrollbar { display: none; }
.sidebar-nav a {
    flex-shrink: 0;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: background .18s, color .18s;
}
.sidebar-nav a.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: 0 4px 14px rgba(91, 91, 214, .35);
}
.sidebar-foot { display: none; }

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

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.admin-topbar h1 { font-size: 16px; font-weight: 700; }
.admin-topbar .who {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: var(--muted);
    white-space: nowrap;
}
.admin-topbar .who a { color: var(--danger); font-weight: 600; }

.admin-content { padding: 14px 14px 40px; }

/* 后台统计 */
.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.stat {
    position: relative;
    overflow: hidden;
    padding: 14px;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.stat::after {
    content: "";
    position: absolute;
    top: -24px;
    right: -24px;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: var(--primary-soft);
    opacity: .85;
}
.stat strong {
    position: relative;
    z-index: 1;
    display: block;
    font-size: 23px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.25;
}
.stat span {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 2px;
    font-size: 12.5px;
    color: var(--muted);
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}
.quick-actions .btn { flex: 1; min-width: 104px; }

/* 后台表格：移动端透明容器 */
.table-wrap { background: transparent; }
.table { width: 100%; border-collapse: collapse; }

/* 移动端表格变卡片 */
.table-cards thead { display: none; }
.table-cards tbody { display: block; }
.table-cards tr {
    display: block;
    margin-bottom: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.table-cards td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px dashed #eef1f6;
    font-size: 13.5px;
    text-align: right;
    word-break: break-word;
}
.table-cards td:last-child { border-bottom: 0; padding-top: 10px; }
.table-cards td::before {
    content: attr(data-label);
    flex-shrink: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}
.table-cards td .inline { justify-content: flex-end; }

/* ---------- 后台登录页 ---------- */
.login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px 16px;
    background:
        radial-gradient(900px 460px at 15% 0%, #e0e7ff 0%, transparent 62%),
        radial-gradient(800px 420px at 100% 100%, #f3e8ff 0%, transparent 58%),
        var(--bg);
}
.login-card {
    width: 100%;
    max-width: 400px;
    padding: 28px 22px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}
.login-card h1 { font-size: 21px; font-weight: 700; letter-spacing: -.3px; }
.login-card .sub { margin: 6px 0 18px; color: var(--muted); font-size: 13.5px; }
.login-card .form { padding: 0; background: transparent; box-shadow: none; }
.login-card .form button { width: 100%; margin-top: 6px; }
.login-card .back-link {
    display: block;
    margin-top: 18px;
    text-align: center;
    font-size: 13.5px;
    color: var(--muted);
}
.login-card .back-link:hover { color: var(--primary); }

/* =========================================================
   桌面端增强
   ========================================================= */
@media (min-width: 760px) {
    body { font-size: 15px; }
    .container { padding: 0 20px; }

    .topbar { padding: 12px 0; }
    .brand { font-size: 17px; }
    .navlinks { gap: 16px; }
    .navlinks a { font-size: 14px; }
    .navlinks .user { font-size: 14px; max-width: none; }

    .site-body { padding-bottom: 0; }
    main.container { padding: 26px 20px 40px; }

    .page-head {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 18px;
    }
    .page-head h1 { font-size: 24px; }

    .search { width: auto; }
    .search input { width: 240px; flex: none; }

    .feed { gap: 16px; }

    .card {
        padding: 18px;
        border-radius: 20px;
        box-shadow: var(--shadow);
        transition: transform .22s ease, box-shadow .22s ease;
    }
    .feed-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

    .feed-title { font-size: 18px; }
    .feed-desc { font-size: 14.5px; }

    .media { aspect-ratio: 16 / 9; border-radius: 16px; }
    .media.thumb { max-height: 240px; }

    .detail h1 { font-size: 24px; }
    .content { font-size: 16px; }

    .form { padding: 22px; border-radius: 20px; box-shadow: var(--shadow); }
    .form > button { width: auto; min-width: 140px; }

    .footer { margin-top: 40px; padding: 30px 0; font-size: 13.5px; }

    .tabbar { display: none; }

    /* 后台恢复左侧栏布局 */
    .admin-layout { flex-direction: row; }

    .sidebar {
        position: sticky;
        top: 0;
        width: 232px;
        flex-shrink: 0;
        height: 100vh;
        padding: 18px 0;
        overflow-y: auto;
    }
    .sidebar-brand { padding: 0 20px 16px; font-size: 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); margin-bottom: 12px; }
    .sidebar-nav { flex-direction: column; gap: 3px; padding: 0 10px; overflow: visible; }
    .sidebar-nav a { padding: 10px 14px; border-radius: 10px; font-size: 14px; background: transparent; }
    .sidebar-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
    .sidebar-foot { display: block; margin-top: 18px; padding: 14px 20px 0; font-size: 12px; color: #64748b; }

    .admin-topbar { position: sticky; top: 0; z-index: 20; padding: 14px 26px; }
    .admin-topbar h1 { font-size: 18px; }
    .admin-topbar .who { font-size: 13px; }

    .admin-content { padding: 22px 26px 60px; }

    .stats { grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
    .stat { padding: 18px; border-radius: 18px; box-shadow: var(--shadow); }
    .stat strong { font-size: 26px; }

    .quick-actions { margin-bottom: 22px; }
    .quick-actions .btn { flex: none; min-width: 0; }

    /* 后台表格恢复标准样式 */
    .table-wrap {
        background: #fff;
        border-radius: 18px;
        box-shadow: var(--shadow);
        overflow: hidden;
    }
    .table-cards thead { display: table-header-group; }
    .table-cards tbody { display: table-row-group; }
    .table-cards tr { display: table-row; margin: 0; padding: 0; background: transparent; box-shadow: none; }
    .table-cards td {
        display: table-cell;
        padding: 12px 16px;
        border-bottom: 1px solid var(--border);
        text-align: left;
        font-size: 14px;
        white-space: nowrap;
    }
    .table-cards td::before { content: none; }
    .table-cards td:last-child { padding-top: 12px; }
    .table-cards tbody tr:last-child td { border-bottom: 0; }
    .table-cards tbody tr:hover { background: #fafbff; }

    .table th {
        padding: 12px 16px;
        background: #f8fafc;
        color: var(--text-2);
        font-size: 13px;
        font-weight: 600;
        text-align: left;
        white-space: nowrap;
    }
}

/* ---------- 小屏微调 ---------- */
@media (max-width: 360px) {
    .navlinks { gap: 9px; }
    .navlinks a { font-size: 12.5px; }
    .feed-title { font-size: 15px; }
    .tab-item { font-size: 10.5px; }
    .tab-item .icon { font-size: 19px; }
    .stat strong { font-size: 20px; }
}

/* ---------- 减少动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- 桌面端悬停效果（触屏不触发） ---------- */
@media (hover: hover) and (min-width: 760px) {
    button:hover, .btn:hover { opacity: .94; }
    .media:hover img, .media:hover video { transform: scale(1.03); }
}
/* =========================================================
   前台登录 / 注册页
   ========================================================= */
.auth-body {
    background:
        radial-gradient(900px 480px at 12% 0%, #e0e7ff 0%, transparent 62%),
        radial-gradient(820px 440px at 100% 100%, #f3e8ff 0%, transparent 58%),
        var(--bg);
    min-height: 100vh;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 28px 16px calc(28px + env(safe-area-inset-bottom, 0px));
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 24px;
    padding: 30px 24px 26px;
    box-shadow: var(--shadow-lg);
    animation: authIn .36s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes authIn {
    from { opacity: 0; transform: translateY(14px) scale(.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .3px;
    margin-bottom: 18px;
}
.auth-brand::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 3px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 0 10px rgba(91, 91, 214, .5);
}

.auth-title {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -.4px;
    line-height: 1.3;
    color: var(--text);
}
.auth-sub {
    margin: 6px 0 20px;
    color: var(--muted);
    font-size: 13.5px;
}

/* 错误 / 成功提示 */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 11px 14px;
    margin-bottom: 14px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.6;
    animation: authIn .28s ease both;
}
.auth-alert.error   { background: #fef2f2; color: #b91c1c; border-left: 3px solid var(--danger); }
.auth-alert.success { background: #ecfdf5; color: #047857; border-left: 3px solid var(--success); }

/* 字段 */
.auth-field { margin-bottom: 14px; }
.auth-label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.auth-input-wrap .auth-icon {
    position: absolute;
    left: 14px;
    font-size: 16px;
    line-height: 1;
    opacity: .55;
    pointer-events: none;
}
.auth-input {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 42px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #f8fafc;
    font-size: 16px;
    outline: none;
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.auth-input::placeholder { color: #9aa4b2; }
.auth-input:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(91, 91, 214, .13);
}

/* 带密码切换按钮的输入框右侧留白 */
.auth-input-wrap.has-eye .auth-input { padding-right: 46px; }
.auth-eye {
    position: absolute;
    right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font-size: 16px;
    cursor: pointer;
    box-shadow: none;
    min-height: 0;
    padding: 0;
}
.auth-eye:active { transform: scale(.94); }

/* 提交按钮 */
.auth-btn {
    width: 100%;
    height: 50px;
    margin-top: 6px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .3px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(91, 91, 214, .32);
    transition: transform .12s, opacity .18s, box-shadow .18s;
}
.auth-btn:active { transform: scale(.98); }
.auth-btn:hover { box-shadow: 0 10px 26px rgba(91, 91, 214, .38); }

/* 底部链接 */
.auth-foot {
    margin-top: 18px;
    text-align: center;
    font-size: 13.5px;
    color: var(--muted);
}
.auth-foot a {
    color: var(--primary);
    font-weight: 600;
    margin-left: 4px;
}
.auth-foot a:hover { text-decoration: underline; }

.auth-back {
    font-size: 13.5px;
    color: var(--muted);
    padding: 6px 12px;
    border-radius: 999px;
}
.auth-back:hover { color: var(--primary); background: rgba(91, 91, 214, .07); }

/* 移动端 */
@media (max-width: 480px) {
    .auth-page {
        justify-content: flex-start;
        padding-top: 34px;
    }
    .auth-card {
        padding: 26px 20px 22px;
        border-radius: 22px;
    }
    .auth-title { font-size: 21px; }
}
/* =========================================================
   顶部栏 v2
   ========================================================= */
.topbar {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 55%, #312e81 100%);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    box-shadow: 0 2px 18px rgba(15, 23, 42, .28);
}

.brand-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    color: #fff;
}
.brand-name {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .3px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.brand-sub {
    font-size: 11px;
    color: #a5b4fc;
    letter-spacing: .2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 3px 10px rgba(99, 102, 241, .4);
}
.avatar:hover { text-decoration: none; opacity: .92; }

.top-username {
    display: none;
    font-size: 13px;
    color: #c7d2fe;
    font-weight: 500;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-logout {
    font-size: 12.5px;
    color: #94a3b8;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .14);
}
.top-logout:hover { color: #fff; border-color: rgba(255, 255, 255, .3); text-decoration: none; }

.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 16px;
    border-radius: 999px;
    background: #fff;
    color: #1e1b4b !important;
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(255, 255, 255, .18);
}
.btn-login:hover { text-decoration: none; opacity: .94; }

/* =========================================================
   首页 Hero
   ========================================================= */
.home-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 22px 18px;
    margin-bottom: 14px;
    border-radius: 22px;
    background:
        radial-gradient(420px 200px at 100% 0%, rgba(168, 85, 247, .18), transparent 70%),
        radial-gradient(360px 200px at 0% 100%, rgba(99, 102, 241, .16), transparent 70%),
        linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    border: 1px solid rgba(99, 102, 241, .12);
    box-shadow: 0 8px 28px rgba(99, 102, 241, .08);
}

.hero-main { position: relative; z-index: 1; }

.hero-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.4px;
    line-height: 1.35;
    color: #1e1b4b;
}
.hero-sub {
    margin-top: 6px;
    font-size: 13.5px;
    color: #4c4f9c;
    line-height: 1.6;
}

.hero-stats {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
}
.hero-stat {
    flex: 1;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .78);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .9);
    box-shadow: 0 4px 14px rgba(99, 102, 241, .08);
}
.hero-stat strong {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: #4f46e5;
    line-height: 1.2;
}
.hero-stat span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #6366f1;
    font-weight: 600;
}

/* 首页搜索 */
.home-search {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}
.home-search input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    font-size: 15px;
    outline: none;
    box-shadow: var(--shadow-sm);
    transition: border-color .18s, box-shadow .18s;
}
.home-search input::placeholder { color: #9aa4b2; }
.home-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(91, 91, 214, .12);
}
.home-search button {
    flex-shrink: 0;
    height: 44px;
    padding: 0 20px;
    border-radius: 999px;
}

.search-tip {
    margin: -4px 0 12px;
    font-size: 13px;
    color: var(--muted);
}

/* 首页卡片微调 */
.post-card {
    padding: 0;
    overflow: hidden;
}
.post-card .media {
    margin: 0;
    border-radius: 0;
    aspect-ratio: 4 / 3;
}
.post-card .post-body {
    padding: 14px 14px 16px;
}
.post-card .feed-title {
    font-size: 17px;
}
.post-card .feed-desc {
    margin-top: 6px;
}
.post-card .meta {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #eef1f6;
}
.post-card .meta .author {
    color: var(--primary);
    font-weight: 600;
}

/* 桌面端增强 */
@media (min-width: 760px) {
    .brand-name { font-size: 18px; }
    .brand-sub { font-size: 12px; }
    .top-username { display: inline; }
    .avatar { width: 36px; height: 36px; font-size: 16px; }
    .btn-login { height: 36px; padding: 0 20px; font-size: 14px; }

    .home-hero {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 28px;
        padding: 30px 32px;
        margin-bottom: 20px;
        border-radius: 26px;
    }
    .hero-title { font-size: 28px; }
    .hero-sub { font-size: 14.5px; margin-top: 8px; }
    .hero-stats { flex-shrink: 0; gap: 12px; }
    .hero-stat { min-width: 110px; padding: 14px 18px; }
    .hero-stat strong { font-size: 26px; }
    .hero-stat span { font-size: 12.5px; }

    .home-search { margin-bottom: 20px; }
    .home-search input { height: 48px; font-size: 15.5px; }
    .home-search button { height: 48px; padding: 0 26px; }

    .post-card .media { aspect-ratio: 16 / 9; }
    .post-card .post-body { padding: 18px 20px 20px; }
    .post-card .feed-title { font-size: 19px; }
}

/* 小屏顶部微调 */
@media (max-width: 360px) {
    .brand-name { font-size: 15.5px; }
    .brand-sub { font-size: 10px; }
    .hero-title { font-size: 20px; }
    .hero-stat strong { font-size: 20px; }
    .btn-login { padding: 0 13px; font-size: 13px; }
}
/* =========================================================
   首页双模块：视频 / 照片
   ========================================================= */

/* Hero 统计改为三列 */
.home-hero .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.home-hero .hero-stat {
    padding: 10px 8px;
    text-align: center;
}
.home-hero .hero-stat strong { font-size: 20px; }
.home-hero .hero-stat span { font-size: 11.5px; }

/* Tab 切换 */
.type-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.type-tabs::-webkit-scrollbar { display: none; }

.type-tab {
    flex-shrink: 0;
    height: 36px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    background: #fff;
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 600;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: .18s;
}
.type-tab:hover { border-color: rgba(91, 91, 214, .4); color: var(--primary); text-decoration: none; }
.type-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(91, 91, 214, .3);
}

/* 分区 */
.media-section { margin-bottom: 26px; }

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--text);
}
.section-icon { font-size: 18px; line-height: 1; }
.section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 11.5px;
    font-weight: 700;
}
.section-more {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
}
.section-more:hover { color: var(--primary); text-decoration: none; }

/* 网格 */
.media-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 560px) {
    .media-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .media-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

/* 卡片 */
.media-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
    animation: fadeUp .32s ease both;
}
.media-card:nth-child(2) { animation-delay: .04s; }
.media-card:nth-child(3) { animation-delay: .08s; }
.media-card:nth-child(4) { animation-delay: .12s; }
.media-card:nth-child(5) { animation-delay: .16s; }
.media-card:nth-child(6) { animation-delay: .2s; }

.mc-media {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0b1220;
}
.mc-video .mc-media { aspect-ratio: 16 / 9; }
.mc-photo .mc-media { aspect-ratio: 1 / 1; }

.mc-media img,
.mc-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.mc-media:active img,
.mc-media:active video { transform: scale(1.03); }

/* 播放按钮 */
.mc-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: #1e1b4b;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    pointer-events: none;
}

/* 浏览量角标 */
.mc-views {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
}

/* 卡片内容 */
.mc-body { padding: 10px 12px 12px; }
.mc-title {
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mc-title a { color: var(--text); }
.mc-title a:hover { color: var(--primary); }

.mc-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
}
.mc-meta span { white-space: nowrap; }

/* 桌面端增强 */
@media (min-width: 760px) {
    .home-hero .hero-stats {
        display: flex;
        gap: 12px;
    }
    .home-hero .hero-stat {
        min-width: 100px;
        padding: 14px 18px;
        text-align: left;
    }
    .home-hero .hero-stat strong { font-size: 24px; }
    .home-hero .hero-stat span { font-size: 12.5px; }

    .type-tab { height: 40px; padding: 0 20px; font-size: 14px; }

    .section-title { font-size: 19px; }
    .section-icon { font-size: 20px; }

    .media-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-lg);
    }
    .mc-media:hover img,
    .mc-media:hover video { transform: scale(1.04); }

    .mc-body { padding: 12px 14px 14px; }
    .mc-title { font-size: 15.5px; }
}

/* 小屏微调 */
@media (max-width: 360px) {
    .home-hero .hero-stat strong { font-size: 18px; }
    .home-hero .hero-stat span { font-size: 11px; }
    .mc-title { font-size: 14px; }
    .type-tab { height: 34px; padding: 0 13px; font-size: 13px; }
}
/* =========================================================
   顶部栏 v3：只保留登录/注册
   ========================================================= */
.topbar {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 55%, #312e81 100%);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    box-shadow: 0 2px 18px rgba(15, 23, 42, .28);
}

.brand-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    color: #fff;
}
.brand-name {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .3px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.brand-sub {
    font-size: 11px;
    color: #a5b4fc;
    letter-spacing: .2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-login,
.btn-register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 700;
    transition: .18s;
}
.btn-login {
    background: transparent;
    color: #e5e7eb !important;
    border: 1px solid rgba(255, 255, 255, .22);
}
.btn-login:hover { background: rgba(255, 255, 255, .08); color: #fff !important; text-decoration: none; }

.btn-register {
    background: #fff;
    color: #1e1b4b !important;
    box-shadow: 0 3px 12px rgba(255, 255, 255, .18);
}
.btn-register:hover { text-decoration: none; opacity: .94; }

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 3px 10px rgba(99, 102, 241, .4);
}
.avatar:hover { text-decoration: none; opacity: .92; }

.top-logout {
    font-size: 12.5px;
    color: #94a3b8;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .14);
}
.top-logout:hover { color: #fff; border-color: rgba(255, 255, 255, .3); text-decoration: none; }

/* =========================================================
   首页 Hero
   ========================================================= */
.home-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 22px 18px;
    margin-bottom: 14px;
    border-radius: 22px;
    background:
        radial-gradient(420px 200px at 100% 0%, rgba(168, 85, 247, .18), transparent 70%),
        radial-gradient(360px 200px at 0% 100%, rgba(99, 102, 241, .16), transparent 70%),
        linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    border: 1px solid rgba(99, 102, 241, .12);
    box-shadow: 0 8px 28px rgba(99, 102, 241, .08);
}

.hero-main { position: relative; z-index: 1; }
.hero-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.4px;
    line-height: 1.35;
    color: #1e1b4b;
}
.hero-sub {
    margin-top: 6px;
    font-size: 13.5px;
    color: #4c4f9c;
    line-height: 1.6;
}
.hero-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.hero-stat {
    padding: 10px 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .78);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .9);
    box-shadow: 0 4px 14px rgba(99, 102, 241, .08);
    text-align: center;
}
.hero-stat strong {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: #4f46e5;
    line-height: 1.2;
}
.hero-stat span {
    display: block;
    margin-top: 2px;
    font-size: 11.5px;
    color: #6366f1;
    font-weight: 600;
}

/* 首页搜索 */
.home-search {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}
.home-search input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    font-size: 15px;
    outline: none;
    box-shadow: var(--shadow-sm);
    transition: border-color .18s, box-shadow .18s;
}
.home-search input::placeholder { color: #9aa4b2; }
.home-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(91, 91, 214, .12);
}
.home-search button {
    flex-shrink: 0;
    height: 44px;
    padding: 0 20px;
    border-radius: 999px;
}
.search-tip {
    margin: -4px 0 12px;
    font-size: 13px;
    color: var(--muted);
}

/* =========================================================
   独立模块
   ========================================================= */
.media-module {
    margin-bottom: 30px;
    padding: 18px 14px 20px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.module-video { background: linear-gradient(180deg, #f5f3ff 0%, #fff 120px); }
.module-photo { background: linear-gradient(180deg, #ecfeff 0%, #fff 120px); }

.module-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px dashed #e8ebf2;
}

.module-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.module-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(99, 102, 241, .18);
}
.module-video .module-icon { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.module-photo .module-icon { background: linear-gradient(135deg, #cffafe, #a5f3fc); }

.module-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--text);
    line-height: 1.2;
}
.module-sub {
    margin-top: 3px;
    font-size: 12.5px;
    color: var(--muted);
}

/* 空状态 */
.module-empty {
    padding: 32px 20px;
    text-align: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, .6);
    border: 1px dashed #e0e7ff;
}
.module-empty .empty-icon {
    display: inline-block;
    font-size: 34px;
    opacity: .55;
    margin-bottom: 8px;
}
.module-empty p {
    font-size: 14px;
    color: var(--muted);
}
.empty-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
}

/* 网格 */
.media-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 560px) {
    .media-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .media-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}

/* 卡片 */
.media-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(15, 23, 42, .04);
    transition: transform .2s ease, box-shadow .2s ease;
    animation: fadeUp .32s ease both;
}
.media-card:nth-child(2) { animation-delay: .04s; }
.media-card:nth-child(3) { animation-delay: .08s; }
.media-card:nth-child(4) { animation-delay: .12s; }
.media-card:nth-child(5) { animation-delay: .16s; }
.media-card:nth-child(6) { animation-delay: .2s; }

.mc-media {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0b1220;
}
.mc-video .mc-media { aspect-ratio: 16 / 9; }
.mc-photo .mc-media { aspect-ratio: 1 / 1; }

.mc-media img,
.mc-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.mc-media:active img,
.mc-media:active video { transform: scale(1.03); }

.mc-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #1e1b4b;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    pointer-events: none;
}

.mc-views {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
}

.mc-body { padding: 10px 12px 12px; }
.mc-title {
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mc-title a { color: var(--text); }
.mc-title a:hover { color: var(--primary); }

.mc-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
}
.mc-meta span { white-space: nowrap; }

/* =========================================================
   桌面端增强
   ========================================================= */
@media (min-width: 760px) {
    .brand-name { font-size: 18px; }
    .brand-sub { font-size: 12px; }
    .btn-login, .btn-register { height: 36px; padding: 0 20px; font-size: 14px; }
    .avatar { width: 36px; height: 36px; font-size: 16px; }

    .home-hero {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 28px;
        padding: 30px 32px;
        margin-bottom: 20px;
        border-radius: 26px;
    }
    .hero-title { font-size: 28px; }
    .hero-sub { font-size: 14.5px; margin-top: 8px; }
    .hero-stats { display: flex; flex-shrink: 0; gap: 12px; }
    .hero-stat { min-width: 100px; padding: 14px 18px; text-align: left; }
    .hero-stat strong { font-size: 24px; }
    .hero-stat span { font-size: 12.5px; }

    .home-search { margin-bottom: 22px; }
    .home-search input { height: 48px; font-size: 15.5px; }
    .home-search button { height: 48px; padding: 0 26px; }

    .media-module { padding: 24px 24px 26px; border-radius: 26px; }
    .module-icon { width: 50px; height: 50px; font-size: 26px; border-radius: 16px; }
    .module-title { font-size: 21px; }
    .module-sub { font-size: 13px; }

    .media-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-lg);
    }
    .mc-media:hover img,
    .mc-media:hover video { transform: scale(1.04); }

    .mc-body { padding: 12px 14px 14px; }
    .mc-title { font-size: 15.5px; }
}

/* 小屏微调 */
@media (max-width: 360px) {
    .brand-name { font-size: 15.5px; }
    .brand-sub { font-size: 10px; }
    .btn-login, .btn-register { height: 32px; padding: 0 12px; font-size: 12.5px; }
    .hero-title { font-size: 20px; }
    .hero-stat strong { font-size: 18px; }
    .hero-stat span { font-size: 11px; }
    .media-module { padding: 14px 10px 16px; }
    .module-title { font-size: 16px; }
    .mc-title { font-size: 14px; }
}
/* =========================================================
   发布页字段说明与字数统计
   ========================================================= */
.field-note {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
    line-height: 1.5;
}
.field-note #contentCount {
    color: var(--primary);
    font-weight: 600;
}
/* =========================================================
   HEIC 占位卡片
   ========================================================= */
.media-ph {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 100%;
    min-height: 160px;
    padding: 16px;
    background:
        linear-gradient(135deg, rgba(99, 102, 241, .08), rgba(168, 85, 247, .08)),
        #f8fafc;
    color: var(--muted);
    text-align: center;
}
.media-ph .ph-icon {
    font-size: 30px;
    line-height: 1;
    opacity: .7;
}
.media-ph .ph-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-2);
}
.media-ph .ph-link {
    margin-top: 2px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #fff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(91, 91, 214, .25);
}
.media-ph .ph-link:hover { text-decoration: none; background: var(--primary-soft); }

/* 详情页 HEIC 占位更大 */
.detail-media .media-ph { min-height: 260px; border-radius: 14px; }

/* 后台缩略图里的占位 */
.media.thumb .media-ph { min-height: 160px; }
/* =========================================================
   首页网格：手机 2 列，卡片明显缩小
   ========================================================= */
.media-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

/* 照片网格：2 / 3 / 4 列 */
.photo-grid {
    grid-template-columns: repeat(2, 1fr);
}

/* 视频网格：手机 2 列，平板 2 列，桌面 3 列 */
.video-grid {
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 560px) {
    .media-grid { gap: 10px; }
    .photo-grid { grid-template-columns: repeat(3, 1fr); }
    .video-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
    .media-grid { gap: 14px; }
    .photo-grid { grid-template-columns: repeat(4, 1fr); }
    .video-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 2 列时卡片更紧凑 */
.media-card {
    border-radius: 12px;
}
.mc-body {
    padding: 8px 10px 10px;
}
.mc-title {
    font-size: 13px;
    -webkit-line-clamp: 1;
}
.mc-meta {
    margin-top: 4px;
    font-size: 11px;
}
.mc-play {
    width: 34px;
    height: 34px;
    font-size: 13px;
}
.mc-views {
    right: 6px;
    bottom: 6px;
    padding: 2px 6px;
    font-size: 10.5px;
}

@media (min-width: 760px) {
    .media-card { border-radius: 14px; }
    .mc-body { padding: 10px 12px 12px; }
    .mc-title { font-size: 14.5px; -webkit-line-clamp: 2; }
    .mc-meta { margin-top: 6px; font-size: 12px; }
    .mc-play { width: 46px; height: 46px; font-size: 18px; }
    .mc-views { right: 8px; bottom: 8px; padding: 3px 8px; font-size: 11.5px; }
}

/* 小屏再微调 */
@media (max-width: 360px) {
    .media-grid { gap: 6px; }
    .mc-title { font-size: 12px; }
    .mc-play { width: 30px; height: 30px; font-size: 12px; }
}
/* =========================================================
   发布页类型选择
   ========================================================= */
.publish-type {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.pt-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 14px 10px;
    border-radius: 14px;
    border: 2px solid var(--border);
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: border-color .18s, background .18s, box-shadow .18s;
    -webkit-tap-highlight-color: transparent;
}
.pt-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.pt-option:hover { border-color: rgba(91, 91, 214, .35); }
.pt-option.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, #eef2ff, #f5f3ff);
    box-shadow: 0 4px 14px rgba(91, 91, 214, .15);
}
.pt-icon { font-size: 26px; line-height: 1; }
.pt-title { font-size: 14px; font-weight: 700; color: var(--text); }
.pt-desc { font-size: 11.5px; color: var(--muted); }
.pt-option.active .pt-title { color: var(--primary); }
.pt-option.active .pt-desc { color: #6366f1; }

/* 模块头部发布按钮 */
.module-publish {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    transition: .18s;
}
.module-publish:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    text-decoration: none;
}

/* 首页网格：手机 2 列 */
.media-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.photo-grid { grid-template-columns: repeat(2, 1fr); }
.video-grid { grid-template-columns: repeat(2, 1fr); }

.media-card { border-radius: 12px; }
.mc-body { padding: 8px 10px 10px; }
.mc-title { font-size: 13px; -webkit-line-clamp: 1; }
.mc-meta { margin-top: 4px; font-size: 11px; }
.mc-play { width: 34px; height: 34px; font-size: 13px; }
.mc-views { right: 6px; bottom: 6px; padding: 2px 6px; font-size: 10.5px; }

@media (min-width: 560px) {
    .media-grid { gap: 10px; }
    .photo-grid { grid-template-columns: repeat(3, 1fr); }
    .video-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 760px) {
    .publish-type { gap: 14px; margin-bottom: 20px; }
    .pt-option { padding: 18px 14px; }
    .pt-icon { font-size: 30px; }
    .pt-title { font-size: 15px; }
    .pt-desc { font-size: 12.5px; }
    .module-publish { height: 34px; padding: 0 16px; font-size: 13px; }
    .media-card { border-radius: 14px; }
    .mc-body { padding: 10px 12px 12px; }
    .mc-title { font-size: 14.5px; -webkit-line-clamp: 2; }
    .mc-meta { margin-top: 6px; font-size: 12px; }
    .mc-play { width: 46px; height: 46px; font-size: 18px; }
    .mc-views { right: 8px; bottom: 8px; padding: 3px 8px; font-size: 11.5px; }
}

@media (min-width: 960px) {
    .media-grid { gap: 14px; }
    .photo-grid { grid-template-columns: repeat(4, 1fr); }
    .video-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 360px) {
    .media-grid { gap: 6px; }
    .mc-title { font-size: 12px; }
    .mc-play { width: 30px; height: 30px; font-size: 12px; }
}
/* =========================================================
   返回首页按钮
   ========================================================= */
.back-home {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: #fff;
    color: var(--text-2) !important;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: .18s;
    white-space: nowrap;
}
.back-home:hover {
    color: var(--primary) !important;
    border-color: rgba(91, 91, 214, .35);
    text-decoration: none;
}

/* 发布页三个类型 */
.publish-type-3 { grid-template-columns: repeat(3, 1fr); }

/* =========================================================
   首页 Hero 四列统计
   ========================================================= */
.hero-stats-4 { grid-template-columns: repeat(4, 1fr); }
.hero-stats-4 .hero-stat { padding: 10px 6px; text-align: center; }
.hero-stats-4 .hero-stat strong { font-size: 18px; }
.hero-stats-4 .hero-stat span { font-size: 11px; }

/* =========================================================
   网格比例缩小
   ========================================================= */
.media-grid { gap: 6px; }
.photo-grid { grid-template-columns: repeat(3, 1fr); }
.video-grid { grid-template-columns: repeat(2, 1fr); }

.media-card { border-radius: 10px; }
.mc-body { padding: 6px 8px 8px; }
.mc-title { font-size: 12px; -webkit-line-clamp: 1; }
.mc-meta { display: none; }
.mc-play { width: 28px; height: 28px; font-size: 11px; }
.mc-views { right: 4px; bottom: 4px; padding: 2px 6px; font-size: 10px; }

@media (min-width: 560px) {
    .media-grid { gap: 8px; }
    .photo-grid { grid-template-columns: repeat(4, 1fr); }
    .video-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 760px) {
    .media-grid { gap: 10px; }
    .photo-grid { grid-template-columns: repeat(5, 1fr); }
    .video-grid { grid-template-columns: repeat(4, 1fr); }
    .media-card { border-radius: 12px; }
    .mc-body { padding: 8px 10px 10px; }
    .mc-title { font-size: 13px; -webkit-line-clamp: 2; }
    .mc-play { width: 38px; height: 38px; font-size: 14px; }
    .mc-views { right: 6px; bottom: 6px; padding: 2px 8px; font-size: 11px; }

    .hero-stats-4 { display: flex; }
    .hero-stats-4 .hero-stat { min-width: 92px; padding: 12px 14px; text-align: left; }
    .hero-stats-4 .hero-stat strong { font-size: 22px; }
    .hero-stats-4 .hero-stat span { font-size: 12px; }
}

/* =========================================================
   二次元动漫模块
   ========================================================= */
.module-anime {
    background:
        radial-gradient(500px 220px at 100% 0%, rgba(244, 114, 182, .12), transparent 70%),
        linear-gradient(180deg, #fdf2f8 0%, #fff 120px);
}

.module-anime .module-icon {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
}

.module-publish-anime {
    background: #fce7f3;
    color: #db2777;
}
.module-publish-anime:hover {
    background: linear-gradient(135deg, #ec4899, #db2777);
    color: #fff;
}

/* 二次元文案网格 */
.anime-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
@media (min-width: 560px) { .anime-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 760px) { .anime-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }

.anime-card {
    position: relative;
    display: block;
    padding: 16px 14px 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #fce7f3;
    box-shadow: 0 3px 14px rgba(236, 72, 153, .08);
    transition: transform .2s ease, box-shadow .2s ease;
    overflow: hidden;
    color: var(--text);
}
.anime-card:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(236, 72, 153, .16);
}

.anime-quote {
    position: absolute;
    top: 2px;
    left: 8px;
    font-size: 42px;
    line-height: 1;
    color: #fbcfe8;
    font-family: Georgia, serif;
    pointer-events: none;
}
.anime-quote-lg { font-size: 64px; top: -4px; left: 10px; }

.anime-text {
    position: relative;
    z-index: 1;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-2);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.anime-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #fce7f3;
    font-size: 11.5px;
    color: var(--muted);
}
.anime-author { color: #db2777; font-weight: 600; }
.anime-views { color: var(--muted); }

/* 二次元详情页 */
.anime-detail {
    position: relative;
    padding: 20px 18px 16px;
    background: linear-gradient(180deg, #fdf2f8 0%, #fff 100%);
    border: 1px solid #fce7f3;
    overflow: hidden;
}
.anime-detail-content {
    position: relative;
    z-index: 1;
    font-size: 16px;
    line-height: 1.9;
    color: var(--text);
    word-break: break-word;
}
.anime-detail-meta {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed #fce7f3;
    justify-content: flex-start;
}

/* 我的记录 / 后台里的二次元缩略 */
.anime-mini {
    position: relative;
    padding: 12px 12px 10px;
    border-radius: 12px;
    background: linear-gradient(180deg, #fdf2f8, #fff);
    border: 1px solid #fce7f3;
    margin-bottom: 10px;
}
.anime-mini .anime-quote { font-size: 36px; top: 0; left: 6px; }
.anime-mini p {
    position: relative;
    z-index: 1;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-2);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 760px) {
    .anime-text { font-size: 15px; }
    .anime-detail { padding: 28px 26px 22px; }
    .anime-detail-content { font-size: 17px; }
}
/* =========================================================
   管理后台 v3：快捷按钮 + 模块卡片
   ========================================================= */

/* ---------- 快捷操作按钮区 ---------- */
.quick-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.quick-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .05);
    box-shadow: 0 2px 10px rgba(15, 23, 42, .05);
    color: var(--text);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    text-decoration: none;
}
.quick-btn:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .1);
    border-color: rgba(91, 91, 214, .2);
}
.quick-btn:active { transform: scale(.98); }

.qb-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .08);
}

.qb-text { display: flex; flex-direction: column; min-width: 0; }
.qb-text strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.qb-text small {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 四种配色 */
.quick-primary { border-color: rgba(91, 91, 214, .18); }
.quick-primary .qb-icon { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); }
.quick-primary strong { color: #4338ca; }

.quick-pink { border-color: rgba(236, 72, 153, .16); }
.quick-pink .qb-icon { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }
.quick-pink strong { color: #db2777; }

.quick-cyan { border-color: rgba(8, 145, 178, .16); }
.quick-cyan .qb-icon { background: linear-gradient(135deg, #cffafe, #a5f3fc); }
.quick-cyan strong { color: #0891b2; }

.quick-violet { border-color: rgba(124, 58, 237, .16); }
.quick-violet .qb-icon { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.quick-violet strong { color: #7c3aed; }

/* ---------- 功能模块卡片 v2 ---------- */
.module-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 22px;
}
@media (min-width: 640px) { .module-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .module-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }

.admin-module {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .05);
    box-shadow: 0 2px 12px rgba(15, 23, 42, .05);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    position: relative;
    overflow: hidden;
}
.admin-module::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    opacity: 0;
    transition: opacity .2s ease;
}
.admin-module:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .1);
    border-color: rgba(91, 91, 214, .2);
}
.admin-module:hover::before { opacity: 1; }

.am-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
}
.am-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .07);
}
.am-icon-posts    { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); }
.am-icon-users    { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.am-icon-settings { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.am-icon-publish  { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }
.am-icon-front    { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.am-icon-logout   { background: linear-gradient(135deg, #fee2e2, #fecaca); }

.am-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    white-space: nowrap;
}

.admin-module h3 {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.1px;
}
.admin-module p {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.6;
    flex: 1;
}

.am-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    margin-top: 4px;
    padding: 0 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(91, 91, 214, .24);
    transition: .18s;
    text-decoration: none;
}
.am-btn:hover { opacity: .94; transform: translateY(-1px); text-decoration: none; }
.am-btn-danger { background: linear-gradient(135deg, #f26d6d, var(--danger)); box-shadow: 0 4px 14px rgba(229, 72, 77, .24); }

/* ---------- 待审核 / 最新注册面板补充 ---------- */
.pl-avatar-admin { background: linear-gradient(135deg, #6366f1, #a855f7); }
.pl-avatar-user  { background: linear-gradient(135deg, #38bdf8, #0ea5e9); }

.pl-go {
    flex-shrink: 0;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    white-space: nowrap;
}
.pl-go:hover { text-decoration: none; opacity: .85; }

/* ---------- 移动端 ---------- */
@media (max-width: 720px) {
    .quick-bar { gap: 8px; }
    .quick-btn { padding: 10px; border-radius: 12px; gap: 8px; }
    .qb-icon { width: 34px; height: 34px; font-size: 16px; border-radius: 10px; }
    .qb-text strong { font-size: 13px; }
    .qb-text small { font-size: 10.5px; }

    .admin-module { padding: 14px; border-radius: 14px; }
    .am-icon { width: 40px; height: 40px; font-size: 19px; border-radius: 12px; }
    .admin-module h3 { font-size: 14.5px; }
    .admin-module p { font-size: 12px; }
    .am-btn { width: 100%; height: 38px; }

    .pl-go { display: none; }
}

/* ---------- 桌面端 ---------- */
@media (min-width: 760px) {
    .quick-bar { grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
    .quick-btn { padding: 14px 16px; border-radius: 16px; }
    .qb-icon { width: 44px; height: 44px; font-size: 21px; border-radius: 13px; }
    .qb-text strong { font-size: 15px; }
    .qb-text small { font-size: 12px; }

    .admin-module { padding: 18px; border-radius: 18px; }
    .am-icon { width: 48px; height: 48px; font-size: 23px; border-radius: 14px; }
    .admin-module h3 { font-size: 16px; }
    .admin-module p { font-size: 13px; }
    .am-btn { height: 38px; padding: 0 16px; font-size: 13.5px; }
}
/* =========================================================
   管理后台仪表盘 v4
   ========================================================= */

/* 通用标题 */
.dash-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    margin: 22px 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -.1px;
}
.dash-title::before {
    content: "";
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--primary), var(--primary-2));
}

/* ---------- 欢迎区 ---------- */
.dash-welcome {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
    background:
        radial-gradient(420px 200px at 100% 0%, rgba(168, 85, 247, .16), transparent 70%),
        linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    border: 1px solid rgba(99, 102, 241, .14);
    box-shadow: 0 6px 22px rgba(99, 102, 241, .08);
    margin-bottom: 6px;
}
.dw-text h2 {
    font-size: 18px;
    font-weight: 800;
    color: #1e1b4b;
    letter-spacing: -.2px;
    margin-bottom: 4px;
}
.dw-text p {
    font-size: 13px;
    color: #4c4f9c;
    line-height: 1.6;
}
.dw-text strong { color: #4f46e5; font-weight: 800; }

.dw-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.dw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 38px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: .18s;
    white-space: nowrap;
}
.dw-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff !important;
    box-shadow: 0 5px 16px rgba(91, 91, 214, .28);
}
.dw-btn-primary:hover { opacity: .94; transform: translateY(-1px); text-decoration: none; }
.dw-btn-ghost {
    background: #fff;
    color: #4338ca !important;
    border: 1px solid rgba(99, 102, 241, .25);
}
.dw-btn-ghost:hover { background: #fff; border-color: var(--primary); text-decoration: none; }

/* ---------- 数据概览 ---------- */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.dash-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .05);
    box-shadow: 0 2px 12px rgba(15, 23, 42, .05);
    position: relative;
    transition: .2s;
}
.dash-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}
.ds-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .07);
}
.ds-indigo  { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); }
.ds-violet  { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.ds-amber   { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.ds-emerald { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }

.ds-body { flex: 1; min-width: 0; }
.ds-body strong {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}
.ds-body span {
    display: block;
    font-size: 11.5px;
    color: var(--muted);
    font-weight: 500;
    margin-top: 1px;
}
.ds-link {
    flex-shrink: 0;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--primary);
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--primary-soft);
    text-decoration: none;
}
.ds-link:hover { text-decoration: none; opacity: .85; }
.ds-link-static { color: var(--muted); background: #f1f5f9; }

/* ---------- 内容分布 ---------- */
.dash-panel {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    border: 1px solid rgba(15, 23, 42, .04);
    box-shadow: 0 2px 12px rgba(15, 23, 42, .05);
    margin-top: 12px;
}
.dp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.dp-head h3 { font-size: 14.5px; font-weight: 800; color: var(--text); }
.dp-head a { font-size: 12.5px; color: var(--muted); font-weight: 600; text-decoration: none; }
.dp-head a:hover { color: var(--primary); }
.dp-sub { font-size: 12px; color: var(--muted); }

.dist-bar {
    display: flex;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: #f1f5f9;
    margin-bottom: 14px;
}
.dist-seg { display: block; height: 100%; transition: width .4s ease; }
.dist-video { background: linear-gradient(90deg, #a78bfa, #7c3aed); }
.dist-photo { background: linear-gradient(90deg, #22d3ee, #0891b2); }
.dist-anime { background: linear-gradient(90deg, #f472b6, #db2777); }

.dist-legend {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.dl-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #eef1f6;
}
.dl-dot { width: 8px; height: 8px; border-radius: 3px; }
.dl-video { background: #7c3aed; }
.dl-photo { background: #0891b2; }
.dl-anime { background: #db2777; }
.dl-name { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.dl-item strong { font-size: 17px; font-weight: 800; color: var(--text); line-height: 1.2; }
.dl-item small { font-size: 11px; color: var(--muted); }

/* ---------- 管理模块 ---------- */
.dash-modules {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.dm-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .05);
    box-shadow: 0 2px 12px rgba(15, 23, 42, .05);
    text-decoration: none;
    color: var(--text);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    position: relative;
    overflow: hidden;
}
.dm-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    opacity: 0;
    transition: opacity .2s;
}
.dm-card:hover {
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .1);
    border-color: rgba(91, 91, 214, .2);
}
.dm-card:hover::before { opacity: 1; }

.dm-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.dm-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .07);
}
.dm-icon-posts    { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); }
.dm-icon-users    { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.dm-icon-settings { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.dm-icon-photo    { background: linear-gradient(135deg, #cffafe, #a5f3fc); }
.dm-icon-video    { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.dm-icon-anime    { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }

.dm-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    white-space: nowrap;
}
.dm-card h3 {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.1px;
}
.dm-card p {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.6;
    flex: 1;
}
.dm-link {
    display: inline-flex;
    align-items: center;
    height: 34px;
    margin-top: 4px;
    padding: 0 14px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    align-self: flex-start;
    box-shadow: 0 4px 12px rgba(91, 91, 214, .22);
    transition: .18s;
}
.dm-card:hover .dm-link { transform: translateX(3px); }

/* ---------- 最近动态 ---------- */
.dash-bottom {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 12px;
}

.dash-list { list-style: none; }
.dash-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed #eef1f6;
}
.dash-list li:last-child { border-bottom: 0; padding-bottom: 0; }

.dl-tag {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
}
.dl-tag-image { background: linear-gradient(135deg, #22d3ee, #0891b2); }
.dl-tag-video { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.dl-tag-anime { background: linear-gradient(135deg, #f472b6, #db2777); }
.dl-tag-text  { background: linear-gradient(135deg, #94a3b8, #64748b); }

.dl-avatar {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 3px 8px rgba(15, 23, 42, .12);
}
.dl-avatar-admin { background: linear-gradient(135deg, #6366f1, #a855f7); }
.dl-avatar-user  { background: linear-gradient(135deg, #38bdf8, #0ea5e9); }

.dl-main { flex: 1; min-width: 0; }
.dl-main strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dl-main span {
    display: block;
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dl-go {
    flex-shrink: 0;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    text-decoration: none;
}
.dl-go:hover { text-decoration: none; opacity: .85; }

.dp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 26px 10px;
    color: var(--muted);
    font-size: 13px;
}
.dp-empty span { font-size: 28px; opacity: .6; }

/* ---------- 桌面端 ---------- */
@media (min-width: 760px) {
    .dash-welcome {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 22px 24px;
        border-radius: 20px;
    }
    .dw-text h2 { font-size: 20px; }
    .dw-text p { font-size: 13.5px; }
    .dw-actions { flex-shrink: 0; }

    .dash-stats { grid-template-columns: repeat(4, 1fr); gap: 14px; }
    .dash-stat { padding: 16px 18px; border-radius: 18px; }
    .ds-icon { width: 48px; height: 48px; font-size: 22px; border-radius: 14px; }
    .ds-body strong { font-size: 24px; }
    .ds-body span { font-size: 12.5px; }

    .dash-panel { padding: 18px 20px; border-radius: 18px; }

    .dash-modules { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .dm-card { padding: 18px; border-radius: 18px; }
    .dm-icon { width: 46px; height: 46px; font-size: 22px; border-radius: 13px; }
    .dm-card h3 { font-size: 16px; }
    .dm-card p { font-size: 13px; }

    .dash-bottom { grid-template-columns: 1fr 1fr; gap: 16px; }
}

@media (min-width: 1024px) {
    .dash-modules { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 小屏微调 ---------- */
@media (max-width: 380px) {
    .dash-stats { gap: 8px; }
    .dash-stat { padding: 12px; gap: 8px; }
    .ds-icon { width: 36px; height: 36px; font-size: 16px; border-radius: 10px; }
    .ds-body strong { font-size: 18px; }
    .ds-link { display: none; }

    .dist-legend { grid-template-columns: 1fr 1fr; }

    .dash-welcome { padding: 14px; border-radius: 14px; }
    .dw-text h2 { font-size: 16px; }
    .dw-btn { height: 34px; padding: 0 12px; font-size: 12.5px; }

    .dm-card { padding: 14px; }
    .dm-icon { width: 38px; height: 38px; font-size: 18px; border-radius: 11px; }
    .dl-go { display: none; }
}
/* =========================================================
   管理后台 v5 · adm- 独立命名空间
   ========================================================= */

.adm-body {
    margin: 0;
    background: #f3f5fa;
    color: #0f172a;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
.adm-body a { text-decoration: none; }

/* ---------- 布局 ---------- */
.adm-shell { display: flex; min-height: 100vh; }

.adm-sidebar {
    width: 236px;
    flex-shrink: 0;
    background: #0f172a;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    padding: 18px 12px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 60;
    transition: transform .25s ease;
}

.adm-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 8px 16px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    min-width: 0;
}
.adm-brand-dot {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: linear-gradient(135deg, #a5b4fc, #e879f9);
    box-shadow: 0 0 10px rgba(165, 180, 252, .7);
}
.adm-brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adm-nav { display: flex; flex-direction: column; gap: 3px; }
.adm-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 500;
    transition: background .18s, color .18s;
}
.adm-nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.adm-nav-item.is-active {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    box-shadow: 0 6px 18px rgba(79, 70, 229, .32);
}
.adm-nav-icon { width: 20px; display: inline-flex; justify-content: center; flex-shrink: 0; }

.adm-sidebar-foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.adm-side-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border-radius: 9px;
    color: #94a3b8;
    font-size: 13px;
    background: rgba(255, 255, 255, .035);
}
.adm-side-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.adm-side-link-danger:hover { background: rgba(239, 68, 68, .18); color: #fca5a5; }

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

.adm-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid #e8ebf2;
}
.adm-menu-btn {
    display: none;
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #334155;
    font-size: 17px;
    cursor: pointer;
    line-height: 1;
}
.adm-topbar-title {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.adm-topbar-user { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.adm-user-badge {
    font-size: 12px;
    font-weight: 700;
    color: #4338ca;
    background: #eef2ff;
    padding: 4px 10px;
    border-radius: 999px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.adm-topbar-logout {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #f26d6d, #e5484d);
    padding: 5px 12px;
    border-radius: 999px;
    box-shadow: 0 3px 10px rgba(229, 72, 77, .25);
}
.adm-topbar-logout:hover { opacity: .9; color: #fff; }

.adm-content { padding: 18px 16px 48px; }

/* ---------- 页头 ---------- */
.adm-page-head {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}
.adm-page-head-text h1 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.3px;
    color: #0f172a;
    line-height: 1.3;
}
.adm-page-head-text p {
    margin-top: 4px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
}
.adm-page-head-text p strong { color: #4f46e5; font-weight: 800; }
.adm-page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.adm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 38px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: .18s;
    text-decoration: none;
    box-shadow: none;
}
.adm-btn:hover { text-decoration: none; opacity: .94; transform: translateY(-1px); }
.adm-btn:active { transform: scale(.98); }

.adm-btn-primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff !important;
    box-shadow: 0 5px 16px rgba(79, 70, 229, .26);
}
.adm-btn-ghost {
    background: #fff;
    color: #334155 !important;
    border: 1px solid #e2e8f0;
}
.adm-btn-ghost:hover { border-color: #c7d2fe; color: #4f46e5 !important; }
.adm-btn-warn {
    background: #fef3c7;
    color: #b45309 !important;
}
.adm-btn-warn:hover { background: #fde68a; }
.adm-btn-danger {
    background: #fee2e2;
    color: #b91c1c !important;
}
.adm-btn-danger:hover { background: #fecaca; }
.adm-btn-block { width: 100%; }

.adm-btn-sm {
    height: 30px;
    padding: 0 11px;
    border-radius: 8px;
    font-size: 12px;
}

/* ---------- 统计卡 ---------- */
.adm-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.adm-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px;
    border-radius: 15px;
    background: #fff;
    border: 1px solid #eef1f6;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .045);
    position: relative;
    transition: .2s;
}
.adm-stat:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 23, 42, .08); }

.adm-stat-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .06);
}
.adm-stat-body { flex: 1; min-width: 0; }
.adm-stat-body strong {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}
.adm-stat-body span {
    display: block;
    font-size: 11.5px;
    color: #64748b;
    margin-top: 1px;
}
.adm-stat-link {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    color: #4f46e5;
    background: #eef2ff;
    padding: 3px 8px;
    border-radius: 999px;
}
.adm-stat-link:hover { color: #4f46e5; opacity: .8; }
.adm-stat-link.is-static { color: #64748b; background: #f1f5f9; }

/* 图标配色 */
.adm-icon-indigo  { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); }
.adm-icon-violet  { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.adm-icon-amber   { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.adm-icon-emerald { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.adm-icon-blue    { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.adm-icon-cyan    { background: linear-gradient(135deg, #cffafe, #a5f3fc); }
.adm-icon-pink    { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }

/* ---------- 面板 ---------- */
.adm-panel {
    background: #fff;
    border-radius: 16px;
    padding: 15px;
    border: 1px solid #eef1f6;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .045);
    margin-bottom: 14px;
}
.adm-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eef1f6;
}
.adm-panel-head h2 { font-size: 14px; font-weight: 800; color: #0f172a; }
.adm-panel-head a { font-size: 12.5px; font-weight: 600; color: #64748b; }
.adm-panel-head a:hover { color: #4f46e5; }
.adm-panel-sub { font-size: 12px; color: #64748b; }

/* ---------- 内容分布 ---------- */
.adm-dist-bar {
    display: flex;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: #f1f5f9;
    margin-bottom: 13px;
}
.adm-dist-seg { display: block; height: 100%; transition: width .4s ease; }
.adm-dist-video { background: linear-gradient(90deg, #a78bfa, #7c3aed); }
.adm-dist-photo { background: linear-gradient(90deg, #22d3ee, #0891b2); }
.adm-dist-anime { background: linear-gradient(90deg, #f472b6, #db2777); }

.adm-dist-legend {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.adm-dist-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 9px 10px;
    border-radius: 11px;
    background: #f8fafc;
    border: 1px solid #eef1f6;
}
.adm-dot { width: 8px; height: 8px; border-radius: 3px; }
.adm-dot-video { background: #7c3aed; }
.adm-dot-photo { background: #0891b2; }
.adm-dot-anime { background: #db2777; }
.adm-dist-name { font-size: 11px; color: #64748b; font-weight: 600; }
.adm-dist-item strong { font-size: 16px; font-weight: 800; color: #0f172a; line-height: 1.2; }
.adm-dist-item small { font-size: 10.5px; color: #94a3b8; }

/* ---------- 区块标题 ---------- */
.adm-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 18px 0 10px;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}
.adm-section-title::before {
    content: "";
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: linear-gradient(180deg, #4f46e5, #7c3aed);
}

/* ---------- 模块卡 ---------- */
.adm-module-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.adm-module {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 15px;
    border-radius: 15px;
    background: #fff;
    border: 1px solid #eef1f6;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .045);
    color: #0f172a;
    position: relative;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.adm-module::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    opacity: 0;
    transition: opacity .2s;
}
.adm-module:hover {
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .1);
    border-color: #c7d2fe;
}
.adm-module:hover::before { opacity: 1; }

.adm-module-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.adm-module-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .06);
}
.adm-badge {
    font-size: 11px;
    font-weight: 700;
    color: #4f46e5;
    background: #eef2ff;
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
}
.adm-module h3 {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -.1px;
}
.adm-module p {
    flex: 1;
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.6;
}
.adm-module-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    height: 32px;
    margin-top: 3px;
    padding: 0 13px;
    border-radius: 9px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(79, 70, 229, .22);
    transition: .18s;
}
.adm-module:hover .adm-module-btn { transform: translateX(3px); }

/* ---------- 两栏 ---------- */
.adm-two-col { display: grid; grid-template-columns: 1fr; gap: 12px; }

/* ---------- 列表 ---------- */
.adm-list { list-style: none; margin: 0; padding: 0; }
.adm-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed #eef1f6;
}
.adm-list li:last-child { border-bottom: 0; padding-bottom: 0; }

.adm-tag {
    flex-shrink: 0;
    width: 30px; height: 30px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; color: #fff;
}
.adm-tag-image { background: linear-gradient(135deg, #22d3ee, #0891b2); }
.adm-tag-video { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.adm-tag-anime { background: linear-gradient(135deg, #f472b6, #db2777); }
.adm-tag-text  { background: linear-gradient(135deg, #94a3b8, #64748b); }

.adm-avatar {
    flex-shrink: 0;
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #fff;
    box-shadow: 0 3px 8px rgba(15, 23, 42, .12);
}
.adm-avatar-admin { background: linear-gradient(135deg, #6366f1, #a855f7); }
.adm-avatar-user  { background: linear-gradient(135deg, #38bdf8, #0ea5e9); }

.adm-list-main { flex: 1; min-width: 0; }
.adm-list-main strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.adm-list-main span {
    display: block;
    font-size: 11.5px;
    color: #64748b;
    margin-top: 1px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.adm-mini-btn {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    color: #4f46e5;
    background: #eef2ff;
    padding: 4px 9px;
    border-radius: 999px;
}
.adm-mini-btn:hover { opacity: .8; }

/* ---------- 空状态 ---------- */
.adm-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 26px 10px;
    color: #64748b;
    font-size: 13px;
}
.adm-empty span { font-size: 30px; opacity: .6; }
.adm-empty-box {
    background: #fff;
    border: 1px dashed #e2e8f0;
    border-radius: 16px;
    padding: 40px 20px;
    margin-bottom: 14px;
}

/* ---------- 筛选 tabs ---------- */
.adm-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tab {
    flex-shrink: 0;
    padding: 7px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 12.5px;
    font-weight: 600;
    transition: .18s;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
}
.adm-tab:hover { border-color: #c7d2fe; color: #4f46e5; }
.adm-tab.is-active {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(79, 70, 229, .28);
}

/* ---------- 记录列表 ---------- */
.adm-record-list { display: grid; gap: 10px; }

.adm-record {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #eef1f6;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .045);
    transition: .2s;
}
.adm-record:hover { box-shadow: 0 8px 22px rgba(15, 23, 42, .08); border-color: #e0e7ff; }

.adm-record-media {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}
.adm-record-media img,
.adm-record-media video { width: 100%; height: 100%; object-fit: cover; }
.adm-media-anime,
.adm-media-text {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
}
.adm-media-anime { background: linear-gradient(135deg, #fdf2f8, #fce7f3); }
.adm-media-text  { background: linear-gradient(135deg, #f1f5f9, #e2e8f0); color: #64748b; font-weight: 800; font-size: 20px; }

.adm-record-main { flex: 1; min-width: 0; }
.adm-record-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.adm-record-head h3 {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 100%;
}
.adm-record-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 11.5px;
    color: #64748b;
    margin-bottom: 6px;
}
.adm-type { font-weight: 600; }
.adm-type-image { color: #0891b2; }
.adm-type-video { color: #7c3aed; }
.adm-type-anime { color: #db2777; }

.adm-record-desc {
    font-size: 12.5px;
    line-height: 1.55;
    color: #475569;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.adm-record-desc.is-muted { color: #94a3b8; }

.adm-record-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ---------- 状态 / 角色 ---------- */
.adm-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.adm-status-pending   { background: #fef3c7; color: #b45309; }
.adm-status-published { background: #d1fae5; color: #047857; }
.adm-status-rejected  { background: #fee2e2; color: #b91c1c; }

.adm-role {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.adm-role-admin { background: #ede9fe; color: #6d28d9; }
.adm-role-user  { background: #f1f5f9; color: #64748b; }

/* ---------- 用户列表 ---------- */
.adm-user-list { display: grid; gap: 10px; }

.adm-user {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #eef1f6;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .045);
    transition: .2s;
}
.adm-user:hover { box-shadow: 0 8px 22px rgba(15, 23, 42, .08); border-color: #e0e7ff; }

.adm-user-avatar {
    flex-shrink: 0;
    width: 46px; height: 46px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; font-weight: 800; color: #fff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .12);
}
.adm-user-main { flex: 1; min-width: 0; }
.adm-user-head {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.adm-user-head h3 {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.adm-user-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 11.5px;
    color: #64748b;
}
.adm-user-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.adm-muted { color: #94a3b8; font-size: 12px; }

/* ---------- 设置页 ---------- */
.adm-alert {
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 500;
}
.adm-alert-error { background: #fef2f2; color: #b91c1c; border-left: 3px solid #e5484d; }

.adm-settings-form { max-width: 680px; display: grid; gap: 12px; }

.adm-settings-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    border: 1px solid #eef1f6;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .045);
}
.adm-settings-head {
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid #eef1f6;
}
.adm-settings-head h2 { font-size: 14px; font-weight: 800; color: #0f172a; }
.adm-settings-head p { margin-top: 3px; font-size: 12px; color: #64748b; }

.adm-field { display: block; margin-bottom: 14px; }
.adm-field:last-child { margin-bottom: 0; }
.adm-field-label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}
.adm-input {
    display: block;
    width: 100%;
    height: 44px;
    padding: 0 13px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 15px;
    color: #0f172a;
    outline: none;
    transition: .18s;
}
.adm-input::placeholder { color: #94a3b8; }
.adm-input:focus {
    background: #fff;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .13);
}
.adm-field-note {
    display: block;
    margin-top: 5px;
    font-size: 11.5px;
    color: #94a3b8;
    line-height: 1.5;
}

.adm-settings-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---------- 登录页 ---------- */
.adm-login-body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(900px 460px at 12% 0%, #e0e7ff 0%, transparent 62%),
        radial-gradient(820px 440px at 100% 100%, #f3e8ff 0%, transparent 58%),
        #f6f7fb;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
}
.adm-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
.adm-login-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 22px;
    padding: 30px 24px 26px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .12);
    animation: admLoginIn .36s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes admLoginIn {
    from { opacity: 0; transform: translateY(14px) scale(.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.adm-login-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4f46e5;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}
.adm-login-card h1 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.4px;
    color: #0f172a;
}
.adm-login-sub {
    margin: 5px 0 18px;
    font-size: 13px;
    color: #64748b;
}
.adm-login-card .adm-btn-block { margin-top: 4px; height: 46px; border-radius: 12px; }
.adm-login-back {
    display: block;
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
    color: #64748b;
}
.adm-login-back:hover { color: #4f46e5; }

/* ---------- 遮罩 ---------- */
.adm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    z-index: 55;
}

/* =========================================================
   移动端
   ========================================================= */
@media (max-width: 860px) {
    .adm-sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        transform: translateX(-100%);
        width: 260px;
        height: 100vh;
        box-shadow: 0 0 40px rgba(15, 23, 42, .35);
    }
    .adm-body.adm-sidebar-open .adm-sidebar { transform: translateX(0); }
    .adm-body.adm-sidebar-open .adm-overlay { display: block; }

    .adm-menu-btn { display: inline-flex; align-items: center; justify-content: center; }

    .adm-content { padding: 14px 14px 40px; }

    .adm-page-head-text h1 { font-size: 18px; }
    .adm-page-actions { width: 100%; }
    .adm-page-actions .adm-btn { flex: 1; }

    .adm-stat-grid { gap: 8px; }
    .adm-stat { padding: 11px; gap: 8px; }
    .adm-stat-icon { width: 36px; height: 36px; font-size: 16px; border-radius: 10px; }
    .adm-stat-body strong { font-size: 18px; }
    .adm-stat-link { display: none; }

    .adm-dist-legend { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .adm-dist-item { padding: 7px 8px; }
    .adm-dist-item strong { font-size: 14px; }

    .adm-module { padding: 13px; }
    .adm-module-icon { width: 36px; height: 36px; font-size: 17px; border-radius: 10px; }
    .adm-module-btn { width: 100%; align-self: stretch; }

    .adm-record,
    .adm-user { flex-wrap: wrap; }
    .adm-record-media { width: 56px; height: 56px; }
    .adm-record-main { flex: 1 1 calc(100% - 68px); }
    .adm-record-actions,
    .adm-user-actions {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        padding-top: 10px;
        border-top: 1px dashed #eef1f6;
    }
    .adm-record-actions form,
    .adm-user-actions form { flex: 1; }
    .adm-record-actions .adm-btn,
    .adm-user-actions .adm-btn { width: 100%; }
    .adm-mini-btn { display: none; }

    .adm-settings-actions { flex-direction: column; }
    .adm-settings-actions .adm-btn { width: 100%; }
}

/* =========================================================
   桌面端
   ========================================================= */
@media (min-width: 861px) {
    .adm-topbar { padding: 14px 26px; }
    .adm-topbar-title { font-size: 16px; }
    .adm-content { padding: 24px 26px 60px; }

    .adm-page-head {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 20px;
    }
    .adm-page-head-text h1 { font-size: 24px; }
    .adm-page-head-text p { font-size: 13.5px; }
    .adm-page-actions { flex-shrink: 0; }

    .adm-stat-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
    .adm-stat { padding: 16px 18px; border-radius: 17px; }
    .adm-stat-icon { width: 46px; height: 46px; font-size: 21px; border-radius: 13px; }
    .adm-stat-body strong { font-size: 24px; }
    .adm-stat-body span { font-size: 12.5px; }

    .adm-panel { padding: 18px 20px; border-radius: 18px; margin-bottom: 18px; }
    .adm-panel-head h2 { font-size: 15px; }

    .adm-module-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
    .adm-module { padding: 18px; border-radius: 17px; }
    .adm-module-icon { width: 44px; height: 44px; font-size: 21px; border-radius: 13px; }
    .adm-module h3 { font-size: 16px; }
    .adm-module p { font-size: 13px; }
    .adm-module-btn { height: 34px; padding: 0 15px; font-size: 12.5px; }

    .adm-two-col { grid-template-columns: 1fr 1fr; gap: 16px; }

    .adm-record,
    .adm-user { padding: 14px 16px; border-radius: 16px; }
    .adm-record-media { width: 84px; height: 84px; border-radius: 12px; }
    .adm-record-head h3 { font-size: 15px; }
    .adm-record-actions,
    .adm-user-actions { flex-direction: row; align-items: center; }

    .adm-settings-form { max-width: 720px; gap: 16px; }
    .adm-settings-card { padding: 20px 22px; border-radius: 18px; }
    .adm-settings-head h2 { font-size: 15px; }
    .adm-field-label { font-size: 13px; }
}
/* =========================================================
   多图上传：九宫格、角标、预览
   ========================================================= */

/* 九宫格 */
.media-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    border-radius: 14px;
    overflow: hidden;
    background: #0b1220;
}
.media-gallery[data-count="2"] { grid-template-columns: repeat(2, 1fr); }
.media-gallery[data-count="4"] { grid-template-columns: repeat(2, 1fr); }

.media-gallery .mg-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #0b1220;
}
.media-gallery .mg-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.media-gallery .mg-item:hover img { transform: scale(1.04); }

.media-gallery .mg-item .media-ph {
    min-height: 0;
    padding: 8px;
    gap: 3px;
}
.media-gallery .mg-item .media-ph .ph-icon { font-size: 20px; }
.media-gallery .mg-item .media-ph .ph-label { font-size: 10px; }
.media-gallery .mg-item .media-ph .ph-link { display: none; }

/* 详情页九宫格更宽松 */
.detail-media .media-gallery { gap: 6px; border-radius: 14px; }
@media (min-width: 760px) {
    .detail-media .media-gallery { gap: 8px; }
    .detail-media .media-gallery[data-count="2"] { grid-template-columns: repeat(2, 1fr); }
    .detail-media .media-gallery { max-width: 720px; }
}

/* 张数角标（封面右上角） */
.mc-count {
    position: absolute;
    top: 6px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.6;
    pointer-events: none;
}

/* 详情页 meta 里的张数徽标 */
.media-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 11.5px;
    font-weight: 700;
}

/* 发布页上传预览九宫格 */
.upload-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 10px;
}
.upload-preview:empty { display: none; }

.upload-preview img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
    animation: fadeUp .25s ease both;
}

/* 后台缩略图里的张数角标 */
.adm-record-media { position: relative; }
.adm-record-media .mc-count {
    top: 4px;
    right: 4px;
    font-size: 9.5px;
    padding: 1px 6px;
}

/* 我的记录里封面张数角标 */
.feed-item .media { position: relative; }

@media (max-width: 380px) {
    .upload-preview { grid-template-columns: repeat(3, 1fr); gap: 4px; }
    .media-gallery { gap: 3px; }
    .mc-count { font-size: 10px; padding: 1px 6px; }
}
/* =========================================================
   编辑页
   ========================================================= */

/* 类型徽标 */
.edit-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12.5px;
    font-weight: 700;
    margin-bottom: 14px;
}
.etb-icon { font-size: 15px; line-height: 1; }

/* 媒体块 */
.edit-media-block {
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
}
.edit-label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-2);
    margin-bottom: 10px;
}

/* 图片编辑九宫格 */
.edit-media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
@media (min-width: 560px) {
    .edit-media-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 760px) {
    .edit-media-grid { grid-template-columns: repeat(5, 1fr); gap: 10px; }
}

.edit-media-item {
    position: relative;
    display: block;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.edit-media-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.emi-img {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    background: #0b1220;
    border: 2px solid transparent;
    transition: border-color .18s, box-shadow .18s;
}
.emi-img img,
.emi-img video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.emi-img .media-ph {
    min-height: 0;
    padding: 8px;
    gap: 3px;
}
.emi-img .media-ph .ph-icon { font-size: 20px; }
.emi-img .media-ph .ph-label { font-size: 10px; }
.emi-img .media-ph .ph-link { display: none; }

/* 封面标 */
.emi-cover {
    position: absolute;
    top: 5px;
    left: 5px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(79, 70, 229, .92);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.6;
    pointer-events: none;
}

/* 删除标记：默认隐藏，勾选后显示 */
.emi-del {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(229, 72, 77, .95);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(229, 72, 77, .35);
}

.edit-media-item input:checked ~ .emi-img {
    opacity: .55;
    border-color: #e5484d;
    box-shadow: 0 0 0 3px rgba(229, 72, 77, .18);
}
.edit-media-item input:checked ~ .emi-del { display: block; }
.edit-media-item input:checked ~ .emi-cover { opacity: .3; }

/* 视频编辑 */
.edit-video-wrap {
    max-width: 480px;
    margin-bottom: 10px;
    border-radius: 12px;
    overflow: hidden;
    background: #0b1220;
}
.edit-video-wrap video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 300px;
}

.edit-video-remove {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #b91c1c;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fef2f2;
    border: 1px solid #fecaca;
}
.edit-video-remove input {
    width: 16px;
    height: 16px;
    accent-color: #e5484d;
    cursor: pointer;
}

/* 底部按钮组 */
.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.form-actions > button { flex: 1; min-width: 140px; }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 20px;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-2) !important;
    border: 1px solid var(--border);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: .18s;
}
.btn-ghost:hover {
    background: #f8fafc;
    border-color: rgba(91, 91, 214, .3);
    color: var(--primary) !important;
    text-decoration: none;
}

/* =========================================================
   我的记录：操作按钮组
   ========================================================= */
.post-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #eef1f6;
}

.post-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: .18s;
    text-decoration: none;
    box-shadow: none;
}
.post-btn:hover { text-decoration: none; opacity: .92; transform: translateY(-1px); }
.post-btn:active { transform: scale(.97); }

.post-btn-ghost {
    background: #f1f5f9;
    color: var(--text-2) !important;
}
.post-btn-ghost:hover { background: #e2e8f0; }

.post-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(91, 91, 214, .25);
}

.post-btn-danger {
    background: #fee2e2;
    color: #b91c1c !important;
}
.post-btn-danger:hover { background: #fecaca; }

/* 详情页 meta 里的编辑链接 */
.meta-edit {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary) !important;
    font-size: 11.5px;
    font-weight: 700;
    text-decoration: none;
}
.meta-edit:hover { text-decoration: none; opacity: .85; }

/* 移动端 */
@media (max-width: 480px) {
    .form-actions { flex-direction: column; }
    .form-actions > button,
    .form-actions > .btn-ghost { width: 100%; }

    .post-actions { gap: 6px; }
    .post-btn { flex: 1; min-width: 0; height: 36px; font-size: 12.5px; padding: 0 10px; }
    .post-actions form { flex: 1; display: flex; }
    .post-actions form .post-btn { width: 100%; }

    .edit-media-grid { gap: 6px; }
    .edit-media-block { padding: 10px; }
}