/* 高清在线模板 - 顶栏 + 主内容 + 右侧榜单 */
:root {
    --hq-header-bg: #1e293b;
    --hq-logo: #f97316;
    --hq-nav-color: #fff;
    --hq-nav-active: #0ea5e9;
    --hq-bg: #f8fafc;
    --hq-card: #fff;
    --hq-text: #1e293b;
    --hq-text2: #64748b;
    --hq-border: #e2e8f0;
    --hq-radius: 8px;
    --hq-rank1: #dc2626;
    --hq-rank2: #ea580c;
    --hq-rank3: #ca8a04;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

.hq-body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--hq-bg);
    color: var(--hq-text);
    line-height: 1.5;
    min-height: 100vh;
}

.hq-wrap { min-height: 100vh; display: flex; flex-direction: column; }

/* 顶栏 */
.hq-header {
    background: var(--hq-header-bg);
    color: var(--hq-nav-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
}

.hq-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 52px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.hq-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--hq-logo);
    text-decoration: none;
    flex-shrink: 0;
}

.hq-logo:hover { color: #fb923c; }

.hq-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.hq-nav-link {
    padding: 8px 14px;
    color: rgba(255,255,255,.9);
    text-decoration: none;
    font-size: 14px;
    border-radius: var(--hq-radius);
    transition: background .2s, color .2s;
}

.hq-nav-link:hover { color: #fff; background: rgba(255,255,255,.1); }
.hq-nav-link.is-active { background: var(--hq-nav-active); color: #fff; }

.hq-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hq-search {
    display: flex;
    align-items: center;
    background: rgba(0,0,0,.25);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--hq-radius);
    overflow: hidden;
}

.hq-search-input {
    width: 180px;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 13px;
}

.hq-search-input::placeholder { color: #94a3b8; }
.hq-search-input:focus { outline: none; }

.hq-search-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
}

.hq-user-icon { font-size: 18px; opacity: .9; }
.hq-menu-btn {
    display: none;
    border: none;
    background: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 6px 10px;
    line-height: 1;
    position: relative;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background .2s, color .2s;
}
.hq-menu-btn:hover { background: rgba(255,255,255,.12); }
.hq-menu-btn .hq-menu-icon { display: block; }
.hq-menu-btn .hq-menu-icon-close { display: none; }
.hq-nav-drawer { display: contents; }
.hq-nav-close { display: none; }

/* 主内容 */
.hq-main { flex: 1; min-width: 0; }
.hq-container { max-width: 1400px; margin: 0 auto; padding: 20px; }
.hq-layout { display: grid; grid-template-columns: 1fr 280px; gap: 24px; align-items: start; }

/* 区块 */
.hq-section { margin-bottom: 24px; }
.hq-section-footer { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--hq-border); }
.hq-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--hq-text);
    margin-bottom: 14px;
}

.hq-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.hq-section-head .hq-section-title {
    margin-bottom: 0;
}

.hq-section-more {
    font-size: 13px;
    color: var(--hq-logo);
    text-decoration: none;
}

.hq-section-more:hover {
    text-decoration: underline;
}

.hq-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.hq-subnav-link {
    padding: 6px 14px;
    background: var(--hq-card);
    border: 1px solid var(--hq-border);
    border-radius: var(--hq-radius);
    color: var(--hq-text2);
    text-decoration: none;
    font-size: 13px;
    transition: border-color .2s, color .2s;
}

.hq-subnav-link:hover,
.hq-subnav-link.is-active {
    border-color: var(--hq-logo);
    color: var(--hq-logo);
}

/* 卡片网格 */
.hq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
}

.hq-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--hq-card);
    border-radius: var(--hq-radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: box-shadow .2s, transform .2s;
}

.hq-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,.1);
    transform: translateY(-2px);
}

.hq-card-pic {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: var(--hq-border);
}

.hq-card-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hq-card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.35);
    color: #fff;
    font-size: 36px;
    opacity: 0;
    transition: opacity .2s;
}

.hq-card:hover .hq-card-play { opacity: 1; }

.hq-card-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 8px;
    font-size: 11px;
    background: rgba(0,0,0,.75);
    color: #fff;
}

