/**
 * 分类信息列表页 - 样式文件
 * 设计风格：杂志编辑风 + 暖色调主题
 * 特点：精致的排版、流畅的动画、优雅的交互
 */

/* ========================================
   迷你 Header
   ======================================== */
.mini-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    max-width: 680px;
    margin: 0 auto;
}

.mini-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mini-back-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.mini-back-btn:active {
    transform: scale(0.95);
}

.mini-back-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.mini-category {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mini-category-name {
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

.mini-category-count {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 2px;
}

.mini-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mini-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mini-action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.mini-action-btn:active {
    transform: scale(0.95);
}

.mini-action-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* ========================================
   子分类导航
   ======================================== */
.sub-nav {
    position: relative;
    z-index: 90;
    background: linear-gradient(180deg, rgba(255, 251, 247, 0.98) 0%, rgba(255, 251, 247, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 85, 46, 0.08);
    padding: 10px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.sub-nav-wrapper {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 0 16px;
    max-width: 680px;
    margin: 0 auto;
}

.sub-nav-wrapper::-webkit-scrollbar {
    display: none;
}

.sub-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.sub-nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sub-nav-item:hover {
    border-color: rgba(255, 85, 46, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 85, 46, 0.1);
}

.sub-nav-item.active {
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(255, 85, 46, 0.25);
}

.sub-nav-item.active::before {
    opacity: 1;
}

.sub-nav-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sub-nav-item.active .sub-nav-text {
    color: white;
}

/* 二级分类导航样式 */
.sub-nav-secondary {
    background: linear-gradient(180deg, rgba(255, 248, 243, 0.98) 0%, rgba(255, 248, 243, 0.95) 100%);
    border-bottom: 1px solid rgba(255, 85, 46, 0.06);
    padding: 8px 0;
}

.sub-nav-secondary .sub-nav-wrapper {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.sub-nav-secondary .sub-nav-wrapper::-webkit-scrollbar {
    display: none;
}

.sub-nav-secondary .sub-nav-item {
    padding: 6px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

.sub-nav-secondary .sub-nav-item.sub-item {
    font-size: 0.8rem;
}

.sub-nav-secondary .sub-nav-item.sub-item .sub-nav-text {
    font-size: 0.8rem;
    font-weight: 500;
}

/* 返回父分类按钮样式 */
.sub-nav-item.back-item {
    background: rgba(255, 85, 46, 0.08);
    border-color: rgba(255, 85, 46, 0.15);
}

.sub-nav-item.back-item svg {
    fill: var(--primary);
}

.sub-nav-item.back-item .sub-nav-text {
    color: var(--primary);
}

/* 链接样式重置 */
.sub-nav-wrapper a.sub-nav-item {
    text-decoration: none;
}

/* ========================================
   筛选排序区
   ======================================== */
.filter-section {
    position: relative;
    z-index: 80;
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid var(--border);
    gap: 12px;
    max-width: 680px;
    margin: 0 auto;
}

.filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: var(--font-body);
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-tab svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    opacity: 0.7;
}

.filter-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-tab.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 10px rgba(255, 85, 46, 0.25);
}

.filter-tab.active svg {
    opacity: 1;
}

.filter-actions {
    display: flex;
    gap: 8px;
}

.filter-action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: var(--font-body);
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-action-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.filter-action-btn .arrow {
    width: 12px;
    height: 12px;
    transition: transform 0.25s ease;
}

.filter-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-action-btn.active .arrow {
    transform: rotate(180deg);
}

/* 排序面板 */
.sort-panel {
    position: absolute;
    top: 100%;
    right: 16px;
    width: 180px;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
    z-index: 100;
}

.sort-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sort-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-option:hover {
    background: rgba(255, 85, 46, 0.05);
    color: var(--primary);
}

.sort-option.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.sort-option svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sort-option.active svg {
    opacity: 1;
}

/* 遮罩层 */
.filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 70;
}

.filter-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   信息列表
   ======================================== */
.main {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

.listing-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
}

/* 分类信息卡片 */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.25s ease;
}

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

.card-classified {
    padding: 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-classified:hover {
    box-shadow: var(--shadow-hover);
}

.classified-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.classified-badge {
    flex-shrink: 0;
    padding: 3px 8px;
    background: linear-gradient(135deg, var(--accent) 0%, #FFC107 100%);
    color: #8B6914;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.classified-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.classified-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 2px;
}

.classified-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}

.classified-category {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 20px;
    border: 1px solid rgba(255, 85, 46, 0.15);
}

.classified-category svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.classified-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.classified-info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.classified-info svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

/* ========================================
   图片展示区域 - 与首页保持一致
   ======================================== */
.classified-images {
    margin: 12px 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

/* 单图样式 - 16:9 比例 */
.classified-images.single-image {
    position: relative;
}

.classified-images.single-image img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius-sm);
    transition: transform 0.4s ease;
}

/* 多图样式（2-3张）- 1:1 正方形 */
.classified-images.triple-image {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.classified-images.triple-image > div {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f5f5f5 0%, #ebebeb 100%);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.classified-images.triple-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.classified-images.triple-image > div:hover img {
    transform: scale(1.08);
}

/* 九宫格样式（>3张）- 1:1 正方形，更小间距 */
.classified-images.grid-image {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.classified-images.grid-image > div {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f5f5f5 0%, #ebebeb 100%);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.classified-images.grid-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.classified-images.grid-image > div:hover img {
    transform: scale(1.1);
}

/* 超过9张图时的 +N 标记 */
.classified-images.grid-image .more-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    pointer-events: none;
}

/* ========================================
   分页 - 适配 ThinkPHP 样式
   ======================================== */
.pagination-wrapper,
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 32px 0 20px;
    list-style: none;
    margin: 0;
}

.pagination-wrapper {
    flex-wrap: wrap;
}

.pagination {
    flex-wrap: wrap;
}

.pagination li {
    list-style: none;
}

.pagination a,
.pagination span,
.page-btn,
.page-num {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    padding: 0 8px;
}

.pagination a:hover,
.page-btn:hover:not(:disabled),
.page-num:hover {
    background: rgba(255, 85, 46, 0.05);
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(255, 85, 46, 0.15);
    text-decoration: none;
}

.pagination .active span,
.pagination .active a,
.page-num.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 10px rgba(255, 85, 46, 0.3);
}

.pagination .disabled span,
.pagination .disabled a,
.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: transparent;
}

