/* ===== 文博素材管理系统 - 全站样式 v5 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
    --max-width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* Header */
.site-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.header-inner {
    margin: 0 auto;
    padding: 0 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.logo { display: flex; align-items: center; gap: 8px; font-size: 1.25rem; font-weight: 700; color: var(--text); text-decoration: none; }
.logo:hover { text-decoration: none; color: var(--primary); }
.logo-emoji { font-size: 1.5rem; }
.logo-wrap { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.logo-desc { font-size: 0.78rem; color: var(--text-muted); margin-top: 1px; padding-left: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a { padding: 8px 14px; border-radius: var(--radius); color: var(--text); font-size: 0.95rem; font-weight: 500; transition: all 0.2s; white-space: nowrap; }
.main-nav a:hover { background: var(--bg); color: var(--primary); text-decoration: none; }
.header-search { display:flex; align-items:center; margin: 0 8px; flex-shrink: 0; }
.header-search-input { border:1px solid var(--border); border-radius:20px; padding:6px 14px; font-size:0.88rem; width:220px; outline:none; transition:border-color 0.2s, width 0.2s; background: var(--bg); }
.header-search-input:focus { border-color:var(--primary); width:280px; }
.header-search-btn { background: none; border: none; cursor: pointer; font-size: 1rem; margin-left: -34px; padding: 4px; z-index: 1; opacity: 0.65; }
.header-search-btn:hover { opacity: 1; }
.nav-item { position:relative; display:inline-flex; align-items:center; }
.nav-arrow { font-size:0.55rem; margin-left:2px; color:var(--primary); pointer-events:none; vertical-align:middle; }
.nav-dropdown { display:none; position:absolute; top:100%; left:0; background:var(--card-bg); border:1px solid var(--border); border-radius:8px; min-width:140px; box-shadow:0 8px 24px rgba(0,0,0,0.12); z-index:200; padding:4px 0; }
.nav-item:hover .nav-dropdown { display:block; }
.nav-dropdown a { display:block; padding:8px 16px; font-size:0.9rem; border-radius:0; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 12px; font-size: 1.4rem; cursor: pointer; }

/* Main */
.site-main { flex: 1; width: 100%; margin: 0 auto; padding: 24px 64px; }

/* Footer */
.site-footer { background: var(--card-bg); border-top: 1px solid var(--border); padding: 20px 0; margin-top: auto; }
.footer-inner { margin: 0 auto; padding: 0 64px; display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; color: var(--text-muted); }
.footer-nav { display: flex; gap: 16px; }

/* Breadcrumb */
.breadcrumb { margin-bottom: 16px; font-size: 0.9rem; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }

/* Cards Grid */
.card-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin: 20px 0; }
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow 0.2s, transform 0.2s; display: flex; flex-direction: column; }
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-cover { width: 100%; height: 200px; object-fit: contain; background: #fff; }
.cover-fallback { width: 100%; height: 200px; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; background: var(--bg); }
.card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.card-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-clamp: 2; overflow: hidden; }
.card-desc { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 12px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-clamp: 2; overflow: hidden; }
.card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; color: var(--text-muted); padding-top: 10px; border-top: 1px solid var(--border); }
.card-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.tag { display: inline-block; padding: 2px 10px; background: var(--bg); border-radius: 12px; font-size: 0.78rem; color: var(--secondary); }
.tag:hover { background: var(--primary); color: #fff; text-decoration: none; }

/* List Mode */
.list-mode .card-grid { display: flex; flex-direction: column; gap: 12px; }
.list-mode .card { flex-direction: row; height: 140px; }
.list-mode .card-cover { width: 200px; height: 140px; flex-shrink: 0; object-fit: contain; background: #fff; }
.list-mode .card-body { padding: 14px; }

/* Page Header */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 1.6rem; margin-bottom: 8px; }
.page-header p { color: var(--text-muted); }

/* Forms */
.form-container { max-width: 480px; margin: 40px auto; background: var(--card-bg); padding: 32px; border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.form-container h2 { text-align: center; margin-bottom: 24px; font-size: 1.4rem; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; color: var(--text); }
.form-control { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; font-size: 0.95rem; transition: border-color 0.2s, box-shadow 0.2s; background: var(--card-bg); color: var(--text); }
.form-control:hover { border-color: #cbd5e1; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; 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='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; appearance: none; -webkit-appearance: none; }
.form-hint { display: flex; align-items: flex-start; gap: 5px; margin-top: 6px; font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }
.form-hint::before { content: '💡'; flex-shrink: 0; }

/* 现代化开关 Switch */
.switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
    width: 46px;
    height: 26px;
    background: #cbd5e1;
    border-radius: 26px;
    transition: background 0.25s;
    position: relative;
    flex-shrink: 0;
}
.switch-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px rgba(37,99,235,0.25); }

/* 提示信息框 */
.info-box { border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; line-height: 1.7; font-size: 0.87rem; }
.info-box strong { font-weight: 600; }
.info-box a { font-weight: 500; }
.info-box-blue { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.info-box-amber { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.info-box-green { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.info-box-gray { background: #f8fafc; border: 1px solid #e2e8f0; color: #475569; }

/* 表单操作栏 */
.form-actions { display: flex; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.form-actions .btn { min-width: 120px; justify-content: center; }

/* 开关卡片 */
.switch-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    background: var(--card-bg);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.switch-card:hover { border-color: #cbd5e1; box-shadow: var(--shadow); }
.switch-card-body { flex: 1; min-width: 0; }
.switch-card-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 2px; }
.switch-card-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }

/* 表单网格（两列布局，响应式） */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .form-group { margin-bottom: 18px; }
.form-grid-full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* Logo 上传行 */
.logo-upload-row { display: flex; gap: 10px; align-items: center; }
.logo-upload-row .form-control { flex: 1; }
.file-btn { cursor: pointer; flex-shrink: 0; display: inline-flex; align-items: center; }
.logo-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.logo-preview img { max-height: 44px; width: auto; border-radius: 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border: none; border-radius: var(--radius); font-size: 0.95rem; font-weight: 500; cursor: pointer; transition: all 0.2s; text-decoration: none; line-height: 1.4; }
.btn:hover { text-decoration: none; opacity: 0.9; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-block { display: block; width: 100%; text-align: center; justify-content: center; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Favorite Button */
.fav-btn.favorited { background: var(--danger); color: #fff; border-color: var(--danger); }

/* Detail Page */
.detail-wrap { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); }
.detail-wrap h3 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.detail-wrap h3::after { content: ''; flex: 1; height: 1px; background: transparent; }
.detail-cover { width: 100%; max-height: 400px; object-fit: contain; background: var(--bg); border-radius: var(--radius); margin-bottom: 20px; }
.detail-title { font-size: 1.5rem; margin-bottom: 12px; }
.detail-meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.detail-desc { margin-bottom: 20px; line-height: 1.8; }
.detail-links { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

/* Alerts */
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 16px; font-size: 0.93rem; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-danger { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 6px; margin: 30px 0; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.9rem; color: var(--text); transition: all 0.2s; }
.pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* View Toggle */
.view-toggle { display: flex; gap: 6px; }
.view-toggle a { padding: 6px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.88rem; color: var(--text); transition: all 0.2s; }
.view-toggle a:hover { text-decoration: none; border-color: var(--primary); }
.view-toggle a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Search Bar */
.search-bar { display: flex; gap: 8px; margin-bottom: 20px; }
.search-bar .form-control { flex: 1; }
.search-bar .btn { flex-shrink: 0; }

/* Admin Layout */
.admin-layout { display: flex; gap: 20px; align-items: flex-start; }
.admin-sidebar {
    width: 236px;
    flex-shrink: 0;
    position: sticky;
    top: 78px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 0 0 12px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.22);
    overflow: hidden;
}

/* 品牌区 */
.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 18px 18px 14px;
    margin-bottom: 6px;
    background: linear-gradient(135deg, rgba(37,99,235,0.22), rgba(124,58,237,0.16));
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.admin-sidebar-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(37,99,235,0.4);
}
.admin-sidebar-title { font-size: 0.98rem; font-weight: 700; color: #fff; line-height: 1.2; }
.admin-sidebar-sub { font-size: 0.72rem; color: #94a3b8; margin-top: 1px; }

/* 分组标题 */
.admin-sidebar-group {
    padding: 14px 18px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #64748b;
}

.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    margin: 0 8px 2px;
    border-radius: 9px;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    transition: all 0.18s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.as-ico {
    width: 20px;
    flex-shrink: 0;
    font-size: 0.95rem;
    text-align: center;
    filter: grayscale(0.2);
}
.admin-sidebar a:hover { background: rgba(255,255,255,0.08); color: #fff; text-decoration: none; }
.admin-sidebar a:hover .as-ico { filter: none; }
.admin-sidebar a.active {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #fff;
    box-shadow: 0 4px 14px rgba(79,70,229,0.4);
}
.admin-sidebar a.active .as-ico { filter: none; }
.admin-sidebar a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 56%;
    background: #93c5fd;
    border-radius: 0 3px 3px 0;
}

/* 底部返回 */
.admin-sidebar-footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.admin-sidebar-footer .as-back { color: #cbd5e1; }
.admin-sidebar-footer .as-back:hover { color: #fff; }
.admin-content { flex: 1; min-width: 0; }
.admin-content .form-control { max-width: 460px; }
.admin-content h2 { font-size: 1.15rem; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.admin-content h3 { font-size: 1.02rem; margin-bottom: 10px; }

/* 后台表格 */
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card-bg); border-radius: 12px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.admin-table th, .admin-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.admin-table th { background: #f8fafc; font-weight: 600; font-size: 0.8rem; color: var(--secondary); letter-spacing: 0.3px; white-space: nowrap; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr { transition: background 0.15s; }
.admin-table tbody tr:hover td { background: #f1f5f9; }
.admin-table td a { color: var(--primary); font-weight: 500; }
.admin-table td a:hover { text-decoration: underline; }

/* 统计卡片 */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    text-align: left;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 14px;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    opacity: 0.85;
}
.stat-num { font-size: 1.8rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 3px; }
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.stat-icon-blue { background: #dbeafe; }
.stat-icon-green { background: #dcfce7; }
.stat-icon-amber { background: #fef3c7; }
.stat-icon-purple { background: #ede9fe; }
.stat-icon-red { background: #fee2e2; }
.stat-icon-cyan { background: #cffafe; }
.stat-icon-pink { background: #fce7f3; }
.stat-icon-slate { background: #e2e8f0; }

/* User Center */
.user-info-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: flex; gap: 20px; align-items: center; margin-bottom: 24px; }
.user-avatar { width: 80px; height: 80px; border-radius: 50%; background: var(--bg); border: 2px solid var(--border); }
.user-detail { flex: 1; }
.user-detail h3 { font-size: 1.3rem; margin-bottom: 4px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 0.78rem; font-weight: 500; }
.badge-normal { background: #e2e8f0; color: #475569; }
.badge-vip { background: #fef3c7; color: #92400e; }
.badge-svip { background: #fce7f3; color: #9d174d; }
.badge-admin { background: #dc2626; color: #fff; }

/* Utility */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }

/* Empty State */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .empty-emoji { font-size: 3rem; margin-bottom: 12px; }

/* Loading */
.spinner { display: inline-block; width: 30px; height: 30px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 1024px) {
    .home-grid { grid-template-columns:repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .header-inner { min-height: 54px; height: auto; padding: 8px 14px; gap: 8px; }
    .site-main { padding: 16px 12px; }
    .nav-toggle { display: block; }
    .header-search { margin: 0; }
    .header-search-input { width: 130px; padding: 6px 30px 6px 12px; }
    .header-search-input:focus { width: 150px; }
    .header-search-btn { margin-left: -28px; }
    .logo-desc { max-width: 150px; }
    .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--card-bg); flex-direction: column; padding: 10px 16px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
    .main-nav.nav-open { display: flex; }
    .main-nav a { padding: 10px 6px; width: 100%; }
    .card-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
    .list-mode .card { flex-direction: column; height: auto; }
    .list-mode .card-cover { width: 100%; height: 200px; object-fit: contain; background: #fff; }
    .admin-layout { flex-direction: column; gap: 14px; }
    .admin-sidebar { width: 100%; position: static; border-radius: 14px; padding: 0 0 8px; }
    .admin-sidebar-brand { display: none; }
    .admin-sidebar-group { display: none; }
    .admin-sidebar-footer { border-top: none; margin-top: 0; padding-top: 0; }
    .admin-sidebar-footer .as-back { display: none; }
    .admin-sidebar-nav {
        display: flex;
        flex-wrap: nowrap;
        gap: 4px;
        padding: 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .admin-sidebar-nav::-webkit-scrollbar { display: none; }
    .admin-sidebar-nav a { flex-shrink: 0; font-size: 0.82rem; padding: 8px 13px; margin: 0; }
    .admin-sidebar-nav a.active::before { display: none; }
    .detail-wrap { padding: 16px; }
    .user-info-card { flex-direction: column; text-align: center; }
    .footer-inner { flex-direction: column; gap: 8px; text-align: center; padding: 0 14px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .site-main { padding: 12px 10px; }
    .card-grid { grid-template-columns: 1fr; }
    .form-container { padding: 20px 16px; margin: 20px auto; }
    .detail-title { font-size: 1.3rem; }
    .admin-table { font-size: 0.82rem; }
    .admin-table th, .admin-table td { padding: 8px 10px; }
    .stats-grid { grid-template-columns: 1fr; }
    .search-bar { flex-direction: column; }
}

@media (max-width: 360px) {
    body { font-size: 15px; }
    .logo-text { display: none; }
    .card-body { padding: 12px; }
    .btn { padding: 8px 14px; font-size: 0.85rem; }
}

/* ===== 新首页样式 ===== */
.home-hero { text-align:center; padding:20px 64px 24px; }
.banner-box { max-width:100%; margin:0 auto 16px; position:relative; overflow:hidden; border-radius:10px; background:#f0f0f0; }
.banner-slide { display:block; text-decoration:none; }
.banner-slide img { width:100%; max-height:100px; object-fit:contain; display:block; border-radius:10px; background:#f5f5f5; }
.banner-dots { display:flex; justify-content:center; gap:8px; margin-top:10px; }
.banner-dot { width:10px; height:10px; border-radius:50%; background:#ccc; cursor:pointer; transition:background 0.3s; }
.banner-dot.active { background:var(--primary); }
.home-title { font-size:1.6rem; font-weight:700; margin-bottom:6px; color:var(--text); }
.home-desc { font-size:0.95rem; color:var(--text-muted); margin-bottom:20px; }
.home-search { display:flex; justify-content:center; gap:0; max-width:480px; margin:0 auto; }
.home-search-input { flex:1; padding:10px 16px; border:1px solid var(--border); border-right:none; border-radius:8px 0 0 8px; font-size:0.95rem; outline:none; }
.home-search-input:focus { border-color:var(--primary); }
.home-search-btn { padding:10px 20px; background:var(--primary); color:#fff; border:none; border-radius:0 8px 8px 0; cursor:pointer; font-size:0.95rem; white-space:nowrap; }

.home-cats { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin-bottom:24px; padding:0 16px; }
.home-cat { display:inline-block; padding:6px 18px; border-radius:20px; font-size:0.88rem; color:var(--text); text-decoration:none; border:1px solid var(--border); background:var(--card-bg); transition:all 0.2s; }
.home-cat:hover { border-color:var(--primary); color:var(--primary); text-decoration:none; }
.home-cat-on { background:var(--primary); color:#fff; border-color:var(--primary); }
.home-cat-search { margin-left:auto; display:flex; align-items:center; gap:0; }
.home-cat-search-input { border:1px solid var(--border); border-right:none; border-radius:20px 0 0 20px; padding:8px 18px; font-size:0.9rem; width:220px; outline:none; background:var(--card-bg); }
.home-cat-search-input:focus { border-color:var(--primary); }
.home-cat-search-btn { border:1px solid var(--primary); border-radius:0 20px 20px 0; padding:8px 18px; font-size:0.9rem; background:var(--primary); color:#fff; cursor:pointer; font-weight:500; }
.home-subcats { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; margin-bottom:20px; padding:0 16px; }
.home-subcats .tag { font-size:0.88rem; padding:4px 14px; background:#e8ecf1; color:#475569; }

.home-search-info { text-align:center; padding:8px 0 16px; font-size:0.9rem; color:var(--text-muted); }

.home-grid { display:grid; grid-template-columns:repeat(5, 1fr); gap:16px; padding:0; }
.home-card { display:block; background:var(--card-bg); border:1px solid var(--border); border-radius:10px; overflow:hidden; text-decoration:none; color:var(--text); transition:box-shadow 0.2s; }
.home-card:hover { box-shadow:0 4px 16px rgba(0,0,0,0.1); text-decoration:none; }
.home-card-img { width:100%; height:260px; display:flex; align-items:center; justify-content:center; background:#fff; overflow:hidden; }
.home-card-img img { width:100%; height:100%; object-fit:contain; }
.home-card-nopic { font-size:2.5rem; }

/* 音频列表 - 每排6个 */
.audio-list { display:grid; grid-template-columns:repeat(6, 1fr); gap:10px; margin-bottom:24px; }
.audio-card { display:flex; flex-direction:column; align-items:center; gap:8px; padding:16px 12px; background:var(--card-bg); border:1px solid var(--border); border-radius:8px; text-align:center; min-width:0; }
.audio-card:hover { box-shadow:0 2px 8px rgba(0,0,0,0.08); }
.audio-icon { font-size:2rem; flex-shrink:0; }
.audio-body { width:100%; min-width:0; }
.audio-title { font-size:0.85rem; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-bottom:8px; }
.audio-row { display:flex; align-items:center; gap:8px; }
.audio-mini-time { font-size:0.65rem; color:var(--text-muted); display:block; margin-top:4px; }
.audio-mini-btn { width:26px; height:26px; border-radius:50%; border:1px solid var(--border); background:#fff; font-size:0.75rem; cursor:pointer; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.audio-mini-btn:hover { background:var(--primary); border-color:var(--primary); color:#fff; }
.audio-mini-bar-wrap { flex:1; display:flex; align-items:center; gap:6px; }
.audio-mini-bar { flex:1; height:3px; background:#e2e8f0; border-radius:2px; cursor:pointer; overflow:hidden; }
.audio-mini-progress { height:100%; background:var(--primary); border-radius:2px; transition:width 0.15s linear; }
.audio-mini-time { font-size:0.65rem; color:var(--text-muted); white-space:nowrap; }
.audio-actions { display:flex; gap:6px; flex-shrink:0; }
.audio-mini-dl, .audio-mini-fav { font-size:0.75rem; padding:4px 10px; border-radius:4px; border:1px solid var(--border); background:#fff; cursor:pointer; text-decoration:none; color:var(--text); line-height:1.3; display:inline-flex; align-items:center; gap:2px; }
.audio-mini-dl:hover { background:var(--primary); color:#fff; border-color:var(--primary); text-decoration:none; }
.audio-mini-fav:hover { background:#f59e0b; color:#fff; border-color:#f59e0b; }

@media (max-width:900px) { .audio-list { grid-template-columns:repeat(3, 1fr); } }
@media (max-width:600px) { .audio-list { grid-template-columns:repeat(2, 1fr); } }
.home-card-info { padding:12px 14px; }
.home-card-title { font-size:0.92rem; font-weight:600; margin-bottom:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.home-card-meta { font-size:0.78rem; color:var(--text-muted); }

@media (max-width: 480px) {
    .home-grid { grid-template-columns:repeat(2, 1fr); gap:10px; }
    .home-card-img { height:180px; }
    .home-search { max-width:100%; }
}

.hidden { display: none !important; }

/* ===== 预览弹窗 ===== */
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.55); z-index:9999; display:flex; align-items:center; justify-content:center; padding:16px; }
.modal-box { position:relative; background:#fff; border-radius:12px; width:100%; max-width:900px; max-height:90vh; overflow-y:auto; box-shadow:0 16px 48px rgba(0,0,0,0.18); }
.modal-close { position:absolute; top:10px; right:14px; font-size:1.5rem; color:#999; cursor:pointer; z-index:2; line-height:1; }
.modal-close:hover { color:#333; }
.modal-body { padding:0; }
.modal-cover { width:100%; min-height:200px; display:flex; align-items:center; justify-content:center; background:#fff; border-radius:12px 12px 0 0; overflow:hidden; }
.modal-cover img { max-width:100%; max-height:400px; object-fit:contain; display:block; }
.modal-cover .modal-nopic { font-size:4rem; padding:40px 0; }
.modal-info { padding:16px 20px 20px; }
.modal-title { font-size:1.15rem; font-weight:700; margin-bottom:6px; }
.modal-meta { font-size:0.82rem; color:var(--text-muted); margin-bottom:8px; display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.modal-desc { font-size:0.9rem; color:#555; line-height:1.7; margin-bottom:12px; word-break:break-word; }
.modal-tags { display:flex; flex-wrap:wrap; gap:5px; margin-bottom:14px; }
.modal-tags .tag { font-size:0.75rem; }
.modal-actions { display:flex; gap:8px; justify-content:flex-end; align-items:center; flex-wrap:wrap; }
.modal-actions .btn { font-size:0.88rem; }
.btn-fav { border-color:#f59e0b; color:#f59e0b; }
.btn-fav.favorited { background:#f59e0b; color:#fff; }

/* ===== 个人中心（现代化 UI） ===== */
.uc-wrap { max-width: 1080px; margin: 0 auto; }

.uc-hero {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 50%, #7c3aed 100%);
    padding: 32px;
    color: #fff;
    margin-bottom: 20px;
    box-shadow: 0 12px 32px rgba(79, 70, 229, 0.25);
}
.uc-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 85% 15%, rgba(255,255,255,0.18) 0%, transparent 45%),
        radial-gradient(circle at 15% 90%, rgba(255,255,255,0.12) 0%, transparent 40%);
    pointer-events: none;
}
.uc-hero-body {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}
.uc-avatar-wrap {
    flex-shrink: 0;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    padding: 3px;
    background: rgba(255,255,255,0.35);
}
.uc-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
}
.uc-hero-info { min-width: 0; }
.uc-hero-name {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.uc-hero-sub {
    font-size: 0.9rem;
    opacity: 0.92;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.uc-dot { opacity: 0.6; }

.uc-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(255,255,255,0.22);
    color: #fff;
    backdrop-filter: blur(4px);
}
.uc-badge-vip { background: rgba(255,255,255,0.25); }
.uc-badge-svip { background: linear-gradient(135deg, #f472b6, #a855f7); }
.uc-badge-admin { background: linear-gradient(135deg, #f59e0b, #ef4444); }

/* 统计卡片 */
.uc-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.uc-stat {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: box-shadow 0.2s, transform 0.2s;
}
.uc-stat:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.uc-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.uc-stat-icon-blue { background: #dbeafe; }
.uc-stat-icon-green { background: #dcfce7; }
.uc-stat-icon-orange { background: #fef3c7; }
.uc-stat-icon-purple { background: #ede9fe; }
.uc-stat-num { font-size: 1.5rem; font-weight: 700; line-height: 1.1; color: var(--text); }
.uc-stat-num-sm { font-size: 1.1rem; }
.uc-stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

/* 配额进度条 */
.uc-quota {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 20px;
}
.uc-quota-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 10px;
}
.uc-quota-val { font-weight: 600; color: var(--primary); }
.uc-quota-bar {
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
}
.uc-quota-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #2563eb, #4f46e5);
    transition: width 0.4s ease;
}

/* Tab */
.uc-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}
.uc-tab {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}
.uc-tab:hover { color: var(--text); }
.uc-tab.is-active { color: var(--primary); }
.uc-tab.is-active::after {
    content: '';
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: -1px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

/* 面板 */
.uc-panel { display: none; }
.uc-panel.is-active { display: block; animation: ucFade 0.25s ease; }
@keyframes ucFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 收藏网格 */
.uc-fav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.uc-fav-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.uc-fav-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.uc-fav-cover {
    display: block;
    width: 100%;
    height: 160px;
    background: #fff;
    overflow: hidden;
    position: relative;
}
.uc-fav-cover img { width: 100%; height: 100%; object-fit: contain; }
.uc-fav-nopic {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: var(--bg);
}
.uc-fav-body { padding: 12px 14px; }
.uc-fav-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.uc-fav-title:hover { color: var(--primary); text-decoration: none; }
.uc-fav-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.uc-fav-meta { font-size: 0.78rem; color: var(--text-muted); }
.uc-fav-btn {
    background: #fef2f2;
    border: none;
    border-radius: 20px;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.uc-fav-btn:hover { background: var(--danger); color: #fff; }

/* 下载记录列表 */
.uc-dl-list {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}
.uc-dl-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}
.uc-dl-item:last-child { border-bottom: none; }
.uc-dl-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.uc-dl-main { flex: 1; min-width: 0; }
.uc-dl-title { font-size: 0.92rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-dl-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.uc-dl-time { font-size: 0.8rem; color: var(--text-muted); flex-shrink: 0; }

/* 设置 */
.uc-settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.uc-setting-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
}
.uc-setting-title { font-size: 1.05rem; margin-bottom: 16px; }

/* 空状态 */
.uc-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    background: var(--card-bg);
    border: 1px dashed var(--border);
    border-radius: 14px;
    font-size: 0.95rem;
}
.uc-empty a { color: var(--primary); }

@media (max-width: 768px) {
    .uc-hero { padding: 24px 18px; }
    .uc-hero-body { flex-direction: column; text-align: center; }
    .uc-hero-name { justify-content: center; }
    .uc-hero-sub { justify-content: center; }
    .uc-stats { grid-template-columns: repeat(2, 1fr); }
    .uc-settings { grid-template-columns: 1fr; }
    .uc-tab { padding: 10px 14px; font-size: 0.88rem; }
}

@media (max-width: 480px) {
    .uc-stats { grid-template-columns: 1fr; }
    .uc-dl-item { flex-wrap: wrap; }
    .uc-dl-time { width: 100%; padding-left: 54px; }
}

/* ===== 首页（现代化 UI + 自适应） ===== */
.hp-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1d4ed8 0%, #4f46e5 55%, #7c3aed 100%);
    border-radius: 20px;
    padding: 48px 32px 40px;
    text-align: center;
    color: #fff;
    margin-bottom: 20px;
}
.hp-hero-inner { position: relative; z-index: 2; max-width: 640px; margin: 0 auto; }
.hp-title { font-size: 2rem; font-weight: 800; letter-spacing: 0.5px; margin-bottom: 8px; }
.hp-sub { font-size: 0.98rem; opacity: 0.92; margin-bottom: 24px; }
.hp-search {
    display: flex;
    max-width: 520px;
    margin: 0 auto;
    background: #fff;
    border-radius: 50px;
    padding: 6px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
}
.hp-search input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 20px;
    font-size: 0.95rem;
    border-radius: 50px;
    color: var(--text);
    background: transparent;
    min-width: 0;
}
.hp-search button {
    border: none;
    background: var(--primary);
    color: #fff;
    border-radius: 50px;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: background 0.2s;
}
.hp-search button:hover { background: var(--primary-dark); }
.hp-hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    pointer-events: none;
}
.hp-hero-glow-a { width: 260px; height: 260px; background: #60a5fa; top: -80px; right: -40px; }
.hp-hero-glow-b { width: 220px; height: 220px; background: #c084fc; bottom: -90px; left: -40px; }

.hp-banner { margin-bottom: 20px; }

.hp-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 18px;
}
.hp-cat {
    padding: 9px 22px;
    border-radius: 50px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text);
    background: var(--card-bg);
    border: 1px solid var(--border);
    transition: all 0.2s;
    text-decoration: none;
}
.hp-cat:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.hp-cat-on {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(79,70,229,0.35);
}
.hp-cat-on:hover { color: #fff; }

.hp-subcats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}
.hp-subcat {
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg);
    transition: all 0.2s;
    text-decoration: none;
}
.hp-subcat:hover { color: var(--primary); text-decoration: none; }
.hp-subcat-on { background: var(--primary); color: #fff; }
.hp-subcat-on:hover { color: #fff; }

.hp-search-info {
    text-align: center;
    padding: 6px 0 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hp-content { margin-top: 4px; }

/* 普通素材网格 */
.hp-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}
.hp-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.hp-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,0.12); }
.hp-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hp-card-img img { width: 100%; height: 100%; object-fit: contain; }
.hp-card-nopic { font-size: 3rem; }
.hp-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(37,99,235,0.9);
    color: #fff;
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}
.hp-card-info { padding: 12px 14px; }
.hp-card-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}
.hp-card-meta { font-size: 0.78rem; color: var(--text-muted); }

/* 音频素材网格 */
.hp-audio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.hp-audio-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 14px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
    min-width: 0;
    transition: box-shadow 0.2s;
}
.hp-audio-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.08); }
.hp-audio-icon { font-size: 2rem; }
.hp-audio-body { width: 100%; min-width: 0; }
.hp-audio-title {
    font-size: 0.85rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 10px;
}
.hp-audio-row { display: flex; align-items: center; gap: 8px; }
.hp-audio-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.hp-audio-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.hp-audio-bar { flex: 1; height: 4px; background: #e2e8f0; border-radius: 2px; cursor: pointer; overflow: hidden; }
.hp-audio-progress { height: 100%; background: var(--primary); border-radius: 2px; transition: width 0.15s linear; }
.hp-audio-time { font-size: 0.68rem; color: var(--text-muted); display: block; margin-top: 4px; }
.hp-audio-actions { display: flex; gap: 6px; }
.hp-audio-dl, .hp-audio-fav {
    font-size: 0.8rem;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}
.hp-audio-dl:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }
.hp-audio-fav:hover { background: #f59e0b; color: #fff; border-color: #f59e0b; }

/* ===== 首页响应式 ===== */
@media (max-width: 1200px) {
    .hp-grid { grid-template-columns: repeat(4, 1fr); }
    .hp-audio-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .hp-grid { grid-template-columns: repeat(3, 1fr); }
    .hp-audio-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hp-hero { padding: 32px 20px 28px; border-radius: 16px; }
    .hp-title { font-size: 1.5rem; }
    .hp-sub { font-size: 0.9rem; }
    .hp-search button span { display: none; }
    .hp-search button { padding: 10px 16px; }
    .hp-cats { gap: 8px; }
    .hp-cat { padding: 8px 16px; font-size: 0.85rem; }
}

@media (max-width: 600px) {
    .hp-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .hp-audio-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .hp-card-img { aspect-ratio: 1 / 1; }
    .hp-subcats { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
    .hp-subcats::-webkit-scrollbar { display: none; }
    .hp-subcat { flex-shrink: 0; }
}

@media (max-width: 400px) {
    .hp-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .hp-card-info { padding: 10px 12px; }
    .hp-card-title { font-size: 0.85rem; }
}

/* 后台头部与面板 */
.ad-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 16px;
    padding: 22px 26px;
    color: #fff;
    margin-bottom: 20px;
}
.ad-head h1 { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.ad-head p { font-size: 0.9rem; opacity: 0.85; margin: 0; }
.ad-head-date {
    font-size: 0.85rem;
    opacity: 0.85;
    white-space: nowrap;
    background: rgba(255,255,255,0.12);
    padding: 8px 16px;
    border-radius: 20px;
}
.ad-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 4px;
}
.ad-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: var(--shadow);
}
.ad-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.ad-panel-head h3 { font-size: 1rem; margin: 0; }
.ad-panel-link { font-size: 0.82rem; color: var(--primary); text-decoration: none; }
.ad-panel-link:hover { text-decoration: underline; }

@media (max-width: 768px) {
    .ad-head { flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 20px; }
    .ad-panels { grid-template-columns: 1fr; }
}

/* 广告管理卡片 */
.banner-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.banner-card:hover { border-color: #cbd5e1; box-shadow: var(--shadow); }
.banner-preview {
    width: 200px;
    height: 100px;
    flex-shrink: 0;
    background: #f1f5f9;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.banner-preview img { width: 100%; height: 100%; object-fit: contain; }
.banner-noimg-text { color: var(--text-muted); font-size: 0.82rem; }
.banner-order {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: rgba(15,23,42,0.72);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.banner-card-body { flex: 1; min-width: 0; }
.banner-sort {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    align-self: center;
}
.banner-sort .btn-xs { padding: 4px 10px; font-size: 0.85rem; line-height: 1.2; }
.banner-sort-placeholder { width: 100%; height: 26px; }
.banner-fields { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 12px; }
.banner-field label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 4px; color: var(--secondary); }
.banner-field .form-control { font-size: 0.86rem; }
.banner-card-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.banner-replace { cursor: pointer; }
.banner-upload { display: flex; align-items: center; gap: 12px; }
.banner-upload-tip { font-size: 0.85rem; color: var(--text-muted); }
@media (max-width: 640px) {
    .banner-card { flex-direction: column; }
    .banner-preview { width: 100%; }
}

/* 音频播放器 */
.modal-audio { display:flex; align-items:center; gap:10px; padding:12px 20px; background:#f8fafc; border-bottom:1px solid var(--border); }
.modal-audio audio { display:none; }
.audio-btn { width:36px; height:36px; border-radius:50%; border:1px solid var(--border); background:var(--card-bg); font-size:1rem; cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:all 0.2s; }
.audio-btn:hover { background:var(--primary); border-color:var(--primary); }
.audio-bar-wrap { flex:1; display:flex; align-items:center; gap:8px; }
.audio-bar { flex:1; height:6px; background:#e2e8f0; border-radius:3px; cursor:pointer; position:relative; overflow:hidden; }
.audio-progress { height:100%; background:var(--primary); border-radius:3px; transition:width 0.2s linear; }
.audio-time { font-size:0.75rem; color:var(--text-muted); white-space:nowrap; min-width:90px; text-align:right; }

/* ===== 后台更新提示条 ===== */
.update-notice { display:flex; align-items:flex-start; gap:14px; padding:16px 18px; border-radius:var(--radius); margin-bottom:16px; background:linear-gradient(135deg,#fff7ed,#fffbeb); border:1px solid #fdba74; }
.update-notice-icon { font-size:1.6rem; line-height:1; margin-top:2px; }
.update-notice-body { flex:1; min-width:0; }
.update-notice-title { font-size:1.02rem; font-weight:600; color:#7c2d12; margin-bottom:4px; }
.update-notice-changelog { font-size:0.88rem; color:#9a3412; line-height:1.6; margin-bottom:4px; white-space:pre-wrap; }
.update-notice-meta { font-size:0.8rem; color:#b45309; }
.update-notice-actions { display:flex; gap:8px; flex-shrink:0; align-items:center; }
@media (max-width:640px){ .update-notice{ flex-direction:column; } .update-notice-actions{ width:100%; } .update-notice-actions form{ flex:1; } .update-notice-actions .btn{ width:100%; } }