.hq-card-name {
    font-size: 14px;
    font-weight: 600;
    padding: 10px 10px 4px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hq-card-meta {
    font-size: 12px;
    color: var(--hq-text2);
    padding: 0 10px 10px;
}

/* 右侧栏 - 周榜单 */
.hq-side { position: sticky; top: 72px; }
.hq-side-box {
    background: var(--hq-card);
    border-radius: var(--hq-radius);
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    padding: 16px;
    margin-bottom: 20px;
}

.hq-side-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--hq-text);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--hq-border);
}

.hq-rank-list { list-style: none; }
.hq-rank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}

.hq-rank-item:last-child { border-bottom: none; }

.hq-rank-num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: var(--hq-text2);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.hq-rank-num-1 { background: var(--hq-rank1); color: #fff; }
.hq-rank-num-2 { background: var(--hq-rank2); color: #fff; }
.hq-rank-num-3 { background: var(--hq-rank3); color: #fff; }

.hq-rank-link {
    flex: 1;
    min-width: 0;
    color: var(--hq-text);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hq-rank-link:hover { color: var(--hq-logo); }
.hq-rank-remark { flex-shrink: 0; font-size: 11px; color: var(--hq-text2); }
.hq-rank-empty { font-size: 13px; color: var(--hq-text2); text-align: center; padding: 20px; }

/* 二维码区 */
.hq-qr-box {
    background: var(--hq-card);
    border-radius: var(--hq-radius);
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.hq-qr-placeholder {
    width: 140px;
    height: 140px;
    margin: 0 auto 12px;
    background: var(--hq-border);
    border-radius: var(--hq-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hq-text2);
    font-size: 13px;
}

.hq-qr-tip { font-size: 12px; color: var(--hq-text2); }

/* 面包屑 */
.hq-breadcrumb {
    font-size: 13px;
    color: var(--hq-text2);
    margin-bottom: 16px;
    padding: 8px 0;
}

.hq-breadcrumb a { color: var(--hq-logo); text-decoration: none; }
.hq-breadcrumb a:hover { text-decoration: underline; }

/* 详情页 */
.hq-detail-top {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    margin-bottom: 20px;
}

.hq-detail-poster {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: var(--hq-radius);
    overflow: hidden;
    background: var(--hq-border);
}

.hq-detail-poster-link { display: block; height: 100%; }
.hq-detail-poster-link img { width: 100%; height: 100%; object-fit: cover; }
.hq-detail-poster-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.4);
    color: #fff;
    font-size: 48px;
    opacity: 0;
    transition: opacity .2s;
}

.hq-detail-poster-link:hover .hq-detail-poster-play { opacity: 1; }
.hq-detail-poster-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 11px;
    background: var(--hq-logo);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
}

.hq-detail-info { min-width: 0; }
.hq-detail-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.hq-detail-rating { font-size: 16px; color: #16a34a; font-weight: 600; margin-bottom: 12px; }
.hq-detail-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 16px;
    font-size: 13px;
    color: var(--hq-text2);
    margin-bottom: 12px;
}

.hq-detail-meta dt { color: var(--hq-text); }
.hq-detail-desc-toggle { font-size: 13px; color: var(--hq-text2); margin-bottom: 14px; }
.hq-detail-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

.hq-btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: var(--hq-radius);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background .2s, opacity .2s;
}

.hq-btn-play { background: var(--hq-logo); color: #fff; }
.hq-btn-play:hover { background: #ea580c; }
.hq-btn-fav { background: #e2e8f0; color: var(--hq-text2); }
.hq-btn-fav:hover { background: #cbd5e1; }
.hq-detail-ep-block { margin-bottom: 20px; }
.hq-detail-ep-group { margin-bottom: 14px; }
.hq-detail-ep-group:last-of-type { margin-bottom: 12px; }
.hq-detail-ep-label { font-size: 13px; color: var(--hq-text2); margin-bottom: 8px; }
.hq-detail-ep-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.hq-detail-ep-item {
    display: inline-block;
    padding: 8px 14px;
    background: var(--hq-bg);
    border: 1px solid var(--hq-border);
    border-radius: var(--hq-radius);
    color: var(--hq-text);
    text-decoration: none;
    font-size: 13px;
    transition: border-color .2s, background .2s, color .2s;
}
.hq-detail-ep-item:hover {
    border-color: var(--hq-logo);
    background: rgba(249, 115, 22, .08);
    color: var(--hq-logo);
}
.hq-btn-ep { background: #e2e8f0; color: var(--hq-text); margin-top: 4px; }
.hq-btn-ep:hover { background: #cbd5e1; }

.hq-detail-plot { margin-top: 20px; padding: 18px; background: var(--hq-card); border-radius: var(--hq-radius); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.hq-detail-plot-title { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.hq-detail-plot-text { font-size: 14px; color: var(--hq-text2); line-height: 1.7; }

/* 播放页 */
.hq-player-wrap {
    position: relative;
    border-radius: var(--hq-radius);
    overflow: hidden;
    background: #000;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

.hq-player-box { aspect-ratio: 16/9; width: 100%; }
.hq-play-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.hq-play-ep-now { font-size: 14px; color: var(--hq-logo); font-weight: 500; margin-bottom: 8px; }
.hq-play-meta { font-size: 14px; color: var(--hq-text2); margin-bottom: 14px; }

.hq-play-lines { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.hq-play-lines-label { font-size: 13px; color: var(--hq-text2); }
.hq-play-line {
    padding: 6px 14px;
    background: var(--hq-bg);
    border: 1px solid var(--hq-border);
    border-radius: var(--hq-radius);
    color: var(--hq-text2);
    text-decoration: none;
    font-size: 13px;
    transition: border-color .2s, background .2s, color .2s;
}
.hq-play-line:hover,
.hq-play-line.is-active {
    border-color: var(--hq-logo);
    background: rgba(249, 115, 22, .1);
    color: var(--hq-logo);
}

.hq-play-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 20px; }
.hq-play-action {
    padding: 8px 16px;
    background: #e2e8f0;
    border: none;
    border-radius: var(--hq-radius);
    font-size: 13px;
    color: var(--hq-text2);
    cursor: pointer;
    text-decoration: none;
}

.hq-play-action:hover { background: #cbd5e1; }
.hq-play-back { border: 1px solid var(--hq-border); }
.hq-play-back:hover { border-color: var(--hq-logo); color: var(--hq-logo); }
.hq-play-nav {
    padding: 8px 18px;
    background: var(--hq-logo);
    color: #fff;
    text-decoration: none;
    border-radius: var(--hq-radius);
    font-size: 14px;
    font-weight: 600;
}

.hq-play-nav:hover { background: #ea580c; color: #fff; }
.hq-play-nav.is-disabled { background: #cbd5e1; color: var(--hq-text2); cursor: default; pointer-events: none; }

/* 播放页 - 主区选集 */
.hq-play-ep-block {
    padding: 18px;
    background: var(--hq-card);
    border-radius: var(--hq-radius);
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    margin-bottom: 24px;
}
.hq-play-ep-title { font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.hq-play-ep-group { margin-bottom: 14px; }
.hq-play-ep-group:last-child { margin-bottom: 0; }
.hq-play-ep-line { font-size: 12px; color: var(--hq-text2); margin-bottom: 8px; }
.hq-play-ep-items { display: flex; flex-wrap: wrap; gap: 8px; }
.hq-play-ep-item {
    padding: 8px 14px;
    background: var(--hq-bg);
    border: 1px solid var(--hq-border);
    border-radius: var(--hq-radius);
    color: var(--hq-text);
    text-decoration: none;
    font-size: 13px;
    transition: border-color .2s, background .2s, color .2s;
}
.hq-play-ep-item:hover,
.hq-play-ep-item.is-active {
    border-color: var(--hq-logo);
    background: rgba(249, 115, 22, .1);
    color: var(--hq-logo);
}

/* 播放页 - 侧栏选集 */
.hq-side-ep { margin-bottom: 20px; }
.hq-side-ep-group { margin-bottom: 12px; }
.hq-side-ep-group:last-child { margin-bottom: 0; }
.hq-side-ep-line { font-size: 12px; color: var(--hq-text2); margin-bottom: 6px; }
.hq-side-ep-list {
    list-style: none;
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.hq-side-ep-list li { margin: 0; }
.hq-side-ep-link {
    display: block;
    padding: 6px 10px;
    white-space: nowrap;
    font-size: 13px;
    color: var(--hq-text);
    text-decoration: none;
    border-radius: 4px;
    transition: background .2s, color .2s;
}
.hq-side-ep-link:hover,
.hq-side-ep-link.is-active {
    background: rgba(249, 115, 22, .12);
    color: var(--hq-logo);
}
.hq-side-ep-more { font-size: 12px; color: var(--hq-text2); margin-top: 6px; }

/* 分页 */
.hq-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
    padding: 16px 0;
}

.hq-pag-btn {
    padding: 10px 22px;
    background: var(--hq-logo);
    color: #fff;
    text-decoration: none;
    border-radius: var(--hq-radius);
    font-weight: 600;
    font-size: 14px;
}

.hq-pag-btn:hover { background: #ea580c; color: #fff; }
.hq-pag-info { color: var(--hq-text2); font-size: 14px; }

.hq-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--hq-text2);
    background: var(--hq-card);
    border-radius: var(--hq-radius);
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

/* 页脚 */
.hq-footer {
    margin-top: auto;
    padding: 20px;
    background: var(--hq-card);
    border-top: 1px solid var(--hq-border);
}

.hq-footer-inner { max-width: 1400px; margin: 0 auto; text-align: center; }
.hq-footer-text { font-size: 13px; color: var(--hq-text2); }

/* 移动端 - 右侧滑出抽屉导航 */
@media (max-width: 900px) {
    .hq-header-inner {
        min-height: 52px;
        padding: 0 16px;
    }
    .hq-header-right { margin-left: auto; }
    .hq-menu-btn {
        display: flex;
        margin-left: 8px;
    }
    .hq-nav-drawer {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(320px, 88vw);
        max-width: 100%;
        background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
        box-shadow: -4px 0 24px rgba(0,0,0,.25);
        z-index: 102;
        transform: translateX(100%);
        transition: transform .28s cubic-bezier(0.4, 0, 0.2, 1), box-shadow .28s;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    body.hq-nav-open .hq-nav-drawer {
        transform: translateX(0);
        box-shadow: -8px 0 32px rgba(0,0,0,.35);
    }
    .hq-nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.45);
        z-index: 101;
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s, visibility .25s;
    }
    body.hq-nav-open .hq-nav-overlay {
        opacity: 1;
        visibility: visible;
    }
    .hq-nav-close {
        display: flex;
        position: absolute;
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        border: none;
        background: rgba(255,255,255,.1);
        color: #fff;
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
        border-radius: 10px;
        z-index: 2;
        transition: background .2s;
    }
    .hq-nav-close:hover { background: rgba(255,255,255,.2); }
    .hq-nav {
        flex: 1;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 56px 20px 24px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .hq-nav-link {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 14px 16px;
        margin-bottom: 4px;
        border-radius: 10px;
        font-size: 16px;
        font-weight: 500;
        color: rgba(255,255,255,.92);
        text-decoration: none;
        transition: background .2s, color .2s;
    }
    .hq-nav-link:hover {
        background: rgba(255,255,255,.08);
        color: #fff;
    }
    .hq-nav-link.is-active {
        background: var(--hq-logo);
        color: #fff;
    }
    .hq-nav-link:last-child { margin-bottom: 0; }
    .hq-search { display: none; }
    body.hq-nav-open { overflow: hidden; }
    .hq-menu-btn .hq-menu-icon-open { display: block; }
    .hq-menu-btn .hq-menu-icon-close { display: none; }
    body.hq-nav-open .hq-menu-btn .hq-menu-icon-open { display: none; }
    body.hq-nav-open .hq-menu-btn .hq-menu-icon-close { display: block; }
    .hq-layout { grid-template-columns: 1fr; }
    .hq-side { position: static; }
    .hq-detail-top { grid-template-columns: 1fr; }
    .hq-detail-poster { max-width: 200px; }
    /* 手机端分类子导航横向滑动 */
}

@media (max-width: 600px) {
    .hq-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .hq-container { padding: 12px; }
    /* 播放页 */
    .hq-player-wrap { margin-bottom: 12px; }
    .hq-play-title { font-size: 18px; }
    .hq-play-actions { gap: 8px; }
    .hq-play-ep-block { padding: 14px; }
    .hq-play-ep-item { padding: 6px 12px; font-size: 12px; }
    .hq-side-ep-list { max-height: 220px; }
}