.page-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0;
}

.page-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--text-secondary);
}

.page-btn:hover:not(:disabled) svg {
    fill: var(--primary);
}

/* 上一页/下一页按钮 */
.pagination li:first-child a,
.pagination li:first-child span,
.pagination li:last-child a,
.pagination li:last-child span {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.pagination li:first-child a:hover,
.pagination li:last-child a:hover {
    border-color: var(--primary);
}

/* A标签无下划线 */
.listing-list a,
.pagination a,
.sub-nav a {
    text-decoration: none;
}

.listing-list a:hover,
.pagination a:hover,
.sub-nav a:hover {
    text-decoration: none;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-num {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.page-num:hover {
    background: rgba(255, 85, 46, 0.05);
    color: var(--primary);
}

.page-num.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 10px rgba(255, 85, 46, 0.3);
}

.page-ellipsis {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0 4px;
}

.pagination li {
    list-style: none;
}

.pagination a,
.pagination span,
.page-btn {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.pagination a:hover,
.page-btn:hover:not(:disabled) {
    background: rgba(255, 85, 46, 0.05);
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(255, 85, 46, 0.15);
    text-decoration: none;
}

.pagination .active span,
.pagination .active a,
.page-num.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 10px rgba(255, 85, 46, 0.3);
}

.pagination .disabled span,
.pagination .disabled a,
.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: transparent;
}

.page-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.page-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--text-secondary);
}

.page-btn:hover:not(:disabled) svg {
    fill: var(--primary);
}

