/* vip.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft Yahei", "PingFang SC", sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

/* 分页当前页背景色改为蓝色（与课程中心保持一致） */
.layui-laypage .layui-laypage-curr .layui-laypage-em {
    background-color: #1e9fff !important;
}

/* 面包屑导航 */
.breadcrumb {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #165DFF;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 5px;
    color: #ccc;
}

/* 主体布局 */
.main-layout {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
    align-items: flex-start;
}

.course-section {
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.news-sidebar {
    width: 300px;
    flex-shrink: 0;
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* 顶部筛选栏 */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.sort-options {
    display: flex;
    gap: 10px;
}

.sort-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s;
}

.sort-btn:hover {
    border-color: #165DFF;
    color: #165DFF;
}

.sort-btn.active {
    background: #165DFF;
    color: #fff;
    border-color: #165DFF;
}

/* 课程网格 */
.course-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    min-height: 300px;
}

/* 课程卡片 */
.course-card {
    border: 1px solid #eef1f5;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: #165DFF;
}

.course-img {
    height: 180px;
    background-color: #f5f7fa;
    position: relative;
    overflow: hidden;
}

.course-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.course-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.course-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-meta .buy-count {
    color: #ff7d00;
}

.course-price {
    font-size: 18px;
    color: #e64340;
    font-weight: bold;
    margin-top: auto;
}

.course-price.free {
    color: #52c41a;
}

.course-price.vip-only {
    color: #165DFF;
    font-weight: 500;
    font-size: 14px;
}

.course-price-original {
    text-decoration: line-through;
    font-size: 14px;
    color: #999;
    margin-left: 6px;
    font-weight: normal;
}

/* 新闻侧边栏样式 */
.news-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8f3ff;
}

.news-list {
    max-height: 400px;
    overflow-y: auto;
}

.news-item {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    font-size: 14px;
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-item:hover {
    color: #165DFF;
    cursor: pointer;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item .title-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
}

.news-item .time {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}

/* 分页 */
.pagination-container {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

/* 空状态 */
.empty-data {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    padding: 60px 20px;
    font-size: 16px;
    background: #fafafa;
    border-radius: 8px;
}

/* 响应式 */
@media (max-width: 992px) {
    .main-layout {
        flex-direction: column;
    }

    .news-sidebar {
        width: 100%;
    }

    .course-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .course-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .sort-options {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
    }
}
/* VIP 课程标签 */
.course-img {
    position: relative;
}
.course-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    font-size: 12px;
    color: #fff;
    border-radius: 3px;
    z-index: 10;
}
.course-tag.vip {
    background: #ff9100;
    font-weight: bold;
}
.course-tag.seckill {
    background: #ff3333;
}

/* VIP 专属价格样式 */
.course-price.vip-only {
    color: #ff9100;
    font-weight: bold;
    font-size: 14px;
}