:root {
    --bg: #0d0d12;
    --bg2: #13131a;
    --card-bg: rgba(20, 18, 32, 0.85);
    --card-border: rgba(212, 163, 58, 0.18);
    --gold: #d4a33a;
    --gold-light: #e8c86a;
    --gold-glow: rgba(212, 163, 58, 0.25);
    --purple: #7c3aed;
    --purple-dark: #4c1d95;
    --text: #e2e8f0;
    --text-dim: #94a3b8;
    --text-dark: #64748b;
    --green: #10b981;
    --red: #ef4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', system-ui, sans-serif;
    background: var(--bg);
    min-height: 100vh;
    color: var(--text);
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #1a1a2e; }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 24px;
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 60px 20px 40px;
    position: relative;
}
.page-header::before {
    content: '';
    position: absolute;
    top: -80px; left: 50%; transform: translateX(-50%);
    width: 600px; height: 300px;
    background: radial-gradient(ellipse, rgba(212,163,58,0.10) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.page-header-logo {
    font-size: 64px;
    margin-bottom: 12px;
    display: inline-block;
    position: relative;
    z-index: 1;
    animation: muLogoPulse 4s ease-in-out infinite;
}
@keyframes muLogoPulse {
    0%,100% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(212,163,58,0.3)); }
    50% { transform: scale(1.05); filter: drop-shadow(0 0 40px rgba(212,163,58,0.5)); }
}
.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    z-index: 1;
}
.page-header h1 .emoji {
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: initial;
}
.page-header p {
    color: var(--text-dim);
    margin-top: 8px;
    position: relative;
    z-index: 1;
}

/* 筛选栏 */
.filter-bar {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    padding: 20px 24px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    border: 1px solid var(--card-border);
}

.category-row {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(212, 163, 58, 0.08);
}
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.category-btn {
    padding: 6px 18px;
    border: 1px solid rgba(212, 163, 58, 0.12);
    background: rgba(255,255,255,0.03);
    border-radius: 30px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    color: var(--text-dim);
}
.category-btn:hover { 
    background: rgba(212, 163, 58, 0.08); 
    border-color: var(--gold);
    color: var(--gold-light);
}
.category-btn.active { 
    background: var(--gold); 
    color: #1a1a2e; 
    border-color: var(--gold);
    font-weight: 600;
}

.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.sort-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.sort-label { font-size: 13px; color: var(--text-dim); white-space: nowrap; }
.sort-select {
    padding: 8px 16px;
    border: 1px solid rgba(212, 163, 58, 0.15);
    border-radius: 30px;
    background: rgba(255,255,255,0.04);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    min-width: 140px;
    outline: none;
}
.sort-select:focus { border-color: var(--gold); }
.right-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.page-size-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.page-size-label { font-size: 13px; color: var(--text-dim); white-space: nowrap; }
.page-size-select {
    padding: 8px 12px;
    border: 1px solid rgba(212, 163, 58, 0.15);
    border-radius: 30px;
    background: rgba(255,255,255,0.04);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    outline: none;
}
.search-group { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.search-group input {
    padding: 8px 16px;
    border: 1px solid rgba(212, 163, 58, 0.15);
    border-radius: 30px;
    background: rgba(255,255,255,0.04);
    color: var(--text);
    width: 180px;
    font-size: 13px;
    outline: none;
}
.search-group input::placeholder { color: var(--text-dark); }
.search-group input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px var(--gold-glow);
}
.search-group button {
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--gold), #f59e0b);
    color: #1a1a2e;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}
