/* 发现页样式 */

/* 发现页区域通用样式 */
.discovery-section {
    margin-bottom: var(--spacing-lg);
    background-color: var(--card-background);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

/* 移除重复的内容样式，现在统一使用tab-bar.css中的定义 */

.discovery-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(180deg, rgba(var(--primary-color-rgb), 0.05) 0%, rgba(var(--primary-color-rgb), 0) 100%);
    z-index: 0;
    opacity: 0.7;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--text-primary);
    font-family: var(--font-display);
    position: relative;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 18px;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 1px;
}

.section-more {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 500;
    display: flex;
    align-items: center;
}

.section-more svg {
    width: 16px;
    height: 16px;
    margin-left: 2px;
}

/* 新增顶部分类切换标签样式 */
.category-tabs {
    display: flex;
    justify-content: space-around;
    background-color: var(--card-background);
    padding: 12px 0;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 44px; /* 导航栏高度 */
    z-index: 99;
}

.category-tab {
    padding: 8px 16px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    text-align: center;
}

.category-tab.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    font-weight: 600;
}

/* 内容区域样式 */
.content {
    padding: 0 12px;
}

.category-content {
    display: none;
    padding-top: 12px;
}

.category-content.active {
    display: block;
}

/* 列表容器通用样式 */
.scrollable-list {
    position: relative;
    z-index: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    padding-bottom: 8px; /* 为iOS滚动条预留空间 */
}

.scrollable-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.horizontal-list {
    display: flex;
    flex-direction: row;
    gap: var(--spacing-md);
    padding: 4px 2px; /* 为阴影效果预留空间 */
}

/* 古董常识区域 */
.knowledge-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    position: relative;
    z-index: 1;
}

.knowledge-list.horizontal .knowledge-item {
    min-width: 280px;
    max-width: 280px;
}

.knowledge-item {
    display: flex;
    flex-direction: row;
    background-color: var(--card-background);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 0.5px solid var(--divider-color);
    margin-bottom: 16px;
}

.knowledge-item:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-xs);
}

.knowledge-image {
    width: 120px;
    min-width: 120px;
    height: 120px;
    overflow: hidden;
    position: relative;
}

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

.knowledge-item:active .knowledge-image img {
    transform: scale(1.02);
}

.knowledge-info {
    flex: 1;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
}

.knowledge-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.knowledge-desc {
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin: 0;
}

/* 鉴别伪造古董区域 */
.antifraud-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    position: relative;
    z-index: 1;
}

.antifraud-list.horizontal .antifraud-item {
    min-width: 280px;
    max-width: 280px;
}

.antifraud-item {
    display: flex;
    align-items: flex-start;
    background-color: rgba(255, 59, 48, 0.05);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    border: 1px solid rgba(255, 59, 48, 0.1);
    transition: background-color 0.2s ease;
    margin-bottom: 16px;
}

.antifraud-item:active {
    background-color: rgba(255, 59, 48, 0.08);
}

.antifraud-icon {
    flex-shrink: 0;
    margin-right: var(--spacing-md);
    width: 24px;
    height: 24px;
}

.antifraud-content {
    flex: 1;
}

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

.antifraud-desc {
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-secondary);
    margin: 0;
}

/* 精选鉴赏区域 - 修改为首页样式 */
.gallery-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    position: relative;
    z-index: 1;
}

.gallery-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    position: relative;
    z-index: 1;
}

/* 改为类似首页的featured-item样式 */
.gallery-item {
    display: flex;
    flex-direction: row;
    background-color: var(--card-background);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 0.5px solid var(--divider-color);
    margin-bottom: 16px;
}

.gallery-item:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-xs);
}

.gallery-item img {
    width: 120px;
    min-width: 120px;
    height: 120px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:active img {
    transform: scale(1.02);
}

/* 修改叠加层为信息区域 */
.gallery-overlay {
    position: relative;
    flex: 1;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: none;
    height: 120px;
    overflow: hidden;
}

.gallery-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-shadow: none;
}

/* 添加年代信息 */
.gallery-period {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.gallery-period::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    background-color: var(--primary-color);
    opacity: 0.2;
    border-radius: 50%;
}

/* 添加描述信息 */
.gallery-desc {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin: 0;
}

/* 加载更多区域 */
.load-more {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-md) 0;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    margin: 16px 0;
}

.loading-spinner {
    margin-right: 8px;
    animation: spin 1s linear infinite;
}

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

/* 列表页面加载状态 */
.list-loading {
    padding: var(--spacing-md);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* 空状态提示 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg) var(--spacing-md);
    color: var(--text-secondary);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: var(--spacing-md);
    opacity: 0.6;
}

.empty-state-text {
    font-size: 14px;
    text-align: center;
} 