/* The detail page: the player row, with the video beside the "接下来播放" list.
 *
 * Loaded through base.html's `styles` block by video/single-video.html only, so no
 * other page pays for it. It comes after the theme and after ultra-pink.css, which
 * is what lets the iframe rule below win. Anything reused by another template
 * belongs in ultra-pink.css instead -- the tag chips did. */

/* style.css sizes .gen-video-holder iframe as 100% x 70vh, from when the player
 * was the full container width. In a two-thirds column that is far taller than
 * the video, so the player would letterbox itself inside black bars. The height
 * has to be !important to beat the theme's own !important. */
.gen-video-holder iframe {
    height: auto !important;
    aspect-ratio: 16 / 9;
}

.gen-up-next {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
    background: var(--black-color);
    border-radius: 4px;
}

.gen-up-next-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.gen-up-next-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
}

/* The autoplay switch. A styled checkbox rather than a scripted control, so the
 * toggle still works with the label, the keyboard and the screen reader. */
.gen-autoplay {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.gen-autoplay-label {
    font-size: 13px;
    color: var(--secondary-color);
    white-space: nowrap;
}

.gen-autoplay input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.gen-autoplay-switch {
    position: relative;
    flex: 0 0 auto;
    width: 38px;
    height: 20px;
    border-radius: 10px;
    background: #3a3a3a;
    transition: background .2s ease;
}

.gen-autoplay-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--white-color);
    transition: transform .2s ease;
}

.gen-autoplay input:checked + .gen-autoplay-switch {
    background: var(--primary-color);
}

.gen-autoplay input:checked + .gen-autoplay-switch::after {
    transform: translateX(18px);
}

.gen-autoplay input:focus-visible + .gen-autoplay-switch {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.gen-up-next-list {
    flex: 1 1 auto;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-y: auto;
}

.gen-up-next-list li + li {
    margin-top: 12px;
}

.gen-up-next-list a {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.gen-up-next-thumb {
    position: relative;
    flex: 0 0 120px;
}

.gen-up-next-thumb img {
    display: block;
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 3px;
}

.gen-up-next-duration {
    position: absolute;
    right: 4px;
    bottom: 4px;
    padding: 0 4px;
    border-radius: 2px;
    background: rgba(0, 0, 0, .8);
    color: var(--white-color);
    font-size: 11px;
    line-height: 16px;
}

.gen-up-next-meta {
    display: block;
    min-width: 0;
}

.gen-up-next-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--white-color);
    font-family: var(--title-fonts);
    font-size: 14px;
    line-height: 1.4;
}

.gen-up-next-list a:hover .gen-up-next-name {
    color: var(--primary-color);
}

.gen-up-next-views {
    display: block;
    margin-top: 4px;
    color: var(--secondary-color);
    font-size: 12px;
    line-height: 1.4;
}

/* Stacked below the player, where a fixed-aspect player no longer constrains the
 * panel -- so nothing needs to stretch and the list keeps its natural height. */
@media (max-width: 991px) {
    .gen-up-next {
        height: auto;
        margin-top: 24px;
    }
}