/* 上一页/下一页按钮 */
.pagination li:first-child a,
.pagination li:first-child span,
.pagination li:last-child a,
.pagination li:last-child span {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.pagination li:first-child a:hover,
.pagination li:last-child a:hover {
    border-color: var(--primary);
}

/* A标签无下划线 */
.listing-list a,
.pagination a,
.sub-nav a {
    text-decoration: none;
}

.listing-list a:hover,
.pagination a:hover,
.sub-nav a:hover {
    text-decoration: none;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-num {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.page-num:hover {
    background: rgba(255, 85, 46, 0.05);
    color: var(--primary);
}

.page-num.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 10px rgba(255, 85, 46, 0.3);
}

.page-ellipsis {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0 4px;
}

/* ========================================
   底部信息
   ======================================== */
.list-footer {
    text-align: center;
    padding: 16px 0 32px;
}

.footer-stats {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-stats strong {
    color: var(--primary);
    font-weight: 600;
}

.footer-stats .divider {
    margin: 0 8px;
    opacity: 0.3;
}

/* ========================================
   国家切换面板
   ======================================== */
.country-switch-btn {
    position: relative;
}

.country-panel {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: var(--bg-card);
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 200;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.country-panel.show {
    right: 0;
}

.country-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.country-panel-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
}

.country-panel-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

.country-panel-close svg {
    width: 20px;
    height: 20px;
    fill: var(--text-secondary);
}

.country-list {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.country-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.country-item:hover {
    background: rgba(255, 85, 46, 0.06);
    color: var(--primary);
}

.country-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.country-flag {
    font-size: 1.1rem;
}

.country-name {
    flex: 1;
}

.country-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 199;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.country-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   迷你Header定制
   ======================================== */
.mini-category {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.mini-category-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
}

.mini-category-count {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
}

.mini-actions {
    display: flex;
    gap: 8px;
}

.mini-action-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.mini-action-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
}

.mini-action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* ========================================
   动画
   ======================================== */
@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-classified {
    animation: cardSlideIn 0.35s ease backwards;
}

.card-classified:nth-child(1) { animation-delay: 0.03s; }
.card-classified:nth-child(2) { animation-delay: 0.06s; }
.card-classified:nth-child(3) { animation-delay: 0.09s; }
.card-classified:nth-child(4) { animation-delay: 0.12s; }
.card-classified:nth-child(5) { animation-delay: 0.15s; }

/* ========================================
   响应式
   ======================================== */
@media (min-width: 768px) {
    .sub-nav {
        padding: 12px 0;
    }

    .sub-nav-wrapper {
        gap: 10px;
        padding: 0;
        max-width: 680px;
    }

    .sub-nav-item {
        padding: 9px 4px;
        border-radius: 14px;
    }

    .card-classified {
        padding: 18px;
    }

    .classified-title {
        font-size: 1rem;
    }

    .classified-desc {
        -webkit-line-clamp: 3;
    }

    .sort-panel {
        right: 50%;
        transform: translateX(50%) translateY(-10px);
    }

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

@media (max-width: 374px) {
    .sub-nav {
        padding: 8px 0;
    }

    .sub-nav-wrapper {
        gap: 4px;
        padding: 0 12px;
        max-width: 360px;
    }

    .sub-nav-item {
        padding: 6px 2px;
        border-radius: 10px;
    }

    .sub-nav-text {
        font-size: 0.7rem;
    }

    .card-classified {
        padding: 14px;
    }

    .classified-title {
        font-size: 0.85rem;
    }

    .classified-desc {
        font-size: 0.8rem;
    }
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
    .sub-nav {
        background: linear-gradient(180deg, rgba(26, 26, 26, 0.98) 0%, rgba(26, 26, 26, 0.95) 100%);
        border-bottom-color: rgba(255, 255, 255, 0.06);
    }

    .sub-nav-secondary {
        background: linear-gradient(180deg, rgba(26, 26, 26, 0.98) 0%, rgba(26, 26, 26, 0.95) 100%);
        border-bottom-color: rgba(255, 255, 255, 0.06);
    }

    .sub-nav-secondary .sub-nav-item {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .sub-nav-item {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .sub-nav-item:hover {
        border-color: rgba(255, 85, 46, 0.3);
    }

    .filter-bar {
        background: rgba(26, 26, 26, 0.6);
    }

    .filter-tab,
    .filter-action-btn {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .card-classified {
        background: var(--bg-card);
        border-color: rgba(255, 255, 255, 0.06);
    }

    .classified-footer {
        border-top-color: rgba(255, 255, 255, 0.06);
    }

    .page-btn {
        background: var(--bg-card);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .filter-overlay {
        background: rgba(0, 0, 0, 0.6);
    }
}

/* ========================================
   加载更多
   ======================================== */
.load-more {
    text-align: center;
    padding: 16px 0 20px;
}

.load-more-btn {
    padding: 10px 32px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary);
    background: rgba(255, 85, 46, 0.06);
    border: 1px solid rgba(255, 85, 46, 0.2);
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.load-more-btn:hover {
    background: rgba(255, 85, 46, 0.12);
    border-color: var(--primary);
}

/* ========================================
   空状态提示
   ======================================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    fill: var(--text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.9rem;
}

/* ========================================
   加载中状态
   ======================================== */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

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

.loading-state p {
    font-size: 0.85rem;
}