.search-group button:hover { 
    box-shadow: 0 4px 12px var(--gold-glow);
    transform: translateY(-1px);
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.model-card {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid var(--card-border);
}
.model-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.card-cover {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #0a0a12;
}
.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.model-card:hover .card-cover img { transform: scale(1.05); }
.card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 6px;
    z-index: 2;
}
.badge {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    color: white;
}
.badge-top { background: #ff4757; }
.badge-recommend { background: #ffa502; }
.badge-free { background: #2ed573; }
.badge-video { background: #e84118; }
.card-content { padding: 16px; }
.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-dark);
}
.card-category { color: var(--gold); }
.card-stats { display: flex; gap: 12px; }

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.page-btn {
    padding: 8px 14px;
    border: 1px solid rgba(212, 163, 58, 0.15);
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-dim);
    transition: all 0.2s;
    font-size: 14px;
}
.page-btn:hover { border-color: var(--gold); color: var(--gold); }
.page-btn.active { background: var(--gold); color: #1a1a2e; border-color: var(--gold); font-weight: 600; }
.page-btn.disabled, .page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-info { color: var(--text-dark); font-size: 13px; margin: 0 10px; }

.loading, .no-data { text-align: center; padding: 60px; color: var(--text-dark); }

/* ===== 作者筛选控件 ===== */
.author-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.author-filter-label {
    font-size: 13px;
    color: var(--text-dim);
    white-space: nowrap;
}
.author-filter-select {
    padding: 8px 16px;
    border: 1px solid rgba(212, 163, 58, 0.15);
    border-radius: 30px;
    background: rgba(255,255,255,0.04);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    min-width: 100px;
    max-width: 160px;
    outline: none;
}
.author-filter-select:focus {
    border-color: var(--gold);
}

/* ===== 表格布局 (PC端) ===== */
.models-table-wrapper {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    border: 1px solid var(--card-border);
    overflow: hidden;
    margin-bottom: 30px;
}
.models-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.models-table thead {
    background: linear-gradient(135deg, rgba(212, 163, 58, 0.12), rgba(124, 58, 237, 0.08));
    border-bottom: 1px solid rgba(212, 163, 58, 0.15);
}
.models-table th {
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--gold-light);
    font-size: 13px;
    white-space: nowrap;
    letter-spacing: 0.5px;
}
.models-table th:first-child { padding-left: 20px; }
.models-table th:last-child { padding-right: 20px; }
.models-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    vertical-align: middle;
    color: var(--text);
}
.models-table td:first-child { padding-left: 20px; }
.models-table td:last-child { padding-right: 20px; }
.models-table tbody tr {
    transition: background 0.2s;
}
.models-table tbody tr:hover {
    background: rgba(212, 163, 58, 0.04);
}
.models-table tbody tr:last-child td {
    border-bottom: none;
}

/* 列宽 */
.col-index { width: 50px; text-align: center !important; }
.col-cover { width: 100px; }
.col-name { min-width: 160px; }
.col-author { width: 100px; }
.col-price { width: 90px; text-align: center !important; }
.col-preview { width: 60px; text-align: center !important; }
.col-detail { width: 100px; text-align: center !important; }
.col-buy { width: 100px; text-align: center !important; }

.models-table td.col-index {
    font-size: 13px;
    color: var(--text-dark);
    font-weight: 500;
}

/* 封面缩略图 */
.table-thumb {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(212, 163, 58, 0.1);
    display: block;
    transition: transform 0.2s, box-shadow 0.2s;
}
a:hover .table-thumb {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* 模型名称链接 */
.model-name-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    display: block;
    line-height: 1.4;
}
.model-name-link:hover {
    color: var(--gold);
}

/* 作者名 */
.author-name {
    color: var(--text-dim);
    font-size: 13px;
}

/* 价格 */
.price-free {
    color: var(--green);
    font-weight: 600;
    font-size: 13px;
}
.price-points {
    color: var(--gold);
    font-weight: 600;
    font-size: 13px;
}

/* 预览按钮 */
.preview-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(212, 163, 58, 0.12);
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
    line-height: 1;
}
.preview-btn:hover {
    background: rgba(212, 163, 58, 0.1);
    border-color: var(--gold);
    transform: scale(1.1);
}
.no-preview {
    color: rgba(255,255,255,0.1);
    font-size: 13px;
}

/* 操作链接 */
.action-link {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    border: none;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.2s;
    white-space: nowrap;
    cursor: pointer;
}
.detail-link {
    background: rgba(255,255,255,0.06);
    color: var(--text-dim);
}
.detail-link:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text);
}
.buy-link {
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(124,58,237,0.3);
}
.buy-link:hover {
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124,58,237,0.4);
}

/* 表格加载状态 */
.table-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-dark);
    font-style: italic;
}
.table-no-data {
    text-align: center;
    padding: 40px;
    color: var(--text-dark);
}

