/* 页面基础样式 */
body {
    background-color: #141428;
    color: #fff;
    padding: 90px 15px 20px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-overflow-scrolling: touch;
}

/* 顶部导航 */
.purchases-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    padding: 0 15px;
    z-index: 100;
}

.back-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    padding: 8px;
    cursor: pointer;
}

.purchases-header h1 {
    flex: 1;
    text-align: center;
    color: #fff;
    font-size: 18px;
    margin: 0;
}

/* 内容类型切换 */
.content-tabs {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    height: 40px;
    background: #1a1a2e;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 15px;
    z-index: 90;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    padding: 8px 15px;
    cursor: pointer;
    position: relative;
}

.tab-btn.active {
    color: #fff;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: #40ffff;
    border-radius: 1px;
}

/* 购买列表 */
.purchases-container {
    max-width: 480px;
    margin: 0 auto;
}

.purchase-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 15px;
    display: flex;
    gap: 12px;
}

/* 媒体预览 */
.media-preview {
    position: relative;
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-preview i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.duration {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* 内容信息 */
.content-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content-info .title {
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-info .desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.meta .price {
    color: #ff9f43;
}

/* 文章预览 */
.article-preview {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.article-preview i {
    font-size: 20px;
    color: #40ffff;
}

/* 适配刘海屏 */
@supports (padding-top: env(safe-area-inset-top)) {
    .purchases-header {
        padding-top: env(safe-area-inset-top);
        height: calc(50px + env(safe-area-inset-top));
    }
    
    body {
        padding-top: calc(90px + env(safe-area-inset-top));
    }
    
    .content-tabs {
        top: calc(50px + env(safe-area-inset-top));
    }
} 