@charset "utf-8";
/* ======================================================
   Comet 彗星 - 原创视频模板主样式
   设计：浅色简洁 + 紫蓝渐变主色
   与 tmvod / light 完全独立的命名体系（ct- 前缀）
   ====================================================== */
:root {
    --ct-p1:#7c3aed;          /* 紫 */
    --ct-p2:#4f46e5;          /* 靛 */
    --ct-p3:#2563eb;          /* 蓝 */
    --ct-grad:linear-gradient(135deg,#7c3aed 0%,#4f46e5 52%,#2563eb 100%);
    --ct-grad-soft:linear-gradient(135deg,rgba(124,58,237,.12),rgba(37,99,235,.12));
    --ct-bg:#f4f5fa;
    --ct-card:#ffffff;
    --ct-text:#1e293b;
    --ct-sub:#64748b;
    --ct-light:#94a3b8;
    --ct-border:#e2e8f0;
    --ct-radius:12px;
    --ct-shadow:0 1px 4px rgba(79,70,229,.08);
    --ct-shadow-lg:0 10px 24px rgba(79,70,229,.16);
}

/* --- 重置 --- */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { -webkit-text-size-adjust:100%; }
body {
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Microsoft YaHei",sans-serif;
    font-size:14px;
    line-height:1.6;
    background:linear-gradient(180deg,#e9e7ff 0%,#f4f5fa 240px);
    color:var(--ct-text);
    overflow-x:hidden;
}
a { color:inherit; text-decoration:none; transition:color .2s,box-shadow .2s,opacity .2s; }
ul,ol { list-style:none; }
img { max-width:100%; display:block; }
input,button,textarea { font-family:inherit; font-size:inherit; outline:none; border:none; }
h1,h2,h3,h4,h5,h6 { font-weight:600; }

/* --- 容器 --- */
.ct-container { width:100%; max-width:1100px; margin:0 auto; padding:0 12px; }
.ct-main { padding-top:6px; padding-bottom:28px; }

/* --- 文字省略 --- */
.ct-ellipsis { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.ct-ellipsis-2 {
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
    line-height:1.5em;
    max-height:3em;
}

/* ======================================================
   顶部头部
   ====================================================== */
.ct-header {
    position:sticky;
    top:0;
    z-index:1000;
    background:var(--ct-grad);
    box-shadow:0 4px 20px rgba(79,70,229,.35);
}
.ct-header-inner {
    display:flex;
    align-items:center;
    gap:16px;
    height:56px;
}
.ct-logo { flex-shrink:0; white-space:nowrap; }
.ct-logo a { display:flex; align-items:center; gap:8px; }
.ct-logo img { width:24px; height:24px; max-width:24px; max-height:24px; flex-shrink:0; object-fit:contain; border-radius:6px; }
.ct-logo span {
    font-size:18px;
    font-weight:700;
    letter-spacing:-.5px;
    color:#fff;
}
/* --- 搜索框（分类导航下方） --- */
.ct-search-bar {
    max-width:420px;
    margin:0 0 10px;
    padding:10px;
    background:var(--ct-card);
    border-radius:var(--ct-radius);
    box-shadow:var(--ct-shadow);
}
.ct-search-bar form { display:flex; align-items:center; }
.ct-search-bar .ct-search-input {
    flex:1;
    min-width:0;
    width:auto;
    padding:8px 14px;
    background:#f1f3f9;
    border:1px solid var(--ct-border);
    border-right:none;
    border-radius:8px 0 0 8px;
    font-size:14px;
    color:var(--ct-text);
    transition:border-color .2s;
}
.ct-search-bar .ct-search-input:focus { border-color:var(--ct-p2); }
.ct-search-bar .ct-search-btn {
    padding:8px 24px;
    background:var(--ct-grad);
    color:#fff;
    border-radius:0 8px 8px 0;
    font-size:14px;
    font-weight:600;
    cursor:pointer;
}

/* --- 分类导航（方形 tab，白卡片容器） --- */
.ct-nav {
    display:flex;
    flex-wrap:wrap;
    justify-content:center;   /* 不满一行时整行居中，消除右侧留白 */
    gap:4px 6px;
    margin:8px 0 8px;
    padding:8px 10px;
    background:var(--ct-card);
    border-radius:var(--ct-radius);
    box-shadow:var(--ct-shadow);
}
.ct-nav a {
    width:calc((100% - 24px) / 5);   /* PC 每行 5 个（4 个 6px 列距=24px） */
    padding:4px 8px;
    border-radius:8px;
    font-size:13px;
    font-weight:500;
    text-align:center;
    color:var(--ct-sub);
    background:transparent;
    border:1px solid transparent;
    transition:color .2s,background .2s,box-shadow .2s;
}
.ct-nav a.current {
    background:var(--ct-grad);
    color:#fff;
    border-color:transparent;
    box-shadow:0 6px 16px rgba(79,70,229,.35);
}

/* ======================================================
   区块（首页分类块 / 通用区块头）
   ====================================================== */
.ct-section { margin-bottom:10px; }
.ct-sec-hd {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:6px;
    padding:0 2px;
}
.ct-sec-bar {
    display:inline-block;
    width:5px;
    height:18px;
    border-radius:3px;
    background:var(--ct-grad);
}
.ct-sec-title {
    display:flex;
    align-items:center;
    gap:7px;
    font-size:17px;
    font-weight:700;
    letter-spacing:-.3px;
}
.ct-sec-title a { display:flex; align-items:center; gap:7px; }
.ct-sec-more {
    font-size:12px;
    padding:3px 14px;
    border-radius:999px;
    color:var(--ct-p2);
    background:transparent;
    border:1px solid rgba(79,70,229,.45);
    transition:background .2s,color .2s;
}
.ct-sec-more {
    font-size:12px;
    color:var(--ct-sub);
    border:1px solid var(--ct-border);
    padding:3px 14px;
    border-radius:999px;
    transition:color .2s,border-color .2s;
}

/* ======================================================
   视频卡片网格
   ====================================================== */
.ct-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; }
.ct-card {
    background:var(--ct-card);
    border-radius:var(--ct-radius);
    overflow:hidden;
    border:1px solid var(--ct-border);
    box-shadow:var(--ct-shadow);
}
.ct-pic {
    position:relative;
    display:block;
    aspect-ratio:16/9;
    overflow:hidden;
    background:#e8eaf3;
}
.ct-pic img { width:100%; height:100%; object-fit:cover; }
.ct-play {
    position:absolute;
    left:50%;
    top:50%;
    width:40px;
    height:40px;
    margin:-20px 0 0 -20px;
    border-radius:50%;
    background:rgba(255,255,255,.92);
    display:flex;
    align-items:center;
    justify-content:center;
    opacity:0;
    box-shadow:0 4px 14px rgba(30,41,59,.25);
}
.ct-play::after {
    content:"";
    width:0;
    height:0;
    margin-left:3px;
    border-left:10px solid #4f46e5;
    border-top:6px solid transparent;
    border-bottom:6px solid transparent;
}
.ct-note {
    position:absolute;
    right:0;
    top:0;
    padding:2px 8px;
    font-size:11px;
    color:#fff;
    background:var(--ct-grad);
    border-radius:0 0 0 8px;
}
/* 更新日期角标（叠加在图片左下角） */
.ct-date {
    position:absolute;
    left:0;
    bottom:0;
    padding:2px 8px;
    font-size:11px;
    color:#fff;
    background:rgba(15,23,42,.55);
    border-radius:0 8px 0 0;
}
.ct-info { padding:6px 8px 8px; }
.ct-name {
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
    white-space:normal;
    font-size:12px;
    font-weight:500;
    line-height:1.4;
}

/* ======================================================
   面包屑
   ====================================================== */
.ct-crumb {
    display:flex;
    align-items:center;
    white-space:nowrap;
    overflow:hidden;
    font-size:12px;
    color:var(--ct-light);
    padding:8px 0 4px;
}
.ct-crumb span.ct-sep { flex-shrink:0; margin:0 6px; }
.ct-crumb .ct-crumb-name {
    flex:1 1 auto;
    min-width:0;
    display:block;
    max-width:100%;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
    color:var(--ct-sub);
}

/* --- 分类页标题栏 --- */
.ct-type-hd {
    padding:10px 14px;
    margin-bottom:8px;
    background:var(--ct-card);
    border-radius:var(--ct-radius);
    box-shadow:var(--ct-shadow);
}
.ct-type-hd h1 {
    font-size:18px;
    background:var(--ct-grad);
    -webkit-background-clip:text;
    background-clip:text;
    -webkit-text-fill-color:transparent;
}

/* ======================================================
   分页
   ====================================================== */
.ct-page {
    display:flex;
    align-items:center;
    justify-content:center;
    flex-wrap:wrap;
    gap:6px;
    margin:12px 0 4px;
}
.ct-page a,.ct-page span {
    display:inline-block;
    min-width:32px;
    padding:5px 10px;
    text-align:center;
    border-radius:999px;
    font-size:13px;
    background:var(--ct-card);
    border:1px solid var(--ct-border);
    color:var(--ct-sub);
    transition:color .2s,border-color .2s;
}
.ct-page span.current {
    background:var(--ct-grad);
    color:#fff;
    border-color:transparent;
    box-shadow:0 4px 12px rgba(79,70,229,.35);
}
.ct-page span.disabled { color:var(--ct-light); background:#eef0f6; }
.ct-page-jump { display:flex; align-items:center; gap:6px; margin-left:6px; }
.ct-page-input {
    width:56px;
    padding:5px 8px;
    border:1px solid var(--ct-border);
    border-radius:999px;
    font-size:13px;
    text-align:center;
    background:var(--ct-card);
}
.ct-page-go {
    padding:5px 12px;
    background:var(--ct-grad);
    color:#fff;
    border-radius:999px;
    font-size:13px;
    cursor:pointer;
}

/* ======================================================
   搜索页
   ====================================================== */
.ct-search-info {
    padding:10px 14px;
    background:var(--ct-card);
    border-radius:var(--ct-radius);
    box-shadow:var(--ct-shadow);
    margin-bottom:10px;
    font-size:14px;
    font-weight:500;
}
.ct-search-info strong { color:var(--ct-p2); }

/* ======================================================
   详情页
   ====================================================== */
.ct-detail-card {
    padding:14px;
    background:var(--ct-card);
    border-radius:var(--ct-radius);
    box-shadow:var(--ct-shadow);
}
.ct-detail-layout { display:flex; gap:12px; }
.ct-detail-left { width:200px; flex-shrink:0; }
.ct-detail-left .ct-pic { aspect-ratio:3/4; border-radius:var(--ct-radius); }
.ct-detail-info { padding:0 4px; }
.ct-detail-info h1 { font-size:22px; margin-bottom:10px; }
.ct-detail-meta { margin-bottom:8px; }
.ct-detail-meta li { padding:4px 0; font-size:14px; color:var(--ct-sub); }
.ct-detail-meta li strong {
    display:inline-block;
    min-width:70px;
    color:var(--ct-text);
}
.ct-detail-meta a { color:var(--ct-p2); }
.ct-detail-play {
    display:inline-block;
    padding:8px 22px;
    background:var(--ct-grad);
    color:#fff;
    border-radius:999px;
    font-weight:600;
    margin-bottom:10px;
    box-shadow:0 6px 16px rgba(79,70,229,.35);
}
.ct-detail-content { padding:8px 0; font-size:14px; line-height:1.9; color:var(--ct-sub); }
.ct-detail-content p { margin-bottom:8px; }

/* ======================================================
   播放页
   ====================================================== */
.ct-play-page { padding-top:8px; padding-bottom:20px; }
.ct-play-layout { display:block; }
.ct-play-left { min-width:0; }

/* 播放页相关推荐（位于播放线路下方） */
.ct-play-rec-section { margin-top:10px; }
.ct-play-rec-section .ct-sec-hd { margin-bottom:6px; padding:0; }

.ct-player-box {
    position:relative;
    width:100%;
    aspect-ratio:16/9;
    background:#0f172a;
    border-radius:var(--ct-radius);
    overflow:hidden;
    box-shadow:0 8px 26px rgba(79,70,229,.2);
}
.ct-player-box #ct-player { width:100%; height:100%; }
.ct-player-box iframe,.ct-player-box video { width:100%; height:100%; display:block; border:0; }

.ct-play-tags { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0 0; }
.ct-tag {
    display:inline-block;
    max-width:100%;
    padding:2px 10px;
    border-radius:999px;
    font-size:12px;
    color:var(--ct-p2);
    background:var(--ct-grad-soft);
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
    vertical-align:middle;
}

/* 标签卡片容器（文章详情页与播放页风格统一） */
.ct-tag-wrap {
    margin-top:8px;
    padding:10px 14px;
    background:var(--ct-card);
    border-radius:var(--ct-radius);
    box-shadow:var(--ct-shadow);
}
.ct-tag-wrap .ct-play-tags { margin:0; }

.ct-play-lines {
    margin-top:8px;
    padding:10px 12px;
    background:var(--ct-card);
    border-radius:var(--ct-radius);
    box-shadow:var(--ct-shadow);
}
.ct-lines-title { font-size:14px; font-weight:600; margin-bottom:6px; }
.ct-lines-list { display:flex; flex-wrap:wrap; gap:6px; }
.ct-line-btn {
    padding:5px 14px;
    border-radius:999px;
    font-size:13px;
    color:var(--ct-sub);
    background:#f1f3f9;
    border:1px solid var(--ct-border);
    transition:color .2s,background .2s,border-color .2s;
}
.ct-line-btn.current {
    background:var(--ct-grad);
    color:#fff;
    border-color:transparent;
    box-shadow:0 4px 12px rgba(79,70,229,.3);
}

/* ======================================================
   文章
   ====================================================== */
.ct-art-list {
    background:var(--ct-card);
    border-radius:var(--ct-radius);
    box-shadow:var(--ct-shadow);
    padding:2px 14px;
}
.ct-art-item {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:10px 0;
    border-bottom:1px dashed var(--ct-border);
}
.ct-art-item:last-child { border-bottom:none; }
.ct-art-item a { font-size:14px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.ct-art-item time { flex-shrink:0; font-size:12px; color:var(--ct-light); }

.ct-article {
    background:var(--ct-card);
    border-radius:var(--ct-radius);
    box-shadow:var(--ct-shadow);
    padding:16px 18px;
}
.ct-article h1 { font-size:20px; text-align:center; margin-bottom:8px; }
.ct-article .ct-art-meta { text-align:center; font-size:12px; color:var(--ct-light); margin-bottom:14px; }
.ct-article .ct-art-body { font-size:15px; line-height:2; color:var(--ct-sub); }
.ct-article .ct-art-body p { margin-bottom:10px; }
.ct-article .ct-art-body img { margin:8px auto; border-radius:8px; }
.ct-crumb { padding-bottom:8px; }

/* ======================================================
   页脚
   ====================================================== */
.ct-footer {
    margin-top:8px;
    background:#0f172a;
    color:#94a3b8;
    padding:18px 0 24px;
    border-top:3px solid var(--ct-grad);
}
.ct-footer-inner { width:100%; max-width:1100px; margin:0 auto; padding:0 12px; }
.ct-friend-box {
    background:#fff;
    border:1px solid var(--ct-border);
    border-radius:10px;
    box-shadow:var(--ct-shadow);
    padding:12px 14px;
    margin-bottom:14px;
}
.ct-friend-title { font-size:14px; font-weight:700; color:var(--ct-text); margin-bottom:10px; }
.ct-friend-list { display:flex; flex-wrap:wrap; gap:6px; }
.ct-friend-list a {
    padding:3px 12px;
    border-radius:999px;
    font-size:12px;
    color:var(--ct-sub);
    border:1px solid var(--ct-border);
    transition:color .2s,border-color .2s;
}
.ct-copyright { font-size:12px; color:#64748b; line-height:2; text-align:center; }
.ct-copyright .ct-email { color:#818cf8; }

/* ======================================================
   系统页（404 / 提示 / 跳转 / 维护）
   ====================================================== */
.ct-sys {
    text-align:center;
    padding:70px 16px;
}
.ct-sys-code {
    font-size:64px;
    font-weight:700;
    line-height:1;
    background:var(--ct-grad);
    -webkit-background-clip:text;
    background-clip:text;
    -webkit-text-fill-color:transparent;
}
.ct-sys-title { font-size:20px; margin:18px 0 8px; }
.ct-sys-msg { color:var(--ct-sub); margin-bottom:26px; font-size:14px; }
.ct-sys-btns { display:flex; justify-content:center; gap:12px; flex-wrap:wrap; }
.ct-btn {
    display:inline-block;
    padding:10px 28px;
    border-radius:999px;
    font-weight:600;
    font-size:14px;
}
.ct-btn-primary { background:var(--ct-grad); color:#fff; box-shadow:0 6px 16px rgba(79,70,229,.35); }
.ct-btn-ghost {
    background:var(--ct-card);
    color:var(--ct-sub);
    border:1px solid var(--ct-border);
}

/* --- 回到顶部 --- */
.ct-backtop {
    position:fixed;
    right:22px;
    bottom:30px;
    width:40px;
    height:40px;
    border-radius:50%;
    background:var(--ct-grad);
    color:#fff;
    font-size:18px;
    display:none;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    box-shadow:0 6px 16px rgba(79,70,229,.4);
    z-index:999;
}
.ct-backtop.show { display:flex; }
.ct-backtop::before { content:"\2191"; }

/* ======================================================
   响应式
   ====================================================== */
/* 平板 */
@media(max-width:1024px) {
    .ct-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
    .ct-nav a { width:calc((100% - 18px) / 4); }   /* 1024px 以下每行 4 个（3 个 6px 列距=18px） */
    .ct-detail-layout { flex-direction:column; }
    .ct-detail-left { width:200px; }
}

/* 手机 */
@media(max-width:768px) {
    .ct-container { padding:0 10px; }
    .ct-header-inner { height:50px; gap:10px; }
    .ct-logo { font-size:16px; flex:1; min-width:0; }
    .ct-logo span { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
    .ct-search-bar { padding:10px; }
    .ct-search-bar .ct-search-input { padding:8px 12px; font-size:13px; }
    .ct-search-bar .ct-search-btn { padding:8px 20px; font-size:13px; }

    .ct-nav {
        display:flex;
        flex-wrap:wrap;
        justify-content:center;   /* 移动端每行不满时也居中 */
        gap:4px 6px;
        margin:8px 0 8px;
        padding:8px 10px;
    }
    .ct-nav a { width:auto; padding:5px 13px; font-size:12px; }

    /* 列表移动端一排一个：卡片纵向（图片在上，名称在下） */
    .ct-grid { grid-template-columns:repeat(1,minmax(0,1fr)); gap:10px; }
    .ct-card { display:block; }
    .ct-card .ct-pic { width:100%; }
    .ct-card .ct-info { padding:8px 10px 10px; }
    .ct-card .ct-play { display:none; }
    .ct-name { font-size:12px; }

    .ct-type-hd { padding:10px 12px; margin-bottom:10px; }
    .ct-type-hd h1 { font-size:16px; }

    .ct-detail-left { width:130px; margin:0 auto; }
    .ct-detail-info h1 { font-size:16px; }
    .ct-detail-card { padding:12px; }

    .ct-play-page { padding-top:6px; padding-bottom:20px; }
    .ct-play-rec-section { margin-top:12px; }

    .ct-article { padding:16px 14px; }
    .ct-article h1 { font-size:18px; }
    .ct-page { gap:6px; }
    .ct-page-jump { display:none; }
}

/* 小屏手机 */
@media(max-width:480px) {
    .ct-sec-title { font-size:14px; }
    .ct-sec-bar { height:14px; }
}

/* ======================================================
   顶部广告位（#aahendtop 内容由 aa.js 注入，与内容列对齐）
   ====================================================== */
#aahendtop {
    width:100%;
    aspect-ratio:16/1;
    overflow:hidden;
    background:#161b22;
}
#aahendtop:empty { display:none; }
#aahendtop li,#aahendtop a {
    display:block;
    width:100%;
    height:100%;
}
#aahendtop img {
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
}

