.tv-view-area {
    max-width: 1200px;
    width: 100%;
    height: auto;
    margin: 16px auto;
    padding: 0 20px;
}

.player-area {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.tv-player-shell {
    width: 100%;
    background: linear-gradient(180deg, #1a2030 0%, #0b0e14 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.tv-player-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 0 auto;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.tv-player-frame--embed {
    aspect-ratio: auto;
    max-height: none;
    height: var(--fb-embed-screen-h, calc(100vw * 9 / 16 + 20px));
    min-height: calc(100vw * 9 / 16 + 20px);
}

.tv-player-frame--embed.tv-player-frame--chat-open {
    min-height: var(--fb-embed-screen-h, calc(100vw * 9 / 16 + min(300px, max(200px, 34vw)) + 32px));
}

#player-box {
    width: 100%;
    height: 100%;
    min-height: 0;
    background: #000;
}

#tv-live-video,
.tv-live-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    object-fit: contain;
}

.tv-embed-wrap {
    width: 100%;
    height: 100%;
    background: #000;
}

.tv-embed-iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    background: #000;
}

.tv-embed-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
    text-align: center;
    box-sizing: border-box;
}

#liveChatBox {
    display: none !important;
}

.chat-box {
    display: block;
    width: 100%;
    height: auto;
    background: #0a3622;
}

@media (max-width: 768px) {
    .tv-view-area {
        padding: 0 12px;
        margin-top: 8px;
    }

    .tv-player-shell {
        padding: 8px;
        border-radius: 12px;
    }

    .tv-player-frame {
        border-radius: 8px;
    }
}
.channel-desc-box {
    width: 100%;
    max-width: 1200px;
    min-height: 96px;
    height: auto;
    border: 2px solid #38404d;
    border-radius: 8px;
    margin: 16px auto;
    padding: 10px 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, .6);
    gap: 10px;
    align-items: center;
}

.desc-box-title-section {
    padding: 8px;
    min-width: 0;
}

.desc-box-title-section > h1 {
    font-size: 22px;
    margin: 0 0 4px;
    line-height: 1.25;
}

.desc-box-video-quality-section {
    width: auto;
    min-width: 180px;
    max-width: 280px;
    height: auto;
    padding: 8px 4px;
    flex: 0 0 auto;
}

.tv-player-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.tv-play-mode-switch {
    display: inline-flex;
    gap: 6px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tv-play-mode-btn {
    flex: 1 1 0;
    min-height: 34px;
    padding: 6px 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.tv-play-mode-btn.is-active {
    color: #fff;
    background: linear-gradient(135deg, #9a2218 0%, #85180f 55%, #5c1009 100%);
    box-shadow: 0 4px 12px rgba(133, 24, 15, 0.35);
}

.tv-player-quality-select {
    margin: 0;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .channel-desc-box {
        flex-direction: column;
        align-items: stretch;
    }

    .desc-box-video-quality-section {
        max-width: none;
        width: 100%;
        padding: 0 8px 4px;
    }
}

.tv-view-area--member-gate {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 12px;
}

.tv-member-gate {
    width: min(480px, 100%);
}

.tv-member-gate__card {
    text-align: center;
    padding: 28px 22px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(30, 34, 38, 0.98) 0%, rgba(18, 20, 22, 0.98) 100%);
    border: 1px solid rgba(255, 193, 7, 0.28);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.tv-member-gate__logo {
    border-radius: 10px;
    margin-bottom: 12px;
}

.tv-member-gate__title {
    margin: 0 0 4px;
    font-size: 1.35rem;
    color: #fff;
}

.tv-member-gate__cate {
    margin: 0 0 14px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
}

.tv-member-gate__lead {
    margin: 0 0 18px;
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
}

.tv-member-gate__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 14px;
}

.tv-member-gate__btn {
    min-width: 160px;
    min-height: 44px;
    font-weight: 700;
}

.tv-member-gate__back {
    display: inline-block;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.88rem;
}

.tv-member-gate__back:hover {
    color: #fff;
}

.tv-member-gate--inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: min(52dvh, calc(100vw * 9 / 16));
    padding: 24px 16px;
    text-align: center;
    background: #111;
}
