/* 硬盘空间 - 现代蓝色主题 v3.1 */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --primary-bg: #eff6ff;
    --primary-hover: #2563eb;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --bg-hover: #f8fafc;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
    --radius: 8px;
    --radius-sm: 6px;
    --transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 24px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "微软雅黑", sans-serif;
    font-size: 14px;
    background: var(--bg-body);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.5;
}

/* 顶部标题栏 */
.header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: #fff;
    padding: 18px 28px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.3);
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

.header .subtitle {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.85;
    letter-spacing: 0;
}

/* 状态栏 */
.status-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 12px;
    box-shadow: var(--shadow-sm);
}

.status-bar .stat-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-bar .stat-item .val {
    color: var(--primary);
    font-weight: 600;
}

/* 主容器 */
.main-wrapper {
    display: flex;
    min-height: calc(100vh - 110px);
    padding: 12px;
    gap: 12px;
}

/* 左侧边栏 */
.sidebar {
    width: var(--sidebar-width, 220px);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.sidebar-section:hover {
    box-shadow: var(--shadow);
}

.sidebar-title {
    background: linear-gradient(135deg, var(--primary-bg) 0%, #f0f7ff 100%);
    padding: 10px 14px;
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-title .section-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--primary);
}

.sidebar-content {
    padding: 12px 14px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* 公告样式 */
.notice-content {
    line-height: 1.8;
    font-size: 13px;
    overflow-x: hidden;
    word-break: break-word;
}
.notice-content p { margin-bottom: 4px; }
.notice-content strong, .notice-content b { font-weight: 700; }
.notice-content img { max-width: 100%; height: auto; }
.notice-content * { max-width: 100%; box-sizing: border-box; }

.notice-date {
    text-align: right;
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
}

/* 统计样式 */
.stats-content .stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
}

.stats-content .stat-row:last-child {
    border-bottom: none;
}

.stats-content .stat-row span:first-child {
    color: var(--text-secondary);
}

.stats-content .stat-row span:last-child {
    font-weight: 600;
    color: var(--text-primary);
}

.stats-content .online {
    color: var(--success) !important;
}

/* 空间进度条 */
.space-bar-wrap {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
}

.space-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.space-bar {
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
}

.space-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* 迷你文件列表 */
.file-list-mini {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-list-mini li {
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

.file-list-mini li:last-child {
    border-bottom: none;
}

.file-list-mini li::before {
    content: '›';
    color: var(--text-muted);
    font-size: 14px;
    flex-shrink: 0;
}

.file-list-mini a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    max-width: 100%;
    transition: var(--transition);
}

.file-list-mini a:hover {
    color: var(--primary);
}

.file-list-mini .count {
    color: var(--text-muted);
    font-size: 10px;
    flex-shrink: 0;
    margin-left: auto;
    background: var(--primary-bg);
    padding: 1px 6px;
    border-radius: 10px;
}

.empty-tip {
    text-align: center;
    color: var(--text-muted);
    padding: 15px 0;
    font-size: 12px;
}

/* 内容区 */
.content-area {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    font-size: 14px;
}

/* 内容头部 */
.content-header {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--primary-bg) 100%);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    flex-wrap: wrap;
}

.breadcrumb .sep {
    color: var(--text-muted);
    font-size: 12px;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    padding: 2px 6px;
    border-radius: 4px;
}

.breadcrumb a:hover {
    color: var(--primary);
    background: var(--primary-bg);
}

/* 文件列表区 */
.file-list-container {
    flex: 1;
    padding: 8px;
    overflow: auto;
}

/* 文件夹项 */
.folder-item {
    border-radius: var(--radius-sm);
    transition: var(--transition);
    margin-bottom: 2px;
}

.folder-item a {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    gap: 10px;
}

.folder-item a:hover {
    background: var(--primary-bg);
    color: var(--primary-dark);
}