/* 图片预览弹窗 */
.image-preview-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}
.image-preview-modal {
    background: var(--bg2);
    border-radius: 16px;
    border: 1px solid var(--card-border);
    width: 800px;
    max-width: 90vw;
    height: 600px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(212, 163, 58, 0.1);
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}
.preview-close {
    cursor: pointer;
    font-size: 22px;
    color: var(--text-dark);
    transition: color 0.2s;
}
.preview-close:hover { color: var(--text); }
.preview-body {
    padding: 20px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    min-height: 0;
}
.preview-img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(212, 163, 58, 0.08);
    cursor: zoom-in;
    transition: transform 0.2s;
}
.preview-img:hover { transform: scale(1.02); }
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== 📱 平板 / 大屏手机 (≤768px) ===== */
@media (max-width: 768px) {
    .main-container { padding: 20px 16px; }
    .page-header { margin-bottom: 24px; }
    .page-header h1 { font-size: 26px; }
    .page-header p { font-size: 14px; }
    .filter-bar { padding: 16px; border-radius: 12px; }
    .category-row { margin-bottom: 14px; padding-bottom: 12px; }
    .category-tabs { gap: 8px; }
    .category-btn { font-size: 13px; padding: 6px 16px; }
    .category-btn:active { background: var(--gold); color: #1a1a2e; }
    /* 手机端：隐藏PC控件行，使用底部 result-bar */
    .controls-row { display: none !important; }
    .mobile-only { display: flex !important; }
    .model-grid { gap: 16px; grid-template-columns: repeat(2, 1fr); }
    .mobile-only { display: flex !important; }
    .result-bar { display: flex !important; }
    .recommend-section { display: block !important; }
    .mobile-search-bar { display: none !important; }
    .model-card { border-radius: 12px; }
    .card-content { padding: 12px; }
    .card-title { font-size: 14px; }
    .card-info { font-size: 11px; }
    .card-stats { flex-direction: column; gap: 2px; text-align: right; }
    .pagination { gap: 6px; }
    .page-btn { padding: 8px 12px; font-size: 13px; }
    .image-preview-modal { width: 95vw; height: auto; max-height: 80vh; }
    .preview-header { padding: 12px 16px; font-size: 14px; }
    .preview-body { padding: 12px; gap: 10px; }
}

/* ===== 📱 手机 (≤480px) ===== */
@media (max-width: 480px) {
    .model-grid { gap: 12px; }
    .card-content { padding: 10px; }
    .card-title { font-size: 13px; }
    .card-stats { font-size: 10px; }
}

/* ==============================
   响应式 & 移动端样式
   ============================== */

/* 桌面端隐藏所有 mobile-only 元素 */
@media (min-width: 769px) {
    .mobile-only, .result-bar, .mobile-search-bar, .recommend-section { display: none !important; }
    .controls-row, .models-table-wrapper { display: flex; }
    .model-grid { display: none !important; }
}

/* ===== 为你推荐 (手机端) ===== */
.recommend-section {
    margin-bottom: 20px;
}
.recommend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.recommend-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}
.recommend-sub {
    font-size: 12px;
    color: var(--text-dark);
    margin-top: 4px;
}
.refresh-btn {
    padding: 6px 14px;
    background: rgba(212,163,58,0.08);
    border: 1px solid rgba(212,163,58,0.15);
    border-radius: 30px;
    font-size: 12px;
    color: var(--gold);
    cursor: pointer;
}
.refresh-btn:active { background: rgba(212,163,58,0.15); }
.recommend-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -16px;
    padding: 0 16px;
}
.recommend-track {
    display: flex;
    gap: 12px;
}

/* ===== 结果栏 (手机端) ===== */
.result-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    gap: 8px;
}
.result-left {
    display: flex;
    gap: 8px;
}
.sort-trigger, .filter-trigger {
    padding: 8px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(212,163,58,0.12);
    border-radius: 30px;
    font-size: 13px;
    color: var(--text-dim);
    cursor: pointer;
}
.sort-trigger:active, .filter-trigger:active {
    background: rgba(212,163,58,0.08);
    color: var(--gold);
}
.result-count {
    font-size: 13px;
    color: var(--text-dark);
}
.search-trigger {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(212,163,58,0.12);
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== 移动搜索条 ===== */
.mobile-search-bar {
    display: none;
    gap: 8px;
    padding: 8px 0 16px;
}
.mobile-search-bar input {
    flex: 1;
    padding: 10px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(212,163,58,0.15);
    border-radius: 30px;
    font-size: 14px;
    color: var(--text);
    outline: none;
}
.mobile-search-bar input:focus {
    border-color: var(--gold);
}
.mobile-search-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--gold), #f59e0b);
    color: #1a1a2e;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* ===== 加载更多按钮 ===== */
.load-more-btn {
    text-align: center;
    padding: 14px;
    margin: 20px 0;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(212,163,58,0.12);
    border-radius: 30px;
    font-size: 14px;
    color: var(--text-dim);
    cursor: pointer;
}
.load-more-btn:active {
    background: rgba(212,163,58,0.08);
    color: var(--gold);
}

/* ===== 回到顶部按钮 ===== */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    font-size: 20px;
    color: var(--gold);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.2s;
}
.back-to-top:active {
    transform: scale(0.9);
}

