/* ============================================================
 * CourseOss 用户端样式（现代卡片精致风）
 * 页面由站点主题包裹（header/footer 来自主题），
 * 本文件仅负责 .co-* 课程组件。
 * ============================================================ */

:root {
    /* 与主站（default 主题）保持一致：石板灰按钮 + 蓝链接 + 浅灰底 */
    --co-primary: #444d5f;
    --co-primary-600: #36404f;
    --co-primary-50: #eceef1;
    --co-accent: #3354AA;
    --co-link: #3354AA;
    --co-gradient: linear-gradient(135deg, #4b5870 0%, #3354AA 100%);

    --co-surface: #ffffff;
    --co-ink: #1a1a1a;
    --co-text: #444444;
    --co-muted: #999999;
    --co-border: #e9e9e9;
    --co-bg: #f8f8f8;

    --co-success: #16a34a;
    --co-success-bg: #e7f7ee;
    --co-danger: #ef4444;
    --co-danger-bg: #fdeaea;
    --co-warning: #f59e0b;
    --co-warning-bg: #fef3e2;
    --co-info: #0ea5e9;
    --co-info-bg: #e6f6fe;

    --co-r: 10px;
    --co-r-sm: 8px;
    --co-r-pill: 999px;

    --co-shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
    --co-shadow: 0 6px 22px rgba(26, 32, 44, .10);
    --co-shadow-lg: 0 12px 40px rgba(26, 32, 44, .16);

    --co-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

.co-wrap {
    max-width: 1120px;
    margin: 32px auto;
    padding: 0 20px 64px;
    font-family: var(--co-font);
    color: var(--co-text);
    min-height: 70vh;
}

/* 播放器容器（文章页直接嵌入时也依赖此样式，原本只在 player.css 中） */
.co-player { position: relative; width: 100%; aspect-ratio: 16 / 9; height: auto; background: #000; border-radius: 10px; overflow: hidden; min-height: 240px; }
.co-player #v { width: 100%; height: 100%; object-fit: contain; display: block; }
.co-fs {
    position: absolute; top: 10px; right: 10px; z-index: 10;
    width: 38px; height: 38px; border: 0; border-radius: 8px;
    background: rgba(0,0,0,.5); color: #fff; font-size: 18px; line-height: 1;
    cursor: pointer; display: none;
}
.co-player:hover .co-fs { display: block; }
html:fullscreen, html:-webkit-full-screen { height: 100%; }
html:fullscreen body, html:-webkit-full-screen body { height: 100%; margin: 0; background: #000; }

.co-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--co-ink);
    margin: 0 0 4px;
    letter-spacing: .2px;
}
.co-subtitle { color: var(--co-muted); margin: 0 0 24px; font-size: 14px; }

/* ---------- 课程网格 ---------- */
.co-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
    gap: 22px;
}

.co-course-card {
    display: flex;
    flex-direction: column;
    background: var(--co-surface);
    border: 1px solid var(--co-border);
    border-radius: var(--co-r);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--co-shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease;
}
.co-course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--co-shadow);
}

.co-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--co-gradient);
    overflow: hidden;
}
.co-cover img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}
.co-course-card:hover .co-cover img { transform: scale(1.05); }

.co-cover-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .92);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 1px;
}
.co-cover::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 46%;
    background: linear-gradient(to top, rgba(0, 0, 0, .42), transparent);
}

.co-cover-badge {
    position: absolute;
    left: 12px; bottom: 12px;
    z-index: 2;
    padding: 3px 10px;
    border-radius: var(--co-r-pill);
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}
.co-cover-badge-ok { background: var(--co-success); }
.co-cover-play {
    position: absolute;
    right: 12px; top: 12px;
    z-index: 2;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: var(--co-primary);
    display: grid; place-items: center;
    font-size: 14px;
    box-shadow: var(--co-shadow-sm);
}