/* 外链目录 */
.folder-link a {
    background: linear-gradient(135deg, var(--primary-bg) 0%, #f0f7ff 100%);
    border: 1px dashed var(--border);
}

.folder-link a:hover {
    border-color: var(--primary);
    background: #dbeafe;
}

/* 目录/外链描述 - 同行显示 */
.folder-desc-inline {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}

/* 纯描述条目 */
.desc-item {
    padding: 10px 14px;
    margin-bottom: 2px;
}

.desc-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1;
    padding-left: 10px;
    border-left: 3px solid var(--border);
    white-space: pre-line;
}

.desc-text .desc-svg-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    line-height: 0;
    white-space: normal;
}

.desc-text .desc-svg-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* 文件描述 - 同行显示 */
.file-desc-inline {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 250px;
    display: inline;
    vertical-align: middle;
}

.folder-icon-img {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* 文件项 */
.file-item {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    font-size: 13px;
    transition: var(--transition);
    border-radius: var(--radius-sm);
    margin-bottom: 1px;
    gap: 10px;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background: var(--bg-hover);
}

.file-icon-img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.file-name {
    flex: 1;
    min-width: 0;
}

.file-name a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: var(--transition);
}

.file-name a:hover {
    color: var(--primary);
}

.file-info {
    color: var(--text-muted);
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.download-link {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    background: var(--primary);
    color: #fff !important;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    border: none;
    transition: var(--transition);
    gap: 4px;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    font-weight: 500;
}

.download-link:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
    text-decoration: none !important;
}

.download-link svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

/* 排序选项 */
.sort-options {
    padding: 8px 16px;
    background: var(--bg-hover);
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-options label {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
    padding: 2px 6px;
    border-radius: 4px;
}

.sort-options label:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.sort-options input[type="radio"],
.sort-options input[type="checkbox"] {
    accent-color: var(--primary);
}

/* 目录状态标签 */
.status-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 4px;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    vertical-align: middle;
    margin-left: 6px;
    white-space: nowrap;
    letter-spacing: 0.5px;
    line-height: 1.6;
}
.status-tag-normal {
    background-color: var(--success);
}
.status-tag-update {
    background-color: var(--warning);
    animation: statusPulse 2s ease-in-out infinite;
}
.status-tag-abandoned {
    background-color: var(--danger);
    animation: statusPulse 2s ease-in-out infinite;
}
@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}

/* 空目录提示 */
.empty-folder {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

.empty-folder::before {
    content: '';
    display: block;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--border-light);
    border-radius: 50%;
    line-height: 64px;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 15px;
    color: var(--text-muted);
    font-size: 11px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

/* 后台管理浮动按钮（detail页右下角） */
.admin-float-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    z-index: 90;
    opacity: 0.8;
}
.admin-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.5);
    opacity: 1;
}
.admin-float-btn:active {
    transform: scale(0.95);
}

/* === 详情页专用样式 === */
.detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.detail-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border-light);
}

.detail-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 22px;
    font-size: 13px;
}

.detail-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-info .label {
    color: var(--text-muted);
}

.detail-info .value {
    color: var(--text-primary);
    font-weight: 500;
}

.detail-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 14px;
    border: none;
    transition: var(--transition);
    gap: 6px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    font-weight: 500;
}

.btn-download:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
    color: #fff;
}

.btn-download svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.btn-share {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    background: var(--bg-card);
    color: var(--primary);
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 14px;
    border: 1px solid var(--primary);
    cursor: pointer;
    transition: var(--transition);
    gap: 6px;
    font-weight: 500;
}

.btn-share:hover {
    background: var(--primary-bg);
    color: var(--primary-dark);
}

.btn-share svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.detail-desc {
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 18px;
    line-height: 1.9;
    color: var(--text-secondary);
    font-size: 13px;
    min-height: 100px;
}

.detail-desc.empty {
    color: var(--text-muted);
    text-align: center;
    padding: 35px;
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.related-list li:last-child {
    border-bottom: none;
}

.related-list li:hover {
    padding-left: 4px;
}

.related-list a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    transition: var(--transition);
}

