.layui-icon {
    font-size: 30px;
}

.header-title {
    font-size: 20px;
    font-weight: bold;
}

.vod-box {
    display: flex;
    padding: 15px 15px 12px;
}

.vod-thumb img {
    width: 110px;
    height: 160px;
    border-radius: 6px;
    object-fit: cover;
}

.vod-info {
    /* margin-left: 15px; */
    flex: 1;
}

.vod-title {
    color: #000;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 6px;
}

.vod-meta {
    font-size: 13px;
    color: #ccc;
    line-height: 1.6;
}

.vod-desc {
    padding: 0 15px;
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.8;
    color: #ddd;
    position: relative;
}

.vod-desc .expand {
    display: inline-block;
    color: #00c3ff;
    cursor: pointer;
    margin-top: 5px;
}

.vod-player {
    padding: 15px 15px 0;
}

.vod-player h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

.recommend-section {
    margin-top: 20px;
    padding: 0 15px;
}

.recommend-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

.recommend-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 10px 0;
}

.recommend-item-wrapper {
    width: 100%;
    box-sizing: border-box;
}

.recommend-item {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: stretch;
    text-decoration: none;
    color: inherit;
    height: 166px;
    overflow: hidden;
}

.recommend-item-img {
    width: 32%;
    height: 100%;
    overflow: hidden;
    flex-shrink: 0;
}

.recommend-item-img img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    border-radius: 6px;
}

.recommend-item-text {
    width: 75%;
    padding: 5px 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.recommend-item-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    line-height: 1.2;
}

.recommend-item-content {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* 顯示最多三行 */
    -webkit-box-orient: vertical;
}

.video-block {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    margin-bottom: 24px;
    /* overflow: hidden; */
}

.vod-preview-desc {
    padding: 0px 15px;
    font-size: 14px;
    color: #666666;
    line-height: 1.6;
    max-height: calc(1.6em * 3);
    /* 三行高度 */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* 限制3行 */
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

#vodIntroPage {
    display: none;
    padding: 16px;
}

#episode-toggle-btn {
    margin-left: auto;
    cursor: pointer;
    font-size: 14px;
    color: #999999;

}

#episode-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 點擊展開集數區塊 */
#episode-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    max-width: 100vw;
    height: 50%;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
    display: flex;
    flex-direction: column;
    padding: 10px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-sizing: border-box;
    overflow: hidden;
}

#episode-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* 半透明黑色 */
    z-index: 998;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    padding-right: 10px;
}

.popup-close {
    cursor: pointer;
    font-size: 30px;
    padding: 4px;
    line-height: 1;
    display: inline-block;
    flex-shrink: 0;
}

.popup-sort {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.popup-sort button {
    padding: 5px 10px;
    font-size: 20px;
    cursor: pointer;
    background-color: white;
    border: none;
}

.popup-episodes {
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-right: 10px;
    padding-left: 10px;
    box-sizing: border-box;
    max-height: 200px;
}

.popup-episodes a {
    padding: 10px 15px;
    background-color: #eee;
    border-radius: 4px;
    text-decoration: none;
    color: black;
}

.popup-episodes a.active {
    background-color: orange;
    color: white;
    font-weight: bold;
}

/* 區段按鈕 */
.segment-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.segment-buttons button {
    border-radius: 18px;
    cursor: pointer;
    font-size: 12px;
    width: 61px;
    height: 24px;
    border: none;
    background: #EAEAEA;
    color: #2F2F2F;
}

.segment-buttons button.active {
    background: #F5ECE1;
    color: #FF8C00;
    font-weight: bold;
}

#play-episodes-container {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 10px 0 0;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE 10+ */
}

#play-episodes-container::-webkit-scrollbar {
    display: none;
    /* Chrome / Safari */
}

.play-episodes {
    display: flex;
    gap: 10px;
    white-space: nowrap;
    min-width: max-content;
}


.play-episodes a {
    background-color: #EAEAEA;
    color: #2F2F2F;
    border-radius: 5px;
    font-size: 16px;
    text-decoration: none;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}


.play-lines a.active,
.play-episodes a.active {
    background-color: #F6DFC3;
    color: #FF8C00;
    font-weight: bold;
}

.play-lines {
    display: flex;
    gap: 10px;
    border-radius: 10px;
    margin-bottom: 12px;
}

.play-lines a {
    background-color: #ECECEC;
    color: #666666;
    border-radius: 20px;
    font-size: 14px;
    text-decoration: none;
    width: 88px;
    height: 24px;
    align-items: center;
    justify-content: center;
    display: flex;
}




.expand-button {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    padding: 0 10px;
    font-size: 16px;
    color: gray;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.expand-button i {
    font-size: 20px;
}

/* 為固定播放器預留空間 */
body {
    margin: 0;
    font-family: sans-serif;
    padding-top: 56.25%;
    /* 根據播放器高度調整 */
}

/* 返回按鈕也需要固定，避免被播放器遮擋 */
.back {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 10000;
    color: gray;
    padding: 6px 12px;
    cursor: pointer;
    line-height: 1;
}

/* 固定播放器在頂部 */
#dplayer-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    margin: 0 auto;
    padding-top: 56.25%;
    /* 16:9 = 9 / 16 = 0.5625 */
    background: #000;
}


#dplayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


.dplayer-notice-list {
    position: absolute !important;
    left: 0px !important;
    bottom: -10px !important;
    width: 100%;
    text-align: center;
    z-index: 9999;
    pointer-events: none;
}

.dplayer-notice-list .dplayer-notice {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    pointer-events: none;
}


.dplayer-full-in-icon {
    display: none !important;
}