.co-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.co-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--co-ink);
    margin: 0;
    line-height: 1.4;
}
.co-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--co-muted); font-size: 12.5px; }
.co-card-tag {
    padding: 2px 8px;
    border-radius: var(--co-r-pill);
    background: #f1f2f6;
    color: var(--co-muted);
    font-size: 11px;
    font-weight: 600;
}
.co-card-tag-ok { background: var(--co-success-bg); color: var(--co-success); }

/* ---------- 徽章（与后台一致） ---------- */
.co-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--co-r-pill);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}
.co-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.co-badge-on { background: var(--co-success-bg); color: var(--co-success); }
.co-badge-off { background: var(--co-danger-bg); color: var(--co-danger); }
.co-badge-warn { background: var(--co-warning-bg); color: var(--co-warning); }
.co-badge-info { background: var(--co-info-bg); color: var(--co-info); }
.co-badge-muted { background: #f1f2f6; color: var(--co-muted); }
.co-badge-plain { background: var(--co-primary-50); color: var(--co-primary); }

/* ---------- 播放页 ---------- */
.co-player-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }

.co-player-card {
	background: #0b0d17;
	border-radius: var(--co-r);
	overflow: hidden;
	box-shadow: var(--co-shadow);
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	min-height: 240px;
}
.co-player-card video {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	background: #000;
}
.co-player-watermark {
    position: absolute;
    right: 12px; bottom: 12px;
    color: rgba(255, 255, 255, .55);
    font-size: 12px;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}

.co-course-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.co-course-head h1 { font-size: 22px; font-weight: 800; color: var(--co-ink); margin: 0; }
.co-free-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: var(--co-r-pill);
    background: var(--co-info-bg); color: var(--co-info);
    font-size: 12px; font-weight: 600;
}

/* 选集 */
/* ---------- 列表（我的课程） ---------- */
.co-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.co-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--co-surface);
    border: 1px solid var(--co-border);
    border-radius: var(--co-r-sm);
    box-shadow: var(--co-shadow-sm);
    transition: .15s;
}
.co-list-item:hover { border-color: var(--co-primary); transform: translateX(2px); }
.co-list-thumb {
    width: 56px; height: 40px;
    border-radius: 8px;
    background: var(--co-gradient);
    flex: none;
    background-size: cover; background-position: center;
}
.co-list-main { flex: 1; min-width: 0; }
.co-list-main a { font-size: 16px; font-weight: 700; color: var(--co-ink); }
.co-list-main a:hover { color: var(--co-primary); }
.co-list-sub { color: var(--co-muted); font-size: 12.5px; margin-top: 2px; }

/* ---------- 居中卡片（激活 / 锁定 / 登录） ---------- */
.co-center {
    max-width: 460px;
    margin: 60px auto;
}
.co-panel-card {
    background: var(--co-surface);
    border: 1px solid var(--co-border);
    border-radius: var(--co-r);
    box-shadow: var(--co-shadow);
    padding: 34px 32px;
    text-align: center;
}
.co-panel-card .co-icon {
    width: 60px; height: 60px;
    margin: 0 auto 16px;
    border-radius: 18px;
    background: var(--co-primary-50);
    color: var(--co-primary);
    display: grid; place-items: center;
    font-size: 28px;
}
.co-panel-card h2 { margin: 0 0 8px; font-size: 20px; font-weight: 800; color: var(--co-ink); }
.co-panel-card p { color: var(--co-text); margin: 0 0 18px; }
.co-panel-card .co-reason { color: var(--co-danger); font-weight: 600; }
.co-panel-card .co-tip { color: var(--co-muted); font-size: 13px; margin-top: 14px; }

.co-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}
.co-form input {
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--co-border);
    border-radius: var(--co-r-sm);
    background: var(--co-surface);
    color: var(--co-ink);
    font-size: 15px;
    font-family: inherit;
    text-align: center;
    letter-spacing: 1px;
    outline: none;
    transition: .15s;
    width: 100%;
}
.co-form input:focus { border-color: var(--co-primary); box-shadow: 0 0 0 3px rgba(68, 77, 95, .14); }
.co-form .co-btn { width: 100%; justify-content: center; height: 44px; font-size: 15px; }