.related-list a:hover {
    color: var(--primary);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 18px;
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 4px;
    transition: var(--transition);
}

.back-link:hover {
    background: var(--primary-bg);
}

.file-icon-large {
    width: 48px;
    height: 48px;
    margin-right: 16px;
    flex-shrink: 0;
}

.title-row {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.screenshots-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.screenshot-thumb {
    display: block;
    width: 160px;
    height: 110px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.screenshot-thumb:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.screenshot-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.screenshot-thumb:hover img {
    transform: scale(1.05);
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--text-primary);
    color: #fff;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 13px;
    z-index: 10000;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* === 响应式样式 === */
@media screen and (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
    .header {
        padding: 14px 18px;
        font-size: 20px;
    }
    .header .subtitle {
        font-size: 12px;
    }
    .status-bar {
        padding: 6px 14px;
        font-size: 11px;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    .main-wrapper {
        flex-direction: column;
        padding: 8px;
        gap: 8px;
    }
    .sidebar {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .sidebar-section {
        margin-bottom: 0;
    }
    .sidebar-title {
        padding: 8px 10px;
        font-size: 12px;
    }
    .sidebar-content {
        padding: 8px 10px;
        font-size: 11px;
    }
    .content-area {
        min-height: 400px;
    }
    .content-header {
        padding: 8px 12px;
    }
    .breadcrumb {
        font-size: 12px;
    }
    .file-list-container {
        padding: 4px;
    }
    .folder-item a {
        padding: 10px 12px;
        font-size: 14px;
        white-space: normal;
        overflow: visible;
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .folder-item a svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        margin-top: 1px;
    }
    .folder-icon-img {
        width: 20px;
        height: 20px;
    }
    .folder-name-text {
        flex-shrink: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        min-width: 0;
    }
    .folder-desc-inline {
        display: block;
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
        padding-left: 30px;
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .file-item {
        padding: 8px 10px;
        flex-wrap: nowrap;
    }
    .file-icon-img {
        width: 18px;
        height: 18px;
        min-width: 18px;
    }
    .file-name a {
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .file-info {
        margin-left: 8px;
        white-space: nowrap;
        font-size: 10px;
    }
    .download-link {
        padding: 4px 10px;
        font-size: 11px;
        box-shadow: none;
    }
    .download-link:hover {
        transform: none;
    }
    .sort-options {
        padding: 6px 12px;
        font-size: 11px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .detail-card { padding: 16px; }
    .notice-date {
        display: none;
    }
    .stats-content .stat-row {
        padding: 4px 0;
        font-size: 11px;
    }
    .file-list-mini li {
        padding: 4px 0;
        font-size: 11px;
    }
    .file-list-mini a {
        font-size: 11px;
    }
    /* 详情页 */
    .detail-title { font-size: 16px; }
    .detail-info { gap: 12px; font-size: 12px; }
    .detail-actions { flex-direction: column; }
    .btn-download, .btn-share { width: 100%; justify-content: center; }
    .file-icon-large { width: 36px; height: 36px; }
    .screenshot-thumb { width: 110px; height: 75px; }
    .footer { font-size: 10px; padding: 10px; }
}

@media screen and (max-width: 480px) {
    .header {
        padding: 12px 14px;
        font-size: 18px;
    }
    .sidebar {
        grid-template-columns: 1fr;
    }
    .folder-item a {
        padding: 10px 10px;
        font-size: 14px;
        white-space: normal;
        overflow: visible;
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .folder-item a svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        margin-top: 1px;
    }
    .folder-icon-img {
        width: 20px;
        height: 20px;
    }
    .folder-desc-inline {
        display: block;
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
        padding-left: 30px;
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .file-item {
        padding: 6px 8px;
    }
    .file-icon-img {
        width: 16px;
        height: 16px;
        min-width: 16px;
    }
    .file-name a {
        font-size: 12px;
    }
    .file-info {
        font-size: 10px;
    }
    .download-link {
        padding: 3px 8px;
        font-size: 10px;
    }
}

/* 图片预览灯箱 */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: zoom-out;
}

.image-overlay img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

/* 弹窗广告 */
.popup-ad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.popup-ad-box {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto !important;
    background: var(--bg-card);
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.popup-ad-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 16px;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    z-index: 2;
    transition: background 0.2s;
}
.popup-ad-close:hover {
    background: rgba(0, 0, 0, 0.85);
}
.popup-ad-box img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}
/* 弹窗广告响应式尺寸 */
.popup-ad-large { width: 800px; max-width: 90vw !important; }
.popup-ad-medium { width: 560px; max-width: 90vw !important; }
.popup-ad-small { width: 320px; max-width: 90vw !important; }
.popup-ad-small .popup-ad-close {
    width: 22px;
    height: 22px;
    font-size: 13px;
    line-height: 22px;
    top: 3px;
    right: 3px;
}
/* 弹窗广告内容区（支持 Markdown 文本时需要 padding） */
.popup-ad-content { padding: 22px 26px; }
.popup-ad-content > *:first-child { margin-top: 0; }
.popup-ad-content > *:last-child { margin-bottom: 0; }
@media (max-width: 600px) {
    .popup-ad-large, .popup-ad-medium, .popup-ad-small { width: 94vw !important; }
    .popup-ad-content { padding: 16px 18px; }
}

/* 4e. :focus-visible 可访问性样式 */
.folder-item:focus-within,
.file-item:focus-within {
    outline: none;
}
.folder-item a:focus-visible,
.file-item a:focus-visible,
.file-name a:focus-visible,
.download-link:focus-visible,
.btn-download:focus-visible,
.btn-share:focus-visible,
.btn:focus-visible,
.search-input:focus-visible,
.search-btn:focus-visible,
.breadcrumb a:focus-visible,
.file-list-mini a:focus-visible,
.back-to-top:focus-visible,
.related-list a:focus-visible,
.back-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* 4f. :active 按下反馈 */
.download-link:active,
.btn-download:active,
.btn-share:active {
    transform: scale(0.97);
}

/* 4g. 弹窗广告入场动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}
.popup-ad-overlay {
    animation: fadeIn 0.25s ease-out;
}
.popup-ad-box {
    animation: scaleIn 0.3s ease-out;
}

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

/* 搜索框样式 */
.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    width: 240px;
    flex-shrink: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, width 0.3s ease;
}
.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    width: 280px;
}
.search-input {
    border: none;
    outline: none;
    padding: 7px 0 7px 14px;
    font-size: 13px;
    width: 100%;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    height: 36px;
    line-height: 36px;
}
.search-input::placeholder {
    color: var(--text-muted);
    font-size: 12px;
}
.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease;
    padding: 0;
    border-radius: 0 7px 7px 0;
}
.search-btn:hover {
    background: var(--primary-dark);
}
.search-btn:active {
    background: var(--primary-dark);
}

/* 搜索高亮 mark 标签 */
mark {
    background: #fef08a;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    z-index: 9998;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.5);
    background: var(--primary-hover);
}
.back-to-top:active {
    transform: scale(0.95);
}

@media screen and (max-width: 768px) {
    .search-box {
        width: 180px;
    }
    .search-box:focus-within {
        width: 220px;
    }
    .back-to-top {
        bottom: 24px;
        right: 24px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* ===== 任务2：空状态页面重设计 ===== */
.empty-folder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    animation: emptyFadeIn 0.5s ease forwards;
}

.empty-folder::before {
    content: '';
    display: block;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--border-light);
    border-radius: 50%;
    position: relative;
    /* 用伪元素绘制空文件夹图标 */
}

.empty-folder::after {
    content: '';
    display: block;
    position: absolute;
    width: 80px;
    height: 80px;
    margin-top: -100px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 48px 48px;
}

.empty-folder .empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.empty-folder .empty-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.empty-folder .empty-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}

.empty-folder .empty-back-btn:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
    text-decoration: none;
}

.empty-folder .empty-back-btn:active {
    transform: scale(0.97);
}

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

/* ===== 任务4：前台列表入场动画 ===== */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.folder-item, .file-item {
    animation: slideUp 0.3s ease forwards;
    opacity: 0;
}

/* ===== 任务5：前台侧边栏视觉增强 ===== */
.sidebar-title {
    border-left: 3px solid var(--primary);
    padding-left: 11px;
}

/* 空间条流光动画 */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.space-bar-fill {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 40%, #93c5fd 50%, var(--primary-light) 60%, var(--primary) 100%);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

/* 在线状态绿点脉冲 */
.online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    position: relative;
    vertical-align: middle;
    margin-right: 4px;
}
.online-dot::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--success);
    opacity: 0;
    animation: onlinePulse 2s ease-out infinite;
}
@keyframes onlinePulse {
    0% { transform: scale(0.5); opacity: 0.6; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ===== 任务6：灯箱功能完善 ===== */
.image-overlay {
    cursor: default;
}

/* 关闭按钮 */
.image-overlay .lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 22px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    z-index: 10001;
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.image-overlay .lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}
.image-overlay .lightbox-close:active {
    transform: scale(0.95);
}
.image-overlay .lightbox-close svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* 左右箭头 */
.image-overlay .lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 10001;
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.image-overlay .lightbox-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
}
.image-overlay .lightbox-arrow:active {
    transform: translateY(-50%) scale(0.95);
}
.image-overlay .lightbox-arrow svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
}
.image-overlay .lightbox-prev {
    left: 16px;
}
.image-overlay .lightbox-next {
    right: 16px;
}

