/* Detail composition follows demo/91-视频播放详情页.html. */
.home-page .detail-page { padding: 24px 16px 60px; }
.detail-breadcrumb { display:flex; align-items:center; gap:10px; font-size:13px; color:var(--home-muted); margin-bottom:18px; min-width:0; }
.detail-breadcrumb [aria-current] { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; color:var(--home-text); }
.detail-breadcrumb a:hover { color:#ff7a45; }
.home-page .detail-title { font-size:32px; font-weight:900; letter-spacing:-.5px; line-height:1.25; margin:2px 0 14px; overflow-wrap:anywhere; }
.detail-hero { display:grid; grid-template-columns:321px minmax(0,1fr); gap:32px; margin-top:14px; }
.detail-poster { position:relative; overflow:hidden; border-radius:16px; aspect-ratio:9/16; align-self:start; background:var(--home-card); }
.detail-cover { display:block; width:100%; height:100%; object-fit:cover; }
.detail-hero-main { display:flex; flex-direction:column; min-width:0; }
.detail-intro-block { position:relative; }
.home-page .detail-intro-title { display:flex; align-items:center; gap:11px; font-size:23px; font-weight:800; margin:0 0 10px; }
.detail-intro-title::before, .detail-subtitle::before, .detail-section-label::before, .detail-comments-title::before, .detail-related-title::before { content:""; width:4px; height:20px; border-radius:4px; background:var(--home-gradient); flex:none; }
.home-page .detail-intro { color:var(--home-muted); font-size:14.5px; line-height:1.75; overflow:hidden; overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; padding-right:3.8em; }
.home-page .detail-intro.is-expanded { display:block; padding-right:0; padding-bottom:24px; max-height:360px; overflow-y:auto; }
.detail-intro-toggle { position:absolute; right:0; bottom:0; border:0; padding:0; background:none; color:#ff916b; font-size:13px; font-weight:700; }
.home-page .detail-subtitle { display:flex; align-items:center; gap:8px; font-size:15px; font-weight:700; margin:20px 0 10px; }
.detail-subtitle::before { width:3px; height:14px; }
.detail-tags { display:flex; flex-wrap:wrap; gap:10px; }
.home-page .detail-tag { background:var(--home-card); border:1px solid var(--home-line); padding:5px 14px; border-radius:20px; font-size:13px; color:var(--home-muted); overflow-wrap:anywhere; }
.home-page a.detail-tag:hover { border-color:var(--home-brand); color:#fff; }
.detail-work-meta { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 18px; margin:0 0 18px; padding:15px 0; border-block:1px solid var(--home-line); }
.detail-work-meta div { display:grid; grid-template-columns:3.5em minmax(0,1fr); gap:8px; font-size:13px; line-height:1.6; }
.detail-work-meta dt { color:var(--home-dim); }
.detail-work-meta dd { margin:0; overflow-wrap:anywhere; }
.detail-actions { display:flex; gap:12px; margin-top:auto; flex-wrap:wrap; align-items:stretch; padding-top:16px; }
.home-page .detail-play-btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:12px 26px; border-radius:12px; color:#fff; background:var(--home-gradient); font-weight:700; font-size:15px; }
.detail-play-btn svg { width:18px; height:18px; fill:currentColor; }
.detail-action-group { display:flex; gap:10px; }
.home-page .detail-action { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:46px; padding:10px 13px; border:1px solid var(--home-line); border-radius:12px; background:var(--home-card); color:var(--home-text); font-size:13px; }
.detail-action img { width:20px; height:20px; object-fit:contain; }
.home-page .detail-action--active { color:#ff634b; border-color:rgba(255,99,75,.65); background:rgba(255,99,75,.08); }
.detail-action:hover, .detail-play-btn:hover { filter:brightness(1.12); }
.detail-episodes { margin-top:38px; scroll-margin-top:86px; }
.detail-episodes-head, .detail-comments-head, .detail-related-head { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:18px; }
.home-page .detail-section-label, .home-page .detail-comments-title, .home-page .detail-related-title { display:flex; align-items:center; gap:11px; font-size:23px; font-weight:800; }
.detail-episodes-status { color:var(--home-muted); font-size:13px; }
.detail-episode-ranges { display:flex; gap:10px; margin-bottom:14px; overflow-x:auto; }
.detail-episode-ranges:has(.detail-episode-range:only-child) { display:none; }
.detail-episode-range { flex:none; border:1px solid var(--home-line); border-radius:8px; padding:6px 14px; color:var(--home-muted); background:var(--home-card); }
.detail-episode-range--active { color:#ff916b; border-color:var(--home-brand); }
.detail-episode-list { display:grid; grid-template-columns:repeat(10,minmax(0,1fr)); gap:10px; }
.home-page .detail-episode { position:relative; display:flex; align-items:center; justify-content:center; min-height:46px; padding:12px 4px; font-size:14px; font-weight:600; text-align:center; color:var(--home-text); background:var(--home-card); border:1px solid var(--home-line); border-radius:10px; }
.home-page .detail-episode:hover { color:#ff916b; border-color:var(--home-brand); }
.detail-episode-lock { position:absolute; right:4px; top:3px; width:16px; height:16px; object-fit:contain; }
.detail-episode-coin { position:absolute; right:3px; top:2px; display:flex; align-items:center; gap:2px; font-size:9px; color:var(--home-gold); }
.detail-episode-coin img { width:12px; height:12px; }
.is-range-hidden { display:none !important; }
.detail-comments { margin-top:44px; min-width:0; }
.detail-comments-sort { display:flex; gap:12px; }
.detail-sort-btn { border:0; background:none; color:var(--home-muted); padding:8px 6px; font-size:13px; }
.detail-sort-btn--active { color:#ff916b; }
.detail-related { margin-top:44px; }
.detail-related-desc { margin:-10px 0 18px; color:var(--home-muted); font-size:13px; }
.detail-related-title-h5 { display:none; }
.detail-related-refresh { display:inline-flex; align-items:center; gap:6px; border:0; background:none; color:var(--home-muted); font-size:13px; }
.detail-related-refresh img { width:16px; height:16px; }
.section-empty { grid-column:1/-1; padding:32px 16px; color:var(--home-muted); text-align:center; font-size:14px; }

/* Existing comment/reply contracts shared with the player. */
.detail-comment-composer {
    align-self: stretch;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
    border-radius: 10px;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 12px;
    display: flex;
    box-sizing: border-box;
}

.detail-comment-composer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 18px;
    object-fit: cover;
    flex-shrink: 0;
}

.detail-comment-composer-main {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 12px;
    display: flex;
}

.detail-comment-composer-input {
    width: 100%;
    min-height: 56px;
    padding: 10px 12px;
    background: #000;
    overflow: hidden;
    border-radius: 8px;
    border: none;
    resize: none;
    box-sizing: border-box;
    box-shadow: none;
    outline: none;
    outline-color: transparent;
    -webkit-appearance: none;
    appearance: none;
    color: #F5F5F5;
    font-size: 12px;
    font-family: PingFang SC;
    font-weight: 400;
    line-height: 18px;
}

.detail-comment-composer-input:focus,
.detail-comment-composer-input:focus-visible {
    border: none;
    outline: none;
    outline-color: transparent;
    box-shadow: none;
}

.detail-comment-composer-input::placeholder {
    color: #A3A3A3;
}

.detail-comment-composer-footer {
    width: 100%;
    height: 28px;
    overflow: hidden;
    justify-content: space-between;
    align-items: center;
    display: flex;
}

.detail-comment-composer-status {
    height: 20px;
    overflow: hidden;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    display: flex;
}

.detail-comment-composer-logged {
    color: #ff7a45;
    font-size: 12px;
    font-family: PingFang SC;
    font-weight: 400;
    line-height: 18px;
}

.detail-comment-composer-user {
    color: #A3A3A3;
    font-size: 12px;
    font-family: PingFang SC;
    font-weight: 400;
    line-height: 18px;
}

.detail-comment-composer-count {
    color: #D4D4D4;
    font-size: 12px;
    font-family: PingFang SC;
    font-weight: 400;
    line-height: 18px;
}

.detail-comment-composer-submit {
    width: 84px;
    height: 28px;
    background: #ff7a45;
    overflow: hidden;
    border-radius: 14px;
    justify-content: center;
    align-items: center;
    display: flex;
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 12px;
    font-family: PingFang SC;
    font-weight: 400;
    line-height: 18px;
    padding: 0;
    position: relative;
    gap: 6px;
    box-sizing: border-box;
}

.detail-comment-composer-submit:disabled,
.detail-comment-composer-submit.is-loading {
    opacity: 0.75;
    cursor: not-allowed;
}

.detail-comment-composer-submit.is-loading::before {
    content: "";
    width: 12px;
    height: 12px;
    border: 2px solid rgba(24, 24, 24, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: detail-comment-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes detail-comment-spin {
    to {
        transform: rotate(360deg);
    }
}

.detail-comments-login {
    align-self: stretch;
    height: 44px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
    border-radius: 7px;
    justify-content: flex-start;
    align-items: center;
    display: flex;
    box-sizing: border-box;
}

.detail-comments-login-link {
    color: #ff7a45;
    font-size: 12px;
    font-family: PingFang SC;
    font-weight: 400;
    line-height: 18px;
    text-decoration: none;
}

.detail-comments-login-hint {
    color: #A3A3A3;
    font-size: 12px;
    font-family: PingFang SC;
    font-weight: 400;
    line-height: 18px;
}

.detail-comment-list {
    align-self: stretch;
    width: 100%;
    box-sizing: border-box;
}

.detail-comment {
    align-self: stretch;
    width: 100%;
    padding: 14px 0;
    overflow: hidden;
    border-bottom: 1px rgba(255, 255, 255, 0.05) solid;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 12px;
    display: flex;
    box-sizing: border-box;
}

.detail-comment:last-of-type {
    border-bottom: none;
}

.detail-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
}

.detail-comment-body {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 6px;
    display: flex;
}

.detail-comment-name {
    color: #A3A3A3;
    font-size: 12px;
    font-family: PingFang SC;
    font-weight: 400;
    line-height: 18px;
}

.detail-comment-text {
    color: #F5F5F5;
    font-size: 12px;
    font-family: PingFang SC;
    font-weight: 400;
    line-height: 18px;
    word-wrap: break-word;
}

.detail-comment-meta {
    height: 16px;
    overflow: hidden;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    display: flex;
}

.detail-comment-time {
    color: #A3A3A3;
    font-size: 12px;
    font-family: PingFang SC;
    font-weight: 400;
    line-height: 18px;
}

.detail-comment-like {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #A3A3A3;
    font-size: 12px;
    font-family: PingFang SC;
    font-weight: 400;
    line-height: 18px;
}

.detail-comment-like img {
    width: 14px;
    height: 14px;
}

.detail-comment-like--active {
    color: #A3A3A3;
}

.detail-comment-like--active img {
    filter: none;
}

.detail-comment-reply-label {
    color: #A3A3A3;
    font-size: 12px;
    font-family: "Noto Sans SC", "PingFang SC", sans-serif;
    font-weight: 400;
    line-height: 18px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.detail-comment-reply-label:hover {
    color: #ff7a45;
}

.detail-comment-reply-to {
    color: #A3A3A3;
}

.detail-comment-replies {
    width: 100%;
    margin-top: 4px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-sizing: border-box;
}

.detail-comment-reply-item {
    color: #F5F5F5;
    font-size: 12px;
    font-family: PingFang SC;
    font-weight: 400;
    line-height: 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 6px;
}

.detail-comment-reply-name {
    color: #A3A3A3;
}

.detail-comment-reply-text {
    color: #F5F5F5;
    word-break: break-word;
}

.detail-comment-reply-item[hidden] {
    display: none !important;
}

.detail-comment-replies-toggle {
    align-self: flex-start;
    text-align: left;
    padding: 0;
    background: none;
    border: none;
    color: #ff7a45;
    font-size: 12px;
    font-family: "Noto Sans SC", "PingFang SC", sans-serif;
    font-weight: 400;
    line-height: 18px;
    cursor: pointer;
}

.detail-comment-replies-toggle:hover {
    opacity: 0.92;
}

.detail-comment-reply-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    color: #A3A3A3;
    font-size: 12px;
    line-height: 18px;
}

.detail-comment-reply-hint button {
    background: none;
    border: none;
    padding: 0;
    color: #ff7a45;
    cursor: pointer;
    font-size: 12px;
}

.detail-comment-inline-composer {
    width: 100%;
    margin-top: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-comment-inline-input {
    width: 100%;
    min-height: 56px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    background: #12151f;
    color: #F5F5F5;
    font-size: 13px;
    font-family: "Noto Sans SC", "PingFang SC", sans-serif;
    line-height: 20px;
    resize: none;
    box-sizing: border-box;
}

.detail-comment-inline-input::placeholder {
    color: #737373;
}

.detail-comment-inline-input:focus,
.detail-comment-inline-input:focus-visible {
    border-color: rgba(250, 220, 68, 0.55);
    outline: none;
    outline-color: transparent;
    box-shadow: none;
}

.detail-comment-inline-footer {
    display: flex;
    justify-content: flex-end;
}

.detail-comment-inline-send {
    height: 32px;
    padding: 0 14px;
    border: none;
    border-radius: 6px;
    background: #ff7a45;
    color: #12151f;
    font-size: 13px;
    font-family: "Noto Sans SC", "PingFang SC", sans-serif;
    font-weight: 500;
    cursor: pointer;
}

.detail-comment-inline-send:disabled,
.detail-comment-inline-send.is-loading {
    opacity: 0.6;
    cursor: not-allowed;
}

.detail-comments-more {
    align-self: stretch;
    height: 43px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
    border-radius: 7px;
    justify-content: center;
    align-items: center;
    display: flex;
    border: none;
    cursor: pointer;
    color: #A3A3A3;
    font-size: 12px;
    font-family: PingFang SC;
    font-weight: 400;
    line-height: 18px;
    margin-top: 0;
}


.home-page .detail-comment-composer { padding:0; border:0; background:none; }
.home-page .detail-comment-composer-input, .home-page .detail-comment-inline-input { background:var(--home-card); color:var(--home-text); border:1px solid var(--home-line); border-radius:12px; caret-color:#ff916b; }
.home-page .detail-comment-composer-input:focus-visible, .home-page .detail-comment-inline-input:focus-visible { outline:2px solid #b5a1ff; outline-offset:2px; }
.home-page .detail-comment-composer-input::placeholder, .home-page .detail-comment-inline-input::placeholder { color:var(--home-dim); }
.home-page .detail-comment-composer-submit, .home-page .detail-comment-inline-send { background:var(--home-gradient); color:#fff; border:0; }
.home-page .detail-comments-login { padding:16px 0; background:none; justify-content:flex-start; }
.home-page .detail-comments-login-link, .home-page .detail-comment-like--active { color:#ff916b; }
.home-page .detail-comment-time, .home-page .detail-comment-composer-count { color:var(--home-dim); }
.home-page .detail-comment { border-color:var(--home-line); }
.home-page .detail-comment-text { color:var(--home-muted); overflow-wrap:anywhere; }
.home-page .detail-comments-more { color:var(--home-muted); border-color:var(--home-line); }
.detail-comments-more[hidden] { display:none; }
@media (max-width:1024px) { .detail-hero { grid-template-columns:260px minmax(0,1fr); gap:26px; } .detail-episode-list { grid-template-columns:repeat(8,minmax(0,1fr)); } }
@media (max-width:767px) {
 .home-page .detail-page { padding-top:18px; }
 .home-page .detail-title { font-size:24px; margin-bottom:12px; }
 .detail-hero { grid-template-columns:1fr; gap:20px; }
 .detail-poster { width:200px; max-width:70%; margin:4px auto 2px; }
 .home-page .detail-intro-title { font-size:19px; }
 .detail-work-meta { gap:10px 12px; }
 .detail-actions { gap:8px; }
 .home-page .detail-play-btn { flex:1.7; padding:12px 10px; }
 .home-page .detail-choose-btn { flex:1; }
 .detail-action-group { flex:1 1 100%; gap:8px; }
 .detail-action-group .detail-action { flex:1; }
 .detail-episode-list { grid-template-columns:repeat(5,minmax(0,1fr)); }
 .home-page .detail-section-label, .home-page .detail-comments-title, .home-page .detail-related-title { font-size:20px; }
 .detail-episodes-status { font-size:12px; }
 .detail-comment-composer-avatar { display:none; }
 .detail-comment-composer-footer { flex-wrap:wrap; }
 .detail-comment-composer-status { flex-wrap:wrap; }
 .detail-comment-meta { flex-wrap:wrap; gap:10px; }
 .detail-comment-composer-logged { display:none; }
}
@media (prefers-reduced-motion:reduce) { .detail-page *, .play-page * { scroll-behavior:auto; transition:none !important; animation:none !important; } }