/* 登录表单 */
.co-form-login { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.co-sub { margin: 0 0 6px !important; }
.co-field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.co-field label { font-size: 13px; color: var(--co-muted); font-weight: 600; }
.co-field input {
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--co-border);
    border-radius: var(--co-r-sm);
    background: var(--co-surface);
    color: var(--co-ink);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: .15s;
    width: 100%;
    text-align: left;
    letter-spacing: 0;
}
.co-field input:focus { border-color: var(--co-primary); box-shadow: 0 0 0 3px rgba(68, 77, 95, .14); }
.co-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--co-text); cursor: pointer; }
.co-btn-block { width: 100%; justify-content: center; height: 46px; font-size: 15px; }


.co-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 42px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: var(--co-r-sm);
    background: var(--co-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: .15s;
    text-decoration: none;
}
.co-btn:hover { background: var(--co-primary-600); color: #fff; box-shadow: 0 6px 16px rgba(68, 77, 95, .28); }
.co-btn-ghost { background: var(--co-surface); color: var(--co-primary); border-color: var(--co-border); }
.co-btn-ghost:hover { background: var(--co-primary-50); color: var(--co-primary); box-shadow: none; }

.co-msg { padding: 12px 16px; border-radius: var(--co-r-sm); font-size: 14px; margin-bottom: 16px; }
.co-msg-ok { background: var(--co-success-bg); color: #15803d; }
.co-msg-err { background: var(--co-danger-bg); color: #b91c1c; }

/* ============================================================
 * 注册 / 登录 独立页（与主站 default 主题风格一致）
 * ============================================================ */
.co-auth {
    max-width: 440px;
    margin: 48px auto;
    padding: 0 16px 64px;
    font-family: var(--co-font);
}
.co-auth-card {
    background: var(--co-surface);
    border: 1px solid var(--co-border);
    border-radius: var(--co-r);
    box-shadow: var(--co-shadow);
    padding: 38px 34px 30px;
    text-align: center;
}
.co-auth-logo {
    display: block;
    margin: 0 auto 18px;
    max-width: 100%;
    max-height: 50px;
    height: auto;
}
.co-auth-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: var(--co-ink);
}
.co-auth-sub {
    margin: 0 0 22px;
    font-size: 14px;
    color: var(--co-muted);
}
.co-auth-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.co-auth-form .co-field { display: flex; flex-direction: column; gap: 6px; }
.co-auth-form label { font-size: 13px; color: var(--co-muted); font-weight: 600; }
.co-auth-form input[type="text"],
.co-auth-form input[type="email"],
.co-auth-form input[type="password"] {
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--co-border);
    border-radius: var(--co-r-sm);
    background: var(--co-surface);
    color: var(--co-ink);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
    box-sizing: border-box;
}
.co-auth-form input:focus {
    border-color: var(--co-primary);
    box-shadow: 0 0 0 3px rgba(68, 77, 95, .14);
}
.co-auth-submit {
    width: 100%;
    justify-content: center;
    height: 46px;
    margin-top: 4px;
    font-size: 16px;
    border-radius: var(--co-r-sm);
}
.co-auth-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--co-text); cursor: pointer; }
.co-auth-foot {
    margin-top: 20px;
    font-size: 14px;
    color: var(--co-muted);
}
.co-auth-foot a { color: var(--co-link); text-decoration: none; }
.co-auth-foot a:hover { text-decoration: underline; }
.co-auth-foot .sep { margin: 0 8px; color: var(--co-border); }

/* 登录 / 注册 提示卡片（文章页 / 课程页内嵌） */
.co-lock {
    max-width: 420px;
    margin: 48px auto;
    padding: 34px 30px;
    text-align: center;
    background: var(--co-surface);
    border: 1px solid var(--co-border);
    border-radius: var(--co-r);
    box-shadow: var(--co-shadow);
    font-family: var(--co-font);
}
.co-lock h2 { margin: 0 0 10px; font-size: 20px; font-weight: 700; color: var(--co-ink); }
.co-lock p { margin: 0 0 16px; color: var(--co-text); font-size: 14px; }
.co-lock .co-actions { display: flex; gap: 12px; justify-content: center; }
.co-lock .tip { color: var(--co-muted); font-size: 13px; margin-top: 6px; }

