/* ===== 全局 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f5f7;
    color: #333;
    min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
input, select { font-family: inherit; }

/* ===== 按钮 ===== */
.btn-primary {
    background: #007aff;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.2s;
}@media (hover: hover) {

.btn-primary:hover { background: #0056cc; }
}
.btn-ghost {
    background: transparent;
    color: #333;
    border: 1px solid #ddd;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}@media (hover: hover) {

.btn-ghost:hover { background: #eee; border-color: #ccc; }
}
.btn-danger {
    background: #ff3b30;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
}@media (hover: hover) {

.btn-danger:hover { background: #d70015; }
}

/* ===== 认证页 ===== */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(-45deg, #8b7cf6, #5ac8fa, #34c759, #ff9500, #ff6b9d, #8b7cf6);
    background-size: 400% 400%;
    animation: authGradient 12s ease infinite;
    min-height: 100vh;
}
@keyframes authGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.auth-container { width: 100%; max-width: 400px; padding: 20px; }
.auth-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.auth-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 24px;
    color: #333;
}
.auth-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 2px solid #eee;
}
.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    font-size: 16px;
    color: #999;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.tab-btn.active { color: #007aff; border-bottom-color: #007aff; }
.auth-form { display: none; }
.auth-form.active { display: block; }
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 6px;
}
.form-group input, .form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus { border-color: #007aff; }
.auth-form .btn-primary { width: 100%; padding: 12px; font-size: 16px; margin-top: 8px; }
.auth-error {
    color: #ff3b30;
    font-size: 13px;
    margin-top: 10px;
    text-align: center;
    min-height: 18px;
}

/* ===== 顶部导航 ===== */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 12px;
    z-index: 100;
}
.top-bar-left { display: flex; align-items: center; gap: 16px; }
.logo { font-size: 20px; font-weight: 700; color: #007aff; }
.user-info { font-size: 14px; color: #666; }
.top-bar-right { display: flex; gap: 10px; align-items: center; }
.top-bar-right a.btn-ghost { display: inline-flex; align-items: center; justify-content: center; }
.top-bar-centered {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}
.top-bar-centered .top-bar-left { justify-self: start; display: flex; align-items: center; gap: 12px; }
.top-bar-centered .top-bar-center { justify-self: center; display: flex; align-items: center; }
.top-bar-centered .top-bar-right { justify-self: end; }
.top-bar-back-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(10px);
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}@media (hover: hover) {

.top-bar-back-btn:hover { background: rgba(255,255,255,0.95); transform: scale(1.05); }
}
.top-bar-back-btn svg { width: 18px; height: 18px; }

/* 待审核红点 */
#adminBtn { position: relative; }
.admin-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #ff3b30;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    animation: badgePulse 2s infinite;
    z-index: 10;
}
/* 好友按钮：允许通知气泡溢出显示 */
#messagesBtn { overflow: visible !important; }
#messagesBtn::after { display: none !important; }
#adminBtn { overflow: visible !important; }
#adminBtn::after { display: none !important; }
@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* AI 增强开关 */
.ai-switch-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: #f5f5f7;
    border-radius: 20px;
}
.ai-switch-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    border-radius: 22px;
    transition: 0.3s;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider {
    background: #34c759;
}
.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(18px);
}

/* ===== 搜索栏 ===== */
.search-bar {
    padding: 16px 24px;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
}
.search-input-wrap {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}
.search-input-wrap input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
}
.search-input-wrap input:focus { border-color: #007aff; }
.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
}
.filter-bar select, .filter-bar input[type="date"] {
    padding: 7px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    background: #fff;
    /* 选项名很长时不让下拉把整行撑破；弹出列表本身由浏览器提供滚动 */
    max-width: 190px;
    min-width: 0;
    text-overflow: ellipsis;
}

/* ===== 上传进度 ===== */
.upload-progress {
    padding: 12px 24px;
    background: #f0f7ff;
    border-bottom: 1px solid #d0e4ff;
}
.upload-progress span { font-size: 14px; color: #007aff; }
.progress-bar {
    width: 100%;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: #007aff;
    width: 0%;
    transition: width 0.3s;
}

/* ===== 上传队列面板 ===== */
.queue-panel {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 340px;
    max-height: 60vh;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 1800;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: queueSlideIn 0.2s ease;
}
@keyframes queueSlideIn { from { opacity:0; transform: translateY(-10px); } to { opacity:1; transform: translateY(0); } }
.queue-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 14px;
    color: #1c1c1e;
}
.queue-panel-header > div { display: flex; align-items: center; gap: 8px; }
.queue-clear-btn {
    background: none; border: none; color: #007aff; font-size: 12px; cursor: pointer;
}
.queue-close-btn {
    background: none; border: none; font-size: 20px; color: #999; cursor: pointer; line-height: 1;
}
.queue-list {
    overflow-y: auto;
    padding: 8px;
    flex: 1;
}
.queue-empty { text-align: center; color: #999; padding: 24px 0; font-size: 13px; }
.queue-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 4px;
    background: #f8f8f8;
}
.queue-item.uploading { background: #f0f7ff; }
.queue-item.success { background: #f0fff4; }
.queue-item.failed { background: #fff0f0; }
.queue-item-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.queue-item-info { flex: 1; min-width: 0; }
.queue-item-name {
    font-size: 12px; color: #1c1c1e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.queue-item-progress {
    width: 100%; height: 4px; background: #e0e0e0; border-radius: 2px; margin-top: 4px; overflow: hidden;
}
.queue-item-progress-fill {
    height: 100%; background: #007aff; border-radius: 2px; transition: width 0.3s;
}
.queue-item.success .queue-item-progress-fill { background: #34c759; }
.queue-item.failed .queue-item-progress-fill { background: #ff3b30; }
.queue-item-status { font-size: 11px; color: #8e8e93; flex-shrink: 0; }
.queue-item.success .queue-item-status { color: #34c759; }
.queue-item.failed .queue-item-status { color: #ff3b30; }

@media (max-width: 768px) {
    .queue-panel {
        top: 56px; right: 8px; left: 8px; width: auto; max-height: 50vh;
    }
}

/* ===== 上传占位卡片 ===== */
.gallery-item.upload-placeholder {
    background: #f0f0f0;
    border: 2px dashed #ccc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border-radius: 12px;
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}
.gallery-item.upload-placeholder .placeholder-icon { font-size: 32px; margin-bottom: 8px; }
.gallery-item.upload-placeholder .placeholder-name {
    font-size: 12px; color: #888; text-align: center; padding: 0 8px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.gallery-item.upload-placeholder.upload-failed {
    border-color: #ff3b30; background: #fff0f0; animation: none;
}
.gallery-item.upload-placeholder.upload-failed .placeholder-icon { color: #ff3b30; }
.gallery-item.upload-placeholder.upload-failed .placeholder-name { color: #ff3b30; }
.gallery-item.upload-placeholder .retry-btn {
    margin-top: 8px; padding: 4px 12px; font-size: 11px;
    background: #ff3b30; color: #fff; border: none; border-radius: 6px; cursor: pointer;
}
.gallery-item.card-enter {
    animation: cardFadeIn 0.4s ease;
}
@keyframes cardFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* ===== 图片网格 ===== */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    padding: 20px 24px;
}
.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
}@media (hover: hover) {

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
}
.gallery-item .thumb-wrap {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f0f0f0;
}
.gallery-item .thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}@media (hover: hover) {

.gallery-item:hover .thumb-wrap img { transform: scale(1.05); }
}
.gallery-item .item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: #fff;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
}@media (hover: hover) {

.gallery-item:hover .item-overlay { opacity: 1; }
}
.gallery-item .ai-pending {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255,149,0,0.9);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}
.gallery-item .ai-fail {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255,59,48,0.9);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}
/* 类别水印（右上角） */
.gallery-item .cat-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}
.gallery-item .multi-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 4px;
}
.gallery-item .multi-badge::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Crect x='3' y='3' width='14' height='14' rx='2'/%3E%3Cpath d='M21 7v12a2 2 0 0 1-2 2H7'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}
.gallery-item .group-expand-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    background: rgba(0,0,0,0.03);
    border-top: 1px solid rgba(0,0,0,0.06);
    margin-top: -4px;
}
.gallery-item .group-expand-thumb {
    width: calc(25% - 5px);
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s;
}@media (hover: hover) {

.gallery-item .group-expand-thumb:hover {
    transform: scale(1.05);
}
}
.gallery-item .group-expand-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 9999;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: toastIn 0.3s ease;
    max-width: 90%;
    text-align: center;
    line-height: 1.6;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
