﻿/**
 * 组件样式
 *
 * @package Xuhuan
 * @since 1.0.0
 */

/* ==========================================================================
   Archive Page Styles
   ========================================================================== */
.archive-header {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--primary-light) 50%);
    padding: var(--spacing-xl) 0;
}

.archive-title-section {
    margin-top: var(--spacing-lg);
}

.archive-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--spacing-sm);
}

.archive-description {
    color: var(--text-secondary);
    font-size: var(--text-lg);
}

/* Archive Layout */
.archive-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--spacing-xl);
    padding: var(--spacing-xl) 0;
}

.archive-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.sidebar-inner {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
}

/* Sidebar Widgets - 基础间距 */
/* 注意：详细样式在文件后面的"侧边栏小工具通用样式"部分定义 */

.sidebar-widget .widget-title {
    font-size: var(--text-base);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-color);
    color: var(--text-primary);
}

/* Search Widget */
.search-widget .search-input-wrapper {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.search-widget .search-input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    background: none;
}

.search-widget .search-btn {
    padding: 10px 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.search-widget .search-btn:hover {
    color: var(--primary-color);
}

/* Filter List */
.filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.filter-item {
    margin-bottom: 2px;
}

.filter-item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.filter-item > a:hover,
.filter-item.active > a {
    background: var(--primary-light);
    color: var(--primary-color);
}

.filter-item .count {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.filter-item .sub-list {
    list-style: none;
    margin: 0;
    padding-left: var(--spacing-md);
}

.filter-item .sub-list li {
    margin: 2px 0;
}

.filter-item .sub-list a {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--text-sm);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
}

.filter-item .sub-list a:hover,
.filter-item .sub-list .active a {
    color: var(--primary-color);
}

/* Filter Group */
.filter-group {
    margin-bottom: var(--spacing-sm);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.filter-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
}

.filter-group-toggle:hover {
    background: var(--bg-tertiary);
}

.filter-group.open .toggle-icon {
    transform: rotate(45deg);
}

.filter-group-content {
    padding: var(--spacing-sm);
    border-top: 1px solid var(--border-light);
}

.filter-options {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    cursor: pointer;
    font-size: var(--text-sm);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.filter-option:hover {
    background: var(--bg-tertiary);
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.tag-cloud .tag {
    padding: 4px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    transition: all var(--transition-normal);
}

.tag-cloud .tag:hover,
.tag-cloud .tag.active {
    background: var(--primary-color);
    color: var(--text-light);
}

/* Archive Toolbar */
.archive-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.result-count {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.sidebar-toggle {
    display: none;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.sort-dropdown .form-select-sm {
    padding: 8px 32px 8px 12px;
    font-size: var(--text-sm);
}

.view-toggle {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 4px;
}

.view-btn {
    padding: 6px 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.view-btn:hover {
    color: var(--text-primary);
}

.view-btn.active {
    background: var(--bg-primary);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--text-sm);
}

.breadcrumbs a {
    color: var(--text-secondary);
}

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

.breadcrumb-separator {
    color: var(--text-muted);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.tah-pagination {
    margin-top: var(--spacing-xl);
}

.pagination-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination-item a,
.pagination-item span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.pagination-item a:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.pagination-item .current {
    background: var(--primary-color);
    color: var(--text-light);
}

.pagination-item .dots {
    background: none;
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-light);
    font-size: 24px;
    cursor: pointer;
    transition: background var(--transition-normal);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--text-light);
    font-size: 24px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

/* ==========================================================================
   User Dashboard Styles
   ========================================================================== */
.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--spacing-xl);
    padding: var(--spacing-xl) 0;
}

.dashboard-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.user-profile-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.user-profile-card .user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto var(--spacing-md);
}

.user-profile-card .user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-profile-card .user-name {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.user-profile-card .user-role {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.dashboard-nav {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.dashboard-nav .nav-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.dashboard-nav .nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.dashboard-nav .nav-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
}

/* Dashboard Nav Groups (Plugins) */
.dashboard-nav-group {
    margin-bottom: var(--spacing-lg);
}

.dashboard-nav-group .nav-group-title {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.dashboard-nav-group .dashboard-nav {
    margin-bottom: 0;
}

.dashboard-action {
    margin-top: var(--spacing-md);
}

/* Dashboard Main */
.dashboard-main {
    min-height: 400px;
}

.dashboard-section {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.dashboard-section .section-title {
    font-size: var(--text-xl);
    margin-bottom: var(--spacing-lg);
}

.dashboard-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    color: var(--text-light);
}

.stat-card .stat-value {
    display: block;
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card .stat-label {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.stat-card-link {
    padding: 0;
}

.stat-card-link .stat-card-inner {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    color: inherit;
    text-decoration: none;
    border-radius: var(--radius-lg);
    transition: background var(--transition-fast);
}

.stat-card-link .stat-card-inner:hover {
    background: var(--bg-secondary);
}

/* Orders Table */
.orders-table-wrapper {
    overflow-x: auto;
    margin-bottom: var(--spacing-lg);
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.orders-table th,
.orders-table td {
    padding: var(--spacing-md) var(--spacing-sm);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.orders-table th {
    font-weight: 600;
    color: var(--text-secondary);
}

.orders-table td.order-no code {
    font-size: 0.9em;
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.orders-table td.order-product a {
    color: var(--primary-color);
}

.orders-table td.order-product a:hover {
    text-decoration: underline;
}

.orders-table .order-amount {
    font-variant-numeric: tabular-nums;
}

.orders-table .order-status.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
}

.orders-table .status-success { background: var(--success-light); color: var(--success-dark); }
.orders-table .status-warning { background: var(--warning-light); color: var(--warning-dark); }
.orders-table .status-secondary { background: var(--bg-tertiary); color: var(--text-muted); }
.orders-table .status-info { background: var(--info-light, #e7f3ff); color: var(--info-dark, #0c5460); }

/* Payment Method Badge */
.orders-table .order-payment-method {
    white-space: nowrap;
}

.payment-method-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 500;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.payment-method-badge svg {
    flex-shrink: 0;
}

.payment-method-badge.pay-alipay {
    background: rgba(0, 166, 226, 0.1);
    color: #00a6e2;
}

.payment-method-badge.pay-wechat {
    background: rgba(9, 187, 7, 0.1);
    color: #09bb07;
}

.payment-method-badge.pay-balance {
    background: rgba(250, 173, 20, 0.1);
    color: #d48806;
}

.dashboard-section .section-desc {
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin: calc(-1 * var(--spacing-md)) 0 var(--spacing-lg);
}

/* Model List */
.model-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.model-list-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
}

.model-list-item .model-thumb {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.model-list-item .model-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.model-list-item .model-thumb .placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.model-list-item .model-info {
    flex: 1;
    min-width: 0;
}

.model-list-item .model-title {
    font-size: var(--text-base);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.model-list-item .model-title a {
    color: var(--text-primary);
}

.model-list-item .model-title a:hover {
    color: var(--primary-color);
}

.model-list-item .model-meta {
    display: flex;
    gap: var(--spacing-md);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.model-list-item .meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.model-list-item .model-status {
    padding: 0 var(--spacing-md);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
}

.status-publish {
    background: var(--success-bg, #d4edda);
    color: var(--success-color, #155724);
}

.status-pending {
    background: var(--warning-bg, #fff3cd);
    color: var(--warning-color, #856404);
}

.status-draft {
    background: var(--info-bg, #e2e4e9);
    color: var(--info-color, #495057);
}

.model-list-item .model-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: var(--spacing-md);
}

.filter-tab {
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.filter-tab:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.filter-tab.active {
    color: var(--primary-color);
    background: var(--primary-light);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-muted);
}

.empty-state p {
    margin-bottom: var(--spacing-lg);
}

/* Settings */
.settings-card {
    padding: var(--spacing-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
}

.settings-card h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--spacing-md);
}

.settings-card p {
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.settings-table {
    width: 100%;
}

.settings-table th {
    text-align: left;
    padding: var(--spacing-sm) 0;
    color: var(--text-muted);
    font-weight: 500;
    width: 150px;
}

.settings-table td {
    padding: var(--spacing-sm) 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .archive-layout {
        grid-template-columns: 1fr;
    }
    
    .archive-sidebar {
        position: fixed;
        top: 0;
        left: -300px;
        width: 300px;
        height: 100vh;
        background: var(--bg-primary);
        z-index: var(--z-modal);
        padding: var(--spacing-lg);
        overflow-y: auto;
        transition: left var(--transition-normal);
    }
    
    .archive-sidebar.open {
        left: 0;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: calc(var(--z-modal) - 1);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
    }
    
    .sidebar-overlay.open {
        opacity: 1;
        visibility: visible;
    }
    
    .sidebar-toggle {
        display: flex;
    }
    
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sidebar {
        position: static;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .model-list-item {
        flex-wrap: wrap;
    }
    
    .model-list-item .model-status {
        order: 3;
        width: 100%;
        padding: var(--spacing-sm) 0 0;
    }
    
    .model-list-item .model-actions {
        order: 4;
        width: 100%;
        padding-top: var(--spacing-sm);
        border-top: 1px solid var(--border-light);
        margin-top: var(--spacing-sm);
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .stat-card {
        padding: var(--spacing-md);
    }
    
    .stat-card .stat-value {
        font-size: var(--text-xl);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   首页小工具区域间距
   间距值通过 --tah-homepage-widget-spacing 变量控制，可在后台自定义
   ============================================================ */
/* 首页顶部全宽区域 */
.homepage-top-fullwidth-area {
    margin-bottom: var(--tah-homepage-widget-spacing, 40px);
}

/* 首页主内容区域（无侧边栏） */
.homepage-content-area {
    display: block;
}

/* 首页底部全宽区域 */
.homepage-bottom-fullwidth-area {
    margin-top: var(--tah-homepage-widget-spacing, 40px);
}

/* 首页小工具通用间距 - 适用于所有首页区域内的小工具 */
.homepage-top-fullwidth-area > *,
.homepage-content-area > *,
.homepage-bottom-fullwidth-area > *,
.homepage-main-content > * {
    margin-bottom: var(--tah-homepage-widget-spacing, 40px) !important;
}

.homepage-top-fullwidth-area > *:last-child,
.homepage-content-area > *:last-child,
.homepage-bottom-fullwidth-area > *:last-child,
.homepage-main-content > *:last-child {
    margin-bottom: 0 !important;
}

/* 首页小工具内部 section 间距统一 */
.homepage-top-fullwidth-area .tah-slider-section,
.homepage-top-fullwidth-area .tah-cover-section,
.homepage-top-fullwidth-area .tah-category-section,
.homepage-content-area .tah-slider-section,
.homepage-content-area .tah-cover-section,
.homepage-content-area .tah-category-section,
.homepage-content-area .tah-posts-section,
.homepage-content-area .tah-tab-section,
.homepage-content-area .tah-models-display,
.homepage-main-content .tah-slider-section,
.homepage-main-content .tah-cover-section,
.homepage-main-content .tah-category-section,
.homepage-main-content .tah-posts-section,
.homepage-main-content .tah-tab-section,
.homepage-main-content .tah-models-display,
.homepage-bottom-fullwidth-area .tah-slider-section,
.homepage-bottom-fullwidth-area .tah-cover-section,
.homepage-bottom-fullwidth-area .tah-category-section,
.homepage-bottom-fullwidth-area .tah-posts-section,
.homepage-bottom-fullwidth-area .tah-tab-section,
.homepage-bottom-fullwidth-area .tah-models-display {
    margin-bottom: 0;
}

/* ============================================================
   幻灯片轮播小工具样式
   ============================================================ */
.tah-slider-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--tah-radius-lg, 12px);
    margin-bottom: 24px;
}

.tah-slider-wrapper {
    position: relative;
    width: 100%;
    height: var(--slider-height, 400px);
}

.tah-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.tah-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--slider-speed, 600ms) ease-in-out, 
                transform var(--slider-speed, 600ms) ease-in-out,
                visibility 0s var(--slider-speed, 600ms);
    display: block;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.tah-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
    transition: opacity var(--slider-speed, 600ms) ease-in-out, 
                transform var(--slider-speed, 600ms) ease-in-out,
                visibility 0s 0s;
}

/* ===== 淡入淡出效果 (默认) ===== */
.tah-slider-effect-fade .tah-slide {
    opacity: 0;
}
.tah-slider-effect-fade .tah-slide.active {
    opacity: 1;
}

/* ===== 滑动效果 ===== */
.tah-slider-effect-slide .tah-slide {
    opacity: 1;
    visibility: visible;
    transform: translateX(100%);
}
.tah-slider-effect-slide .tah-slide.active {
    transform: translateX(0);
}
.tah-slider-effect-slide .tah-slide.slide-prev {
    transform: translateX(-100%);
}

/* 垂直滑动 */
.tah-slider-effect-slide.tah-slider-dir-vertical .tah-slide {
    transform: translateY(100%);
}
.tah-slider-effect-slide.tah-slider-dir-vertical .tah-slide.active {
    transform: translateY(0);
}
.tah-slider-effect-slide.tah-slider-dir-vertical .tah-slide.slide-prev {
    transform: translateY(-100%);
}

/* ===== 3D方块效果 ===== */
.tah-slider-effect-cube {
    perspective: 1200px;
}
.tah-slider-effect-cube .tah-slider-track {
    transform-style: preserve-3d;
}
.tah-slider-effect-cube .tah-slide {
    opacity: 1;
    visibility: visible;
    transform: rotateY(90deg) translateZ(50%);
    transform-origin: center center;
}
.tah-slider-effect-cube .tah-slide.active {
    transform: rotateY(0deg) translateZ(0);
}
.tah-slider-effect-cube .tah-slide.slide-prev {
    transform: rotateY(-90deg) translateZ(50%);
}

/* ===== 3D翻转效果 ===== */
.tah-slider-effect-flip {
    perspective: 1200px;
}
.tah-slider-effect-flip .tah-slider-track {
    transform-style: preserve-3d;
}
.tah-slider-effect-flip .tah-slide {
    opacity: 1;
    visibility: visible;
    transform: rotateY(180deg);
    transform-origin: center center;
}
.tah-slider-effect-flip .tah-slide.active {
    transform: rotateY(0deg);
}
.tah-slider-effect-flip .tah-slide.slide-prev {
    transform: rotateY(-180deg);
}

/* ===== 3D流效果 (Coverflow) ===== */
.tah-slider-effect-coverflow {
    perspective: 1200px;
}
.tah-slider-effect-coverflow .tah-slider-track {
    transform-style: preserve-3d;
}
.tah-slider-effect-coverflow .tah-slide {
    opacity: 0.4;
    visibility: visible;
    transform: rotateY(45deg) scale(0.85) translateX(30%);
    transform-origin: center center;
}
.tah-slider-effect-coverflow .tah-slide.active {
    opacity: 1;
    transform: rotateY(0deg) scale(1) translateX(0);
    z-index: 2;
}
.tah-slider-effect-coverflow .tah-slide.slide-prev {
    opacity: 0.4;
    transform: rotateY(-45deg) scale(0.85) translateX(-30%);
}

/* ===== 卡片堆叠效果 ===== */
.tah-slider-effect-cards .tah-slide {
    opacity: 0.6;
    visibility: visible;
    transform: scale(0.9) translateY(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-radius: inherit;
}
.tah-slider-effect-cards .tah-slide.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    z-index: 2;
}
.tah-slider-effect-cards .tah-slide.slide-prev {
    opacity: 0;
    transform: scale(0.85) translateY(-20px);
}

.tah-slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tah-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 1;
}

.tah-slide-content {
    position: absolute;
    top: var(--slide-content-top, auto);
    bottom: var(--slide-content-bottom, 0);
    left: 0;
    right: 0;
    padding: 40px;
    z-index: 2;
    color: var(--slide-text-color, #fff);
    display: flex;
    justify-content: var(--slide-content-align, flex-start);
    text-align: var(--slide-text-align, left);
    transform: var(--slide-content-transform, none);
}

/* 文字内容容器 */
.tah-slide-text-wrapper {
    display: inline-block;
    padding: 16px 24px;
    background: transparent;
    max-width: 600px;
    text-align: var(--slide-text-align, left);
}

.tah-slide-title {
    font-size: var(--slide-title-size, 2rem);
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.3;
    color: #ffffff !important;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.8),
        0 4px 12px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(0, 0, 0, 0.4);
}

.tah-slide-desc {
    font-size: var(--slide-desc-size, 1rem);
    margin: 0;
    color: rgba(255, 255, 255, 0.95) !important;
    max-width: 600px;
    line-height: 1.5;
    text-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.8),
        0 3px 8px rgba(0, 0, 0, 0.5),
        0 0 16px rgba(0, 0, 0, 0.3);
}

/* 当有按钮时，描述需要底部间距 */
.tah-slide-desc + .tah-slide-btn {
    margin-top: 16px;
}

.tah-slide-btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--slide-btn-color, var(--tah-primary, #2271b1));
    color: #fff !important;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    text-shadow: none;
}

.tah-slide-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

a.tah-slide:hover .tah-slide-btn {
    background: var(--tah-primary-hover, #135e96);
}

/* 箭头按钮 */
.tah-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0;
    backdrop-filter: blur(4px);
}

.tah-slider-section:hover .tah-slider-arrow {
    opacity: 1;
}

.tah-slider-arrow:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.05);
}

.tah-slider-prev {
    left: 16px;
}

.tah-slider-next {
    right: 16px;
}

/* 指示点 */
.tah-slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 8px;
    align-items: center;
}

.tah-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.tah-slider-dot.active {
    background: #fff;
    transform: scale(1.2);
}

.tah-slider-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* 横线指示器样式 */
.tah-slider-dots-line .tah-slider-dots {
    gap: 6px;
}
.tah-slider-dots-line .tah-slider-dot {
    width: 24px;
    height: 4px;
    border-radius: 2px;
}
.tah-slider-dots-line .tah-slider-dot.active {
    width: 36px;
    transform: none;
}

/* 数字分页样式 */
.tah-slider-fraction {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 14px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}
.tah-slider-current {
    font-size: 18px;
}
.tah-slider-separator {
    margin: 0 4px;
    opacity: 0.7;
}
.tah-slider-total {
    opacity: 0.8;
}

/* 缩略图指示器样式 */
.tah-slider-dots[data-style="thumbnail"] {
    bottom: 12px;
    gap: 6px;
    padding: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    backdrop-filter: blur(8px);
}
.tah-slider-thumb {
    width: 48px;
    height: 32px;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.6;
}
.tah-slider-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tah-slider-thumb.active {
    border-color: #fff;
    opacity: 1;
    transform: scale(1.05);
}
.tah-slider-thumb:hover {
    opacity: 0.9;
}

/* 进度条 */
.tah-slider-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 4;
}
.tah-slider-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--tah-primary, #2271b1), var(--tah-primary-light, #3a8fd9));
    width: 0;
    transition: width 0.1s linear;
}
.tah-slider-progress-bar.animating {
    animation: sliderProgress var(--slider-interval, 5000ms) linear forwards;
}
@keyframes sliderProgress {
    from { width: 0; }
    to { width: 100%; }
}

/* ============================================================
   幻灯片搜索框叠加层
   ============================================================ */
.tah-slider-search-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.tah-slider-search-content {
    width: 100%;
    max-width: 680px;
    padding: 32px 24px;
    text-align: center;
    pointer-events: auto;
}

/* 现代毛玻璃样式 */
.tah-search-style-modern .tah-slider-search-content {
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* 简约透明样式 */
.tah-search-style-minimal .tah-slider-search-content {
    background: transparent;
    backdrop-filter: none;
}

/* 纯色背景样式 */
.tah-search-style-solid .tah-slider-search-content {
    background: rgba(0, 0, 0, 0.65);
    border-radius: 20px;
}

/* 搜索区标题 */
.tah-slider-search-header {
    margin-bottom: 24px;
}

.tah-slider-search-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.tah-slider-search-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* 搜索框容器 */
.tah-slider-search-box {
    max-width: 580px;
    margin: 0 auto;
}

/* 搜索表单 */
.tah-search-form {
    width: 100%;
}

.tah-search-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    padding: 6px 8px 6px 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.tah-search-input-wrapper:focus-within {
    background: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(34, 113, 177, 0.3);
    transform: scale(1.02);
}

.tah-search-icon {
    flex-shrink: 0;
    color: #999;
    margin-right: 12px;
}

.tah-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: #333;
    outline: none;
    padding: 12px 0;
    min-width: 0;
}

.tah-search-input::placeholder {
    color: #aaa;
}

.tah-search-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--tah-primary, #2271b1) 0%, var(--tah-primary-dark, #1a5a8e) 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
}

.tah-search-btn:hover {
    background: linear-gradient(135deg, var(--tah-primary-dark, #1a5a8e) 0%, var(--tah-primary, #2271b1) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(34, 113, 177, 0.4);
}

.tah-search-btn-icon {
    display: none;
}

/* 热门标签 */
.tah-slider-hot-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.tah-hot-label {
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    font-weight: 500;
}

.tah-hot-label svg {
    color: #ff6b6b;
}

.tah-hot-tag {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.8rem;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tah-hot-tag:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    transform: translateY(-1px);
}

/* 统计数据 */
.tah-slider-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.tah-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.tah-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tah-stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tah-stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
}

/* 搜索框叠加时隐藏幻灯片原有文字内容 */
.tah-slider-section:has(.tah-slider-search-overlay) .tah-slide-content {
    display: none;
}

/* 搜索框叠加时调整指示器位置 */
.tah-slider-section:has(.tah-slider-search-overlay) .tah-slider-dots {
    bottom: 12px;
}

/* 搜索框叠加时箭头始终显示 */
.tah-slider-section:has(.tah-slider-search-overlay) .tah-slider-arrow {
    opacity: 0.7;
}

.tah-slider-section:has(.tah-slider-search-overlay) .tah-slider-arrow:hover {
    opacity: 1;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .tah-slider-wrapper {
        height: var(--slider-m-height, calc(var(--slider-height, 400px) * 0.6));
    }
    
    .tah-slide-content {
        padding: 16px;
    }
    
    .tah-slide-text-wrapper {
        padding: 12px 16px;
        border-radius: 8px;
        max-width: calc(100% - 32px);
    }
    
    .tah-slide-title {
        font-size: calc(var(--slide-title-size, 2rem) * 0.65);
    }
    
    .tah-slide-desc {
        font-size: calc(var(--slide-desc-size, 1rem) * 0.85);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .tah-slide-desc + .tah-slide-btn {
        margin-top: 12px;
    }
    
    .tah-slide-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .tah-slider-arrow {
        width: 36px;
        height: 36px;
        opacity: 1;
    }
    
    .tah-slider-prev {
        left: 8px;
    }
    
    .tah-slider-next {
        right: 8px;
    }
    
    /* 移动端禁用部分3D效果（性能优化） */
    .tah-slider-effect-cube .tah-slide,
    .tah-slider-effect-flip .tah-slide,
    .tah-slider-effect-coverflow .tah-slide {
        transform: translateX(100%);
    }
    .tah-slider-effect-cube .tah-slide.active,
    .tah-slider-effect-flip .tah-slide.active,
    .tah-slider-effect-coverflow .tah-slide.active {
        transform: translateX(0);
    }
    .tah-slider-effect-cube .tah-slide.slide-prev,
    .tah-slider-effect-flip .tah-slide.slide-prev,
    .tah-slider-effect-coverflow .tah-slide.slide-prev {
        transform: translateX(-100%);
    }
    
    /* 移动端缩略图更小 */
    .tah-slider-thumb {
        width: 36px;
        height: 24px;
    }
    
    /* 移动端搜索框叠加适配 */
    .tah-slider-search-content {
        padding: 20px 16px;
        max-width: calc(100% - 32px);
    }
    
    .tah-search-style-modern .tah-slider-search-content {
        border-radius: 16px;
    }
    
    .tah-slider-search-title {
        font-size: 1.35rem;
    }
    
    .tah-slider-search-subtitle {
        font-size: 0.85rem;
    }
    
    .tah-slider-search-header {
        margin-bottom: 16px;
    }
    
    .tah-search-input-wrapper {
        padding: 4px 6px 4px 14px;
        border-radius: 40px;
    }
    
    .tah-search-icon {
        width: 18px;
        height: 18px;
        margin-right: 8px;
    }
    
    .tah-search-input {
        font-size: 0.9rem;
        padding: 10px 0;
    }
    
    .tah-search-btn {
        padding: 10px 16px;
        font-size: 0;
    }
    
    .tah-search-btn-text {
        display: none;
    }
    
    .tah-search-btn-icon {
        display: block;
    }
    
    .tah-slider-hot-tags {
        margin-top: 12px;
        gap: 6px;
    }
    
    .tah-hot-label {
        font-size: 0.75rem;
    }
    
    .tah-hot-tag {
        padding: 4px 10px;
        font-size: 0.7rem;
    }
    
    .tah-slider-stats {
        gap: 16px;
        margin-top: 16px;
        padding-top: 14px;
    }
    
    .tah-stat-number {
        font-size: 1.15rem;
    }
    
    .tah-stat-label {
        font-size: 0.65rem;
    }
    
    .tah-stat-divider {
        height: 24px;
    }
    
    /* 移动端进度条更细 */
    .tah-slider-progress {
        height: 2px;
    }
}

/* ============================================================
   图文封面卡片小组件
   ============================================================ */
.tah-cover-section {
    margin-bottom: 24px;
}

.tah-cover-grid {
    display: grid;
    gap: 12px;
}

.tah-cols-2 { grid-template-columns: repeat(2, 1fr); }
.tah-cols-3 { grid-template-columns: repeat(3, 1fr); }
.tah-cols-4 { grid-template-columns: repeat(4, 1fr); }
.tah-cols-5 { grid-template-columns: repeat(5, 1fr); }
.tah-cols-6 { grid-template-columns: repeat(6, 1fr); }

.tah-cover-item {
    position: relative;
    display: block;
    height: var(--cover-height, 180px);
    border-radius: var(--tah-radius-md, 8px);
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tah-cover-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.tah-cover-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    opacity: var(--cover-mask-opacity, 0.3);
    transition: opacity 0.3s;
}

.tah-cover-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1;
}

.tah-cover-title {
    font-size: var(--cover-font-size, 18px);
    font-weight: 600;
    color: var(--cover-font-color, #fff);
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.4;
}

/* 悬停效果 */
.tah-hover-zoom:hover .tah-cover-media {
    transform: scale(1.08);
}

.tah-hover-brightness:hover .tah-cover-mask {
    opacity: calc(var(--cover-mask-opacity, 0.3) * 0.5);
}

.tah-hover-scale:hover {
    transform: scale(1.03);
}
.tah-hover-scale {
    transition: transform 0.3s ease;
}

a.tah-cover-item:hover .tah-cover-title {
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* ============================================================
   分类聚合卡片小组件
   ============================================================ */
.tah-category-section {
    margin-bottom: 24px;
}

.tah-category-grid {
    display: grid;
    gap: 16px;
}

.tah-cat-cols-1 .tah-category-grid {
    grid-template-columns: 1fr;
}

.tah-cat-cols-2 .tah-category-grid {
    grid-template-columns: repeat(2, 1fr);
}

.tah-category-item {
    background: var(--tah-card-bg, #fff);
    border-radius: var(--tah-radius-lg, 12px);
    padding: 16px;
    box-shadow: var(--tah-shadow-sm, 0 1px 3px rgba(0,0,0,0.1));
}

.tah-category-header {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.tah-category-thumb {
    position: relative;
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: var(--tah-radius-md, 8px);
    overflow: hidden;
}

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

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

.tah-category-count {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    backdrop-filter: blur(4px);
}

.tah-category-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.tah-category-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--tah-text-primary, #1a1a2e);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tah-category-name:hover {
    color: var(--tah-primary, #2271b1);
}

.tah-category-desc {
    font-size: 13px;
    color: var(--tah-text-muted, #666);
    margin: 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tah-category-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--tah-primary, #2271b1);
    text-decoration: none;
}

.tah-category-more:hover {
    text-decoration: underline;
}

.tah-category-posts {
    border-top: 1px solid var(--tah-border, #eee);
    padding-top: 12px;
}

.tah-category-post {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    text-decoration: none;
    border-bottom: 1px dashed var(--tah-border, #eee);
}

.tah-category-post:last-child {
    border-bottom: none;
}

.tah-category-post .tah-post-title {
    flex: 1;
    font-size: 14px;
    color: var(--tah-text-primary, #1a1a2e);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 12px;
}

.tah-category-post:hover .tah-post-title {
    color: var(--tah-primary, #2271b1);
}

.tah-category-post .tah-post-meta {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--tah-text-muted, #999);
}

/* ============================================================
   资源列表小组件
   ============================================================ */
.tah-posts-section {
    margin-bottom: 24px;
}

.tah-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.tah-section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--tah-text-primary, #1a1a2e);
    margin: 0;
}

.tah-section-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--tah-primary, #2271b1);
    text-decoration: none;
}

.tah-section-more:hover {
    text-decoration: underline;
}

/* 卡片网格样式 */
.tah-posts-grid {
    display: grid;
    gap: 16px;
}

.tah-post-card {
    display: block;
    background: var(--tah-card-bg, #fff);
    border-radius: var(--tah-radius-lg, 12px);
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--tah-shadow-sm, 0 1px 3px rgba(0,0,0,0.1));
    transition: transform 0.3s, box-shadow 0.3s;
}

.tah-post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--tah-shadow-md, 0 4px 12px rgba(0,0,0,0.15));
}

.tah-post-thumb {
    position: relative;
    padding-bottom: 66.67%;
    overflow: hidden;
}

.tah-post-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.tah-post-card:hover .tah-post-thumb img {
    transform: scale(1.05);
}

.tah-post-info {
    padding: 12px;
}

.tah-post-info .tah-post-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--tah-text-primary, #1a1a2e);
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.tah-post-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--tah-text-muted, #999);
}

/* 列表样式 */
.tah-posts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tah-post-list-item {
    display: flex;
    gap: 16px;
    padding: 12px;
    background: var(--tah-card-bg, #fff);
    border-radius: var(--tah-radius-md, 8px);
    text-decoration: none;
    box-shadow: var(--tah-shadow-sm, 0 1px 3px rgba(0,0,0,0.1));
    transition: background 0.2s;
}

.tah-post-list-item:hover {
    background: var(--tah-bg-hover, #f8f9fa);
}

.tah-post-list-thumb {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: var(--tah-radius-sm, 6px);
    overflow: hidden;
}

.tah-post-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tah-post-list-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.tah-post-list-info .tah-post-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--tah-text-primary, #1a1a2e);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tah-post-excerpt {
    font-size: 13px;
    color: var(--tah-text-muted, #666);
    margin: 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mini列表样式 */
.tah-posts-mini {
    display: flex;
    flex-direction: column;
    background: var(--tah-card-bg, #fff);
    border-radius: var(--tah-radius-lg, 12px);
    padding: 8px;
    box-shadow: var(--tah-shadow-sm, 0 1px 3px rgba(0,0,0,0.1));
}

.tah-post-mini-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    text-decoration: none;
    border-radius: var(--tah-radius-sm, 6px);
    transition: background 0.2s;
}

.tah-post-mini-item:hover {
    background: var(--tah-bg-hover, #f8f9fa);
}

.tah-post-number {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tah-primary, #2271b1);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    margin-right: 12px;
}

.tah-post-mini-item:nth-child(1) .tah-post-number { background: #ff6b6b; }
.tah-post-mini-item:nth-child(2) .tah-post-number { background: #ffa94d; }
.tah-post-mini-item:nth-child(3) .tah-post-number { background: #69db7c; }

.tah-post-mini-item .tah-post-title {
    flex: 1;
    font-size: 14px;
    color: var(--tah-text-primary, #1a1a2e);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 12px;
}

.tah-post-mini-item:hover .tah-post-title {
    color: var(--tah-primary, #2271b1);
}

.tah-post-mini-item .tah-post-date {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--tah-text-muted, #999);
}

/* ============================================================
   多栏目资源小组件
   ============================================================ */
.tah-tab-section {
    margin-bottom: 24px;
}

.tah-tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.tah-tab-nav {
    position: relative;
    display: inline-flex;
    gap: 0;
    background: var(--tah-bg-secondary, #f1f3f5);
    padding: 5px;
    border-radius: 14px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* 滑动指示器背景 */
.tah-tab-nav .tah-tab-slider {
    position: absolute;
    top: 5px;
    left: 5px;
    height: calc(100% - 10px);
    background: linear-gradient(135deg, var(--tah-card-bg, #fff) 0%, #fafafa 100%);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 0;
}

.tah-tab-btn {
    position: relative;
    z-index: 1;
    padding: 10px 22px;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--tah-text-secondary, #666);
    cursor: pointer;
    transition: color 0.25s ease;
    white-space: nowrap;
}

.tah-tab-btn:hover {
    color: var(--tah-text, #444);
}

.tah-tab-btn.active {
    color: var(--tah-primary, #2271b1);
    font-weight: 600;
}

/* 激活按钮底部指示点 */
.tah-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scale(1);
    width: 6px;
    height: 6px;
    background: var(--tah-primary, #2271b1);
    border-radius: 50%;
    animation: tabDotPop 0.3s ease;
}

@keyframes tabDotPop {
    0% { transform: translateX(-50%) scale(0); }
    50% { transform: translateX(-50%) scale(1.3); }
    100% { transform: translateX(-50%) scale(1); }
}

.tah-tab-content {
    position: relative;
}

.tah-tab-pane {
    display: none;
}

.tah-tab-pane.active {
    display: block;
    animation: tabFadeIn 0.3s ease;
}

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

.tah-no-posts {
    text-align: center;
    padding: 40px;
    color: var(--tah-text-muted, #999);
}

/* ============================================================
   移动端响应式
   ============================================================ */
@media (max-width: 768px) {
    /* 封面卡片 */
    .tah-m-cols-1 { grid-template-columns: 1fr; }
    .tah-m-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .tah-m-cols-3 { grid-template-columns: repeat(3, 1fr); }
    
    .tah-cover-item {
        height: calc(var(--cover-height, 180px) * 0.7);
    }
    
    .tah-cover-title {
        font-size: calc(var(--cover-font-size, 18px) * 0.8);
    }
    
    /* 分类聚合 */
    .tah-cat-cols-2 .tah-category-grid {
        grid-template-columns: 1fr;
    }
    
    .tah-category-thumb {
        width: 100px;
        height: 70px;
    }
    
    /* 资源列表 */
    .tah-cols-4,
    .tah-cols-5,
    .tah-cols-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tah-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tah-post-list-thumb {
        width: 100px;
        height: 66px;
    }
    
    /* 多栏目 */
    .tah-tab-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tah-tab-nav {
        display: inline-flex;
        width: auto;
        max-width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding: 4px;
        border-radius: 12px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .tah-tab-nav::-webkit-scrollbar {
        display: none;
    }
    
    .tah-tab-nav .tah-tab-slider {
        top: 4px;
        left: 4px;
        height: calc(100% - 8px);
        border-radius: 8px;
    }
    
    .tah-tab-btn {
        flex-shrink: 0;
        padding: 8px 16px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    .tah-tab-btn.active::after {
        bottom: 3px;
        width: 5px;
        height: 5px;
    }
}

/* ============================================================
   资源展示小组件（合并版）
   ============================================================ */
.tah-models-display {
    margin-bottom: 24px;
}

/* 网格样式 */
.tah-models-grid {
    display: grid;
    gap: 16px;
}

.tah-models-grid.tah-cols-2 { grid-template-columns: repeat(2, 1fr); }
.tah-models-grid.tah-cols-3 { grid-template-columns: repeat(3, 1fr); }
.tah-models-grid.tah-cols-4 { grid-template-columns: repeat(4, 1fr); }
.tah-models-grid.tah-cols-5 { grid-template-columns: repeat(5, 1fr); }
.tah-models-grid.tah-cols-6 { grid-template-columns: repeat(6, 1fr); }

.tah-model-card {
    display: block;
    background: var(--tah-card-bg, #fff);
    border-radius: var(--tah-radius-lg, 12px);
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--tah-shadow-sm, 0 1px 3px rgba(0,0,0,0.1));
    transition: transform 0.3s, box-shadow 0.3s;
}

.tah-model-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--tah-shadow-md, 0 4px 12px rgba(0,0,0,0.15));
}

.tah-model-thumb {
    position: relative;
    padding-bottom: 66.67%;
    overflow: hidden;
}

.tah-model-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.tah-model-card:hover .tah-model-thumb img {
    transform: scale(1.05);
}

.tah-model-info {
    padding: 12px;
}

.tah-model-info .tah-model-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--tah-text-primary, #1a1a2e);
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.tah-model-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--tah-text-muted, #999);
}

/* 图文列表样式 */
.tah-models-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tah-model-list-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--tah-card-bg, #fff);
    border-radius: var(--tah-radius-lg, 12px);
    text-decoration: none;
    box-shadow: var(--tah-shadow-sm, 0 1px 3px rgba(0,0,0,0.1));
    transition: background 0.2s, box-shadow 0.2s;
}

.tah-model-list-item:hover {
    background: var(--tah-bg-hover, #f8f9fa);
    box-shadow: var(--tah-shadow-md, 0 4px 12px rgba(0,0,0,0.1));
}

.tah-model-list-thumb {
    flex-shrink: 0;
    width: 160px;
    height: 100px;
    border-radius: var(--tah-radius-md, 8px);
    overflow: hidden;
}

.tah-model-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.tah-model-list-item:hover .tah-model-list-thumb img {
    transform: scale(1.05);
}

.tah-model-list-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.tah-model-list-info .tah-model-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--tah-text-primary, #1a1a2e);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tah-model-excerpt {
    font-size: 13px;
    color: var(--tah-text-muted, #666);
    margin: 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* Mini列表样式 */
.tah-models-mini {
    display: flex;
    flex-direction: column;
    background: var(--tah-card-bg, #fff);
    border-radius: var(--tah-radius-lg, 12px);
    padding: 8px;
    box-shadow: var(--tah-shadow-sm, 0 1px 3px rgba(0,0,0,0.1));
}

.tah-model-mini-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    text-decoration: none;
    border-radius: var(--tah-radius-sm, 6px);
    transition: background 0.2s;
}

.tah-model-mini-item:hover {
    background: var(--tah-bg-hover, #f8f9fa);
}

.tah-model-number {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tah-primary, #2271b1);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    margin-right: 12px;
}

.tah-model-mini-item:nth-child(1) .tah-model-number { background: #ff6b6b; }
.tah-model-mini-item:nth-child(2) .tah-model-number { background: #ffa94d; }
.tah-model-mini-item:nth-child(3) .tah-model-number { background: #69db7c; }

.tah-model-mini-item .tah-model-title {
    flex: 1;
    font-size: 14px;
    color: var(--tah-text-primary, #1a1a2e);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 12px;
}

.tah-model-mini-item:hover .tah-model-title {
    color: var(--tah-primary, #2271b1);
}

.tah-model-mini-item .tah-model-date {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--tah-text-muted, #999);
}

/* 紧凑列表样式 */
.tah-models-compact {
    display: flex;
    flex-direction: column;
    background: var(--tah-card-bg, #fff);
    border-radius: var(--tah-radius-lg, 12px);
    padding: 8px;
    box-shadow: var(--tah-shadow-sm, 0 1px 3px rgba(0,0,0,0.1));
}

.tah-model-compact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    text-decoration: none;
    border-radius: var(--tah-radius-sm, 6px);
    transition: background 0.2s;
}

.tah-model-compact-item:hover {
    background: var(--tah-bg-hover, #f8f9fa);
}

.tah-model-compact-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 40px;
    border-radius: var(--tah-radius-sm, 6px);
    overflow: hidden;
}

.tah-model-compact-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tah-model-compact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tah-model-compact-info .tah-model-title {
    font-size: 14px;
    color: var(--tah-text-primary, #1a1a2e);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tah-model-compact-item:hover .tah-model-title {
    color: var(--tah-primary, #2271b1);
}

.tah-model-compact-info .tah-model-meta {
    font-size: 12px;
    color: var(--tah-text-muted, #999);
    margin-top: 2px;
}

.tah-model-downloads {
    color: var(--tah-primary, #2271b1);
}

/* 资源展示移动端响应式 */
@media (max-width: 768px) {
    .tah-models-grid.tah-cols-4,
    .tah-models-grid.tah-cols-5,
    .tah-models-grid.tah-cols-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tah-models-grid.tah-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tah-model-list-item {
        padding: 12px;
    }
    
    .tah-model-list-thumb {
        width: 100px;
        height: 66px;
    }
    
    .tah-model-list-info .tah-model-title {
        font-size: 14px;
    }
    
    .tah-model-excerpt {
        display: none;
    }
}

/* ============================================================
   侧边栏样式
   ============================================================ */

/* 页面侧边栏布局 */
.page-with-sidebar,
.homepage-with-sidebar {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width, 320px);
    gap: 30px;
    align-items: start;
    padding-top: var(--spacing-lg, 24px);
}

/* 左侧边栏布局 */
.tah-sidebar-left .page-with-sidebar,
.tah-sidebar-left .homepage-with-sidebar {
    grid-template-columns: var(--sidebar-width, 320px) 1fr;
}

.tah-sidebar-left .page-sidebar {
    order: -1;
}

/* 主内容区 */
.page-main-content,
.homepage-main-content {
    min-width: 0;
}

/* 侧边栏容器 */
.page-sidebar {
    width: 100%;
    display: block; /* 使用 block 布局确保 margin 生效 */
}

/* 侧边栏内小工具间距 - 使用多重选择器确保优先级 */
.page-sidebar .sidebar-widget,
.page-sidebar > .sidebar-widget,
aside.page-sidebar .sidebar-widget,
aside.page-sidebar > div.sidebar-widget {
    margin-bottom: 32px !important;
}

.page-sidebar .sidebar-widget:last-child,
.page-sidebar > .sidebar-widget:last-child,
aside.page-sidebar .sidebar-widget:last-child,
aside.page-sidebar > div.sidebar-widget:last-child {
    margin-bottom: 0 !important;
}

/* 侧边栏粘性定位 */
.page-sidebar.sidebar-sticky {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* 滚动条美化 */
.page-sidebar.sidebar-sticky::-webkit-scrollbar {
    width: 4px;
}

.page-sidebar.sidebar-sticky::-webkit-scrollbar-track {
    background: transparent;
}

.page-sidebar.sidebar-sticky::-webkit-scrollbar-thumb {
    background: var(--tah-border-color, #e2e8f0);
    border-radius: 4px;
}

.page-sidebar.sidebar-sticky::-webkit-scrollbar-thumb:hover {
    background: var(--tah-text-muted, #94a3b8);
}

/* 侧边栏小工具通用样式 */
.sidebar-widget,
div.sidebar-widget,
.page-sidebar .sidebar-widget,
aside .sidebar-widget,
.page-sidebar > div,
aside.page-sidebar > div,
[class*="tah-sidebar-"][class*="-widget"] {
    background: var(--tah-card-bg, #fff);
    border-radius: var(--tah-radius-lg, 12px);
    padding: 20px;
    margin-bottom: 32px !important;
    box-shadow: var(--tah-shadow-sm, 0 1px 3px rgba(0,0,0,0.08));
    border: 1px solid var(--tah-border-color, #e2e8f0);
}

.sidebar-widget:last-child,
div.sidebar-widget:last-child,
.page-sidebar .sidebar-widget:last-child,
aside .sidebar-widget:last-child,
.page-sidebar > div:last-child,
aside.page-sidebar > div:last-child,
[class*="tah-sidebar-"][class*="-widget"]:last-child {
    margin-bottom: 0 !important;
}

.sidebar-widget-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--tah-text-primary, #1a1a2e);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tah-border-color, #e2e8f0);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-widget-title::before {
    content: '';
    width: 3px;
    height: 16px;
    background: var(--tah-primary, #2563eb);
    border-radius: 2px;
}

.sidebar-no-content {
    color: var(--tah-text-muted, #94a3b8);
    font-size: 14px;
    text-align: center;
    padding: 20px 0;
}

/* 侧边栏资源列表 */
.sidebar-models-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-model-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.sidebar-model-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 45px;
    border-radius: var(--tah-radius-sm, 6px);
    overflow: hidden;
    background: var(--tah-bg-secondary, #f1f5f9);
}

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

.sidebar-model-item:hover .sidebar-model-thumb img {
    transform: scale(1.05);
}

.sidebar-model-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tah-text-muted, #94a3b8);
}

.sidebar-model-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-model-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--tah-text-primary, #1a1a2e);
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.sidebar-model-title:hover {
    color: var(--tah-primary, #2563eb);
}

.sidebar-model-meta {
    font-size: 12px;
    color: var(--tah-text-muted, #94a3b8);
    display: flex;
    align-items: center;
    gap: 4px;
}

.sidebar-model-meta svg {
    opacity: 0.7;
}

/* 侧边栏标签云 */
.sidebar-tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sidebar-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--tah-bg-secondary, #f1f5f9);
    border-radius: var(--tah-radius-full, 9999px);
    font-size: 13px;
    color: var(--tah-text-secondary, #475569);
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-tag:hover {
    background: var(--tah-primary, #2563eb);
    color: #fff;
}

.sidebar-tag-count {
    font-size: 11px;
    padding: 2px 6px;
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
}

.sidebar-tag:hover .sidebar-tag-count {
    background: rgba(255,255,255,0.2);
}

/* 侧边栏分类列表 */
.sidebar-categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-category-item {
    border-bottom: 1px solid var(--tah-border-color, #e2e8f0);
}

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

.sidebar-category-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    text-decoration: none;
    color: var(--tah-text-primary, #1a1a2e);
    transition: color 0.2s;
}

.sidebar-category-link:hover {
    color: var(--tah-primary, #2563eb);
}

.sidebar-category-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-category-icon .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.sidebar-category-name {
    flex: 1;
    font-size: 14px;
}

.sidebar-category-count {
    font-size: 12px;
    color: var(--tah-text-muted, #94a3b8);
    background: var(--tah-bg-secondary, #f1f5f9);
    padding: 2px 8px;
    border-radius: 10px;
}

.sidebar-subcategories {
    list-style: none;
    margin: 0;
    padding: 0 0 8px 34px;
}

.sidebar-subcategories li {
    margin-bottom: 4px;
}

.sidebar-subcategories a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: var(--tah-text-secondary, #475569);
    text-decoration: none;
    transition: color 0.2s;
}

.sidebar-subcategories a:hover {
    color: var(--tah-primary, #2563eb);
}

/* 侧边栏搜索框 */
.sidebar-search-form {
    margin: 0;
}

.sidebar-search-input-wrap {
    display: flex;
    align-items: stretch;
    background: var(--tah-bg-secondary, #f1f5f9);
    border-radius: var(--tah-radius-md, 8px);
    overflow: hidden;
    border: 1px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sidebar-search-input-wrap:focus-within {
    border-color: var(--tah-primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: var(--tah-card-bg, #fff);
}

.sidebar-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--tah-text-primary, #1a1a2e);
    outline: none;
}

.sidebar-search-input::placeholder {
    color: var(--tah-text-muted, #94a3b8);
}

.sidebar-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    border: none;
    background: transparent;
    color: var(--tah-text-muted, #94a3b8);
    cursor: pointer;
    transition: color 0.2s;
}

.sidebar-search-btn:hover {
    color: var(--tah-primary, #2563eb);
}

/* 侧边栏用户卡片 */
.sidebar-user-card {
    text-align: center;
}

.sidebar-user-avatar {
    margin-bottom: 12px;
}

.sidebar-user-avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid var(--tah-bg-secondary, #f1f5f9);
}

.sidebar-user-info {
    margin-bottom: 16px;
}

.sidebar-user-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--tah-text-primary, #1a1a2e);
    margin-bottom: 4px;
}

.sidebar-user-role {
    font-size: 12px;
    color: var(--tah-text-muted, #94a3b8);
    text-transform: capitalize;
}

.sidebar-user-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 16px 0;
    border-top: 1px solid var(--tah-border-color, #e2e8f0);
    border-bottom: 1px solid var(--tah-border-color, #e2e8f0);
    margin-bottom: 16px;
}

.sidebar-user-stat {
    text-align: center;
}

.sidebar-user-stat .stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--tah-text-primary, #1a1a2e);
}

.sidebar-user-stat .stat-label {
    font-size: 12px;
    color: var(--tah-text-muted, #94a3b8);
}

.sidebar-user-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-user-guest {
    text-align: center;
    padding: 20px 0;
}

.sidebar-user-guest p {
    color: var(--tah-text-secondary, #475569);
    margin-bottom: 16px;
}

.sidebar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--tah-radius-md, 8px);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.sidebar-btn-primary {
    background: var(--tah-primary, #2563eb);
    color: #fff;
}

.sidebar-btn-primary:hover {
    background: var(--tah-primary-dark, #1d4ed8);
    color: #fff;
}

.sidebar-btn-outline {
    background: transparent;
    color: var(--tah-text-primary, #1a1a2e);
    border: 1px solid var(--tah-border-color, #e2e8f0);
}

.sidebar-btn-outline:hover {
    border-color: var(--tah-primary, #2563eb);
    color: var(--tah-primary, #2563eb);
}

/* 侧边栏站点统计 */
.sidebar-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.sidebar-stat-item {
    text-align: center;
    padding: 16px 8px;
    background: var(--tah-bg-secondary, #f1f5f9);
    border-radius: var(--tah-radius-md, 8px);
}

.sidebar-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    color: var(--tah-primary, #2563eb);
}

.sidebar-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--tah-text-primary, #1a1a2e);
    margin-bottom: 2px;
}

.sidebar-stat-label {
    font-size: 12px;
    color: var(--tah-text-muted, #94a3b8);
}

/* 自定义内容 */
.sidebar-custom-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--tah-text-secondary, #475569);
}

.sidebar-custom-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--tah-radius-sm, 6px);
}

.sidebar-custom-content a {
    color: var(--tah-primary, #2563eb);
}

/* ============================================================
   资源详情页专用侧边栏小工具样式
   ============================================================ */

/* 侧边栏规格表格（定价设置、资源属性通用） */
.sidebar-specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.sidebar-specs-table tr {
    border-bottom: 1px solid var(--tah-border-color, #e2e8f0);
}

.sidebar-specs-table tr:last-child {
    border-bottom: none;
}

.sidebar-specs-table th,
.sidebar-specs-table td {
    padding: 10px 0;
    text-align: left;
    vertical-align: top;
}

.sidebar-specs-table th {
    font-weight: 500;
    color: var(--tah-text-muted, #94a3b8);
    width: 45%;
    padding-right: 12px;
}

.sidebar-specs-table td {
    color: var(--tah-text-primary, #1a1a2e);
    font-weight: 500;
}

/* 定价类型标签 */
.pricing-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--tah-radius-full, 9999px);
    font-size: 12px;
    font-weight: 600;
}

.pricing-type-free,
.pricing-type-login_required {
    background: var(--tah-success-bg, #dcfce7);
    color: var(--tah-success, #16a34a);
}

.pricing-type-paid {
    background: var(--tah-primary-bg, #dbeafe);
    color: var(--tah-primary, #2563eb);
}

.pricing-type-vip_only {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.pricing-type-points {
    background: var(--tah-info-bg, #e0e7ff);
    color: var(--tah-info, #4f46e5);
}

/* 价格值样式 */
.sidebar-specs-table .price-value {
    font-weight: 600;
}

.sidebar-specs-table .price-value.free {
    color: var(--tah-success, #16a34a);
}

.sidebar-specs-table .price-value.vip {
    color: #92400e;
}

.sidebar-specs-table .price-value.points {
    color: var(--tah-info, #4f46e5);
}

/* 属性值样式 */
.sidebar-specs-table .empty-value {
    color: var(--tah-text-muted, #94a3b8);
}

.sidebar-specs-table .value-yes {
    color: var(--tah-success, #16a34a);
}

.sidebar-specs-table .value-no {
    color: var(--tah-text-muted, #94a3b8);
}

/* 资源统计小工具 */
.sidebar-model-stats-content {
    display: flex;
    gap: 12px;
}

.sidebar-model-stats-content.layout-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.sidebar-model-stats-content.layout-list {
    flex-direction: column;
    gap: 8px;
}

.sidebar-model-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: var(--tah-bg-secondary, #f1f5f9);
    border-radius: var(--tah-radius-md, 8px);
    text-align: center;
}

.layout-list .sidebar-model-stat-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 12px;
    text-align: left;
}

.sidebar-model-stat-item .stat-icon {
    color: var(--tah-primary, #2563eb);
}

.sidebar-model-stat-item .stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--tah-text-primary, #1a1a2e);
}

.layout-list .sidebar-model-stat-item .stat-value {
    font-size: 16px;
    margin-left: auto;
}

.sidebar-model-stat-item .stat-label {
    font-size: 12px;
    color: var(--tah-text-muted, #94a3b8);
}

.layout-list .sidebar-model-stat-item .stat-label {
    flex: 1;
}

/* 资源作者小工具 */
.sidebar-model-author-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.sidebar-model-author-content .author-avatar {
    flex-shrink: 0;
}

.sidebar-model-author-content .author-avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid var(--tah-bg-secondary, #f1f5f9);
}

.sidebar-model-author-content .author-info {
    flex: 1;
    min-width: 0;
}

.sidebar-model-author-content .author-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--tah-text-primary, #1a1a2e);
    margin: 0 0 6px;
}

.sidebar-model-author-content .author-bio {
    font-size: 13px;
    color: var(--tah-text-secondary, #475569);
    line-height: 1.5;
    margin: 0 0 10px;
}

.sidebar-model-author-content .author-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.sidebar-model-author-content .author-model-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--tah-text-muted, #94a3b8);
}

.sidebar-model-author-content .author-link {
    width: 100%;
}

/* 归档页小工具侧边栏 */
.archive-widget-sidebar {
    flex-shrink: 0;
    width: var(--sidebar-width, 320px);
}

.model-archive-page.has-widget-sidebar .archive-layout {
    grid-template-columns: 260px 1fr var(--sidebar-width, 320px);
}

/* 移动端侧边栏按钮 */
.sidebar-mobile-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--tah-primary, #2563eb);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    cursor: pointer;
    z-index: 999;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.sidebar-mobile-toggle:hover {
    transform: scale(1.05);
}

/* 移动端侧边栏面板 */
.sidebar-mobile-panel {
    display: none;
}

/* 侧边栏响应式 */
@media (max-width: 1024px) {
    .page-with-sidebar,
    .homepage-with-sidebar {
        grid-template-columns: 1fr;
    }
    
    .model-archive-page.has-widget-sidebar .archive-layout {
        grid-template-columns: 260px 1fr;
    }
    
    .archive-widget-sidebar {
        display: none;
    }
    
    /* 移动端侧边栏隐藏 */
    .tah-sidebar-mobile-hidden .page-sidebar {
        display: none;
    }
    
    /* 移动端侧边栏移至底部 */
    .tah-sidebar-mobile-bottom .page-with-sidebar,
    .tah-sidebar-mobile-bottom .homepage-with-sidebar {
        display: block;
    }
    
    .tah-sidebar-mobile-bottom .page-sidebar {
        margin-top: 40px;
        position: static;
        max-height: none;
    }
    
    /* 移动端可折叠侧边栏 */
    .tah-sidebar-mobile-collapsible .page-sidebar {
        display: none;
    }
    
    .tah-sidebar-mobile-collapsible .sidebar-mobile-toggle {
        display: flex;
    }
    
    .tah-sidebar-mobile-collapsible .sidebar-mobile-panel {
        display: block;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 360px;
        height: 100vh;
        background: var(--tah-card-bg, #fff);
        z-index: 1000;
        padding: 20px;
        overflow-y: auto;
        transition: right 0.3s ease;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    }
    
    .tah-sidebar-mobile-collapsible .sidebar-mobile-panel.active {
        right: 0;
    }
    
    .sidebar-mobile-panel-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 16px;
        margin-bottom: 16px;
        border-bottom: 1px solid var(--tah-border-color, #e2e8f0);
    }
    
    .sidebar-mobile-panel-title {
        font-size: 16px;
        font-weight: 600;
        color: var(--tah-text-primary, #1a1a2e);
    }
    
    .sidebar-mobile-panel-close {
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        background: transparent;
        color: var(--tah-text-muted, #94a3b8);
        cursor: pointer;
        font-size: 24px;
    }
    
    .sidebar-mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .tah-sidebar-mobile-collapsible .sidebar-mobile-overlay.active {
        display: block;
    }
}

@media (max-width: 768px) {
    .sidebar-widget {
        padding: 16px;
    }
    
    .sidebar-model-thumb {
        width: 50px;
        height: 38px;
    }
    
    .sidebar-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .sidebar-stat-item {
        padding: 12px 8px;
    }
    
    .sidebar-stat-value {
        font-size: 16px;
    }
}

/* ============================================================
   3D展示橱窗小组件 - 自动适配全局主题
   ============================================================ */
.tah-showcase {
    position: relative;
    padding: 48px 0;
    margin-bottom: var(--tah-homepage-widget-spacing, 32px);
    overflow: hidden;
    background: var(--card-bg, #fff);
    border-radius: var(--radius-lg, 14px);
    border: 1px solid var(--border-light, #e5e7eb);
    box-shadow: var(--card-shadow, 0 1px 3px rgba(0, 0, 0, 0.08));
    transition: var(--transition-normal, 0.25s ease);
}

.tah-showcase-header {
    position: relative;
    text-align: center;
    margin-bottom: 40px;
    padding: 0 24px;
}

.tah-showcase-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 100px;
    background: radial-gradient(ellipse, var(--primary-color, #0066cc) 0%, transparent 70%);
    opacity: 0.12;
    filter: blur(40px);
    pointer-events: none;
}

.tah-showcase-title {
    position: relative;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--text-primary, #1a1a2e);
}

.tah-showcase-subtitle {
    font-size: 15px;
    color: var(--text-muted, #666);
    margin: 0;
}

.tah-showcase-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding: 0 24px;
    perspective: 1000px;
}

.tah-showcase-card {
    position: relative;
    display: block;
    text-decoration: none;
    border-radius: var(--radius-lg, 14px);
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
    animation: showcaseFloat 6s ease-in-out infinite;
    animation-delay: calc(var(--card-index) * 0.5s);
}

@keyframes showcaseFloat {
    0%, 100% { transform: translateY(0) rotateX(0) rotateY(0); }
    50% { transform: translateY(-6px) rotateX(1deg) rotateY(-1deg); }
}

.tah-showcase-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--card-hover-shadow, 0 12px 40px rgba(0, 0, 0, 0.15));
    animation-play-state: paused;
    z-index: 10;
}

.tah-showcase-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.tah-showcase-card-front {
    position: relative;
    background: var(--bg-secondary, #f8f9fc);
    border-radius: var(--radius-lg, 14px);
    overflow: hidden;
    border: 1px solid var(--border-light, #e5e7eb);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.08));
    transition: var(--transition-normal, 0.25s ease);
}

.tah-showcase-card:hover .tah-showcase-card-front {
    border-color: var(--primary-color, #0066cc);
}

.tah-showcase-img {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.tah-showcase-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tah-showcase-card:hover .tah-showcase-img img {
    transform: scale(1.08);
}

.tah-showcase-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.tah-showcase-card:hover .tah-showcase-overlay {
    opacity: 0.4;
}

.tah-showcase-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    color: #fff;
    z-index: 2;
}

.tah-showcase-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.tah-showcase-meta {
    display: flex;
    gap: 12px;
}

.tah-showcase-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    opacity: 0.9;
}

.tah-showcase-stat svg {
    width: 14px;
    height: 14px;
}

/* 光效 */
.tah-showcase-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-25deg);
    transition: left 0.6s ease;
    pointer-events: none;
}

.tah-showcase-card:hover .tah-showcase-shine {
    left: 150%;
}

/* 精选卡片（第一个）特殊样式 */
.tah-showcase-featured {
    grid-row: span 2;
}

.tah-showcase-featured .tah-showcase-img {
    aspect-ratio: auto;
    height: 100%;
}

.tah-showcase-featured .tah-showcase-name {
    font-size: 18px;
}

/* ============================================================
   数据统计面板小组件 - 自动适配全局主题
   ============================================================ */
.tah-stats-panel {
    position: relative;
    padding: 50px 40px;
    margin-bottom: var(--tah-homepage-widget-spacing, 32px);
    border-radius: var(--radius-lg, 14px);
    overflow: hidden;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-light, #e5e7eb);
    box-shadow: var(--card-shadow, 0 1px 3px rgba(0, 0, 0, 0.08));
    transition: var(--transition-normal, 0.25s ease);
}

.tah-stats-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.6;
}

.tah-stats-grid-lines {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(var(--primary-light, rgba(0, 102, 204, 0.04)) 1px, transparent 1px),
        linear-gradient(90deg, var(--primary-light, rgba(0, 102, 204, 0.04)) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: statsGridMove 25s linear infinite;
}

@keyframes statsGridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

.tah-stats-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: statsGlowPulse 4s ease-in-out infinite;
}

.tah-stats-glow-1 {
    top: -50%;
    left: -20%;
    width: 350px;
    height: 350px;
    background: var(--primary-light, rgba(0, 102, 204, 0.1));
}

.tah-stats-glow-2 {
    bottom: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: var(--secondary-color, rgba(255, 107, 53, 0.08));
    animation-delay: 2s;
}

@keyframes statsGlowPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.08); }
}

.tah-stats-title {
    position: relative;
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary, #1a1a2e);
    margin: 0 0 36px;
}

.tah-stats-items {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.tah-stats-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 24px;
    min-width: 150px;
    background: var(--bg-secondary, #f8f9fc);
    border: 1px solid var(--border-light, #e5e7eb);
    border-radius: var(--radius-lg, 14px);
    transition: all var(--transition-normal, 0.25s ease);
}

.tah-stats-item:hover {
    background: var(--bg-hover, #f3f4f6);
    border-color: var(--primary-color, #0066cc);
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow, 0 12px 32px rgba(0, 0, 0, 0.12));
}

.tah-stats-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 14px;
    color: var(--primary-color, #0066cc);
    transition: var(--transition-normal, 0.25s ease);
}

.tah-stats-item:hover .tah-stats-icon {
    transform: scale(1.1);
}

.tah-stats-icon svg {
    width: 100%;
    height: 100%;
}

.tah-stats-content {
    text-align: center;
}

.tah-stats-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary, #1a1a2e);
    line-height: 1;
    margin-bottom: 8px;
    font-family: var(--font-heading, -apple-system, sans-serif);
}

.tah-stats-label {
    font-size: 13px;
    color: var(--text-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tah-stats-ring {
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--radius-lg, 14px) + 2px);
    background: linear-gradient(135deg, var(--primary-color, #0066cc) 0%, transparent 50%, var(--secondary-color, #ff6b35) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.tah-stats-item:hover .tah-stats-ring {
    opacity: 0.3;
}

/* 响应式 */
@media (max-width: 1200px) {
    .tah-showcase-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .tah-showcase-featured {
        grid-row: span 1;
    }
}

@media (max-width: 992px) {
    .tah-showcase-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .tah-stats-items {
        gap: 30px;
    }
    .tah-stats-item {
        min-width: 140px;
        padding: 24px;
    }
    .tah-stats-value {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .tah-showcase {
        padding: 32px 0;
    }
    .tah-showcase-title {
        font-size: 24px;
    }
    .tah-showcase-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .tah-showcase-card {
        animation: none;
    }
    .tah-stats-panel {
        padding: 40px 20px;
        border-radius: 16px;
    }
    .tah-stats-items {
        gap: 16px;
    }
    .tah-stats-item {
        min-width: calc(50% - 12px);
        padding: 20px;
    }
    .tah-stats-value {
        font-size: 28px;
    }
    .tah-stats-icon {
        width: 36px;
        height: 36px;
    }
}

/* ============================================================
   头部3D展示小组件 - 自动适配全局主题
   ============================================================ */
.tah-hero-3d {
    position: relative;
    width: 100%;
    height: var(--hero-3d-height, 450px);
    margin-bottom: var(--tah-homepage-widget-spacing, 32px);
    border-radius: 0;
    overflow: visible;
    /* 完全透明背景，只显示模型 */
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* 确保小组件父容器不遮挡 */
.widget_tah_hero_3d_widget {
    overflow: visible !important;
}

.tah-hero-3d-container {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: none !important;
}

.tah-hero-3d-container canvas {
    position: absolute !important;
    inset: 0;
    z-index: 11;
    width: 100% !important;
    height: 100% !important;
}

.tah-hero-3d-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* 加载状态 */
.tah-hero-3d-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--text-muted, #6b7280);
    font-size: 14px;
    z-index: 10;
    background: transparent;
    pointer-events: none;
}

.hero-3d-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light, #e5e7eb);
    border-top-color: var(--primary-color, #0066cc);
    border-radius: 50%;
    animation: hero3dSpin 1s linear infinite;
}

@keyframes hero3dSpin {
    to { transform: rotate(360deg); }
}

/* 错误状态 - 只在有错误时显示 */
.tah-hero-3d-error {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--error-color, #ef4444);
    font-size: 14px;
    background: rgba(248, 249, 252, 0.9);
    z-index: 10;
}

.tah-hero-3d-error.show {
    display: flex;
}

.tah-hero-3d-error svg {
    opacity: 0.6;
}

/* 内容层 */
.tah-hero-3d-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 40px;
    pointer-events: none;
    z-index: 5;
}

.tah-hero-3d-text {
    pointer-events: auto;
    max-width: 500px;
}

.tah-hero-3d-title {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.tah-hero-3d-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 20px;
    line-height: 1.6;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.tah-hero-3d-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color, #0066cc);
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md, 10px);
    transition: all var(--transition-normal, 0.25s ease);
    box-shadow: 0 4px 16px rgba(0, 102, 204, 0.3);
}

.tah-hero-3d-btn:hover {
    background: var(--primary-hover, #0052a3);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 102, 204, 0.4);
}

.tah-hero-3d-btn svg {
    transition: transform 0.2s ease;
}

.tah-hero-3d-btn:hover svg {
    transform: translateX(4px);
}

/* 工具栏 */
.tah-hero-3d-toolbar {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--card-bg, rgba(255, 255, 255, 0.9));
    border-radius: var(--radius-md, 10px);
    border: 1px solid var(--border-light, #e5e7eb);
    box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.1));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10;
}

.hero-3d-toolbar-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-3d-toolbar-group label {
    display: flex;
    align-items: center;
    color: var(--text-muted, #6b7280);
}

.hero-3d-brightness-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border-light, #e5e7eb);
    border-radius: 2px;
    outline: none;
}

.hero-3d-brightness-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--primary-color, #0066cc);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.hero-3d-brightness-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.hero-3d-btn-rotate,
.hero-3d-btn-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm, 6px);
    color: var(--text-secondary, #4a4a68);
    cursor: pointer;
    transition: all 0.2s ease;
}

.hero-3d-btn-rotate:hover,
.hero-3d-btn-reset:hover {
    background: var(--bg-hover, #f3f4f6);
    color: var(--primary-color, #0066cc);
}

.hero-3d-btn-rotate.active {
    color: var(--primary-color, #0066cc);
    background: var(--primary-light, rgba(0, 102, 204, 0.1));
}

.hero-3d-btn-rotate.active svg {
    animation: hero3dRotateIcon 2s linear infinite;
}

@keyframes hero3dRotateIcon {
    to { transform: rotate(360deg); }
}

/* 操作提示 */
.tah-hero-3d-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 16px;
    background: var(--card-bg, rgba(255, 255, 255, 0.85));
    border-radius: var(--radius-full, 9999px);
    font-size: 12px;
    color: var(--text-muted, #6b7280);
    border: 1px solid var(--border-light, #e5e7eb);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 8;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.tah-hero-3d:hover .tah-hero-3d-hint {
    opacity: 0;
}

/* 响应式 */
@media (max-width: 768px) {
    .tah-hero-3d {
        height: var(--hero-3d-m-height, 300px) !important;
        border-radius: var(--radius-md, 10px);
    }
    
    .tah-hero-3d-content {
        padding: 24px;
        align-items: flex-end;
    }
    
    .tah-hero-3d-text {
        max-width: 100%;
    }
    
    .tah-hero-3d-title {
        font-size: 22px;
    }
    
    .tah-hero-3d-subtitle {
        font-size: 14px;
        margin-bottom: 16px;
    }
    
    .tah-hero-3d-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .tah-hero-3d-toolbar {
        bottom: 12px;
        right: 12px;
        padding: 6px 10px;
    }
    
    .hero-3d-brightness-slider {
        width: 60px;
    }
    
    .hero-3d-btn-rotate,
    .hero-3d-btn-reset {
        width: 28px;
        height: 28px;
    }
    
    .tah-hero-3d-hint {
        display: none;
    }
}

/* ========== 侧边栏小工具间距强制覆盖（放在文件末尾确保最高优先级）========== */
.page-sidebar > *,
aside.page-sidebar > *,
.page-sidebar > div,
.page-sidebar > .sidebar-widget {
    margin-bottom: 32px !important;
}

.page-sidebar > *:last-child,
aside.page-sidebar > *:last-child,
.page-sidebar > div:last-child,
.page-sidebar > .sidebar-widget:last-child {
    margin-bottom: 0 !important;
}