/* ===== 抽屉面板 ===== */
.drawer-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s;
}
.drawer-overlay.active {
    visibility: visible;
    opacity: 1;
}
.drawer-panel {
    width: 100%;
    max-width: 500px;
    max-height: 70vh;
    background: var(--bg2);
    border-radius: 20px 20px 0 0;
    padding: 0 0 24px;
    overflow-y: auto;
    border: 1px solid rgba(212,163,58,0.1);
    border-bottom: none;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.drawer-overlay.active .drawer-panel,
.drawer-panel.active {
    transform: translateY(0);
}
.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px 12px;
    border-bottom: 1px solid rgba(212,163,58,0.08);
    font-size: 16px;
    font-weight: 600;
    position: sticky;
    top: 0;
    background: var(--bg2);
    z-index: 1;
}
.drawer-close {
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
}
.drawer-section {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(212,163,58,0.04);
}
.drawer-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 12px;
}
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-tags .category-btn {
    font-size: 13px;
    padding: 6px 14px;
}
.filter-radio-group,
.filter-check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-radio,
.filter-check {
    padding: 8px 18px;
    border: 1px solid rgba(212,163,58,0.12);
    border-radius: 30px;
    font-size: 13px;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s;
}
.filter-radio.active,
.filter-check.active {
    background: var(--gold);
    color: #1a1a2e;
    border-color: var(--gold);
    font-weight: 600;
}
.filter-radio:active,
.filter-check:active {
    background: rgba(212,163,58,0.15);
}
.drawer-actions {
    display: flex;
    gap: 12px;
    padding: 16px 20px 0;
}
.drawer-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}
.drawer-btn.confirm {
    background: linear-gradient(135deg, var(--gold), #f59e0b);
    color: #1a1a2e;
}
.drawer-btn.confirm:active {
    transform: scale(0.98);
}
.drawer-btn.reset {
    background: rgba(255,255,255,0.06);
    color: var(--text-dim);
    border: 1px solid rgba(212,163,58,0.12);
}

/* ===== 排序面板 ===== */
.sort-option {
    padding: 14px 20px;
    font-size: 15px;
    color: var(--text-dim);
    cursor: pointer;
    border-bottom: 1px solid rgba(212,163,58,0.04);
    transition: all 0.15s;
}
.sort-option:active {
    background: rgba(212,163,58,0.08);
    color: var(--gold-light);
}
.sort-option.active {
    color: var(--gold);
    background: rgba(212,163,58,0.06);
    font-weight: 600;
}

/* ===== 表格 ===== */
.models-table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    backdrop-filter: blur(8px);
}
.models-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}
.models-table th {
    padding: 14px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
    text-align: left;
    background: rgba(212,163,58,0.04);
    border-bottom: 1px solid rgba(212,163,58,0.1);
}
.models-table td {
    padding: 12px;
    font-size: 13px;
    color: var(--text-dim);
    border-bottom: 1px solid rgba(212,163,58,0.04);
    vertical-align: middle;
}
.models-table tbody tr:hover {
    background: rgba(212,163,58,0.03);
}
.models-table tbody tr:last-child td {
    border-bottom: none;
}
.col-index { width: 50px; text-align: center; }
.col-cover { width: 80px; }
.col-name { }
.col-author { width: 100px; }
.col-price { width: 90px; text-align: center; }
.col-video { width: 60px; text-align: center; }
.col-detail { width: 60px; text-align: center; }
.col-buy { width: 80px; text-align: center; }
.col-author.sortable,
.col-price.sortable {
    cursor: pointer;
    user-select: none;
}
.col-author.sortable:hover,
.col-price.sortable:hover {
    color: var(--gold-light);
}
.sort-arrow {
    display: inline-block;
    margin-left: 4px;
    font-size: 10px;
    opacity: 0.5;
}
.sort-arrow.asc::after { content: "▲"; opacity: 1; }
.sort-arrow.desc::after { content: "▼"; opacity: 1; }
.table-thumb {
    width: 56px;
    height: 42px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
}
.table-thumb:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.table-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-dark);
    font-size: 14px;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* ==============================
   购买弹窗 (购买积分)
   ============================== */