/* 图片底部信息栏 */
.gallery-item .item-info {
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid #f0f0f0;
}
.gallery-item .item-name {
    font-size: 13px;
    color: #333;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.gallery-item .item-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #8e8e93;
    flex-shrink: 0;
}
.gallery-item .item-stats span {
    display: flex;
    align-items: center;
    gap: 3px;
}
.gallery-item .item-stats .liked { color: #ff3b30; }

/* ===== 加载更多 ===== */
.load-more-wrap {
    text-align: center;
    padding: 20px;
}
.empty-tip { color: #999; font-size: 15px; padding: 40px 0; }

/* ===== 弹窗 ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 1100px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}
.modal-small { max-width: 480px; padding: 24px; max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; }
.modal-small h2 { margin-bottom: 20px; flex-shrink: 0; }
.modal-small #editForm { overflow-y: auto; flex: 1; min-height: 0; padding-right: 4px; margin-right: -4px; }
.modal-small #editForm .btn-primary { position: sticky; bottom: 0; margin-top: 16px; width: 100%; }
.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    z-index: 10;
    line-height: 1;
}@media (hover: hover) {

.modal-close:hover { color: #333; }
}
.modal-body {
    display: flex;
    overflow: hidden;
    flex: 1;
}
.modal-image-wrap {
    flex: 1;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 400px;
    overflow: hidden;
}
.modal-image-wrap img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    transition: transform 0.2s, opacity 0.3s ease;
    cursor: grab;
    margin: auto;
    display: block;
}
.modal-image-wrap img.rotated {
    max-height: 45vh;
    max-width: 70vh;
}
.modal-image-wrap img:active { cursor: grabbing; }
.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: background 0.2s;
    line-height: 1;
}@media (hover: hover) {

.modal-nav-btn:hover { background: rgba(0,0,0,0.7); }
}
.modal-prev { left: 12px; }
.modal-next { right: 12px; }
@media (max-width: 768px) {
    .modal-nav-btn { width: 32px; height: 32px; font-size: 20px; }
    .modal-prev { left: 6px; }
    .modal-next { right: 6px; }
}
.zoom-controls {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    z-index: 5;
}
.zoom-controls button {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}@media (hover: hover) {

.zoom-controls button:hover { background: rgba(255,255,255,0.2); }
}
.zoom-controls #saveRotateBtn {
    width: auto;
    padding: 0 12px;
    font-size: 13px;
    border-radius: 14px;
    height: 28px;
}
.zoom-controls #saveRotateBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.zoom-controls #zoomReset {
    width: auto;
    padding: 0 10px;
    font-size: 13px;
    border-radius: 14px;
    height: 28px;
}
.zoom-controls span { color: #fff; font-size: 13px; min-width: 48px; text-align: center; flex-shrink: 0; }
.modal-info {
    width: 340px;
    padding: 24px;
    overflow-y: auto;
    border-left: 1px solid #eee;
}
.modal-info h2 {
    font-size: 18px;
    margin-bottom: 16px;
    padding-right: 30px;
}
.meta-section { margin-bottom: 20px; }
/* 上传者卡片（可点击进入主页） */
.owner-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fafafa;
    cursor: pointer;
    transition: background .15s ease;
}@media (hover: hover) {

.owner-card:hover { background: #f0f0f0; }
}
.sku-owner-field .owner-card { margin: 0; padding: 6px 10px; }
.sku-owner-field .owner-card .owner-avatar { width: 30px; height: 30px; }
/* 上传者卡片上的关注按钮 */
.owner-follow-btn {
    margin-left: auto;
    padding: 5px 14px;
    border-radius: 15px;
    border: 1px solid #007aff;
    background: #007aff;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: all .15s ease;
}
.owner-follow-btn.followed {
    background: #fff;
    color: #666;
    border-color: #ddd;
}
.owner-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #e8e8e8;
    flex-shrink: 0;
}
.owner-info { display: flex; flex-direction: column; min-width: 0; }
.owner-nickname { font-size: 15px; font-weight: 600; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owner-hint { font-size: 12px; color: #007aff; }
/* 我的关注弹窗 */
.modal-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-shrink: 0; }
.modal-title-row h2 { margin: 0; font-size: 17px; }
.follow-picker-list { flex: 1; overflow-y: auto; min-height: 0; max-height: 55vh; margin: 0 -4px 0 0; padding-right: 4px; }
.follow-picker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    transition: background .12s ease;
}@media (hover: hover) {

.follow-picker-item:hover { background: #f5f5f5; }
}
.follow-picker-item.selected { background: rgba(0, 122, 255, 0.08); }
.follow-picker-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #e8e8e8; flex-shrink: 0; }
.follow-picker-info { flex: 1; min-width: 0; }
.follow-picker-name { font-size: 14px; font-weight: 600; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.follow-picker-code { font-size: 12px; color: #999; }
.follow-picker-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ccc;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    transition: all .12s ease;
}
.follow-picker-item.selected .follow-picker-check { background: #007aff; border-color: #007aff; }
.follow-picker-empty { padding: 30px 0; text-align: center; color: #999; font-size: 14px; }
.follow-picker-actions { display: flex; gap: 10px; margin-top: 16px; flex-shrink: 0; }
.follow-picker-actions .btn-ghost { flex: 1; }
.follow-picker-actions .btn-primary { flex: 1; }
.meta-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.meta-label {
    width: 70px;
    color: #888;
    flex-shrink: 0;
}
.meta-value {
    flex: 1;
    color: #333;
    word-break: break-all;
}
.meta-value.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.meta-value.tags span {
    background: #e8f0fe;
    color: #007aff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}
.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.modal-actions .btn-primary,
.modal-actions .btn-ghost,
.modal-actions .btn-danger {
    flex: 1;
    min-width: calc(50% - 4px);
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: 1;
    box-sizing: border-box;
    cursor: pointer;
    white-space: nowrap;
}
.share-link-box {
    background: #f8f9fa;
    padding: 14px;
    border-radius: 8px;
    margin-top: 12px;
}
.share-friend-box {
    background: #f8f9fa;
    padding: 14px;
    border-radius: 8px;
    margin-top: 12px;
}
.share-friend-box p { font-size: 13px; color: #666; margin-bottom: 8px; }
.friend-list {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.friend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}@media (hover: hover) {

.friend-item:hover { background: #e8f0fe; }
}
.friend-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.friend-item .friend-name { font-size: 14px; color: #1c1c1e; }
.share-link-box p { font-size: 13px; color: #666; margin-bottom: 8px; }
.share-link-row { display: flex; gap: 8px; margin-bottom: 8px; }
.share-link-row input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
}

/* ===== 分享页 ===== */
.share-body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    min-height: 100vh;
}
.share-container {
    max-width: 900px;
    width: 100%;
    padding: 20px;
    text-align: center;
}
.share-loading { color: #999; font-size: 18px; padding: 60px 0; }
.share-title { color: #fff; font-size: 22px; margin-bottom: 20px; }
.share-image-wrap {
    background: #222;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}
.share-image-wrap img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.share-meta { margin-bottom: 20px; }
.share-caption { color: #ccc; font-size: 15px; margin-bottom: 12px; }
.share-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.share-tags span {
    background: rgba(255,255,255,0.1);
    color: #aaa;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 13px;
}
.share-error { color: #ff6b6b; }
.share-error h2 { margin-bottom: 10px; }
.share-error p { color: #999; }

/* ===== 点赞/评论统计栏 ===== */
.stats-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 10px;
}
.like-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    font-size: 15px;
    color: #8e8e93;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}@media (hover: hover) {

.like-btn:hover { background: #ffe5e5; }
}
.like-btn.liked { color: #ff3b30; }
.like-btn.liked .like-icon { animation: heartPop 0.3s; }
@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}
.like-icon { font-size: 18px; line-height: 1; display: inline-flex; align-items: center; }
.like-icon svg { width: 22px; height: 22px; }
.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    color: #8e8e93;
}
.stat-icon { font-size: 16px; display: inline-flex; align-items: center; }
.stat-icon svg { width: 20px; height: 20px; }

/* ===== 评论区 ===== */
.comments-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}
.comments-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}
.comments-count {
    background: #007aff;
    color: #fff;
    font-size: 12px;
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 500;
}
.comments-list {
    max-height: 240px;
    overflow-y: auto;
    margin-bottom: 12px;
}
.comments-empty {
    color: #aaa;
    font-size: 13px;
    text-align: center;
    padding: 16px 0;
}
.comment-item {
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    animation: fadeIn 0.3s;
}
.comment-item:last-child { border-bottom: none; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.comment-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.comment-user {
    font-size: 13px;
    font-weight: 600;
    color: #007aff;
}
.comment-time {
    font-size: 11px;
    color: #aaa;
}
.comment-content {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    word-break: break-all;
}
.comment-delete {
    background: none;
    border: none;
    color: #ff3b30;
    font-size: 11px;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
}@media (hover: hover) {

.comment-delete:hover { text-decoration: underline; }
}
.comment-input-row {
    display: flex;
    gap: 8px;
}
.comment-input-row input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.comment-input-row input:focus { border-color: #007aff; }
.comment-input-row .btn-primary {
    padding: 9px 18px;
    white-space: nowrap;
}

/* ===== 界面美化增强 ===== */
.top-bar {
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95);
}
.logo {
    background: linear-gradient(135deg, #007aff, #5856d6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
/* 顶部标题：主标题+副标题 */
.logo-wrap { display: flex; flex-direction: row; line-height: 1.1; align-items: center; gap: 0; }
.logo-text-group { display: flex; flex-direction: column; align-items: flex-start; }
.logo-ring {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    background: conic-gradient(#8b7cf6, #5ac8fa, #34c759, #8b7cf6);
    -webkit-mask: radial-gradient(circle at center, transparent 32%, #000 32%);
    mask: radial-gradient(circle at center, transparent 32%, #000 32%);
    margin-right: 10px; vertical-align: middle; flex-shrink: 0;
    animation: ringSpin 8s linear infinite;
}
.logo-ring::after { content: none; }
@keyframes ringSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.logo-main {
    font-size: 22px; font-weight: 900;
    background: linear-gradient(135deg, #8b7cf6, #5ac8fa, #34c759, #8b7cf6);
    background-size: 300% 300%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    animation: logoGradient 8s ease infinite;
}
.logo-sub {
    font-size: 10px; font-weight: 600; margin-top: 3px; letter-spacing: 2px;
    background: linear-gradient(135deg, #8b7cf6, #5ac8fa, #34c759, #8b7cf6);
    background-size: 300% 300%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    animation: logoGradient 8s ease infinite;
}
@keyframes logoGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
/* 登录页标题 */
.auth-title-wrap { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 24px; }
.auth-title-text { text-align: center; }
.auth-logo-ring {
    width: 46px; height: 46px; margin-right: 14px;
    background: conic-gradient(#8b7cf6, #5ac8fa, #34c759, #8b7cf6);
    -webkit-mask: radial-gradient(circle at center, transparent 32%, #000 32%);
    mask: radial-gradient(circle at center, transparent 32%, #000 32%);
}@media (hover: hover) {

.auth-title-wrap:hover .auth-logo-ring { animation: ringSpin 8s linear infinite; }
}
.auth-logo-ring::after { content: none; }
.auth-title-main {
    font-size: 32px; font-weight: 900; margin: 0; letter-spacing: 6px;
    background: linear-gradient(135deg, #8b7cf6, #5ac8fa, #34c759, #8b7cf6);
    background-size: 300% 300%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}@media (hover: hover) {

.auth-title-wrap:hover .auth-title-main { animation: logoGradient 8s ease infinite; }
}
.auth-title-sub {
    font-size: 14px; margin: 6px 0 0; letter-spacing: 3px; font-weight: 600;
    background: linear-gradient(135deg, #8b7cf6, #5ac8fa, #34c759, #8b7cf6);
    background-size: 300% 300%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}@media (hover: hover) {

.auth-title-wrap:hover .auth-title-sub { animation: logoGradient 8s ease infinite; }
}
.search-bar {
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.gallery-item {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}@media (hover: hover) {

.gallery-item:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
}
.btn-primary {
    box-shadow: 0 2px 8px rgba(0,122,255,0.25);
}
.btn-primary:active { transform: scale(0.97); }
.btn-ghost:active { transform: scale(0.97); }
.modal-content {
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .modal-body { flex-direction: column; }
    .modal-info { width: 100%; border-left: none; border-top: 1px solid #eee; }
    .gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); padding: 12px; gap: 8px; }
    .top-bar { padding: 10px 12px; }
    .top-bar-right .btn-ghost { padding: 6px 10px; font-size: 13px; }
    .search-bar { padding: 12px; }
}

/* ============================================================
   全套美化增强 v2
   ============================================================ */

/* --- 全局背景（莫兰迪淡灰调） --- */
body {
    background: linear-gradient(135deg, #e9ecf2 0%, #eef0f5 40%, #f0eef4 100%);
    background-attachment: fixed;
}

/* --- 自定义滚动条 --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }@media (hover: hover) {

::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }
}

/* --- 顶部导航增强（半透明毛玻璃，与背景自然融合） --- */
.top-bar {
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 1px 12px rgba(100,110,140,0.06);
    padding: 10px 28px;
}
.user-info {
    background: rgba(0,122,255,0.08);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    color: #007aff;
    font-weight: 500;
}
.user-profile-entry {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 12px 4px 4px;
    border-radius: 20px;
    transition: background 0.2s;
}
/* 新粉丝红点（个人主页入口右上角） */
.profile-entry-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: #ff3b30;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
    box-sizing: border-box;
}@media (hover: hover) {

.user-profile-entry:hover {
    background: rgba(255,255,255,0.6);
}
}
.top-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* --- 按钮统一美化（液态玻璃风格） --- */
.btn-primary {
    background: linear-gradient(135deg, rgba(0,122,255,0.85), rgba(88,86,214,0.85));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,122,255,0.25), inset 0 1px 0 rgba(255,255,255,0.3);
    font-weight: 600;
    border-radius: 14px;
    padding: 9px 22px;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    border: 1px solid rgba(255,255,255,0.2);
}@media (hover: hover) {

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(0,86,204,0.9), rgba(74,72,192,0.9));
    box-shadow: 0 4px 18px rgba(0,122,255,0.35), inset 0 1px 0 rgba(255,255,255,0.35);
    transform: translateY(-1px);
}
}
.btn-ghost {
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 1px 6px rgba(100,110,140,0.08), inset 0 1px 0 rgba(255,255,255,0.8);
    font-weight: 500;
    border-radius: 14px;
    padding: 8px 18px;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}@media (hover: hover) {

.btn-ghost:hover {
    background: rgba(255,255,255,0.75);
    border-color: rgba(0,122,255,0.3);
    color: #007aff;
    box-shadow: 0 3px 12px rgba(0,122,255,0.12), inset 0 1px 0 rgba(255,255,255,0.9);
    transform: translateY(-1px);
}
}
#uploadBtn {
    background: linear-gradient(135deg, rgba(52,199,89,0.85), rgba(48,209,88,0.85));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    box-shadow: 0 2px 10px rgba(52,199,89,0.25), inset 0 1px 0 rgba(255,255,255,0.3);
    font-weight: 600;
    border-radius: 14px;
}@media (hover: hover) {

#uploadBtn:hover {
    background: linear-gradient(135deg, rgba(45,179,78,0.9), rgba(40,192,77,0.9));
    box-shadow: 0 4px 18px rgba(52,199,89,0.35), inset 0 1px 0 rgba(255,255,255,0.35);
    color: #fff;
}
}
#folderUploadBtn {
    background: linear-gradient(135deg, rgba(255,149,0,0.85), rgba(255,159,10,0.85));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    box-shadow: 0 2px 10px rgba(255,149,0,0.25), inset 0 1px 0 rgba(255,255,255,0.3);
    font-weight: 600;
    border-radius: 14px;
}@media (hover: hover) {

#folderUploadBtn:hover {
    background: linear-gradient(135deg, rgba(224,134,0,0.9), rgba(232,138,8,0.9));
    box-shadow: 0 4px 18px rgba(255,149,0,0.35), inset 0 1px 0 rgba(255,255,255,0.35);
    color: #fff;
}
}

/* --- 搜索栏美化 --- */
.search-bar {
    background: rgba(255,255,255,0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.4);
    padding: 18px 28px;
}
.search-input-wrap input {
    border: 1.5px solid rgba(0,0,0,0.08);
    border-radius: 14px;
    padding: 12px 18px;
    font-size: 15px;
    background: rgba(255,255,255,0.9);
    transition: all 0.25s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.search-input-wrap input:focus {
    /* 聚焦只做轻微边框提示：不再有外扩光晕（0 0 0 4px 那种），避免看起来像框被放大且失焦不回去 */
    border-color: rgba(0,122,255,0.45);
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    background: rgba(255,255,255,0.9);
}
.filter-bar select, .filter-bar input[type="date"] {
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 1px 6px rgba(100,110,140,0.08), inset 0 1px 0 rgba(255,255,255,0.8);
    border-radius: 14px;
    padding: 8px 36px 8px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    height: 38px;
    box-sizing: border-box;
    flex-shrink: 0;
}@media (hover: hover) {

.filter-bar select:hover, .filter-bar input[type="date"]:hover {
    background-color: rgba(255,255,255,0.75);
    border-color: rgba(0,122,255,0.3);
    color: #007aff;
    box-shadow: 0 3px 12px rgba(0,122,255,0.12), inset 0 1px 0 rgba(255,255,255,0.9);
    transform: translateY(-1px);
}
}
.filter-bar select:focus, .filter-bar input[type="date"]:focus {
    border-color: rgba(0,122,255,0.5);
    box-shadow: 0 0 0 3px rgba(0,122,255,0.12), 0 3px 12px rgba(0,122,255,0.12);
    outline: none;
    background-color: rgba(255,255,255,0.8);
}
#authorFilter { text-align: center; text-align-last: center; }

/* ===== 日期筛选按钮（带"日期筛选"水印，外观与其他筛选/重置按钮一致）===== */
.date-filter-wrap {
    position: relative;
    height: 38px;
    width: 130px;
    min-width: 130px;
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 14px;
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 6px rgba(100,110,140,0.08), inset 0 1px 0 rgba(255,255,255,0.8);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.25s;
    overflow: hidden;
}@media (hover: hover) {

.date-filter-wrap:hover {
    background-color: rgba(255,255,255,0.75);
    border-color: rgba(0,122,255,0.3);
    box-shadow: 0 3px 12px rgba(0,122,255,0.12), inset 0 1px 0 rgba(255,255,255,0.9);
    transform: translateY(-1px);
}
}
.date-filter-ph {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 500;
    color: #333;
    pointer-events: none;
    z-index: 2;
    white-space: nowrap;
}
.date-filter-wrap.has-value .date-filter-ph { display: none; }
/* 未选日期时隐藏原生"年/月/日"占位，只显示自定义"日期筛选"水印 */
.date-filter-wrap:not(.has-value) input[type="date"]::-webkit-datetime-edit,
.date-filter-wrap:not(.has-value) input[type="date"]::-webkit-inner-spin-button { color: transparent; }
.date-filter-wrap.has-value input[type="date"]::-webkit-datetime-edit { color: #333; }
.filter-bar .date-filter-wrap input[type="date"] {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 14px;
    padding: 8px 10px;
    color: #333;
    appearance: auto;
    -webkit-appearance: none;
    transform: none !important;
}
.filter-bar .date-filter-wrap input[type="date"]:focus {
    box-shadow: inset 0 0 0 2px rgba(0,122,255,0.25) !important;
}
/* 日期按钮各主题适配 */
body[data-theme="blue"] .date-filter-wrap { background-color: rgba(255,255,255,0.9); }
body[data-theme="blue"] .date-filter-ph { color: #1e3a5f; }
body[data-theme="pink"] .date-filter-wrap { background-color: rgba(255,255,255,0.9); }
body[data-theme="pink"] .date-filter-ph { color: #831843; }
body[data-theme="yellow"] .date-filter-wrap { background-color: rgba(255,255,255,0.95); }
body[data-theme="yellow"] .date-filter-ph { color: #422006; }
body[data-theme="green"] .date-filter-wrap { background-color: rgba(255,255,255,0.92); }
body[data-theme="green"] .date-filter-ph { color: #166534; }
body[data-theme="dark"] .date-filter-wrap { background-color: rgba(58,58,60,0.8); border-color: #48484a; }
body[data-theme="dark"] .date-filter-ph { color: #fff; }
body[data-theme="dark"] .date-filter-wrap.has-value input[type="date"]::-webkit-datetime-edit { color: #fff; }
body[data-theme="rainbow"] .date-filter-wrap { background-color: rgba(255,255,255,0.85); border: 1.5px solid rgba(255,107,157,0.25); }
body[data-theme="rainbow"] .date-filter-ph { color: #1c1c1e; }

/* 日期快捷筛选：今天 / 近7天 / 近30天（手机端首选，免点原生日期控件） */
.date-quick {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.date-quick-btn {
    height: 38px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 6px rgba(100,110,140,0.08), inset 0 1px 0 rgba(255,255,255,0.8);
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}@media (hover: hover) {

.date-quick-btn:hover {
    background-color: rgba(255,255,255,0.75);
    border-color: rgba(0,122,255,0.3);
    transform: translateY(-1px);
}
}
.date-quick-btn.active {
    background: linear-gradient(135deg, #4d8bff, #2f6bff);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 10px rgba(0,122,255,0.3);
}
body[data-theme="blue"] .date-quick-btn { background-color: rgba(255,255,255,0.9); color: #1e3a5f; }
body[data-theme="pink"] .date-quick-btn { background-color: rgba(255,255,255,0.9); color: #831843; }
body[data-theme="yellow"] .date-quick-btn { background-color: rgba(255,255,255,0.95); color: #422006; }
body[data-theme="green"] .date-quick-btn { background-color: rgba(255,255,255,0.92); color: #166534; }
body[data-theme="dark"] .date-quick-btn { background-color: rgba(58,58,60,0.8); border-color: #48484a; color: #fff; }
body[data-theme="rainbow"] .date-quick-btn { background-color: rgba(255,255,255,0.85); color: #1c1c1e; }

/* ===== 手机端筛选面板（类别/地点/好友/关注 集中到一个按钮） ===== */
.mobile-filter-btn { display: none; }
.mobile-filter-sheet {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9998;
}
.mobile-filter-sheet.show { display: block; }
.mobile-filter-mask {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
}
.mobile-filter-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    border-radius: 18px 18px 0 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    max-height: 76vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    animation: mfSlideUp 0.26s ease;
}
@keyframes mfSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.mobile-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.mobile-filter-title { font-size: 16px; font-weight: 600; color: #1c1c1e; }
.mobile-filter-close {
    border: none;
    background: none;
    font-size: 24px;
    line-height: 1;
    color: #8e8e93;
    cursor: pointer;
    padding: 0 4px;
}
.mobile-filter-group { margin-bottom: 16px; }
.mobile-filter-label {
    font-size: 13px;
    color: #8e8e93;
    font-weight: 500;
    margin-bottom: 8px;
}
.mobile-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.mobile-chip {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.1);
    background: #f2f2f7;
    color: #333;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.mobile-chip.active {
    background: #007aff;
    border-color: #007aff;
    color: #fff;
    font-weight: 500;
}
/* 地点/好友：单行下拉，选项再多也不会铺满面板 */
.mobile-select-wrap { position: relative; }
.mobile-select-wrap select {
    width: 100%;
    height: 42px;
    padding: 0 38px 0 14px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    background: #f2f2f7;
    color: #1c1c1e;
    font-size: 14px;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}
.mobile-select-wrap::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid #8e8e93;
    border-bottom: 1.5px solid #8e8e93;
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}
.mobile-follow-btn {
    width: 100%;
    padding: 11px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    background: #f2f2f7;
    color: #333;
    font-size: 14px;
    cursor: pointer;
}
.mobile-follow-btn.active {
    background: #007aff;
    border-color: #007aff;
    color: #fff;
}
.mobile-filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}
.mobile-filter-reset, .mobile-filter-apply {
    flex: 1;
    padding: 13px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.mobile-filter-reset { background: #f2f2f7; color: #333; }
.mobile-filter-apply { background: #007aff; color: #fff; }

/* --- 图片卡片美化 --- */
.gallery {
    gap: 14px;
    padding: 20px 16px;
}
.gallery-item {
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    animation: cardFadeIn 0.5s ease both;
}@media (hover: hover) {

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
}
.gallery-item .thumb-wrap {
    aspect-ratio: 1;
}
.gallery-item .thumb-wrap img {
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}@media (hover: hover) {

.gallery-item:hover .thumb-wrap img {
    transform: scale(1.06);
}
}
.gallery-item .item-info {
    padding: 10px 12px;
    background: rgba(255,255,255,0.95);
}
.gallery-item .item-name {
    font-size: 13px;
    font-weight: 600;
    color: #1c1c1e;
}
.gallery-item .item-stats {
    font-size: 12px;
    color: #8e8e93;
}
.gallery-item .item-stats .liked { color: #ff3b30; font-weight: 600; }
.gallery-item .item-stats span { display: inline-flex; align-items: center; gap: 3px; }
.stat-icon-svg { width: 15px; height: 15px; flex-shrink: 0; }
@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 类别水印美化 */
.gallery-item .cat-badge {
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    letter-spacing: 0.5px;
}
.gallery-item .ai-pending {
    background: rgba(255,149,0,0.92);
    backdrop-filter: blur(6px);
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    animation: pendingPulse 1.5s ease infinite;
}
@keyframes pendingPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* --- 弹窗美化 --- */
.modal-overlay {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    animation: overlayFadeIn 0.25s ease;
}
@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-content {
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.35);
    animation: modalScaleIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalScaleIn {
    from { opacity: 0; transform: scale(0.92) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-small { border-radius: 16px; }
.modal-close {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.06);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    transition: all 0.2s;
    top: 14px; right: 16px;
    z-index: 100;
    pointer-events: auto;
    cursor: pointer;
}@media (hover: hover) {

.modal-close:hover {
    background: rgba(0,0,0,0.12);
    transform: rotate(90deg);
}
}
.modal-info {
    background: #fafafa;
}
.modal-info h2 {
    font-size: 19px;
    font-weight: 700;
    color: #1c1c1e;
}
.meta-row {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.meta-label {
    color: #8e8e93;
    font-weight: 500;
    font-size: 13px;
}
.meta-value {
    color: #1c1c1e;
    font-size: 14px;
}
.meta-value.tags span {
    background: linear-gradient(135deg, rgba(0,122,255,0.1), rgba(88,86,214,0.1));
    color: #007aff;
    font-weight: 500;
    border-radius: 12px;
    padding: 3px 10px;
}
.copy-sku-btn {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 500;
    color: #007aff;
    background: rgba(0,122,255,0.08);
    border: 1px solid rgba(0,122,255,0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    vertical-align: middle;
}@media (hover: hover) {

.copy-sku-btn:hover {
    background: rgba(0,122,255,0.15);
    border-color: rgba(0,122,255,0.4);
}
}
.copy-sku-btn.copied {
    color: #34c759;
    background: rgba(52,199,89,0.1);
    border-color: rgba(52,199,89,0.3);
}

/* --- 点赞/评论统计栏美化 --- */
.stats-bar {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.like-btn {
    padding: 6px 12px;
    border-radius: 10px;
    font-weight: 600;
}@media (hover: hover) {

.like-btn:hover { background: rgba(255,59,48,0.08); }
}
.like-btn.liked { background: rgba(255,59,48,0.1); }

/* --- 评论区美化 --- */
.comments-header {
    font-size: 16px;
    font-weight: 700;
    color: #1c1c1e;
}
.comments-count {
    background: linear-gradient(135deg, #007aff, #5856d6);
    font-weight: 600;
    padding: 2px 10px;
}
.comment-item {
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border-bottom: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.comment-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1c1c1e;
}
.comment-user::before {
    display: none;
}
.comment-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.08);
}
.comment-content {
    color: #333;
    padding-left: 32px;
    margin-top: 4px;
}
.comment-time {
    color: #c7c7cc;
}
.comment-input-row input {
    border: 1.5px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 11px 16px;
    transition: all 0.2s;
}
.comment-input-row input:focus {
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.1);
}

/* --- 空状态美化 --- */
.empty-tip {
    color: #8e8e93;
    font-size: 16px;
    padding: 60px 0;
}
.empty-tip::before {
    content: "📷";
    display: block;
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* --- 加载更多按钮 --- */
#loadMoreBtn {
    background: rgba(255,255,255,0.8);
    border: 1.5px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 10px 32px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}@media (hover: hover) {

#loadMoreBtn:hover {
    background: #fff;
    border-color: #007aff;
    color: #007aff;
}
}

/* --- 上传进度美化 --- */
.upload-progress {
    background: linear-gradient(135deg, rgba(0,122,255,0.06), rgba(88,86,214,0.06));
    border-bottom: 1px solid rgba(0,122,255,0.1);
}
.progress-bar {
    height: 8px;
    border-radius: 4px;
    background: rgba(0,0,0,0.06);
}
.progress-fill {
    background: linear-gradient(90deg, #007aff, #5856d6);
    border-radius: 4px;
}

/* --- 分享链接框美化 --- */
.share-link-box {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.share-link-row input {
    border: 1.5px solid rgba(0,0,0,0.08);
    border-radius: 10px;
}

/* ============================================================
   手机端优化（768px以下）
   ============================================================ */
@media (max-width: 768px) {
    /* --- 顶部导航：允许换行，按钮不遮挡 --- */
    .top-bar {
        flex-wrap: wrap;
        padding: 8px 12px;
        gap: 8px;
    }
    .top-bar-left {
        gap: 10px;
        flex: 1;
        min-width: 0;
    }
    .top-bar-right {
        flex-wrap: wrap;
        gap: 6px;
        width: 100%;
        justify-content: flex-start;
        padding-top: 4px;
        border-top: 1px solid rgba(255,255,255,0.3);
        margin-top: 4px;
    }
    .top-bar-right .btn-ghost {
        padding: 7px 12px !important;
        font-size: 12px !important;
        flex: 1;
        min-width: 0;
        text-align: center;
        white-space: nowrap;    }
    /* 居中导航栏：手机端保持三栏不换行 */
    .top-bar-centered {
        flex-wrap: nowrap;
        grid-template-columns: auto 1fr auto;
        gap: 8px;
        padding: 8px 12px;
    }
    .top-bar-centered .top-bar-right {
        width: auto;
        border: none;
        padding: 0;
        margin: 0;
        flex-wrap: nowrap;
    }
    .top-bar-centered .logo-main { font-size: 18px; }
    .top-bar-centered .logo-sub { font-size: 8px; }
    #uploadBtn, #folderUploadBtn {
        flex: 1.2;
    }
    .ai-switch-wrap {
        padding: 3px 10px;
        order: -1;
    }
    .ai-switch-label { font-size: 12px; }
    .user-profile-entry {
        padding: 2px 8px 2px 2px;
    }
    .top-avatar { width: 26px; height: 26px; }
    .user-info {
        font-size: 12px;
        padding: 3px 8px;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .logo-main { font-size: 18px; }
    .logo-sub { font-size: 9px; }

    /* --- 搜索栏 --- */
    .search-bar { padding: 12px; }
    .search-input-wrap {
        flex-direction: column;
        gap: 8px;
    }
    .search-input-wrap input {
        width: 100%;
        padding: 11px 14px;
        /* 必须 ≥16px：小于 16px 时 iOS/部分安卓浏览器聚焦输入框会自动放大页面，失焦后不回位 */
        font-size: 16px;
        touch-action: manipulation;
    }
    .search-input-wrap .btn-primary {
        width: 100%;
        padding: 11px;
    }
    .filter-bar {
        flex-wrap: wrap;
        gap: 8px;
    }
    .filter-bar select, .filter-bar input[type="date"] {
        flex: 1;
        min-width: 100px;
        padding: 8px 32px 8px 12px;
        font-size: 13px;
        height: 36px;
    }
    /* 日期筛选按钮：与快捷按钮同一行（尺寸见下方 date-filter-wrap 覆盖规则） */
    .filter-bar .date-filter-wrap {
        border-radius: 12px;
    }
    .filter-bar .date-filter-wrap .date-filter-ph {
        left: 12px;
        font-size: 13px;
    }
    .filter-bar .date-filter-wrap input[type="date"] {
        flex: none;
        min-width: 0;
        width: 100%;
        height: 100%;
        padding: 8px 8px;
        font-size: 13px;
    }
    /* 手机端：日期框 + 快捷按钮压在同一行，点一下立刻筛选 */
    .filter-bar .date-filter-wrap {
        flex: 0 0 40%;
        min-width: 0;
        height: 40px;
        border-radius: 12px;
    }
    .filter-bar .date-quick {
        flex: 1;
        width: auto;
        gap: 6px;
    }
    .filter-bar .date-quick-btn {
        flex: 1;
        min-width: 0;
        height: 40px;
        font-size: 13px;
        padding: 0 2px;
        border-radius: 12px;
    }
    /* 手机端：类别/地点/好友/我的关注 收进"筛选"面板，筛选行压成「日期行 + 筛选/重置行」 */
    .filter-bar #categoryFilter,
    .filter-bar #locationFilter,
    .filter-bar #authorFilter,
    .filter-bar #followFilterBtn {
        display: none;
    }
    .filter-bar .mobile-filter-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 1;
        min-width: 100px;
        height: 40px;
        padding: 0 12px;
        border-radius: 12px;
        font-size: 14px;
        font-weight: 500;
    }
    .filter-bar .mobile-filter-btn.has-filter {
        background: linear-gradient(135deg, #4d8bff, #2f6bff);
        border-color: transparent;
        color: #fff;
        box-shadow: 0 3px 10px rgba(0,122,255,0.28);
    }
    .filter-bar .btn-ghost {
        flex: 1;
        min-width: 80px;
        padding: 8px 12px;
        font-size: 13px;
        height: 36px;
        min-height: 36px !important;
        box-sizing: border-box;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* --- 图片网格：2列 --- */
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 12px;
    }
    .gallery-item .item-info {
        padding: 6px 8px;
    }
    .gallery-item .item-name { font-size: 12px; }
    .gallery-item .item-stats { font-size: 11px; gap: 6px; }
    .gallery-item .cat-badge,
    .gallery-item .ai-pending {
        font-size: 10px;
        padding: 2px 6px;
    }

    /* --- 弹窗：小红书风格，图片+信息一体滚动，操作按钮固定底部 --- */
    .modal-overlay { padding: 10px; align-items: center; }
    .modal-content {
        max-width: 100%;
        width: 100%;
        max-height: calc(100vh - 70px);
        height: calc(100vh - 70px);
        border-radius: 16px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    .modal-small {
        max-width: 92%;
        width: auto;
        height: auto;
        max-height: 82vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    .modal-small h2 { font-size: 18px; margin-bottom: 12px; padding-right: 30px; }
    .modal-small #editForm {
        overflow-y: auto;
        flex: 1;
        min-height: 0;
        padding-right: 2px;
    }
    .modal-small .form-group { margin-bottom: 10px; }
    .modal-small .form-group label { font-size: 13px; margin-bottom: 4px; }
    .modal-small .form-group input,
    .modal-small .form-group select {
        padding: 8px 12px;
        font-size: 14px;
        border-radius: 10px;
    }
    .modal-small .btn-primary {
        padding: 10px;
        font-size: 15px;
        margin-top: 4px;
    }
    .modal-body {
        flex-direction: column;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        flex: 1;
        display: flex;
        min-height: 0;
    }
    .modal-image-wrap {
        flex-shrink: 0;
        max-height: 45vh;
        height: 45vh;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #1a1a1a;
        padding: 0;
        overflow: hidden;
        position: relative;
    }
    .modal-image-wrap img {
        max-height: 45vh;
        max-width: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        display: block;
    }
    .modal-image-wrap img.rotated {
        max-height: 32vh;
        max-width: 45vh;
    }
    .modal-info {
        width: 100%;
        flex: none;
        border-left: none;
        border-top: 1px solid #eee;
        padding: 14px 16px 80px;
        overflow: visible;
        min-height: 0;
    }
    .modal-info h2 { font-size: 16px; margin-bottom: 8px; }
    /* 操作按钮固定在滚动区底部 */
    .modal-actions {
        position: sticky;
        bottom: 0;
        flex-wrap: wrap;
        gap: 6px;
        padding: 10px 16px;
        margin: 0 -16px;
        background: inherit;
        z-index: 5;
        border-top: 1px solid rgba(0,0,0,0.06);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
    .zoom-controls {
        position: absolute;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
        padding: 4px 8px;
        gap: 4px;
    }
    .zoom-controls button { width: 30px; height: 30px; font-size: 15px; }
    .zoom-controls span { font-size: 11px; min-width: 36px; }
    .modal-close {
        background: rgba(0,0,0,0.5) !important;
        color: #fff !important;
        top: 8px !important;
        right: 8px !important;
        width: 30px !important;
        height: 30px !important;
        font-size: 20px !important;
    }
    .stats-bar { padding: 8px 10px; gap: 12px; margin-bottom: 10px; }
    .like-btn { padding: 6px 12px; font-size: 13px; }
    .meta-row { padding: 4px 0; font-size: 13px; }
    .modal-actions { flex-wrap: wrap; gap: 6px; }
    .modal-actions .btn-primary, .modal-actions .btn-ghost, .modal-actions .btn-danger {
        flex: 1; min-width: calc(50% - 3px); height: 38px; padding: 0 10px;
        font-size: 13px; border-radius: 10px; display: inline-flex;
        align-items: center; justify-content: center; line-height: 1;
    }
    .comments-section { margin-top: 12px; }

    /* --- 按钮统一触摸大小 --- */
    .btn-primary, .btn-ghost, .btn-danger {
        min-height: 40px;
        font-size: 14px;
    }

    /* --- 评论区 --- */
    .comment-input-row { flex-direction: column; }
    .comment-input-row .btn-primary { width: 100%; }

    /* --- 空状态 --- */
    .empty-tip { font-size: 14px; padding: 30px 0; }

    /* --- 加载更多 --- */
    #loadMoreBtn { width: 80%; padding: 12px; }

    /* --- 预览弹窗：手机全屏沉浸式（小红书式） --- */
    #previewModal {
        z-index: 1200;               /* 盖住底部导航(1000) */
        padding: 0;
        align-items: stretch;
        background: #000;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    /* 编辑信息弹窗要压在预览弹窗之上 */
    #editModal { z-index: 1300; }
    #previewModal .modal-content {
        max-width: none;
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
        box-shadow: none;
        background: #000;
        animation: none;
        display: block;
        position: relative;
    }
    #previewModal .modal-body {
        position: absolute;
        top: 0; right: 0; bottom: 0; left: 0;
        display: block;
        overflow: hidden;
        background: #000;
    }
    /* 图片铺满整屏，底部留出抽屉露出的高度 */
    #previewModal .modal-image-wrap {
        position: absolute;
        top: 0; right: 0; bottom: 0; left: 0;
        height: auto;
        max-height: none;
        min-height: 0;
        padding: 0 0 calc(96px + env(safe-area-inset-bottom, 0px));
        box-sizing: border-box;
        background: #000;
        overflow: hidden;
    }
    #previewModal .modal-image-wrap img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
    }
    #previewModal .modal-nav-btn {
        opacity: 0.5;
        width: 34px;
        height: 34px;
        font-size: 20px;
        background: rgba(0,0,0,0.35);
    }
    #previewModal .modal-nav-btn:active { opacity: 0.9; }
    #previewModal .modal-close {
        top: 10px !important;
        right: 10px !important;
        width: 32px !important;
        height: 32px !important;
        background: rgba(0,0,0,0.55) !important;
        color: #fff !important;
        z-index: 30;
    }
    #previewModal .zoom-controls {
        bottom: calc(96px + 14px + env(safe-area-inset-bottom, 0px));
        z-index: 25;
        opacity: 0.9;
        transition: opacity 0.2s;
    }
    /* 信息抽屉：默认收起只露标题+统计，点上滑展开 */
    #previewModal .modal-info {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 62vh;
        max-height: 62vh;
        padding: 0 16px calc(20px + env(safe-area-inset-bottom, 0px));
        background: #fff;
        border-radius: 16px 16px 0 0;
        border-top: none;
        box-shadow: 0 -8px 26px rgba(0,0,0,0.45);
        transform: translateY(calc(100% - 96px - env(safe-area-inset-bottom, 0px)));
        transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
        overflow: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        z-index: 20;
        touch-action: pan-y;
        will-change: transform;
    }
    #previewModal .modal-info::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        width: 38px;
        height: 4px;
        margin-left: -19px;
        border-radius: 2px;
        background: rgba(0,0,0,0.22);
        pointer-events: none;
        z-index: 2;
    }
    #previewModal .modal-info.show-detail {
        transform: translateY(0);
        overflow-y: auto;
    }
    #previewModal .modal-info h2 {
        font-size: 17px;
        margin: 22px 0 4px;
        padding-right: 34px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    #previewModal .modal-info .stats-bar {
        margin-bottom: 6px;
        padding: 2px 0 6px;
    }
    #previewModal .modal-info .meta-section { padding-top: 4px; }
    body[data-theme="dark"] #previewModal .modal-info {
        background: #1c1c1e;
        color: #f2f2f7;
    }
    body[data-theme="dark"] #previewModal .modal-info h2 { color: #f2f2f7; }
    body[data-theme="dark"] #previewModal .modal-info::before { background: rgba(255,255,255,0.28); }
}

/* 小屏手机（480px以下） */
@media (max-width: 480px) {
    .mobile-hide { display: none !important; }
    .top-bar-right .btn-ghost {
        font-size: 10px !important;
        padding: 5px 3px !important;
        flex: 1 !important;
    }
    .ai-switch-wrap { flex: 1 1 100% !important; justify-content: center; }
    .gallery { gap: 6px; padding: 8px 10px; padding-bottom: 80px; }
    .gallery-item .item-name { font-size: 11px; }
    .gallery-item .item-stats { font-size: 10px; }
}

/* ===== 顶部导航小标题按钮 ===== */
.top-nav-btn {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #8e8e93 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    transition: color 0.2s, background 0.2s !important;
    letter-spacing: 0.3px;
}@media (hover: hover) {

.top-nav-btn:hover {
    color: #1c1c1e !important;
    background: rgba(0,0,0,0.05) !important;
    transform: none !important;
}
}
#adminBtn.top-nav-btn { color: #ff3b30 !important; }@media (hover: hover) {

#adminBtn.top-nav-btn:hover { background: rgba(255,59,48,0.08) !important; }
}@media (hover: hover) {

#messagesBtn.top-nav-btn:hover { color: #007aff !important; background: rgba(0,122,255,0.08) !important; }
}@media (hover: hover) {

#logoutBtn.top-nav-btn:hover { color: #ff3b30 !important; background: rgba(255,59,48,0.08) !important; }
}
/* 主题适配 */
body[data-theme="blue"] .top-nav-btn { color: #64748b !important; }@media (hover: hover) {

body[data-theme="blue"] .top-nav-btn:hover { color: #1e3a5f !important; background: rgba(30,58,95,0.06) !important; }
}
body[data-theme="pink"] .top-nav-btn { color: #be185d !important; }@media (hover: hover) {

body[data-theme="pink"] .top-nav-btn:hover { color: #831843 !important; background: rgba(131,24,67,0.06) !important; }
}
body[data-theme="yellow"] .top-nav-btn { color: #92400e !important; }@media (hover: hover) {

body[data-theme="yellow"] .top-nav-btn:hover { color: #422006 !important; background: rgba(66,32,6,0.06) !important; }
}
body[data-theme="green"] .top-nav-btn { color: #4ade80 !important; }@media (hover: hover) {

body[data-theme="green"] .top-nav-btn:hover { color: #16a34a !important; background: rgba(34,197,94,0.06) !important; }
}
body[data-theme="dark"] .top-nav-btn { color: #98989d !important; }@media (hover: hover) {

body[data-theme="dark"] .top-nav-btn:hover { color: #ffffff !important; background: rgba(255,255,255,0.08) !important; }
}

/* ===== 批量操作 ===== */
.batch-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid #e5e5e5;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1100;
    gap: 8px;
    flex-wrap: wrap;
}
.batch-count { font-size: 14px; color: #1c1c1e; }
.batch-count b { color: #007aff; font-size: 16px; }
.batch-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.batch-actions .btn-danger {
    background: #ff3b30; color: #fff; border: none;
    padding: 8px 16px; border-radius: 10px; cursor: pointer; font-size: 13px;
}
.gallery-item.multi-select { cursor: pointer; }
.gallery-item.selected {
    outline: 3px solid #007aff;
    outline-offset: -3px;
}
.gallery-item .select-check {
    position: absolute;
    top: 8px; left: 8px;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: 2px solid #007aff;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5;
    font-size: 14px;
    color: #007aff;
}
.gallery-item.multi-select .select-check { display: flex; }
.gallery-item.selected .select-check { background: #007aff; color: #fff; }
body[data-theme="dark"] .batch-bar { background: rgba(44,44,46,0.95); border-top-color: #38383a; }
body[data-theme="dark"] .batch-count { color: #fff; }

/* ===== 移动端底部导航 ===== */
.bottom-nav { display: none; }
@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        background: rgba(255,255,255,0.55);
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        border-top: 1px solid rgba(255,255,255,0.6);
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
        z-index: 1000;
        padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
        justify-content: space-around;
        align-items: center;
    }
    .bottom-nav-item {
        display: flex; flex-direction: column; align-items: center; gap: 2px;
        text-decoration: none; color: #8e8e93; font-size: 10px;
        padding: 4px 12px; cursor: pointer; transition: color 0.2s;
    }
    .bottom-nav-item.active { color: #007aff; }
    .bottom-nav-item .nav-icon {
        width: 22px;
        height: 22px;
        display: block;
    }
    .bottom-nav-badge {
        position: absolute;
        top: 0px;
        right: 6px;
        background: #ff3b30;
        color: #fff;
        font-size: 9px;
        font-weight: 700;
        min-width: 14px;
        height: 14px;
        border-radius: 7px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 3px;
        line-height: 1;
        z-index: 10;
        animation: badgePulse 2s infinite;
    }
    .bottom-nav-item.nav-upload { position: relative; display: flex; align-items: center; justify-content: center; }
    .bottom-nav-item.nav-upload .nav-plus {
        width: 40px; height: 40px;
        background: linear-gradient(135deg, #007aff, #5856d6);
        color: #fff; border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        font-size: 22px; box-shadow: 0 4px 12px rgba(0,122,255,0.4);
        line-height: 1;
    }
    body[data-theme="dark"] .bottom-nav { background: rgba(44,44,46,0.55); border-top-color: #38383a; }
    body[data-theme="dark"] .bottom-nav-item { color: #98989d; }
    body[data-theme="dark"] .bottom-nav-item.active { color: #0a84ff; }
    body[data-theme="blue"] .bottom-nav { background: rgba(219,234,254,0.55); border-top-color: #bfdbfe; }
    body[data-theme="blue"] .bottom-nav-item { color: #64748b; }
    body[data-theme="blue"] .bottom-nav-item.active { color: #1d4ed8; }
    body[data-theme="blue"] .nav-upload .nav-plus { background: linear-gradient(135deg,#2563eb,#1d4ed8); box-shadow: 0 4px 12px rgba(37,99,235,0.4); }
    body[data-theme="pink"] .bottom-nav { background: rgba(252,231,243,0.55); border-top-color: #f9a8d4; }
    body[data-theme="pink"] .bottom-nav-item { color: #be185d; }
    body[data-theme="pink"] .bottom-nav-item.active { color: #db2777; }
    body[data-theme="pink"] .nav-upload .nav-plus { background: linear-gradient(135deg,#db2777,#be185d); box-shadow: 0 4px 12px rgba(219,39,119,0.4); }
    body[data-theme="yellow"] .bottom-nav { background: rgba(254,249,195,0.55); border-top-color: #fde047; }
    body[data-theme="yellow"] .bottom-nav-item { color: #92400e; }
    body[data-theme="yellow"] .bottom-nav-item.active { color: #b45309; }
    body[data-theme="yellow"] .nav-upload .nav-plus { background: linear-gradient(135deg,#d97706,#b45309); box-shadow: 0 4px 12px rgba(217,119,6,0.4); }
    body[data-theme="green"] .bottom-nav { background: rgba(240,253,244,0.55); border-top-color: #bbf7d0; }
    body[data-theme="green"] .bottom-nav-item { color: #4ade80; }
    body[data-theme="green"] .bottom-nav-item.active { color: #22c55e; }
    body[data-theme="green"] .nav-upload .nav-plus { background: linear-gradient(135deg,#4ade80,#22c55e); box-shadow: 0 4px 12px rgba(74,222,128,0.4); }
    body[data-theme="rainbow"] .bottom-nav {
        background: linear-gradient(135deg, rgba(255,224,236,0.7), rgba(255,244,214,0.7), rgba(224,255,232,0.7), rgba(214,236,255,0.7));
        background-size: 300% 300%;
        border-top-color: rgba(255,255,255,0.6);
    }
    body[data-theme="rainbow"] .bottom-nav-item { color: #636366; }
    body[data-theme="rainbow"] .bottom-nav-item.active { color: #ff6b9d; }
    body[data-theme="rainbow"] .nav-upload .nav-plus { background: linear-gradient(135deg,#ff6b9d,#4d96ff); box-shadow: 0 4px 12px rgba(255,107,157,0.4); }
}

/* ===== 主题切换 ===== */
.logo-wrap { cursor: pointer; user-select: none; }
.theme-picker {
    position: absolute;
    top: 60px;
    left: 20px;
    z-index: 2000;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    padding: 14px;
    width: 200px;
    animation: themeFadeIn 0.2s ease;
}
@keyframes themeFadeIn { from { opacity:0; transform: translateY(-8px); } to { opacity:1; transform: translateY(0); } }
.theme-picker-title { font-size: 13px; font-weight: 600; color: #1c1c1e; margin-bottom: 10px; }
.theme-options { display: flex; flex-direction: column; gap: 8px; }
.theme-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
}@media (hover: hover) {

.theme-option:hover { transform: scale(1.02); }
}
.theme-option.active { border-color: #007aff; }
.theme-option span { font-weight: 500; }
.rainbow-lock { margin-left: auto; font-size: 12px; opacity: 0.9; }
.rainbow-lock.hidden { display: none; }

/* --- 蓝色主题 --- */
body[data-theme="blue"] { background: #e8f0fe; }
body[data-theme="blue"] .top-bar { background: rgba(219,234,254,0.55); border-bottom-color: #bfdbfe; }
body[data-theme="blue"] .logo-main { color: #1e3a5f; }
body[data-theme="blue"] .logo-sub { color: #3b82f6; }
body[data-theme="blue"] .gallery-item { background: rgba(255,255,255,0.92); box-shadow: 0 2px 12px rgba(30,58,95,0.08); }
body[data-theme="blue"] .item-name { color: #1e3a5f; }
body[data-theme="blue"] .item-stats { color: #64748b; }
body[data-theme="blue"] .btn-primary { background: linear-gradient(135deg,#2563eb,#1d4ed8); }
body[data-theme="blue"] .btn-ghost { background: rgba(255,255,255,0.8); color: #1e40af; border-color: #93c5fd; }
body[data-theme="blue"] .user-info { color: #1e3a5f; }
body[data-theme="blue"] .search-box input { background: rgba(255,255,255,0.9); color: #1e3a5f; }
body[data-theme="blue"] .filter-bar select, .filter-bar input[type="date"] { background-color: rgba(255,255,255,0.9); color: #1e3a5f; }
body[data-theme="blue"] .modal-content { background: #eff6ff; }
body[data-theme="blue"] .modal-info { background: #eff6ff; color: #1e3a5f; }
body[data-theme="blue"] .modal-info h2 { color: #1e3a5f; }
body[data-theme="blue"] .meta-label { color: #64748b; }
body[data-theme="blue"] .meta-value { color: #1e3a5f; }
body[data-theme="blue"] .stats-bar { background: rgba(255,255,255,0.7); }
body[data-theme="blue"] .comments-section { background: rgba(255,255,255,0.5); }
body[data-theme="blue"] .comment-user { color: #1e40af; }
body[data-theme="blue"] .comment-content { color: #1e3a5f; }
body[data-theme="blue"] .theme-picker { background: #eff6ff; }
body[data-theme="blue"] .theme-picker-title { color: #1e3a5f; }

/* --- 粉色主题 --- */
body[data-theme="pink"] { background: #fce7f3; }
body[data-theme="pink"] .top-bar { background: rgba(252,231,243,0.55); border-bottom-color: #f9a8d4; }
body[data-theme="pink"] .logo-main { color: #831843; }
body[data-theme="pink"] .logo-sub { color: #db2777; }
body[data-theme="pink"] .gallery-item { background: rgba(255,255,255,0.92); box-shadow: 0 2px 12px rgba(131,24,67,0.08); }
body[data-theme="pink"] .item-name { color: #831843; }
body[data-theme="pink"] .item-stats { color: #be185d; }
body[data-theme="pink"] .btn-primary { background: linear-gradient(135deg,#db2777,#be185d); }
body[data-theme="pink"] .btn-ghost { background: rgba(255,255,255,0.8); color: #9d174d; border-color: #f9a8d4; }
body[data-theme="pink"] .user-info { color: #831843; }
body[data-theme="pink"] .search-box input { background: rgba(255,255,255,0.9); color: #831843; }
body[data-theme="pink"] .filter-bar select, .filter-bar input[type="date"] { background-color: rgba(255,255,255,0.9); color: #831843; }
body[data-theme="pink"] .modal-content { background: #fdf2f8; }
body[data-theme="pink"] .modal-info { background: #fdf2f8; color: #831843; }
body[data-theme="pink"] .modal-info h2 { color: #831843; }
body[data-theme="pink"] .meta-label { color: #be185d; }
body[data-theme="pink"] .meta-value { color: #831843; }
body[data-theme="pink"] .stats-bar { background: rgba(255,255,255,0.7); }
body[data-theme="pink"] .comments-section { background: rgba(255,255,255,0.5); }
body[data-theme="pink"] .comment-user { color: #be185d; }
body[data-theme="pink"] .comment-content { color: #831843; }
body[data-theme="pink"] .theme-picker { background: #fdf2f8; }
body[data-theme="pink"] .theme-picker-title { color: #831843; }

/* --- 黄色主题 --- */
body[data-theme="yellow"] { background: #fef9c3; }
body[data-theme="yellow"] .top-bar { background: rgba(254,249,195,0.55); border-bottom-color: #fde047; }
body[data-theme="yellow"] .logo-main { color: #422006; }
body[data-theme="yellow"] .logo-sub { color: #b45309; }
body[data-theme="yellow"] .gallery-item { background: rgba(255,255,255,0.95); box-shadow: 0 2px 12px rgba(66,32,6,0.08); }
body[data-theme="yellow"] .item-name { color: #422006; }
body[data-theme="yellow"] .item-stats { color: #92400e; }
body[data-theme="yellow"] .btn-primary { background: linear-gradient(135deg,#d97706,#b45309); }
body[data-theme="yellow"] .btn-ghost { background: rgba(255,255,255,0.9); color: #78350f; border-color: #fde047; }
body[data-theme="yellow"] .user-info { color: #422006; }
body[data-theme="yellow"] .search-box input { background: rgba(255,255,255,0.95); color: #422006; }
body[data-theme="yellow"] .filter-bar select, .filter-bar input[type="date"] { background-color: rgba(255,255,255,0.95); color: #422006; }
body[data-theme="yellow"] .modal-content { background: #fefce8; }
body[data-theme="yellow"] .modal-info { background: #fefce8; color: #422006; }
body[data-theme="yellow"] .modal-info h2 { color: #422006; }
body[data-theme="yellow"] .meta-label { color: #92400e; }
body[data-theme="yellow"] .meta-value { color: #422006; }
body[data-theme="yellow"] .stats-bar { background: rgba(255,255,255,0.8); }
body[data-theme="yellow"] .comments-section { background: rgba(255,255,255,0.6); }
body[data-theme="yellow"] .comment-user { color: #b45309; }
body[data-theme="yellow"] .comment-content { color: #422006; }
body[data-theme="yellow"] .theme-picker { background: #fefce8; }
body[data-theme="yellow"] .theme-picker-title { color: #422006; }

body[data-theme="green"] { background: #f0fdf4; }
body[data-theme="green"] .top-bar { background: rgba(240,253,244,0.55); border-bottom-color: #bbf7d0; }
body[data-theme="green"] .logo-main { color: #166534; }
body[data-theme="green"] .logo-sub { color: #22c55e; }
body[data-theme="green"] .gallery-item { background: rgba(255,255,255,0.92); box-shadow: 0 2px 12px rgba(22,101,52,0.06); }
body[data-theme="green"] .item-name { color: #166534; }
body[data-theme="green"] .item-stats { color: #4ade80; }
body[data-theme="green"] .btn-primary { background: linear-gradient(135deg,#4ade80,#22c55e); }
body[data-theme="green"] .btn-ghost { background: rgba(255,255,255,0.85); color: #16a34a; border-color: #bbf7d0; }
body[data-theme="green"] .user-info { color: #166534; }
body[data-theme="green"] .search-box input { background: rgba(255,255,255,0.92); color: #166534; }
body[data-theme="green"] .filter-bar select, .filter-bar input[type="date"] { background-color: rgba(255,255,255,0.92); color: #166534; }
body[data-theme="green"] .modal-content { background: #f7fef9; }
body[data-theme="green"] .modal-info { background: #f7fef9; color: #166534; }
body[data-theme="green"] .modal-info h2 { color: #166534; }
body[data-theme="green"] .meta-label { color: #4ade80; }
body[data-theme="green"] .meta-value { color: #166534; }
body[data-theme="green"] .stats-bar { background: rgba(255,255,255,0.8); }
body[data-theme="green"] .comments-section { background: rgba(255,255,255,0.6); }
body[data-theme="green"] .comment-user { color: #22c55e; }
body[data-theme="green"] .comment-content { color: #166534; }
body[data-theme="green"] .theme-picker { background: #f7fef9; }
body[data-theme="green"] .theme-picker-title { color: #166534; }

/* --- 黑色（暗色）主题 --- */
body[data-theme="dark"] { background: #1c1c1e; }
body[data-theme="dark"] .top-bar { background: rgba(44,44,46,0.85); border-bottom-color: #38383a; }
body[data-theme="dark"] .logo-main { color: #ffffff; }
body[data-theme="dark"] .logo-sub { color: #0a84ff; }
body[data-theme="dark"] .gallery-item { background: rgba(44,44,46,0.9); box-shadow: 0 2px 12px rgba(0,0,0,0.3); }
body[data-theme="dark"] .gallery-item .item-info { background: rgba(58,58,60,0.95); }
body[data-theme="dark"] .item-name { color: #ffffff; }
body[data-theme="dark"] .item-stats { color: #98989d; }
body[data-theme="dark"] .btn-primary { background: linear-gradient(135deg,#0a84ff,#0066cc); }
body[data-theme="dark"] .btn-ghost { background: rgba(58,58,60,0.8); color: #ffffff; border-color: #48484a; }
body[data-theme="dark"] .user-info { color: #ffffff; }
body[data-theme="dark"] .search-input-wrap input { background: rgba(58,58,60,0.7); color: #ffffff; border-color: rgba(255,255,255,0.12); box-shadow: inset 0 1px 1px rgba(255,255,255,0.08), 0 1px 6px rgba(0,0,0,0.3); }
body[data-theme="dark"] .search-input-wrap input::placeholder { color: rgba(255,255,255,0.4); }
body[data-theme="dark"] .search-input-wrap input:focus { border-color: #0a84ff; background: rgba(58,58,60,0.7); box-shadow: inset 0 1px 1px rgba(255,255,255,0.08), 0 1px 6px rgba(0,0,0,0.3); }
body[data-theme="dark"] .search-bar { background: rgba(44,44,46,0.6); border-color: rgba(255,255,255,0.08); box-shadow: inset 0 1px 1px rgba(255,255,255,0.06), 0 4px 16px rgba(0,0,0,0.3); }
body[data-theme="dark"] .top-bar-back-btn { background: rgba(58,58,60,0.8); border-color: rgba(255,255,255,0.1); color: #fff; }
body[data-theme="dark"] .filter-bar select, .filter-bar input[type="date"] { background-color: rgba(58,58,60,0.8); color: #ffffff; border-color: #48484a; }
body[data-theme="dark"] .modal-content { background: #2c2c2e; }
body[data-theme="dark"] .modal-info { background: #2c2c2e; color: #ffffff; border-left-color: #38383a; }
body[data-theme="dark"] .modal-info h2 { color: #ffffff; }
body[data-theme="dark"] .meta-label { color: #98989d; }
body[data-theme="dark"] .meta-value { color: #ffffff; }
body[data-theme="dark"] .stats-bar { background: rgba(58,58,60,0.6); }
body[data-theme="dark"] .comments-section { background: rgba(58,58,60,0.4); }
body[data-theme="dark"] .comment-user { color: #0a84ff; }
body[data-theme="dark"] .comment-content { color: #e5e5ea; }
body[data-theme="dark"] .comment-time { color: #98989d; }
body[data-theme="dark"] .comments-empty { color: #98989d; }
body[data-theme="dark"] .comment-input-row input { background: rgba(58,58,60,0.8); color: #ffffff; border-color: #48484a; }
body[data-theme="dark"] .ai-switch-label { color: #ffffff; }
body[data-theme="dark"] .ai-switch-wrap { background: rgba(58,58,60,0.8); border: 1px solid rgba(255,255,255,0.1); }
body[data-theme="dark"] .toggle-slider { background: rgba(255,255,255,0.2); }
body[data-theme="dark"] .toggle-slider:before { background: rgba(255,255,255,0.9); }
body[data-theme="dark"] .theme-picker { background: #2c2c2e; }
body[data-theme="dark"] .theme-picker-title { color: #ffffff; }
body[data-theme="dark"] .share-link-box { background: rgba(58,58,60,0.6); }
body[data-theme="dark"] .share-link-box p { color: #98989d; }
body[data-theme="dark"] .share-friend-box { background: rgba(58,58,60,0.6); }
body[data-theme="dark"] .share-friend-box p { color: #98989d; }
body[data-theme="dark"] .friend-item { background: rgba(58,58,60,0.8); }@media (hover: hover) {

body[data-theme="dark"] .friend-item:hover { background: rgba(0,132,255,0.2); }
}
body[data-theme="dark"] .friend-name { color: #ffffff; }

/* ============================================================
   苹果液态玻璃 Liquid Glass 增强层（预览版，可整块删除）
   核心：强模糊+饱和增强 / 内边缘高光模拟玻璃厚度 / 柔和分层投影
   ============================================================ */

/* 顶部导航栏：通透玻璃 */
.top-bar {
    background: rgba(255,255,255,0.30);
    backdrop-filter: blur(34px) saturate(200%) brightness(1.06);
    -webkit-backdrop-filter: blur(34px) saturate(200%) brightness(1.06);
    border: 1px solid rgba(255,255,255,0.5);
    padding: 16px 28px;
    margin: 12px 16px 0;
    border-radius: 14px;
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.7),
        inset 0 -1px 0 rgba(255,255,255,0.2),
        0 6px 24px rgba(31,38,135,0.07);
}

/* 搜索栏：磨砂玻璃条 */
.search-bar {
    margin: 12px 16px 0;
    padding: 16px 20px;
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.8),
        0 4px 16px rgba(31,38,135,0.06);
}
.search-input-wrap input,
.filter-bar select, .filter-bar input[type="date"] {
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.9),
        inset 0 -1px 0 rgba(0,0,0,0.03),
        0 1px 6px rgba(31,38,135,0.05);
}

/* 图片卡片：悬浮玻璃片 */
.gallery-item {
    border: 1px solid rgba(255,255,255,0.55);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.7),
        0 4px 20px rgba(31,38,135,0.09);
}@media (hover: hover) {

.gallery-item:hover {
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.75),
        0 18px 44px rgba(31,38,135,0.18);
}
}

/* 弹窗：厚玻璃 */
.modal-content {
    backdrop-filter: blur(38px) saturate(180%) brightness(1.03);
    -webkit-backdrop-filter: blur(38px) saturate(180%) brightness(1.03);
    background: rgba(255,255,255,0.60);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.75),
        inset 0 -1px 1px rgba(255,255,255,0.2),
        inset 1px 0 1px rgba(255,255,255,0.25),
        inset -1px 0 1px rgba(255,255,255,0.25),
        0 24px 70px rgba(0,0,0,0.22);
}

/* 浮动面板：主题选择 / 上传队列 / 批量操作栏 */
.theme-picker,
.queue-panel {
    backdrop-filter: blur(24px) saturate(190%) brightness(1.05);
    -webkit-backdrop-filter: blur(24px) saturate(190%) brightness(1.05);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.75),
        0 12px 40px rgba(31,38,135,0.16);
}
.batch-bar {
    backdrop-filter: blur(24px) saturate(190%);
    -webkit-backdrop-filter: blur(24px) saturate(190%);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.5),
        0 -8px 32px rgba(0,0,0,0.12);
}

/* 手机端底部导航：玻璃 */
.bottom-nav {
    backdrop-filter: blur(28px) saturate(200%) brightness(1.05);
    -webkit-backdrop-filter: blur(28px) saturate(200%) brightness(1.05);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.7),
        0 -6px 24px rgba(31,38,135,0.08);
}

/* 按钮：玻璃高光边缘 + 悬停光泽扫过 */
.btn-primary,
.btn-ghost { position: relative; overflow: hidden; }
.btn-primary {
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.45),
        inset 0 -1px 1px rgba(0,0,0,0.08),
        0 4px 14px rgba(0,122,255,0.28);
}
.btn-ghost {
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.9),
        inset 0 -1px 0 rgba(0,0,0,0.04),
        0 2px 8px rgba(31,38,135,0.06);
}
.btn-primary::after,
.btn-ghost::after {
    content: '';
    position: absolute;
    top: 0; left: -80%;
    width: 60%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
    pointer-events: none;
}@media (hover: hover) {

.btn-primary:hover::after,
.btn-ghost:hover::after { left: 130%; }
}

/* 黑色主题下减弱白色反光、改为冷调玻璃 */
body[data-theme="dark"] .top-bar,
body[data-theme="dark"] .bottom-nav {
    background: rgba(44,44,46,0.6);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.12),
        0 6px 24px rgba(0,0,0,0.4);
}
body[data-theme="dark"] .modal-content {
    background: rgba(44,44,46,0.82);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.14),
        0 24px 70px rgba(0,0,0,0.5);
}
body[data-theme="dark"] .gallery-item {
    border-color: rgba(255,255,255,0.08);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.1),
        0 4px 20px rgba(0,0,0,0.3);
}

/* 一键回到顶部：液态玻璃悬浮球 */
.back-to-top {
    position: fixed;
    right: 28px;
    bottom: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.35);
    backdrop-filter: blur(20px) saturate(180%) brightness(1.08);
    -webkit-backdrop-filter: blur(20px) saturate(180%) brightness(1.08);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.8),
        inset 0 -1px 1px rgba(255,255,255,0.25),
        0 6px 20px rgba(31,38,135,0.18);
    color: #1c1c1e;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.85);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s, box-shadow 0.2s;
    z-index: 999;
}
.back-to-top svg { width: 22px; height: 22px; }
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}@media (hover: hover) {

.back-to-top:hover {
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.9),
        0 10px 28px rgba(31,38,135,0.28);
    transform: translateY(-2px) scale(1.05);
}
}
.back-to-top:active { transform: translateY(0) scale(0.95); }
body[data-theme="dark"] .back-to-top {
    background: rgba(58,58,60,0.55);
    border-color: rgba(255,255,255,0.15);
    color: #fff;
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.15),
        0 6px 20px rgba(0,0,0,0.4);
}

/* ===== 彩虹动画主题 ===== */
@keyframes rainbowBg {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes themeRainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
body[data-theme="rainbow"] {
    position: relative;
    background: transparent;
    color: #1c1c1e;
    overflow-x: hidden;
}
body[data-theme="rainbow"]::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 200%; height: 200%;
    background: linear-gradient(-45deg, #ffe0ec, #fff4d6, #e0ffe8, #d6ecff, #f0e0ff, #ffe0ec);
    z-index: -1;
    will-change: transform;
    contain: paint;
    animation: rainbowBgTransform 15s ease infinite;
}
@keyframes rainbowBgTransform {
    0% { transform: translate(0, 0); }
    50% { transform: translate(-25%, -25%); }
    100% { transform: translate(0, 0); }
}
body[data-theme="rainbow"] .top-bar {
    background: linear-gradient(135deg, rgba(255,107,157,0.4), rgba(255,217,61,0.4), rgba(107,203,119,0.4), rgba(77,150,255,0.4));
    border-bottom: 1px solid rgba(255,255,255,0.5);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
body[data-theme="rainbow"] .gallery-item {
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 2px 12px rgba(255,107,157,0.1);
}
body[data-theme="rainbow"] .gallery-item .item-info { background: rgba(255,255,255,0.95); }
body[data-theme="rainbow"] .item-name { color: #1c1c1e; }
body[data-theme="rainbow"] .item-stats { color: #636366; }
body[data-theme="rainbow"] .search-bar {
    background: linear-gradient(135deg, rgba(255,224,236,0.6), rgba(255,244,214,0.6), rgba(224,255,232,0.6), rgba(214,236,255,0.6));
    background-size: 300% 300%;
    border: 1.5px solid rgba(255,255,255,0.7);
    box-shadow: 0 4px 16px rgba(255,107,157,0.12);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
body[data-theme="rainbow"] .search-input-wrap input {
    background: rgba(255,255,255,0.85);
    border: 1.5px solid rgba(255,107,157,0.25);
    color: #1c1c1e;
}
body[data-theme="rainbow"] .search-input-wrap input::placeholder { color: #8e8e93; }
body[data-theme="rainbow"] .search-input-wrap input:focus {
    border-color: rgba(0,122,255,0.45);
    background: rgba(255,255,255,0.85);
    box-shadow: 0 1px 6px rgba(31,38,135,0.05);
}
body[data-theme="rainbow"] .filter-bar select, .filter-bar input[type="date"] {
    background-color: rgba(255,255,255,0.85);
    color: #1c1c1e;
    border: 1.5px solid rgba(255,107,157,0.25);
}
body[data-theme="rainbow"] .filter-bar select, .filter-bar input[type="date"]:focus {
    border-color: rgba(255,107,157,0.5);
    box-shadow: 0 0 0 3px rgba(255,107,157,0.15);
    background-color: rgba(255,255,255,0.95);
}
body[data-theme="rainbow"] .btn-ghost {
    background: rgba(255,255,255,0.7);
    color: #1c1c1e;
    border: 1px solid rgba(255,107,157,0.2);
}@media (hover: hover) {

body[data-theme="rainbow"] .btn-ghost:hover { background: rgba(255,255,255,0.9); }
}
body[data-theme="rainbow"] .btn-primary {
    background: linear-gradient(135deg, #ff6b9d, #4d96ff);
    border: none;
    color: #fff;
}
body[data-theme="rainbow"] .back-to-top {
    background: linear-gradient(135deg, rgba(255,107,157,0.7), rgba(77,150,255,0.7));
    border-color: rgba(255,255,255,0.5);
    color: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
body[data-theme="rainbow"] .category-watermark {
    background: linear-gradient(135deg, #ff6b9d, #4d96ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
body[data-theme="rainbow"] .theme-picker {
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(255,107,157,0.2);
}
body[data-theme="rainbow"] .empty-tip { color: #636366; }
@media (max-width: 768px) {
    .back-to-top { right: 18px; bottom: 84px; width: 44px; height: 44px; }
    .back-to-top svg { width: 20px; height: 20px; }
}

/* 顶部导航按钮紧凑布局，防止文字换行 */
.top-bar-right { gap: 4px; }
.top-bar-right .btn-ghost {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #8e8e93;
}@media (hover: hover) {

.top-bar-right .btn-ghost:hover {
    color: #1c1c1e;
    background: rgba(0,0,0,0.05);
}
}
.top-bar-right .btn-ghost#logoutBtn { padding: 8px 12px; }
.top-bar-left { gap: 16px; }
.ai-switch-wrap { padding: 4px 10px; gap: 6px; }
.ai-switch-label { font-size: 12px; }
.logo-main { font-size: 24px; letter-spacing: 4px; font-weight: 700; }
.logo-sub { font-size: 12px; letter-spacing: 2px; }
/* 个人主页入口：一体化玻璃按钮，融入右侧按钮组 */
.user-profile-entry {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px 14px 5px 5px;
    border-radius: 14px;
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 1px 6px rgba(100,110,140,0.08), inset 0 1px 0 rgba(255,255,255,0.8);
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    height: 38px;
    box-sizing: border-box;
    flex-shrink: 0;
}@media (hover: hover) {

.user-profile-entry:hover {
    background: rgba(255,255,255,0.75);
    border-color: rgba(0,122,255,0.3);
    box-shadow: 0 3px 12px rgba(0,122,255,0.12), inset 0 1px 0 rgba(255,255,255,0.9);
    transform: translateY(-1px);
}
}
.user-profile-entry .user-info {
    background: transparent;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1c1c1e;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.top-avatar { width: 28px; height: 28px; border: 1.5px solid rgba(255,255,255,0.9); }
/* 图片备注：整行展示，支持多行 */
.meta-note-row { flex-direction: column; align-items: flex-start; gap: 4px; }
.meta-note-row .meta-label { flex-shrink: 0; }
.meta-note-row .meta-value { width: 100%; min-height: 20px; }
/* 电脑端：只显示右侧按钮组里的头像 */
.mobile-profile-entry { display: none !important; }

/* 移动端保持紧凑 */
@media (max-width: 768px) {
    .mobile-hide { display: none !important; }
    .top-bar {
        padding: 8px 12px;
        margin: 8px 10px 0;
        border-radius: 12px;
        gap: 4px;
        flex-wrap: wrap !important;
        top: 8px;
    }
    .top-bar-left { gap: 8px; flex: 1; min-width: 0; }
    .top-bar-right {
        flex-wrap: wrap;
        gap: 4px;
        flex: 1 1 100%;
        justify-content: flex-start;
        padding-top: 6px;
        border-top: 1px solid rgba(255,255,255,0.3);
        margin-top: 4px;
    }
    .top-bar-right .btn-ghost {
        padding: 6px 4px !important;
        font-size: 11px !important;
        flex: 1 !important;
        min-width: 0 !important;
        text-align: center;
        white-space: nowrap;
        line-height: 1.2;
        overflow: visible !important;
        box-sizing: border-box;
    }
    #uploadBtn, #folderUploadBtn { flex: 1 !important; }
    .search-bar {
        margin: 8px 10px 0 !important;
        padding: 12px !important;
        border-radius: 12px !important;
    }
    .ai-switch-wrap {
        flex: 1 1 100% !important;
        order: -1;
        justify-content: center;
        padding: 4px 8px !important;
    }
    .ai-switch-label { font-size: 11px; }
    .logo-main { font-size: 20px; }
    .logo-sub { font-size: 10px; }
    /* 手机端：头像绝对定位到顶部导航栏右上角，不影响原有布局 */
    .mobile-profile-entry {
        position: absolute !important;
        right: 12px;
        top: 9px;
        display: inline-flex !important;
        height: 34px;
        padding: 3px 10px 3px 3px;
        border-radius: 12px;
        gap: 6px;
        z-index: 10;
    }
    .mobile-profile-entry .user-info { font-size: 11px; max-width: 60px; }
    .mobile-profile-entry .top-avatar { width: 26px; height: 26px; }
    .desktop-profile-entry { display: none !important; }
    .top-bar-right .btn-ghost::after { display: none; }

    /* 右侧按钮组一个可见操作都没有时整行收起，"汇象"区高度跟着自适应 */
    .top-bar-right.no-actions { display: none !important; }

    /* 手机筛选行：两行网格（日期行 40/60，按钮行三等分），避免所有控件挤成一行 */
    .filter-bar {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 8px;
    }
    .filter-bar .date-filter-wrap { grid-row: 1; grid-column: 1 / span 2; width: auto; }
    .filter-bar .date-quick {
        grid-row: 1;
        grid-column: 3 / span 4;
        width: auto;
        flex: none;
        min-width: 0;
    }
    .filter-bar .mobile-filter-btn,
    .filter-bar .btn-ghost#resetFilterBtn {
        grid-row: 2;
        grid-column: span 2;
        width: auto;
        min-width: 0;
        flex: none;
        padding: 0 6px;
        height: 40px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 移动端顶栏常驻：已取消滚动折叠动画 */
}

/* ============================================================
   固定布局：整页不滚动，只有内容区滚动
   ============================================================ */
.fixed-layout {
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}
.fixed-layout .top-bar {
    flex-shrink: 0;
    position: relative;
}
.fixed-layout .search-bar {
    flex-shrink: 0;
}
.fixed-layout .upload-progress {
    flex-shrink: 0;
}
.fixed-layout .gallery {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.fixed-layout .empty-tip {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}
.fixed-layout .bottom-nav {
    flex-shrink: 0;
}
/* 聊天界面 */
.fixed-layout .chat-main {
    flex: 1;
    min-height: 0;
    height: auto;
    overflow: hidden;
    display: flex;
}
.fixed-layout .chat-sidebar {
    height: 100%;
    min-height: 0;
}
.fixed-layout .chat-window {
    height: 100%;
    min-height: 0;
}
/* 手机端输入法弹出时聊天框自适应 */
@media (max-width: 768px) {
    .fixed-layout {
        height: 100dvh;
    }
    .fixed-layout .gallery {
        -webkit-overflow-scrolling: touch;
    }
    .fixed-layout .chat-main {
        height: auto;
        flex: 1;
        min-height: 0;
    }
}

/* ===== 手机端适配：关注系统新增组件 ===== */
@media (max-width: 768px) {
    /* 详情弹窗上传者卡片：收紧尺寸防止挤压 */
    .owner-card {
        gap: 10px;
        padding: 8px 10px;
        margin-bottom: 10px;
    }
    .owner-avatar { width: 34px; height: 34px; }
    .owner-nickname { font-size: 14px; }
    .owner-hint { font-size: 11px; }
    /* 关注按钮：加大触摸目标，保证手指可点 */
    .owner-follow-btn {
        padding: 6px 16px;
        min-height: 36px;
        min-width: 64px;
        font-size: 14px;
        border-radius: 18px;
        box-sizing: border-box;
    }
    /* 主界面头像入口红点：缩小避免遮挡昵称 */
    .profile-entry-badge {
        min-width: 16px;
        height: 16px;
        line-height: 16px;
        font-size: 10px;
        top: -4px;
        right: -4px;
    }
    /* 关注筛选弹窗：列表项头像略小，按钮全宽触摸 */
    .follow-picker-avatar { width: 32px; height: 32px; }
    .follow-picker-name { font-size: 13px; }
    .follow-picker-code { font-size: 11px; }
    .follow-picker-actions .btn-ghost,
    .follow-picker-actions .btn-primary {
        min-height: 42px;
        font-size: 15px;
    }
    /* 筛选栏按钮：文字不折行，超出省略号 */
    .filter-bar .btn-ghost {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 8px 6px;
    }
}

/* ===== 访客模式：登录 / 注册弹窗（毛玻璃遮罩，背景变暗） ===== */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 3200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.45);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    backdrop-filter: blur(10px) saturate(120%);
}
.auth-modal-overlay.show { display: flex; }
.auth-modal-card {
    position: relative;
    width: 100%;
    max-width: 380px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 26px 24px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
    animation: authCardIn 0.22s ease-out;
}
@keyframes authCardIn {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to { opacity: 1; transform: none; }
}
.auth-modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #8e8e93;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
}@media (hover: hover) {

.auth-modal-close:hover { background: rgba(0, 0, 0, 0.06); color: #333; }
}
.auth-modal-hint {
    text-align: center;
    font-size: 12px;
    color: #8e8e93;
    margin: -8px 0 14px;
}
.auth-modal-card .auth-title-wrap { margin-bottom: 12px; }
.auth-modal-card .auth-tabs { margin-bottom: 18px; }
.auth-modal-card .auth-title-main { font-size: 22px; }
.auth-modal-card .auth-title-sub { font-size: 12px; }
body[data-theme="dark"] .auth-modal-card {
    background: rgba(28, 28, 30, 0.92);
    border-color: rgba(255, 255, 255, 0.14);
}
body[data-theme="dark"] .auth-modal-card .form-group label { color: #d1d1d6; }
body[data-theme="dark"] .auth-modal-card .form-group input {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}
body[data-theme="dark"] .auth-modal-card .auth-tabs { border-bottom-color: rgba(255, 255, 255, 0.12); }
body[data-theme="dark"] .auth-modal-card .tab-btn { color: #8e8e93; }
body[data-theme="dark"] .auth-modal-hint { color: #8e8e93; }
body[data-theme="dark"] .auth-modal-card .auth-title-main,
body[data-theme="dark"] .auth-modal-card .auth-title-sub { color: #fff; }

@media (max-width: 768px) {
    .auth-modal-card { max-width: 100%; padding: 22px 18px 16px; }
    .auth-modal-card .form-group input { font-size: 16px; }
    /* 访客态手机端：顶部按钮组整体隐藏，只留 LOGO + 右上角"登录/注册"；
       上传入口统一走右下角浮动按钮（点击弹登录窗），避免出现孤零零的"上传多张" */
    body.guest-mode .top-bar-right { display: none !important; }
    body.guest-mode .top-bar { padding: 8px 12px; }
    /* 访客态弹窗在小屏更贴边，避免圆角被裁 */
    .auth-modal-overlay { padding: 12px; }
    .auth-modal-card { border-radius: 14px; }
    /* 图库底部留出浮动按钮/底部导航的高度，最后一行不被遮住 */
    .gallery { padding-bottom: 88px; }
}

/* ===== 电脑端「上传多张」上传选择菜单 ===== */
.desk-upload-menu {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.desk-upload-menu.show { display: flex; }
.desk-upload-mask {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}
.desk-upload-card {
    position: relative;
    width: 380px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    animation: deskMenuIn 0.18s ease;
}
@keyframes deskMenuIn {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: none; }
}
.desk-upload-title {
    text-align: center;
    font-size: 14px;
    color: #8e8e93;
    margin-bottom: 12px;
}
body[data-theme="dark"] .desk-upload-card { background: #1c1c1e; }
body[data-theme="dark"] .desk-upload-card .mobile-upload-option { background: rgba(255,255,255,0.10); color: #fff; }
body[data-theme="dark"] .desk-upload-card .mobile-upload-cancel { background: transparent; }

/* 桌面菜单仅由顶栏「上传多张」触发，手机端该按钮隐藏，故无需按屏宽禁用 */

/* ===== 电脑端液态玻璃弹窗（Liquid Glass）=====
   仅桌面生效：手机端预览弹窗走全屏沉浸式抽屉，不受影响 */
@media (min-width: 769px) {
    /* 遮罩：加深并轻模糊，玻璃层才有"底下有东西"的质感 */
    .modal-overlay {
        background: rgba(10, 12, 18, 0.46);
        -webkit-backdrop-filter: blur(14px) saturate(120%);
        backdrop-filter: blur(14px) saturate(120%);
    }

    /* 通用弹窗卡片：半透明玻璃 + 顶部高光 + 内描边 */
    .modal-content {
        background: linear-gradient(150deg,
            rgba(255,255,255,0.88) 0%,
            rgba(255,255,255,0.74) 52%,
            rgba(243,246,252,0.78) 100%);
        -webkit-backdrop-filter: blur(34px) saturate(190%);
        backdrop-filter: blur(34px) saturate(190%);
        border: 1px solid rgba(255,255,255,0.62);
        border-radius: 18px;
        box-shadow:
            0 30px 80px rgba(0,0,0,0.34),
            0 2px 10px rgba(0,0,0,0.10),
            inset 0 1px 0 rgba(255,255,255,0.96),
            inset 0 -1px 0 rgba(255,255,255,0.42);
    }

    /* 预览弹窗：图片区保持深色，卡片本身透明，玻璃只做在右侧信息栏 */
    #previewModal .modal-content {
        background: transparent;
        border: none;
        box-shadow: 0 40px 110px rgba(0,0,0,0.45);
    }
    #previewModal .modal-info {
        background: linear-gradient(160deg,
            rgba(255,255,255,0.92) 0%,
            rgba(255,255,255,0.82) 60%,
            rgba(246,248,253,0.86) 100%);
        -webkit-backdrop-filter: blur(30px) saturate(185%);
        backdrop-filter: blur(30px) saturate(185%);
        border-left: 1px solid rgba(255,255,255,0.55);
        color: #14161a;
    }

    /* 可读性：文字加深、输入框给独立浅底，避免和背景混在一起 */
    .modal-content h2,
    #previewModal .modal-info h2 { color: #101216; }
    .meta-label { color: #5c5f67; }
    .meta-value, .meta-value * { color: #14161a; }
    #previewModal .modal-info .stats-bar { color: #30333a; }
    #previewModal .modal-info .owner-nickname { color: #14161a; }
    .modal-content input,
    .modal-content select,
    .modal-content textarea,
    #previewModal .modal-info input,
    #previewModal .modal-info select,
    #previewModal .modal-info textarea {
        background: rgba(255,255,255,0.82);
        border-color: rgba(0,0,0,0.10);
        color: #14161a;
    }

    /* 登录弹窗、桌面上传菜单同步成同一套玻璃质感 */
    .auth-modal-card,
    .desk-upload-card {
        background: linear-gradient(150deg,
            rgba(255,255,255,0.90) 0%,
            rgba(255,255,255,0.76) 55%,
            rgba(244,247,252,0.80) 100%);
        -webkit-backdrop-filter: blur(32px) saturate(190%);
        backdrop-filter: blur(32px) saturate(190%);
        border: 1px solid rgba(255,255,255,0.60);
        box-shadow:
            0 28px 76px rgba(0,0,0,0.32),
            inset 0 1px 0 rgba(255,255,255,0.95);
    }

    /* 深色主题同步 */
    body[data-theme="dark"] .modal-content {
        background: linear-gradient(150deg,
            rgba(40,42,48,0.90) 0%,
            rgba(26,27,31,0.82) 100%);
        border-color: rgba(255,255,255,0.16);
        color: #f2f3f6;
    }
    body[data-theme="dark"] #previewModal .modal-content {
        background: transparent;
        border: none;
    }
    body[data-theme="dark"] #previewModal .modal-info {
        background: linear-gradient(160deg,
            rgba(42,44,50,0.92) 0%,
            rgba(26,27,31,0.88) 100%);
        border-left-color: rgba(255,255,255,0.14);
        color: #f2f3f6;
    }
    body[data-theme="dark"] .desk-upload-card {
        background: linear-gradient(150deg,
            rgba(42,44,50,0.92) 0%,
            rgba(26,27,31,0.86) 100%);
        border-color: rgba(255,255,255,0.16);
    }
    body[data-theme="dark"] .modal-content h2,
    body[data-theme="dark"] #previewModal .modal-info h2,
    body[data-theme="dark"] #previewModal .modal-info .owner-nickname,
    body[data-theme="dark"] .meta-value,
    body[data-theme="dark"] .meta-value * { color: #f4f5f8; }
    body[data-theme="dark"] .meta-label { color: #a7aab3; }
    body[data-theme="dark"] #previewModal .modal-info .stats-bar { color: #d6d8dd; }
    body[data-theme="dark"] .modal-content input,
    body[data-theme="dark"] .modal-content select,
    body[data-theme="dark"] .modal-content textarea {
        background: rgba(255,255,255,0.08);
        border-color: rgba(255,255,255,0.18);
        color: #f4f5f8;
    }
}

/* 液态玻璃：弹窗内部小卡片同步半透明，避免玻璃上贴纯白块；次要文字再加深一档 */
@media (min-width: 769px) {
    #previewModal .modal-info .stats-bar,
    #previewModal .modal-info .owner-card {
        background: rgba(255, 255, 255, 0.62);
        border: 1px solid rgba(255, 255, 255, 0.70);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }
    #previewModal .modal-info .stats-bar { box-shadow: inset 0 1px 0 rgba(255,255,255,0.5); }
    .meta-label { color: #4c4f57; }
    #previewModal .modal-info .follow-picker-code { color: #6b6e76; }

    body[data-theme="dark"] #previewModal .modal-info .stats-bar,
    body[data-theme="dark"] #previewModal .modal-info .owner-card {
        background: rgba(255, 255, 255, 0.10);
        border-color: rgba(255, 255, 255, 0.16);
    }
    body[data-theme="dark"] .meta-label { color: #b0b3bb; }
}

/* 液态玻璃：整体提高约 30% 通透度（白度相对下调），同时加大模糊保证文字清晰 */
@media (min-width: 769px) {
    .modal-overlay {
        background: rgba(10, 12, 18, 0.36);
        -webkit-backdrop-filter: blur(18px) saturate(125%);
        backdrop-filter: blur(18px) saturate(125%);
    }
    .modal-content {
        background: linear-gradient(150deg,
            rgba(255,255,255,0.62) 0%,
            rgba(255,255,255,0.52) 52%,
            rgba(243,246,252,0.55) 100%);
        -webkit-backdrop-filter: blur(40px) saturate(200%);
        backdrop-filter: blur(40px) saturate(200%);
        border-color: rgba(255,255,255,0.52);
    }
    #previewModal .modal-info {
        background: linear-gradient(160deg,
            rgba(255,255,255,0.64) 0%,
            rgba(255,255,255,0.57) 60%,
            rgba(246,248,253,0.60) 100%);
        -webkit-backdrop-filter: blur(38px) saturate(195%);
        backdrop-filter: blur(38px) saturate(195%);
        border-left-color: rgba(255,255,255,0.48);
    }
    #previewModal .modal-info .stats-bar,
    #previewModal .modal-info .owner-card {
        background: rgba(255, 255, 255, 0.43);
        border-color: rgba(255, 255, 255, 0.58);
    }
    .auth-modal-card,
    .desk-upload-card {
        background: linear-gradient(150deg,
            rgba(255,255,255,0.63) 0%,
            rgba(255,255,255,0.53) 55%,
            rgba(244,247,252,0.56) 100%);
        -webkit-backdrop-filter: blur(38px) saturate(195%);
        backdrop-filter: blur(38px) saturate(195%);
        border-color: rgba(255,255,255,0.52);
    }
    .meta-label { color: #45484f; }

    body[data-theme="dark"] .modal-content {
        background: linear-gradient(150deg,
            rgba(40,42,48,0.63) 0%,
            rgba(26,27,31,0.57) 100%);
    }
    body[data-theme="dark"] #previewModal .modal-info {
        background: linear-gradient(160deg,
            rgba(42,44,50,0.66) 0%,
            rgba(26,27,31,0.60) 100%);
    }
    body[data-theme="dark"] .desk-upload-card {
        background: linear-gradient(150deg,
            rgba(42,44,50,0.66) 0%,
            rgba(26,27,31,0.60) 100%);
    }
    body[data-theme="dark"] #previewModal .modal-info .stats-bar,
    body[data-theme="dark"] #previewModal .modal-info .owner-card {
        background: rgba(255, 255, 255, 0.07);
    }
}

/* 缩略图加载失败占位：仅在自动重试两次后仍失败时出现，避免卡片空白像"图没了" */
.gallery-item .thumb-wrap.thumb-load-failed::after,
.video-card-item .thumb-wrap.thumb-load-failed::after {
    content: "图片加载失败";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f2f3f5;
    color: #8a8d94;
    font-size: 13px;
    letter-spacing: .5px;
    z-index: 2;
}
.gallery-item .thumb-wrap img.load-failed,
.video-card-item .thumb-wrap img.load-failed {
    visibility: hidden;
}

/* ===== 双端液态玻璃（iOS Liquid Glass）：按钮 + 图片卡片 =====
   质感要点：半透明材质 + 顶部一道亮高光 + 底部更弱的一道反光，克制的柔和外阴影 */
.btn-primary, .btn-ghost, .btn-danger, .top-nav-btn, .date-quick-btn,
.mobile-filter-btn, .mobile-upload-option, .mobile-upload-cancel,
.like-btn, .owner-follow-btn, .copy-sku-btn, .queue-clear-btn, .queue-close-btn {
    position: relative;
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.92),
        inset 0 -1px 0 rgba(255,255,255,0.34),
        0 2px 8px rgba(16,18,24,0.07);
}

/* 浅色玻璃按钮（次要操作） */
.btn-ghost, .top-nav-btn, .date-quick-btn, .mobile-filter-btn,
.mobile-upload-option, .mobile-upload-cancel, .copy-sku-btn,
.queue-clear-btn, .queue-close-btn {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.88) 0%,
        rgba(255,255,255,0.62) 48%,
        rgba(246,248,252,0.72) 100%);
    border: 1px solid rgba(255,255,255,0.68);
    color: #14161a;
}

/* 主操作按钮：保留品牌蓝，只叠上下反光做出玻璃厚度 */
.btn-primary {
    background: linear-gradient(180deg, #4aa1ff 0%, #0a84ff 46%, #0068d9 100%);
    border: 1px solid rgba(255,255,255,0.26);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.50),
        inset 0 -1px 0 rgba(255,255,255,0.16),
        0 3px 10px rgba(0,110,230,0.24);
}@media (hover: hover) {

.btn-primary:hover { background: linear-gradient(180deg, #3f97ff 0%, #0075ec 46%, #005fc7 100%); }
}

/* 危险操作按钮 */
.btn-danger {
    background: linear-gradient(180deg, #ff5f57 0%, #ff3b30 46%, #e02b21 100%);
    border: 1px solid rgba(255,255,255,0.24);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.42),
        inset 0 -1px 0 rgba(255,255,255,0.14),
        0 3px 10px rgba(214,32,24,0.22);
}

/* 点赞、关注、图标类小按钮 */
.like-btn, .owner-follow-btn {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.90) 0%,
        rgba(255,255,255,0.66) 52%,
        rgba(244,247,252,0.74) 100%);
    border: 1px solid rgba(255,255,255,0.66);
}
.owner-follow-btn:not(.followed) {
    background: linear-gradient(180deg, #4aa1ff 0%, #0a84ff 46%, #0068d9 100%);
    border-color: rgba(255,255,255,0.26);
}

/* 图片卡片：半透明白玻璃 + 上下各一道静态反光（不做 backdrop-filter，避免上百张卡拖慢滚动） */
.gallery-item {
    position: relative;
    background: linear-gradient(180deg,
        rgba(255,255,255,0.97) 0%,
        rgba(255,255,255,0.91) 58%,
        rgba(250,252,255,0.94) 100%);
    border: 1px solid rgba(255,255,255,0.72);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.95),
        inset 0 -1px 0 rgba(255,255,255,0.42),
        0 5px 16px rgba(16,18,24,0.08);
}
.gallery-item::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.92),
        inset 0 -1px 0 rgba(255,255,255,0.38);
}@media (hover: hover) {

.gallery-item:hover {
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.96),
        inset 0 -1px 0 rgba(255,255,255,0.44),
        0 10px 26px rgba(16,18,24,0.12);
}
}

/* 深色主题：同一套反光逻辑，材质换成深玻璃 */
body[data-theme="dark"] .btn-ghost,
body[data-theme="dark"] .top-nav-btn,
body[data-theme="dark"] .date-quick-btn,
body[data-theme="dark"] .mobile-filter-btn,
body[data-theme="dark"] .mobile-upload-option,
body[data-theme="dark"] .mobile-upload-cancel,
body[data-theme="dark"] .copy-sku-btn,
body[data-theme="dark"] .queue-clear-btn,
body[data-theme="dark"] .queue-close-btn,
body[data-theme="dark"] .like-btn {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.14) 0%,
        rgba(255,255,255,0.07) 52%,
        rgba(255,255,255,0.10) 100%);
    border-color: rgba(255,255,255,0.18);
    color: #f2f3f6;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.28),
        inset 0 -1px 0 rgba(255,255,255,0.10),
        0 2px 8px rgba(0,0,0,0.30);
}
body[data-theme="dark"] .gallery-item {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.09) 0%,
        rgba(255,255,255,0.05) 58%,
        rgba(255,255,255,0.07) 100%);
    border-color: rgba(255,255,255,0.14);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.22),
        inset 0 -1px 0 rgba(255,255,255,0.08),
        0 5px 16px rgba(0,0,0,0.34);
}

/* 手机底栏"+"号：只叠上下反光，保留主题色渐变 */
.nav-upload .nav-plus {
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.52),
        inset 0 -1px 0 rgba(255,255,255,0.16),
        0 4px 12px rgba(16,18,24,0.22);
}

/* ===== v36.1 修正 =====
   ① 上下反光改为「中间最亮、向两端逐渐淡出」的横向渐变（更接近 iOS 液态玻璃边缘光）
   ② 卡片底部信息栏改成玻璃（与电脑端弹窗信息面板同一材质）
   ③ 搜索按钮由蓝色改为统一的白玻璃 */

/* --- ① 按钮：去掉整条均匀的内阴影，改由伪元素画一条中间亮两端消失的线 --- */
.btn-primary, .btn-ghost, .btn-danger, .top-nav-btn, .date-quick-btn,
.mobile-filter-btn, .mobile-upload-option, .mobile-upload-cancel,
.like-btn, .owner-follow-btn, .copy-sku-btn, .queue-clear-btn, .queue-close-btn {
    box-shadow: 0 2px 8px rgba(16,18,24,0.07);
}
.btn-primary { box-shadow: 0 3px 10px rgba(0,110,230,0.20); }
.btn-danger { box-shadow: 0 3px 10px rgba(214,32,24,0.18); }

.btn-primary::before, .btn-ghost::before, .btn-danger::before, .top-nav-btn::before,
.date-quick-btn::before, .mobile-filter-btn::before, .mobile-upload-option::before,
.mobile-upload-cancel::before, .like-btn::before, .owner-follow-btn::before,
.copy-sku-btn::before, .queue-clear-btn::before, .queue-close-btn::before {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    border-radius: inherit;
    pointer-events: none;
    background-image:
        linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.42) 18%, rgba(255,255,255,0.92) 50%, rgba(255,255,255,0.42) 82%, rgba(255,255,255,0) 100%),
        linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.14) 20%, rgba(255,255,255,0.32) 50%, rgba(255,255,255,0.14) 80%, rgba(255,255,255,0) 100%);
    background-size: 100% 1px, 100% 1px;
    background-position: 0 0, 0 100%;
    background-repeat: no-repeat;
}

/* --- ③ 搜索按钮：统一白玻璃（与筛选按钮同一材质） --- */
#searchBtn {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.90) 0%,
        rgba(255,255,255,0.64) 48%,
        rgba(246,248,252,0.74) 100%);
    border: 1px solid rgba(255,255,255,0.68);
    color: #14161a;
    box-shadow: 0 2px 8px rgba(16,18,24,0.07);
}@media (hover: hover) {

#searchBtn:hover {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.94) 0%,
        rgba(255,255,255,0.70) 48%,
        rgba(248,250,253,0.80) 100%);
}
}
body[data-theme="dark"] #searchBtn {
    background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.07) 52%, rgba(255,255,255,0.10) 100%);
    border-color: rgba(255,255,255,0.18);
    color: #f2f3f6;
}

/* --- ② 卡片：底部信息栏玻璃 + 卡片反光改为横渐变 --- */
.gallery-item {
    box-shadow: 0 5px 16px rgba(16,18,24,0.08);
}
.gallery-item::after {
    background-image:
        linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.45) 18%, rgba(255,255,255,0.96) 50%, rgba(255,255,255,0.45) 82%, rgba(255,255,255,0) 100%),
        linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.16) 20%, rgba(255,255,255,0.36) 50%, rgba(255,255,255,0.16) 80%, rgba(255,255,255,0) 100%);
    background-size: 100% 1px, 100% 1px;
    background-position: 0 0, 0 100%;
    background-repeat: no-repeat;
    box-shadow: none;
}
.gallery-item .item-info {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.80) 0%,
        rgba(255,255,255,0.66) 52%,
        rgba(250,252,255,0.70) 100%);
    border-top: 1px solid rgba(255,255,255,0.58);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.90);
}
body[data-theme="dark"] .gallery-item .item-info {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.11) 0%,
        rgba(255,255,255,0.06) 52%,
        rgba(255,255,255,0.09) 100%);
    border-top-color: rgba(255,255,255,0.16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.20);
}

/* 卡片玻璃略微透出背景，让上下反光线真的看得见（仍保持克制） */
.gallery-item {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.94) 0%,
        rgba(255,255,255,0.86) 58%,
        rgba(250,252,255,0.90) 100%);
}
.gallery-item .item-info {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.76) 0%,
        rgba(255,255,255,0.60) 52%,
        rgba(250,252,255,0.66) 100%);
}

/* 卡片信息条玻璃加强：更透（透出页面灰调形成分层）+ 顶部高光边 + 内侧柔光 + 底部弱反光 */
.gallery-item .item-info {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.72) 0%,
        rgba(255,255,255,0.44) 54%,
        rgba(250,252,255,0.56) 100%);
    border-top: 1px solid rgba(255,255,255,0.88);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.96),
        inset 0 7px 12px -9px rgba(255,255,255,0.92),
        inset 0 -1px 0 rgba(255,255,255,0.30),
        0 -1px 6px rgba(16,18,24,0.05);
}
body[data-theme="dark"] .gallery-item .item-info {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.18) 0%,
        rgba(255,255,255,0.08) 54%,
        rgba(255,255,255,0.12) 100%);
    border-top-color: rgba(255,255,255,0.26);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.30),
        inset 0 7px 12px -9px rgba(255,255,255,0.22),
        inset 0 -1px 0 rgba(255,255,255,0.10),
        0 -1px 6px rgba(0,0,0,0.20);
}

/* 卡片信息条玻璃再加厚：更透 + 背景轻模糊 + 更强的内侧柔光 */
.gallery-item .item-info {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.62) 0%,
        rgba(255,255,255,0.32) 55%,
        rgba(248,251,255,0.46) 100%);
    border-top: 1px solid rgba(255,255,255,0.92);
    -webkit-backdrop-filter: blur(10px) saturate(170%);
    backdrop-filter: blur(10px) saturate(170%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.98),
        inset 0 9px 14px -10px rgba(255,255,255,0.95),
        inset 0 -1px 0 rgba(255,255,255,0.28),
        0 -1px 8px rgba(16,18,24,0.06);
}
body[data-theme="dark"] .gallery-item .item-info {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.16) 0%,
        rgba(255,255,255,0.06) 55%,
        rgba(255,255,255,0.11) 100%);
    border-top-color: rgba(255,255,255,0.28);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.32),
        inset 0 9px 14px -10px rgba(255,255,255,0.24),
        inset 0 -1px 0 rgba(255,255,255,0.10),
        0 -1px 8px rgba(0,0,0,0.24);
}

/* 下载 / 删除 / 关注 三个按钮统一改成白玻璃 */
#downloadBtn, #videoDownloadBtn,
#deleteBtn, #videoDeleteBtn,
.owner-follow-btn {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.90) 0%,
        rgba(255,255,255,0.64) 48%,
        rgba(246,248,252,0.74) 100%);
    border: 1px solid rgba(255,255,255,0.70);
    box-shadow: 0 2px 8px rgba(16,18,24,0.07);
}
#downloadBtn, #videoDownloadBtn,
.owner-follow-btn:not(.followed) {
    color: #14161a;
}
/* 删除保留红色语义，只把底色改白 */
#deleteBtn, #videoDeleteBtn {
    color: #ff3b30;
}@media (hover: hover) {

#deleteBtn:hover, #videoDeleteBtn:hover {
    background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(255,255,255,0.74) 48%, rgba(255,246,246,0.82) 100%);
    color: #e02b21;
}
}
/* 已关注状态：白玻璃 + 灰字，和未关注区分 */
.owner-follow-btn.followed {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.88) 0%,
        rgba(255,255,255,0.60) 48%,
        rgba(246,248,252,0.72) 100%);
    border-color: rgba(255,255,255,0.66);
    color: #6b6f76;
}@media (hover: hover) {

#downloadBtn:hover, #videoDownloadBtn:hover {
    background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.72) 48%, rgba(248,250,253,0.82) 100%);
}
}

body[data-theme="dark"] #downloadBtn,
body[data-theme="dark"] #videoDownloadBtn,
body[data-theme="dark"] #deleteBtn,
body[data-theme="dark"] #videoDeleteBtn,
body[data-theme="dark"] .owner-follow-btn {
    background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.07) 52%, rgba(255,255,255,0.10) 100%);
    border-color: rgba(255,255,255,0.18);
    color: #f2f3f6;
}
body[data-theme="dark"] #deleteBtn,
body[data-theme="dark"] #videoDeleteBtn {
    color: #ff6961;
}

/* 未关注态也要白玻璃（覆盖此前蓝色渐变，权重相同且顺序在后） */
.owner-follow-btn:not(.followed) {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.90) 0%,
        rgba(255,255,255,0.64) 48%,
        rgba(246,248,252,0.74) 100%);
    border-color: rgba(255,255,255,0.70);
    color: #14161a;
}
body[data-theme="dark"] .owner-follow-btn:not(.followed) {
    background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.07) 52%, rgba(255,255,255,0.10) 100%);
    border-color: rgba(255,255,255,0.18);
    color: #f2f3f6;
}

/* 主操作按钮全部统一白玻璃：下载图片 / 保存 / 开始上传 / 评论发送 / 关注 / 删除 */
.btn-primary {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.90) 0%,
        rgba(255,255,255,0.64) 48%,
        rgba(246,248,252,0.74) 100%);
    border: 1px solid rgba(255,255,255,0.68);
    color: #14161a;
    box-shadow: 0 2px 8px rgba(16,18,24,0.07);
}@media (hover: hover) {

.btn-primary:hover {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.94) 0%,
        rgba(255,255,255,0.70) 48%,
        rgba(248,250,253,0.80) 100%);
    color: #14161a;
}
}

/* 删除：白玻璃底，文字保留红色语义，hover 略泛暖红 */
.btn-danger {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.90) 0%,
        rgba(255,255,255,0.64) 48%,
        rgba(252,249,249,0.74) 100%);
    border: 1px solid rgba(255,255,255,0.68);
    color: #d70015;
    box-shadow: 0 2px 8px rgba(16,18,24,0.07);
}@media (hover: hover) {

.btn-danger:hover {
    background: linear-gradient(180deg,
        rgba(255,251,250,0.96) 0%,
        rgba(255,236,234,0.88) 100%);
    border-color: rgba(255,196,190,0.90);
    color: #b8000f;
}
}

/* 关注：白玻璃底，未关注用蓝色文字区分状态 */
.owner-follow-btn:not(.followed) {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.90) 0%,
        rgba(255,255,255,0.64) 48%,
        rgba(246,248,252,0.74) 100%);
    border: 1px solid rgba(255,255,255,0.68);
    color: #007aff;
    box-shadow: 0 2px 8px rgba(16,18,24,0.07);
}@media (hover: hover) {

.owner-follow-btn:not(.followed):hover {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.94) 0%,
        rgba(255,255,255,0.70) 100%);
}
}
.owner-follow-btn.followed {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.64) 0%,
        rgba(255,255,255,0.44) 100%);
    border: 1px solid rgba(255,255,255,0.58);
    color: #8e8e93;
    box-shadow: 0 1px 4px rgba(16,18,24,0.05);
}

/* 深色主题 */
body[data-theme="dark"] .btn-primary {
    background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.07) 52%, rgba(255,255,255,0.10) 100%);
    border-color: rgba(255,255,255,0.18);
    color: #f2f3f6;
}
body[data-theme="dark"] .btn-danger {
    background: linear-gradient(180deg, rgba(255,255,255,0.13) 0%, rgba(255,255,255,0.06) 52%, rgba(255,255,255,0.10) 100%);
    border-color: rgba(255,255,255,0.18);
    color: #ff6b60;
}
body[data-theme="dark"] .owner-follow-btn:not(.followed) {
    background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.07) 52%, rgba(255,255,255,0.10) 100%);
    border-color: rgba(255,255,255,0.18);
    color: #6cb6ff;
}

/* 删除按钮：默认与其余按钮同一套深色文字（不再跳红），仅悬停时略泛暖红提示 */
.btn-danger,
#deleteBtn,
#videoDeleteBtn {
    color: #14161a;
}@media (hover: hover) {

.btn-danger:hover,
#deleteBtn:hover,
#videoDeleteBtn:hover {
    color: #b8000f;
    background: linear-gradient(180deg,
        rgba(255,251,250,0.96) 0%,
        rgba(255,236,234,0.88) 100%);
    border-color: rgba(255,196,190,0.90);
}
}
body[data-theme="dark"] .btn-danger,
body[data-theme="dark"] #deleteBtn,
body[data-theme="dark"] #videoDeleteBtn {
    color: #f2f3f6;
}@media (hover: hover) {

body[data-theme="dark"] .btn-danger:hover,
body[data-theme="dark"] #deleteBtn:hover,
body[data-theme="dark"] #videoDeleteBtn:hover {
    color: #ff8a80;
}
}

/* 账号管理按钮：红字改成与旁边 SKU管理 一致的常规文字色，悬停改为淡蓝提示 */
#adminBtn.top-nav-btn {
    color: #14161a !important;
}@media (hover: hover) {

#adminBtn.top-nav-btn:hover {
    color: #007aff !important;
    background: rgba(0,122,255,0.08) !important;
}
}
body[data-theme="dark"] #adminBtn.top-nav-btn {
    color: #f2f3f6 !important;
}

/* 账号管理按钮：颜色与旁边 SKU管理 完全一致（rgb 142,142,147） */
#adminBtn.top-nav-btn {
    color: #8e8e93 !important;
}

/* ============================================================
   黑色主题：按钮去掉边缘玻璃反光
   只移除 inset 白色高光边（原来模拟玻璃厚度的那道亮边）与 hover 白色扫光，
   外部投影与底色保持不变，避免按钮失去层次
   ============================================================ */

/* 彩色按钮：保留原有彩色投影，去掉内高光 */
body[data-theme="dark"] .btn-primary {
    box-shadow: 0 4px 14px rgba(0,122,255,0.28) !important;
}
body[data-theme="dark"] .btn-primary:hover {
    box-shadow: 0 4px 18px rgba(0,122,255,0.35) !important;
}
body[data-theme="dark"] #uploadBtn {
    box-shadow: 0 2px 10px rgba(52,199,89,0.25) !important;
}
body[data-theme="dark"] #uploadBtn:hover {
    box-shadow: 0 4px 18px rgba(52,199,89,0.35) !important;
}
body[data-theme="dark"] #folderUploadBtn {
    box-shadow: 0 2px 10px rgba(255,149,0,0.25) !important;
}
body[data-theme="dark"] #folderUploadBtn:hover {
    box-shadow: 0 4px 18px rgba(255,149,10,0.35) !important;
}

/* 深玻璃按钮：保留深色投影，去掉内高光 */
body[data-theme="dark"] .btn-ghost {
    box-shadow: 0 2px 8px rgba(31,38,135,0.06) !important;
}
body[data-theme="dark"] .btn-ghost:hover {
    box-shadow: 0 3px 12px rgba(0,122,255,0.12) !important;
}
body[data-theme="dark"] .top-nav-btn,
body[data-theme="dark"] .date-quick-btn,
body[data-theme="dark"] .mobile-filter-btn,
body[data-theme="dark"] .mobile-upload-option,
body[data-theme="dark"] .mobile-upload-cancel,
body[data-theme="dark"] .copy-sku-btn,
body[data-theme="dark"] .queue-clear-btn,
body[data-theme="dark"] .queue-close-btn,
body[data-theme="dark"] .like-btn {
    box-shadow: 0 2px 8px rgba(0,0,0,0.30) !important;
}

/* hover 时的白色斜向光泽扫过一并关闭 */
body[data-theme="dark"] .btn-primary::after,
body[data-theme="dark"] .btn-ghost::after {
    display: none !important;
}

/* ============================================================
   黑色主题：文字与按钮可读性
   只调整深色底上对比不足的文字色与遮罩，不改整体配色体系
   ============================================================ */

/* 个人入口（头像 + 昵称 / 登录注册）：原来是浅白玻璃底配白字，实测只有 3:1 */
body[data-theme="dark"] .user-profile-entry {
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.16);
    box-shadow: none;
}
body[data-theme="dark"] .user-profile-entry:hover {
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.24);
    box-shadow: none;
}

/* 顶栏文字按钮：原来的 #98989d 在深底上偏灰，提亮一档，仍弱于纯白主文字 */
body[data-theme="dark"] .top-nav-btn {
    color: #c7c7cc !important;
}
body[data-theme="dark"] .top-nav-btn:hover {
    color: #ffffff !important;
}

/* 搜索框提示文字：由 0.4 提到 0.55，避免看起来像禁用态 */
body[data-theme="dark"] .search-input-wrap input::placeholder {
    color: rgba(255,255,255,0.55);
}

/* 品牌副标题、底部导航高亮：10px 的蓝色在小字号下发闷，提亮一档 */
body[data-theme="dark"] .logo-sub { color: #5aa9ff; }
body[data-theme="dark"] .bottom-nav-item.active { color: #5aa9ff; }

/* 卡片类别角标：遮罩 0.5 → 0.62，白字在明亮图片上也能读清 */
body[data-theme="dark"] .gallery-item .cat-badge { background: rgba(0,0,0,0.62); }

/* 卡片次要统计（点赞 / 评论数）：略提亮 */
body[data-theme="dark"] .item-stats { color: #a8a8ad; }

/* 备案信息：页面底部公开展示（工信部要求），链接到工信部备案系统。
   移动端底部导航是 fixed，这里留出空间避免被遮挡。 */
.site-beian {
    text-align: center;
    padding: 22px 16px 26px;
    font-size: 12px;
    line-height: 1.8;
    letter-spacing: 0.2px;
    color: #6e6e73;
}
.site-beian a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}
@media (hover: hover) {
    .site-beian a:hover { color: #007aff; }
}
body[data-theme="dark"] .site-beian { color: #a1a1a6; }
@media (hover: hover) {
    body[data-theme="dark"] .site-beian a:hover { color: #5aa9ff; }
}
@media (max-width: 768px) {
    .site-beian { padding-bottom: 84px; }
}
/* 登录页 / 分享页的 body 是 flex 居中容器，页脚不能当 flex 子项参与排布，
   改为绝对定位贴底，避免被挤出可视区或压缩主卡片。 */
.auth-body,
.share-body { position: relative; }
.auth-body > .site-beian,
.share-body > .site-beian {
    position: absolute;
    left: 0; right: 0; bottom: 14px;
    padding: 0 16px;
    z-index: 1;
}
/* 登录页底部是彩色渐变，灰字对比不足，改用半透明胶囊保证可读 */
.auth-body .site-beian a {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.26);
    color: #ffffff;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
@media (hover: hover) {
    .auth-body .site-beian a:hover {
        background: rgba(0, 0, 0, 0.4);
        color: #ffffff;
    }
}
/* 分享页是深色底，页脚固定用浅灰 */
.share-body .site-beian { color: #a1a1a6; }