.co-back { display: inline-block; margin-top: 14px; color: var(--co-muted); font-size: 13px; }
.co-back:hover { color: var(--co-primary); }

.co-empty { text-align: center; color: var(--co-muted); padding: 60px 20px; }

/* ---------- 文章页嵌入式播放器 ---------- */
.co-embed {
	position: relative;
	width: 100%;
	max-width: 100%;
	border-radius: var(--co-r);
	overflow: hidden;
	background: #0b0d17;
	box-shadow: var(--co-shadow);
	margin: 18px 0;
}
.co-embed iframe {
	position: absolute;
	top: 0; right: 0; bottom: 0; left: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

/* ---------- 课程目录 / Tab ---------- */
.co-tabs { display: flex; gap: 6px; margin: 18px 0 12px; border-bottom: 1px solid var(--co-border, #e5e7eb); }
.co-tab {
	padding: 9px 16px; border: 0; background: transparent; cursor: pointer;
	font-size: 15px; color: var(--co-muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.co-tab.active { color: var(--co-primary); border-bottom-color: var(--co-primary); font-weight: 600; }
.co-tab-panel { margin-top: 12px; }
.co-intro { font-size: 14px; line-height: 1.8; color: #333; white-space: pre-wrap; }

.co-ep-list-wrap { background: #fff; border-radius: var(--co-r); box-shadow: var(--co-shadow); overflow: hidden; }
.co-ep-list-head { padding: 14px 18px; font-weight: 700; border-bottom: 1px solid #f0f0f0; background: #fafafa; font-size: 14px; color: var(--co-ink); }
.co-ep-list { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow-y: auto; }
.co-ep-group { border-bottom: 1px solid #f0f0f0; }
.co-ep-group-title {
	display: flex; align-items: center; gap: 8px; padding: 9px 16px;
	font-size: 13px; font-weight: 700; color: var(--co-ink);
	background: #f7f8fa; cursor: pointer; user-select: none;
}
.co-ep-group-title:hover { background: #f0f2f5; }
.co-ep-chevron {
	flex: 0 0 auto; width: 0; height: 0; margin-left: 2px;
	border-style: solid; border-width: 5px 0 5px 7px;
	border-color: transparent transparent transparent var(--co-ink);
	transition: transform .15s ease;
}
.co-ep-group-collapsed .co-ep-chevron { transform: rotate(0deg); }
.co-ep-group:not(.co-ep-group-collapsed) .co-ep-chevron { transform: rotate(90deg); }
.co-ep-group-name { flex: 1 1 auto; min-width: 0; }
.co-ep-group-count { flex: 0 0 auto; font-size: 12px; font-weight: 400; color: var(--co-muted); }
.co-ep-sublist { list-style: none; margin: 0; padding: 0; overflow: hidden; max-height: 3000px; transition: max-height .2s ease; }
.co-ep-group-collapsed .co-ep-sublist { max-height: 0 !important; }
.co-ep-sublist .co-ep-row {
	padding-left: 30px;
	border-bottom: none;
	border-top: 1px solid #f5f5f5;
}
.co-ep-sublist .co-ep-row:first-child { border-top: none; }
.co-ep-row {
	display: flex; align-items: center; gap: 10px; padding: 8px 18px; cursor: pointer;
	border-bottom: 1px solid #f5f5f5; transition: background .12s, color .12s;
}
.co-ep-row:hover { background: #f6f9ff; }
.co-ep-row.co-ep-active { background: #eef4ff; }
.co-ep-play {
	flex: 0 0 24px; width: 24px; height: 24px; display: grid; place-items: center;
	background: #eef2ff; color: var(--co-primary); border-radius: 50%;
	transition: background .12s, color .12s;
}
.co-ep-row.co-ep-active .co-ep-play { background: var(--co-primary); color: #fff; }
.co-ep-row.co-ep-locked .co-ep-play { background: #f1f2f6; color: #b9bdc7; }
.co-ep-info { flex: 1 1 auto; min-width: 0; }
.co-ep-name { font-size: 13.5px; color: #222; display: block; line-height: 1.35; }
.co-ep-row.co-ep-locked .co-ep-name { color: var(--co-muted); }
.co-ep-chap { font-size: 12px; color: var(--co-muted); }
.co-ep-dur { flex: 0 0 auto; font-size: 12.5px; color: var(--co-muted); font-variant-numeric: tabular-nums; }
.co-ep-lock {
	flex: 0 0 auto; font-size: 12px; color: #b9bdc7;
	display: grid; place-items: center; width: 24px; height: 24px;
}

/* 试看遮罩：未登录访客看免费集时，播放 15 秒后弹出 */
.co-preview-overlay { display: none; }
.co-preview-overlay[hidden] { display: none; }
.co-preview-overlay:not([hidden]) {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, .72);
    display: grid; place-items: center;
    z-index: 50;
    animation: co-fade-in .25s ease;
}
@keyframes co-fade-in { from { opacity: 0; } to { opacity: 1; } }
.co-preview-card {
    position: relative;
    max-width: 360px; margin: 0 16px;
    background: #fff; border-radius: 12px;
    padding: 28px 24px 22px; text-align: center;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .35);
}
.co-preview-icon { font-size: 38px; margin-bottom: 8px; }
.co-preview-card h3 { margin: 0 0 8px; font-size: 18px; color: var(--co-ink); }
.co-preview-card p { margin: 0 0 18px; color: var(--co-muted); font-size: 13px; line-height: 1.6; }
.co-preview-btns { display: flex; gap: 10px; justify-content: center; }
.co-preview-close {
    position: absolute; top: 6px; right: 10px;
    background: transparent; border: 0; cursor: pointer;
    font-size: 22px; line-height: 1; color: var(--co-muted);
    width: 28px; height: 28px;
}
.co-preview-close:hover { color: var(--co-ink); }

/* 解锁弹窗：点击锁定集时弹出，已登录可输兑换码，未登录引导登录/注册 */
.co-unlock-overlay { display: none; }
.co-unlock-overlay[hidden] { display: none; }
.co-unlock-overlay:not([hidden]) {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .78);
    display: grid; place-items: center;
    z-index: 60;
    animation: co-fade-in .25s ease;
    padding: 16px;
    box-sizing: border-box;
}
.co-unlock-card {
    position: relative;
    width: min(420px, calc(100% - 32px)); margin: 0 16px;
    background: #fff; border-radius: 14px;
    padding: 30px 26px 24px; text-align: center;
    box-shadow: 0 20px 56px rgba(0, 0, 0, .38);
}
.co-unlock-icon { font-size: 40px; margin-bottom: 10px; }
.co-unlock-card h3 { margin: 0 0 8px; font-size: 18px; color: var(--co-ink); }
.co-unlock-card > p { margin: 0 0 20px; color: var(--co-muted); font-size: 13px; line-height: 1.6; }
.co-unlock-close {
    position: absolute; top: 8px; right: 12px;
    background: transparent; border: 0; cursor: pointer;
    font-size: 24px; line-height: 1; color: var(--co-muted);
    width: 30px; height: 30px;
}
.co-unlock-close:hover { color: var(--co-ink); }
.co-unlock-form { display: flex; gap: 8px; justify-content: center; }
.co-unlock-form input {
    flex: 1; height: 42px; padding: 0 14px;
    border: 1px solid var(--co-border); border-radius: var(--co-r-sm);
    background: #fff; font-size: 14px; letter-spacing: 1px;
    outline: none; min-width: 0;
}
.co-unlock-form input:focus { border-color: var(--co-primary); box-shadow: 0 0 0 3px rgba(68, 77, 95, .12); }
.co-unlock-form .co-btn { height: 42px; padding: 0 20px; white-space: nowrap; }
.co-unlock-btns { display: flex; gap: 10px; justify-content: center; }
.co-unlock-msg { margin-top: 12px; font-size: 13px; min-height: 18px; }
.co-unlock-msg.ok { color: var(--co-success); }
.co-unlock-msg.err { color: var(--co-danger); }

/* 课程页内兑换码输入框（未激活用户可见） */
.co-activate-box {
    max-width: 480px; margin: 18px auto 0;
    background: linear-gradient(135deg, #fff7e6, #fff1f0);
    border: 1px solid #ffd591; border-radius: var(--co-r);
    padding: 18px 20px;
}
.co-activate-box h4 { margin: 0 0 6px; font-size: 15px; color: #874d00; }
.co-activate-box p { margin: 0 0 12px; font-size: 13px; color: #874d00; }
.co-activate-form { display: flex; gap: 8px; }
.co-activate-form input {
    flex: 1; height: 40px; padding: 0 14px;
    border: 1px solid #ffd591; border-radius: var(--co-r-sm);
    background: #fff; font-size: 14px; letter-spacing: 1px;
    outline: none;
}
.co-activate-form input:focus { border-color: #fa8c16; box-shadow: 0 0 0 3px rgba(250, 140, 22, .15); }
.co-activate-form button {
    height: 40px; padding: 0 22px;
    background: #fa8c16; color: #fff; border: 0; border-radius: var(--co-r-sm);
    font-size: 14px; font-weight: 600; cursor: pointer;
}
.co-activate-form button:hover { background: #d46b08; }
.co-activate-msg { margin-top: 8px; font-size: 13px; min-height: 18px; }
.co-activate-msg.ok { color: var(--co-success); }
.co-activate-msg.err { color: var(--co-danger); }
.co-activated-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: var(--co-r-pill);
    background: var(--co-success-bg); color: var(--co-success);
    font-size: 13px; font-weight: 600;
    margin: 14px 0 0;
}

/* 未登录用户的解锁引导（课程页内） */
.co-activate-box-guest { background: linear-gradient(135deg, #f0f5ff, #f6ffed); border-color: #b7eb8f; }
.co-activate-box-guest h4,
.co-activate-box-guest p { color: var(--co-ink); }
.co-activate-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.co-activate-btns .co-btn { height: 40px; line-height: 40px; padding: 0 24px; text-decoration: none; }

/* ---------- 课程详情页：左右布局 ---------- */
.co-course-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}
@media (max-width: 900px) {
    .co-course-layout { grid-template-columns: 1fr; }
}

.co-sidebar { display: flex; flex-direction: column; gap: 18px; }
.co-side-card {
    background: var(--co-surface);
    border: 1px solid var(--co-border);
    border-radius: var(--co-r);
    padding: 20px;
    box-shadow: var(--co-shadow-sm);
}
.co-side-card h4 { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--co-ink); }
.co-side-card p { margin: 0 0 14px; font-size: 13px; color: var(--co-text); line-height: 1.6; }
.co-side-icon {
    width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center;
    font-size: 18px; margin-bottom: 10px;
}
.co-side-ok .co-side-icon { background: var(--co-success-bg); color: var(--co-success); }
.co-side-ok { border-color: #b7eb8f; background: linear-gradient(135deg, #f6ffed, #fff); }
.co-side-lock .co-side-icon { background: #fff7e6; color: #fa8c16; }
.co-side-lock { border-color: #ffd591; background: linear-gradient(135deg, #fff7e6, #fff1f0); }
.co-side-guest .co-side-icon { background: var(--co-info-bg); color: var(--co-info); }
.co-side-guest { border-color: #91d5ff; background: linear-gradient(135deg, #f0f5ff, #f6ffed); }

.co-side-courses { padding: 0; overflow: hidden; }
.co-side-courses h4 { padding: 16px 18px 0; }
.co-side-course-list { list-style: none; margin: 0; padding: 8px 0; }
.co-side-course-link {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; padding: 11px 18px; text-decoration: none; color: inherit;
    transition: background .12s;
}
.co-side-course-link:hover { background: #f6f9ff; }
.co-side-course-link.current { background: #eef4ff; }
.co-side-course-title { font-size: 14px; color: var(--co-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-side-course-link.current .co-side-course-title { color: var(--co-primary); font-weight: 600; }
.co-side-course-meta { flex: 0 0 auto; font-size: 12px; color: var(--co-muted); }

/* 课程页底部：所有课程列表（已废弃，保留类名兼容） */
.co-course-list-section { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--co-border); }
.co-section-title {
    margin: 0 0 18px;
    font-size: 20px; font-weight: 800;
    color: var(--co-ink);
}
.co-course-current { border-color: var(--co-primary); box-shadow: 0 0 0 2px rgba(24, 144, 255, .15); }
.co-course-current .co-card-title { color: var(--co-primary); }

/* 百度 APP 内置浏览器拦截提示（视频需在浏览器打开） */
.co-baidu-tip {
    max-width: 420px;
    margin: 48px auto;
    padding: 34px 28px;
    text-align: center;
    background: var(--co-surface);
    border: 1px solid var(--co-border);
    border-radius: var(--co-r);
    box-shadow: var(--co-shadow);
    font-family: var(--co-font);
}
.co-baidu-tip-icon { font-size: 40px; margin-bottom: 10px; }
.co-baidu-tip-title { margin: 0 0 8px; font-size: 18px; font-weight: 800; color: var(--co-ink); }
.co-baidu-tip-sub { margin: 0; font-size: 13.5px; color: var(--co-muted); line-height: 1.7; }

/* 百度 APP 顶部引导条（独立于视频检测，登录/注册等纯表单页也用得到） */
.co-baidu-bar {
    width: 100%;
    background: linear-gradient(90deg, #fff7e6, #fff1f0);
    color: #ad6800;
    text-align: center;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.6;
    border-bottom: 1px solid #ffd591;
    box-sizing: border-box;
    font-family: var(--co-font);
}
/* 窄屏强制 auth 卡片铺满，避免百度 APP 980px 缩放视口下被挤到一角 */
@media (max-width: 480px) {
    .co-auth { max-width: 100%; margin: 20px auto; padding: 0 14px 48px; }
    .co-auth-card { padding: 28px 20px 24px; border-radius: 12px; }
    .co-auth-title { font-size: 20px; }
    .co-auth-form input { font-size: 16px; height: 48px; }  /* 16px 防 iOS 自动放大 */
    .co-auth-form input:focus { font-size: 16px; }
}

/* ---------- 手机端增强（≤600px） ---------- */
@media (max-width: 600px) {
    .co-wrap { margin: 16px auto; padding: 0 12px 48px; }
    .co-course-head { gap: 8px; margin-bottom: 12px; }
    .co-course-head h1 { font-size: 19px; }
    .co-player-card { border-radius: 8px; min-height: 200px; }
    .co-player-watermark { font-size: 11px; right: 8px; bottom: 8px; }
    .co-unlock-card { padding: 26px 20px 22px; border-radius: 12px; }
    .co-unlock-form { flex-direction: column; }
    .co-unlock-form .co-btn { width: 100%; }
    .co-unlock-close { font-size: 26px; }
    .co-ep-list { max-height: none; }
    .co-ep-row { padding: 10px 14px; }
    .co-ep-sublist .co-ep-row { padding-left: 24px; }
    .co-activate-form { flex-direction: column; }
    .co-activate-form button { width: 100%; }
    .co-activate-btns { flex-direction: column; }
    .co-activate-btns .co-btn { width: 100%; justify-content: center; text-align: center; }
    .co-side-card { padding: 16px; }
    .co-free-badge { font-size: 11px; padding: 4px 10px; }
}
