/* 页面基础样式 */
body {
    background-color: #141428;
    color: #fff;
    padding: 70px 0 70px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-overflow-scrolling: touch;
}

/* 顶部导航 */
.featured-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    z-index: 100;
}

.featured-header h1 {
    color: #fff;
    font-size: 18px;
    margin: 0;
}

/* 分类导航 */
.category-nav {
    position: sticky;
    top: 50px;
    display: flex;
    overflow-x: auto;
    background: #1a1a2e;
    padding: 10px 15px;
    gap: 15px;
    z-index: 99;
    -webkit-overflow-scrolling: touch;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-nav .nav-item {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s;
}

.category-nav .nav-item.active {
    background: linear-gradient(45deg, #ff6b81, #ff75a0);
    color: #fff;
    box-shadow: 0 2px 10px rgba(255, 107, 129, 0.3);
}

/* 内容区域 */
.featured-container {
    padding: 15px;
    max-width: 600px;
    margin: 0 auto;
}

/* 卡片通用样式 */
.featured-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
}

.featured-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.card-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9比例 */
    overflow: hidden;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 精品标签 */
.premium-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(45deg, #ffd700, #ffaa00);
    padding: 4px 10px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.premium-tag i {
    font-size: 12px;
}

/* 教程标签 */
.tutorial-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(45deg, #40ffff, #0099ff);
    padding: 4px 10px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.card-content {
    padding: 15px;
}

/* 作者信息 */
.author-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.author-detail {
    flex: 1;
}

.author-name {
    font-size: 14px;
    color: #fff;
    margin-bottom: 2px;
}

.post-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.follow-btn {
    position: relative;
    z-index: 2;
    cursor: pointer;
    background: linear-gradient(45deg, #ff6b81, #ff75a0);
    border: none;
    border-radius: 15px;
    padding: 6px 12px;
    color: #fff;
    font-size: 12px;
}

.follow-btn.following {
    background: rgba(255, 255, 255, 0.1);
}

/* 卡片内容 */
.card-title {
    font-size: 16px;
    margin: 0 0 8px;
}

.card-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

/* 统计信息 */
.card-stats {
    display: flex;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

/* 教程信息 */
.tutorial-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.price {
    margin-left: auto;
    color: #ffd700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 合集样式 */
.collection-card {
    background: linear-gradient(135deg, rgba(64, 255, 255, 0.1), rgba(0, 153, 255, 0.05));
}

.collection-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collection-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.collection-title i {
    color: #40ffff;
}

.collection-count {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    padding: 0 2px;
}

.collection-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.collection-footer {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collection-footer .author-info {
    margin: 0;
}

.collection-stats {
    display: flex;
    gap: 15px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

/* 适配刘海屏 */
@supports (padding-top: env(safe-area-inset-top)) {
    .featured-header {
        padding-top: env(safe-area-inset-top);
        height: calc(50px + env(safe-area-inset-top));
    }
    
    body {
        padding-top: calc(70px + env(safe-area-inset-top));
    }
}

/* 当遮罩层显示时禁止页面滚动 */
body.mask-active {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* 会员遮罩层 */
.vip-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 60px;
}

.mask-content {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    margin-bottom: 30px;
}

.mask-content i.fa-crown {
    font-size: 48px;
    color: #ffd700;
    margin-bottom: 20px;
}

.mask-content h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #fff;
}

.mask-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.vip-benefits {
    margin: 20px 0;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    color: rgba(255, 255, 255, 0.9);
}

.benefit-item i {
    color: #4cd964;
}

.unlock-btn {
    background: linear-gradient(45deg, #ffd700, #ffaa00);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    cursor: pointer;
    transition: transform 0.3s;
}

.unlock-btn:active {
    transform: scale(0.98);
}

/* 底部导航样式 */
.bottom-nav {
    z-index: 999;
}

/* 适配刘海屏 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .vip-mask {
        padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }
}

/* 加载更多样式 */
.load-more {
    text-align: center;
    padding: 20px 0;
    margin-top: 20px;
}

.loading-spinner {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 auto;
}

.loading-spinner i {
    font-size: 20px;
    animation: spin 1s linear infinite;
}

.loading-spinner span {
    font-size: 14px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 