body {
    background-color: #000000;
}

h1 {
    color: #fff;
    font-size: 12px;
    text-align: center;
    padding: 0 16px;
    line-height: 1.5;
    text-indent: -99999px;
    position: absolute;
}

.kv-wrap {
    background-color: #000000;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: top center;
}

.kv-wrap.entrance {
    min-height: 100vh;
    height: 100%;
    display: flex;
    align-content: center;
    justify-content: center;
}

.kv-wrap .container {
    width: 100%;
    max-width: 455px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.main-content {
    padding-top: 20px;
}

.kv {
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    -webkit-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    color: #fff;
    text-align: center;
}

.btn-wrap {
    padding-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.btn-wrap a,
.player-container .text-wrap a,
.player-container .text-wrap button {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 14px 24px;
    border-radius: 999px;
    font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    color: #FFFFFF;
    cursor: pointer;
    transition: background-color .2s ease, transform .15s ease;
}

.btn-primary {
    background-color: #E94709;
}

.btn-primary:hover {
    background-color: #F2591C;
}

.btn-primary:active {
    background-color: #C93A05;
    transform: scale(0.96);
}

.btn-secondary {
    background-color: #AA8657;
}

.btn-secondary:hover {
    background-color: #BC9A6E;
}

.btn-secondary:active {
    background-color: #8F6E44;
    transform: scale(0.96);
}

/* LIVE 頁切換播放來源按鈕 */
.player-container .text-wrap button {
    border: 0;
    line-height: inherit;
}

.player-container .text-wrap button.is-active {
    background-color: #E94709;
    cursor: default;
}

@media screen and (min-width: 744px) {
    .kv-wrap .container {
        max-width: 480px;
    }
    .btn-wrap {
        flex-wrap: nowrap;
        gap: 16px;
    }
    .btn-wrap a,
    .player-container .text-wrap a,
    .player-container .text-wrap button {
        padding: 18px 32px;
        font-size: 18px;
    }
}

.player-frame {
    position: relative; /* 作為 .player-notice 的定位基準 */
    background-color: #272727;
    width: 80vw;
    height: 45vw;
    max-width: 901px;
    max-height: 506.8125px;
    margin: 0 auto;
    margin-bottom: 20px;
    background-size: cover;
}

@media screen and (max-width: 768px) {
    .player-frame {
        margin-top: 50px;
    }
}

/* 播放錯誤提示，疊在播放器下方置中（避開控制列），不佔版面 */
.player-notice {
    position: absolute;
    left: 50%;
    bottom: 15%;
    transform: translateX(-50%);
    z-index: 1100; /* 高於 video.js 各層（最高 1000） */
    width: max-content;
    max-width: 90%;
    margin: 0;
    padding: 8px 20px;
    border-radius: 20px;
    background-color: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
}

.player-notice[hidden] {
    display: none;
}

/* 播放器填滿外框，尺寸與間距由 .player-frame 控制 */
#videoPlayer {
    width: 100%;
    height: 100%;
}

.player-container .text-wrap {
    width: 80vw;
    max-width: 901px;
    text-align: center;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: center;
    align-items: center;
    margin: 0 auto;
    padding-top: 20px;
    padding-bottom: 40px;
}

.player-container .text-wrap h1 {
    color: #000;
    padding: 0;
    margin-right: 24px;
    letter-spacing: 0.12em;
}

.player-container .text-wrap .link-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 0 auto;
}

@media screen and (max-width: 1024px) {
    .player-container .text-wrap h1 {
        margin-right: 0;
    }
    .player-frame {
        width: 90vw;
        height: 50.625vw;
    }
    .player-container .text-wrap {
        width: 90vw;
        flex-direction: column;
        padding: 0 16px 24px;
    }
    .player-container .text-wrap .link-wrap {
        width: 100%;
        margin-top: 16px;
        justify-content: center;
    }
}

@media screen and (max-width: 1024px) and (orientation: portrait) {
    .kv-wrap .container {
        width: 80%;
        min-width: 0;
    }
}

@media screen and (max-width: 768px) {
    .kv-wrap .container {
        width: 80%;
        min-width: 0;
    }
    .player-container .text-wrap {
        max-width: 600px;
        -webkit-justify-content: center;
        justify-content: center;
    }
}

@media screen and (max-width: 600px) {
    .kv-wrap .container {
        width: 90%;
        min-width: 0;
    }
    .btn-wrap a,
    .player-container .text-wrap a,
    .player-container .text-wrap button {
        padding: 10px 16px;
        font-size: 13px;
    }
    .player-frame {
        width: 96vw;
        height: 54vw;
    }
    .player-container .text-wrap {
        padding: 0;
    }
    .player-container .text-wrap h1 {
        font-size: 15px;
    }
}

@media screen and (max-width: 360px) {
    .player-container .text-wrap a,
    .player-container .text-wrap button {
        padding: 8px 14px;
        font-size: 12px;
    }
}