.buy-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}
.buy-modal-content {
    background: var(--bg2);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 28px;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.buy-modal-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--gold);
}
.buy-name {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(212, 163, 58, 0.08);
}
.buy-cost {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}
.buy-cost .label { color: var(--text-dim); }
.buy-cost .price { 
    font-size: 20px; 
    font-weight: 700; 
    color: var(--gold-light);
    font-family: 'SF Mono', 'Consolas', monospace;
}
.buy-points { 
    font-size: 13px; 
    color: var(--text-dark); 
    margin-bottom: 20px;
}
.buy-points span { color: var(--text-dim); }
.buy-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.purchase-btn {
    padding: 10px 28px;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.purchase-btn.confirm {
    background: linear-gradient(135deg, var(--gold), #f59e0b);
    color: #1a1a2e;
    font-weight: 700;
}
.purchase-btn.confirm:hover {
    box-shadow: 0 4px 12px var(--gold-glow);
    transform: translateY(-1px);
}
.purchase-btn.cancel {
    background: rgba(255,255,255,0.06);
    color: var(--text-dim);
    border: 1px solid rgba(212, 163, 58, 0.12);
}
.purchase-btn.cancel:hover { 
    background: rgba(255,255,255,0.1); 
    color: var(--text);
}

/* ==============================
   下载链接展示
   ============================== */
.download-link-group {
    margin-top: 16px;
}
.download-link-group label {
    display: block;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 6px;
    font-weight: 500;
}
.download-url-box {
    display: flex;
    gap: 8px;
}
.download-url-box input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(212, 163, 58, 0.15);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text);
    background: rgba(255,255,255,0.04);
    outline: none;
}
.copy-btn {
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
    transition: all 0.2s;
}
.copy-btn:hover { 
    box-shadow: 0 4px 12px rgba(124,58,237,0.3);
    transform: translateY(-1px);
}

.download-reminder {
    margin-top: 16px;
    padding: 12px;
    background: rgba(212, 163, 58, 0.06);
    border: 1px solid rgba(212, 163, 58, 0.12);
    border-radius: 8px;
    font-size: 13px;
    color: var(--gold);
    text-align: center;
    line-height: 1.5;
}

/* 已购买按钮 */
.buy-link.bought {
    background: linear-gradient(135deg, var(--green), #1abc9c) !important;
    cursor: pointer !important;
}
.buy-link.bought:hover {
    background: linear-gradient(135deg, #26a65b, #16a085) !important;
}

/* Toast提示 */
.buy-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    animation: toastIn 0.3s ease;
    max-width: 90vw;
    text-align: center;
}
.buy-toast-info { background: var(--bg2); color: var(--text); border: 1px solid var(--card-border); }
.buy-toast-warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: #1a1a2e; }
.buy-toast-error { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }
.buy-toast.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ==============================
   图片预览轮播
   ============================== */
.preview-carousel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 20px;
    min-height: 0;
    overflow: hidden;
}
.carousel-viewport {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 10px 0;
}
.preview-main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: opacity 0.3s;
}
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.carousel-arrow:hover { background: rgba(0,0,0,0.8); }
.carousel-arrow.left { left: 10px; }
.carousel-arrow.right { right: 10px; }
.preview-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 0 16px;
}
.preview-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    cursor: pointer;
    transition: all 0.2s;
}
.preview-dot.active {
    background: var(--gold);
    transform: scale(1.3);
}

/* 封面缩略图交互 */
.table-thumb { cursor: pointer; }
.table-thumb:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* ==============================
   分类筛选响应式（原样式保留）
   ============================== */
@media (max-width: 768px) {
    .category-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
    }
    .category-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
    .author-filter-group {
        width: 100%;
        justify-content: space-between;
    }
    .author-filter-select {
        flex: 1;
        max-width: none;
        min-width: 0;
    }
}

@media (min-width: 769px) {
    .models-table-wrapper {
        display: block;
    }
    .model-grid {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .models-table-wrapper {
        display: none;
    }
}

/* select option 暗色适配 */
select option {
    background: #1a1a2e;
    color: var(--text);
}

/* ===== 推荐卡片 ===== */
.rec-card {
    flex-shrink: 0;
    width: 140px;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--card-border);
}
.rec-cover {
    position: relative;
    height: 100px;
    overflow: hidden;
}
.rec-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rec-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    padding: 2px 6px;
    background: rgba(212,163,58,0.9);
    color: #1a1a2e;
    font-size: 10px;
    border-radius: 8px;
    font-weight: 600;
}
.rec-info {
    padding: 8px 10px;
}
.rec-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.rec-stats {
    font-size: 10px;
    color: var(--text-dark);
    display: flex;
    gap: 8px;
}
.rec-price {
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    margin-top: 2px;
}
.rec-price.free {
    color: #4ade80;
}

/* ===== 搜索触发器 ===== */
.search-trigger {
    flex-shrink: 0;
}