/* 底部图片计数器 */
.image-overlay .lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    padding: 6px 16px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    z-index: 10001;
    user-select: none;
}

/* 灯箱加载指示器 */
.image-overlay .lightbox-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    display: none;
    pointer-events: none;
}
.image-overlay .lightbox-loader svg {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

/* 渐进式加载过渡效果 */
.image-overlay #previewImg {
    transition: opacity 0.3s ease;
    opacity: 1;
}
.image-overlay #previewImg:not(.loaded) {
    opacity: 0.5;
    filter: blur(4px);
}
.image-overlay #previewImg.loaded {
    opacity: 1;
    filter: none;
}

/* ===== 主题切换按钮 ===== */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    margin-left: 12px;
    flex-shrink: 0;
    padding: 0;
}
.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}
.theme-toggle:active {
    transform: scale(0.95);
}
.theme-toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* 后台主题切换按钮（白色边框） */
.admin-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
    padding: 0;
}
.admin-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}
.admin-theme-toggle:active {
    transform: scale(0.95);
}
.admin-theme-toggle svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.admin-theme-toggle .icon-sun { display: none; }
.admin-theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .admin-theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .admin-theme-toggle .icon-moon { display: none; }

/* ===== 任务1a：前台暗色模式 ===== */
[data-theme="dark"] {
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --primary-light: #93c5fd;
    --primary-bg: rgba(59, 130, 246, 0.12);
    --primary-hover: #93c5fd;
    --success: #34d399;
    --danger: #f87171;
    --warning: #fbbf24;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --border-light: #1e293b;
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] body {
    color: var(--text-primary);
}

