/* ===== 我的课堂 ===== */

.hidden { display: none !important; }

.cr-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 22px;
}
.cr-tabs button {
    background: none;
    border: 0;
    padding: 12px 20px;
    font-size: 15px;
    color: var(--text-2);
    cursor: pointer;
    position: relative;
    font-family: inherit;
}
.cr-tabs button:hover { color: var(--blue); }
.cr-tabs button.active { color: var(--blue); font-weight: 600; }
.cr-tabs button.active::after {
    content: "";
    position: absolute;
    left: 18px; right: 18px; bottom: -1px;
    height: 2px;
    background: var(--blue);
}

.cr-empty {
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 46px 0;
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
}

/* ---- 我的班级 ---- */
.cr-class {
    display: flex;
    gap: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}
.cr-class .cover {
    width: 150px;
    height: 96px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #EEF4FC;
}
.cr-class .cover img { width: 100%; height: 100%; object-fit: cover; }
.cr-class .info { flex: 1; min-width: 0; }
.cr-class h4 { font-size: 16px; color: #1B2536; margin-bottom: 6px; }
.cr-class .meta { font-size: 12px; color: var(--text-3); display: flex; gap: 16px; flex-wrap: wrap; }
.cr-class .acts { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.cr-tag {
    display: inline-block;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 20px;
    margin-left: 8px;
}
.cr-tag.approved { background: #E8F7EE; color: #1F9254; }
.cr-tag.pending { background: #FFF7E6; color: #B7791F; }
.cr-tag.rejected { background: #FDECEC; color: #D9363E; }
.cr-tag.live { background: #FDECEC; color: #D9363E; }
.cr-tag.upcoming { background: #EEF4FC; color: var(--blue); }
.cr-tag.ended { background: #F2F4F7; color: #98A2B3; }

/* ---- 点播课程 ---- */
.cr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.cr-course {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.cr-course:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cr-course .cover { height: 140px; background: #EEF4FC; overflow: hidden; }
.cr-course .cover img { width: 100%; height: 100%; object-fit: cover; }
.cr-course .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.cr-course h4 { font-size: 16px; color: #1B2536; margin-bottom: 6px; line-height: 1.5; }
.cr-course .sub { font-size: 12px; color: var(--text-3); margin-bottom: 10px; }
.cr-course .desc {
    font-size: 13px; color: var(--text-2); line-height: 1.7; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 12px;
}
.cr-bar { height: 6px; background: #EEF1F5; border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.cr-bar i { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
.cr-course .foot { display: flex; align-items: center; justify-content: space-between; }
.cr-course .foot .muted { font-size: 12px; color: var(--text-3); }

/* ---- 直播课程 ---- */
.cr-live {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}
.cr-live .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #C7D0DB; flex-shrink: 0;
}
.cr-live .dot.live { background: #D9363E; box-shadow: 0 0 0 4px rgba(217, 54, 62, .12); }
.cr-live .info { flex: 1; min-width: 0; }
.cr-live h4 { font-size: 15px; color: #1B2536; margin-bottom: 4px; }
.cr-live .meta { font-size: 12px; color: var(--text-3); }

/* ---- 课程详情 ---- */
.cd-head {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
}
.cd-head b { display: block; font-size: 16px; color: #1B2536; }
.cd-head .muted { font-size: 12px; color: var(--text-3); }
.btn-back {
    background: none; border: 1px solid var(--line); border-radius: 4px;
    padding: 6px 12px; font-size: 13px; color: var(--text-2); cursor: pointer;
}
.btn-back:hover { color: var(--blue); border-color: var(--blue); }

.cd-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
}
.cd-player { min-width: 0; }
.player-box {
    background: #0C1424;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.player-box video,
.player-box iframe { width: 100%; height: 100%; border: 0; background: #000; }
.player-ph { text-align: center; color: rgba(255, 255, 255, .55); }
.player-ph svg { width: 54px; height: 54px; fill: rgba(255, 255, 255, .35); margin: 0 auto 8px; }
.player-ph p { font-size: 13px; }
.player-tip { font-size: 12px; color: var(--text-3); margin-top: 10px; }

.cd-lessons {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
}
.cd-lessons h4 { font-size: 15px; color: #1B2536; margin-bottom: 10px; }
.cd-lessons li {
    padding: 11px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-2);
    border-bottom: 1px dashed #EEF1F5;
}
.cd-lessons li:last-child { border-bottom: 0; }
.cd-lessons li:hover { background: #F5F8FD; color: var(--blue); }
.cd-lessons li.active { background: #EEF4FC; color: var(--blue); font-weight: 500; }
.cd-lessons li .l-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); margin-top: 3px; }
.cd-lessons li .done { color: #1F9254; }

@media (max-width: 900px) {
    .cd-body { grid-template-columns: 1fr; }
    .cr-class { flex-direction: column; }
    .cr-class .cover { width: 100%; height: 140px; }
}
@media (max-width: 640px) {
    .cr-grid { grid-template-columns: 1fr; }
    .cr-live { flex-wrap: wrap; }
}
