:root{--bg:#0f0f0f;--panel:#181818;--hover:#272727;--line:#303030;--txt:#f1f1f1;--muted:#aaa;--red:#f03}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--txt);font:14px Arial,"Microsoft YaHei",sans-serif}a{color:inherit;text-decoration:none}.td-header{height:60px;position:fixed;z-index:20;inset:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:0 24px;background:#101010;border-bottom:1px solid #222;gap:20px}.td-head-left{display:flex;align-items:center;gap:18px}.td-menu{border:0;background:none;color:white;font-size:22px;cursor:pointer}.td-brand{font-size:19px;font-weight:bold;white-space:nowrap}.td-brand b{display:inline-grid;place-items:center;background:var(--red);border-radius:7px;width:30px;height:21px;margin-right:9px;font-size:13px}.td-search{display:flex;width:min(600px,55vw);height:40px;border:1px solid #383838;border-radius:24px;overflow:hidden}.td-search input{flex:1;min-width:0;padding:0 16px;background:#121212;border:0;outline:0;color:white;font-size:15px}.td-search button{width:60px;background:#252525;border:0;color:white;font-size:24px}.td-shell{padding-top:60px}.td-sidebar{position:fixed;top:60px;bottom:0;left:0;width:220px;padding:16px 12px;overflow:auto}.td-sidebar>a{display:block;padding:13px 14px;border-radius:9px}.td-sidebar>a:hover,.td-sidebar>a:first-child{background:var(--hover)}.td-sidebar h4{margin:22px 14px 8px;color:#aaa}.td-main{margin-left:220px}.td-content{padding:22px 28px 50px;max-width:1900px;margin:auto}.td-chips{display:flex;gap:10px;overflow:auto;margin-bottom:28px}.td-chips a{padding:9px 14px;border-radius:8px;background:#272727;white-space:nowrap}.td-chips a.active{background:#eee;color:#111}.td-content h2{font-size:21px;margin:22px 0}.td-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:32px 16px;margin-bottom:40px}.td-card{min-width:0}.td-thumb{aspect-ratio:16/9;overflow:hidden;border-radius:11px;background:#252525}.td-thumb img{width:100%;height:100%;object-fit:cover;transition:.25s}.td-card:hover .td-thumb img{transform:scale(1.04)}.td-meta{display:flex;gap:11px;padding-top:11px}.td-meta>b{flex:0 0 36px;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#383838}.td-meta>div{min-width:0}.td-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-weight:600;line-height:1.5}.td-meta small{display:block;color:var(--muted);font-size:12px;margin-top:5px}.td-muted{color:var(--muted)}.td-watch{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:24px;padding:24px 28px}.td-player{aspect-ratio:16/9;min-height:250px;background:#000;border-radius:12px;overflow:hidden;display:flex;align-items:center;justify-content:center}.td-player iframe,.td-player video,.td-player embed{width:100%!important;height:100%!important;border:0}.td-watch h1{font-size:21px}.td-desc,.td-playlist{padding:16px;background:#202020;border-radius:10px;margin-top:18px;line-height:1.7}.td-episodes{display:flex;flex-wrap:wrap;gap:8px}.td-episode{padding:9px 12px;border-radius:7px;background:#333}.td-episode:hover{background:#555}.td-related{display:flex;gap:10px;align-items:center;margin:12px 0}.td-related img{width:130px;aspect-ratio:16/9;object-fit:cover;border-radius:7px}.td-related a{font-size:13px}.td-open .td-sidebar{transform:translateX(0)}@media(max-width:1000px){.td-watch{grid-template-columns:1fr}.td-sidebar{width:76px}.td-sidebar>a{font-size:0;text-align:center}.td-sidebar h4{display:none}.td-main{margin-left:76px}}@media(max-width:650px){.td-header{height:56px;padding:0 10px;gap:8px}.td-head-left{gap:8px}.td-brand{font-size:16px}.td-search{height:36px;flex:1;width:auto}.td-search input{font-size:13px;padding:0 10px}.td-search button{width:42px}.td-shell{padding-top:56px}.td-sidebar{top:56px;width:230px;transform:translateX(-100%);background:#111;z-index:30;transition:.2s}.td-sidebar>a{font-size:14px;text-align:left}.td-sidebar h4{display:block}.td-main{margin-left:0}.td-content{padding:14px 12px}.td-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 10px}.td-thumb{border-radius:8px}.td-meta{gap:7px;padding-top:8px}.td-meta>b{flex-basis:29px;width:29px;height:29px}.td-title{font-size:13px}.td-meta small{font-size:11px}.td-watch{padding:10px 0;gap:18px}.td-watch>section{padding:0 12px}.td-player{border-radius:0;min-height:200px}.td-watch>aside{padding:0 12px}.td-watch h1{font-size:18px}}@media(max-width:380px){.td-grid{grid-template-columns:1fr}}
/* 分类页影片封面：宽 460px，高 260px；首页不受影响 */
.td-type-page .td-grid {
    grid-template-columns: repeat(auto-fill, 460px);
    gap: 32px 16px;
}

.td-type-page .td-card {
    width: 460px;
    max-width: 100%;
}

.td-type-page .td-thumb {
    width: 460px;
    max-width: 100%;
    height: 260px;
    aspect-ratio: auto;
}

.td-type-page .td-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 分页外观沿用 TubeDark 深色主题 */
.td-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin: 8px 0 30px;
    color: var(--muted);
}

.td-pagination-info {
    font-size: 12px;
    line-height: 1.5;
}

.td-pagination-list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.td-page-link {
    display: inline-flex;
    min-width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--hover);
    color: var(--txt);
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}

.td-page-link:hover {
    background: #383838;
    border-color: #555;
}

.td-page-link.active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    font-weight: 600;
    cursor: default;
}

/* 小屏幕按 16:9 比例自适应宽度 */
@media (max-width: 650px) {
    .td-type-page .td-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 10px;
    }

    .td-type-page .td-card,
    .td-type-page .td-thumb {
        width: 100%;
        max-width: 100%;
    }

    .td-type-page .td-thumb {
        height: auto;
        aspect-ratio: 23 / 13;
    }

    .td-pagination {
        gap: 11px;
        margin: 4px 0 24px;
    }

    .td-pagination-list {
        gap: 6px;
    }

    .td-page-link {
        min-width: 32px;
        height: 34px;
        padding: 0 9px;
        font-size: 12px;
    }
}