[data-theme="dark"] .header {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 50%, #2563eb 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .status-bar {
    background: var(--bg-card);
    border-bottom-color: var(--border);
}

[data-theme="dark"] .sidebar-section {
    background: var(--bg-card);
    border-color: var(--border);
}

[data-theme="dark"] .sidebar-title {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-bottom-color: var(--border);
    color: var(--primary-light);
}

[data-theme="dark"] .content-area {
    background: var(--bg-card);
    border-color: var(--border);
}

[data-theme="dark"] .content-header {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(59, 130, 246, 0.08) 100%);
    border-bottom-color: var(--border);
}

[data-theme="dark"] .folder-item a:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-light);
}

[data-theme="dark"] .folder-link a {
    background: rgba(59, 130, 246, 0.06);
    border-color: var(--border);
}

[data-theme="dark"] .folder-link a:hover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .file-item {
    border-bottom-color: var(--border-light);
}

[data-theme="dark"] .file-item:hover {
    background: var(--bg-hover);
}

[data-theme="dark"] .file-name a {
    color: var(--text-primary);
}

[data-theme="dark"] .file-name a:hover {
    color: var(--primary-light);
}

[data-theme="dark"] .sort-options {
    background: var(--bg-card);
    border-top-color: var(--border);
}

[data-theme="dark"] .download-link {
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .desc-text {
    border-left-color: var(--border);
}

[data-theme="dark"] .search-box {
    background: var(--bg-card);
    border-color: var(--border);
}

[data-theme="dark"] .search-input {
    color: var(--text-primary);
}

[data-theme="dark"] .back-to-top {
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* 暗色 Toast */
[data-theme="dark"] .toast {
    background: #334155;
    color: #e2e8f0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* 暗色灯箱 */
[data-theme="dark"] .image-overlay {
    background: rgba(0, 0, 0, 0.92);
}

/* 暗色弹窗广告 */
[data-theme="dark"] .popup-ad-box {
    background: var(--bg-card);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .popup-ad-close {
    background: rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .popup-ad-close:hover {
    background: rgba(0, 0, 0, 0.85);
}

/* 暗色 mark 高亮 */
[data-theme="dark"] mark {
    background: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

/* 暗色 footer */
[data-theme="dark"] .footer {
    border-top-color: var(--border);
}

/* 暗色空状态 */
[data-theme="dark"] .empty-folder::before {
    background: var(--border);
}

[data-theme="dark"] .empty-folder::after {
    filter: brightness(1.5);
}

/* 暗色 detail 页面 */
[data-theme="dark"] .detail-card {
    background: var(--bg-card);
    border-color: var(--border);
}

[data-theme="dark"] .detail-desc {
    background: var(--bg-hover);
    border-color: var(--border);
}

[data-theme="dark"] .btn-share {
    background: var(--bg-card);
    border-color: var(--primary);
    color: var(--primary);
}

[data-theme="dark"] .btn-share:hover {
    background: var(--primary-bg);
}

/* 暗色 breadcrumb */
[data-theme="dark"] .breadcrumb a:hover {
    background: var(--primary-bg);
}

/* 暗色 notice-date */
[data-theme="dark"] .notice-date {
    border-top-color: var(--border);
}

/* 暗色 space-bar */
[data-theme="dark"] .space-bar {
    background: var(--border);
}

/* 暗色 file-list-mini */
[data-theme="dark"] .file-list-mini li {
    border-bottom-color: var(--border-light);
}

[data-theme="dark"] .file-list-mini .count {
    background: rgba(59, 130, 246, 0.12);
}

/* 暗色 screenshot-thumb */
[data-theme="dark"] .screenshot-thumb {
    border-color: var(--border);
}

[data-theme="dark"] .screenshot-thumb:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

/* 暗色 admin-btn */
[data-theme="dark"] .admin-float-btn {
    background: var(--primary);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
}
[data-theme="dark"] .admin-float-btn:hover {
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.4);
}

/* ====== 目录公告 Markdown 渲染样式 ====== */

/* 公告弹窗容器：更宽、可滚动 */
.notice-popup {
    width: 640px;
    max-width: 90vw !important;
    max-height: 85vh !important;
    overflow: visible !important;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
}
.notice-popup-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.notice-popup-header svg { color: var(--primary); flex-shrink: 0; }
.notice-popup-body {
    padding: 18px 24px;
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--text-secondary);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.notice-popup-footer {
    padding: 12px 24px;
    border-top: 1px solid var(--border);
    text-align: right;
    flex-shrink: 0;
}
.notice-popup-footer button {
    padding: 8px 28px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: opacity 0.15s;
}
.notice-popup-footer button:hover { opacity: 0.88; }
@media (max-width: 640px) {
    .notice-popup { width: 94vw; }
    .notice-popup-header, .notice-popup-body, .notice-popup-footer { padding-left: 16px; padding-right: 16px; }
}

.notice-md > *:first-child { margin-top: 0; }
.notice-md > *:last-child { margin-bottom: 0; }
.notice-md p { margin: 0 0 8px; }
.notice-md h1, .notice-md h2, .notice-md h3,
.notice-md h4, .notice-md h5, .notice-md h6 {
    margin: 12px 0 6px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
}
.notice-md h1 { font-size: 1.5em; }
.notice-md h2 { font-size: 1.35em; }
.notice-md h3 { font-size: 1.2em; }
.notice-md h4 { font-size: 1.1em; }
.notice-md h5, .notice-md h6 { font-size: 1em; }
.notice-md ul, .notice-md ol {
    margin: 6px 0 8px;
    padding-left: 22px;
}
.notice-md li { margin: 3px 0; }
.notice-md ul li { list-style: disc; }
.notice-md ol li { list-style: decimal; }
.notice-md blockquote {
    margin: 8px 0;
    padding: 6px 12px;
    border-left: 3px solid var(--primary);
    background: rgba(59, 130, 246, 0.06);
    color: var(--text-secondary);
    border-radius: 0 4px 4px 0;
}
.notice-md blockquote > *:last-child { margin-bottom: 0; }
.notice-md code {
    padding: 1px 5px;
    background: rgba(0, 0, 0, 0.07);
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
}
[data-theme="dark"] .notice-md code {
    background: rgba(255, 255, 255, 0.1);
}
.notice-md pre {
    margin: 8px 0;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.75);
    color: #e2e8f0;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.88em;
    line-height: 1.5;
}
.notice-md pre code {
    padding: 0;
    background: none;
    color: inherit;
}
.notice-md a {
    color: var(--primary);
    text-decoration: none;
}
.notice-md a:hover { text-decoration: underline; }
.notice-md img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 6px 0;
}
.notice-md hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 12px 0;
}
.notice-md strong, .notice-md b { font-weight: 700; color: var(--text-primary); }
.notice-md table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 0.92em;
}
.notice-md th, .notice-md td {
    border: 1px solid var(--border);
    padding: 5px 8px;
    text-align: left;
}
.notice-md th {
    background: rgba(59, 130, 246, 0.08);
    font-weight: 600;
}
.notice-md video, .notice-md audio {
    max-width: 100%;
    margin: 6px 0;
    border-radius: 6px;
}

/* ====== 视频预览灯箱 ====== */
.video-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}
.video-overlay .lightbox-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 1;
}
.video-overlay .lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}
.video-overlay .lightbox-close svg {
    width: 22px; height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
}
.video-player-wrap {
    position: relative;
    width: 90vw;
    max-width: 1100px;
}
.video-player-wrap video {
    width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    background: #000;
    outline: none;
}
.video-title-bar {
    color: #fff;
    font-size: 14px;
    text-align: center;
    padding: 10px 0 0;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 全屏模式下的样式适配 */
.video-player-wrap:fullscreen {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-player-wrap:fullscreen video {
    max-height: 100vh;
    max-width: 100vw;
}

/* ====== 音频预览灯箱 ====== */
.audio-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}
.audio-overlay .lightbox-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.audio-overlay .lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}
.audio-overlay .lightbox-close svg {
    width: 22px; height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
}
.audio-player-wrap {
    background: rgba(30, 30, 40, 0.95);
    border-radius: 12px;
    padding: 36px 32px 28px;
    width: 90vw;
    max-width: 480px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.audio-player-wrap .audio-icon {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}
.audio-player-wrap .audio-title {
    color: #fff;
    font-size: 15px;
    margin-bottom: 20px;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.audio-player-wrap audio {
    width: 100%;
    outline: none;
}
[data-theme="dark"] .audio-player-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
}