/* VividTV Watch */
:root {
    --watch-bg: #080808;
    --watch-panel: #111111;
    --watch-panel-soft: #171717;
    --watch-line: #262626;
    --watch-line-strong: #343434;
    --watch-text: #f3f3f3;
    --watch-muted: #9a9a9a;
    --watch-accent: #e50914;
    --watch-accent-soft: rgba(229, 9, 20, 0.12);
    --watch-danger: #ff5a67;
    --watch-radius: 18px;
    --watch-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    --plyr-color-main: #e50914;
}

body.page-template-page-watch {
    background:
        radial-gradient(circle at top center, rgba(229, 9, 20, 0.12), transparent 22%),
        linear-gradient(180deg, #0a0a0a 0%, #050505 100%);
}

.yt-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    max-width: 1500px;
    margin: 0 auto;
    padding: 24px;
    color: var(--watch-text);
}

.yt-primary,
.yt-secondary {
    min-width: 0;
}

.yt-player,
.yt-below,
.yt-sb,
.yt-recommended,
.yt-modal {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)), var(--watch-panel);
    border: 1px solid var(--watch-line);
    box-shadow: var(--watch-shadow);
}

.yt-player {
    padding: 12px;
    border-radius: 22px;
}

.yt-player-inner {
    position: relative;
    padding-top: 56.25%;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
}

.yt-player .player-container,
.yt-player .plyr,
.yt-player .plyr--video,
.yt-player .plyr video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.yt-player .player-container video,
.yt-player .plyr video {
    display: block;
    object-fit: contain;
    background: #000;
}

.yt-player .player-overlay,
.yt-player .player-loading {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 24px;
    text-align: center;
    background: linear-gradient(180deg, rgba(4, 4, 4, 0.5), rgba(4, 4, 4, 0.86));
}

.yt-player .player-overlay.hidden,
.yt-player .player-loading.hidden,
.yt-player .player-error.hidden,
.yt-title-row.hidden,
.yt-below.hidden {
    display: none;
}

.yt-player .player-overlay p,
.yt-player .player-loading p {
    margin-top: 14px;
    color: #d1d1d1;
    font-size: 14px;
    line-height: 1.5;
}

.yt-player .spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--watch-accent);
    border-radius: 50%;
    animation: ytspin .75s linear infinite;
}

@keyframes ytspin {
    to { transform: rotate(360deg); }
}

.yt-player .player-error {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 6;
    padding: 13px 14px;
    border: 1px solid rgba(255, 90, 103, 0.26);
    border-radius: 14px;
    background: rgba(90, 15, 23, 0.96);
    color: #fff;
    font-size: 13px;
}

.yt-title-row,
.yt-np,
.yt-below,
.yt-recommended {
    margin-top: 16px;
}

.yt-title {
    margin: 0;
    font-size: 30px;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.yt-np {
    display: flex;
    align-items: center;
    gap: 10px;
}

.yt-np-badge {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--watch-line-strong);
    background: #161616;
    color: var(--watch-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.yt-np-badge.live {
    border-color: rgba(229, 9, 20, 0.28);
    background: var(--watch-accent);
    color: #fff;
}

.yt-np-name {
    font-size: 14px;
    color: var(--watch-muted);
}

.yt-below {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border-radius: 20px;
}

.yt-channel {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.yt-avatar {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    overflow: hidden;
    background: #1d1d1d;
    border: 1px solid var(--watch-line);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.yt-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yt-chinfo,
.yt-rec-info {
    min-width: 0;
}

.yt-chname {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.yt-chsub {
    margin-top: 4px;
    font-size: 13px;
    color: var(--watch-muted);
}

.yt-btns {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.yt-btn-group {
    display: flex;
}

.yt-btn-group,
.yt-btn {
    border: 1px solid var(--watch-line);
    border-radius: 999px;
    background: var(--watch-panel-soft);
}

.yt-btn-group button,
.yt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 14px;
    color: var(--watch-text);
    font-size: 13px;
    font-weight: 600;
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.yt-btn-group button:not(:last-child) {
    border-right: 1px solid var(--watch-line);
}

.yt-btn:hover,
.yt-btn-group button:hover {
    background: rgba(255, 255, 255, 0.04);
}

.yt-btn.active,
.yt-btn-group button.active {
    color: #fff;
    background: var(--watch-accent-soft);
}

.yt-btn.stop {
    color: #fff;
    background: rgba(229, 9, 20, 0.18);
    border-color: rgba(229, 9, 20, 0.28);
}

.yt-secondary {
    position: sticky;
    top: 88px;
    align-self: start;
}

.yt-sb {
    padding: 16px;
    border-radius: 20px;
}

.yt-sb-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.yt-sb-tab {
    min-height: 42px;
    border: 1px solid var(--watch-line);
    border-radius: 14px;
    background: #141414;
    color: var(--watch-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: .18s ease;
}

.yt-sb-tab:hover {
    color: #fff;
    background: #1a1a1a;
}

.yt-sb-tab.active {
    color: #fff;
    background: var(--watch-accent);
    border-color: var(--watch-accent);
}

.yt-sb-search,
.yt-sb-select {
    margin-bottom: 10px;
}

.yt-sb-search input,
.yt-sb-select {
    width: 100%;
    min-height: 44px;
    padding: 11px 13px;
    border: 1px solid var(--watch-line);
    border-radius: 14px;
    background: #0d0d0d;
    color: var(--watch-text);
    font-size: 13px;
    outline: none;
}

.yt-sb-search input:focus,
.yt-sb-select:focus {
    border-color: rgba(229, 9, 20, 0.34);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

.yt-sb-list {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--watch-line);
    border-radius: 16px;
    background: #0d0d0d;
}

.yt-sb-list::-webkit-scrollbar {
    width: 6px;
}

.yt-sb-list::-webkit-scrollbar-thumb {
    background: #303030;
    border-radius: 999px;
}

.yt-ch-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    padding: 10px 11px;
    border: 1px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    transition: .18s ease;
}

.yt-ch-item:hover {
    background: #171717;
    border-color: #212121;
}

.yt-ch-item.active {
    background: rgba(229, 9, 20, 0.08);
    border-color: rgba(229, 9, 20, 0.18);
}

.yt-ch-thumb,
.yt-rec-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
    border: 1px solid var(--watch-line);
    display: grid;
    place-items: center;
    color: var(--watch-muted);
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

.yt-ch-thumb img,
.yt-rec-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yt-ch-name,
.yt-rec-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yt-ch-cat,
.yt-rec-cat,
.yt-sb-footer {
    font-size: 11px;
    color: var(--watch-muted);
}

.yt-ch-cat,
.yt-rec-cat {
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yt-sb-footer {
    padding-top: 10px;
    text-align: center;
}

.yt-recommended {
    padding: 18px;
    border-radius: 20px;
}

.yt-rec-title {
    margin: 0 0 12px;
    font-size: 19px;
}

.yt-rec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
}

.yt-rec-card {
    border: 1px solid var(--watch-line);
    border-radius: 16px;
    overflow: hidden;
    background: #141414;
    cursor: pointer;
    transition: .18s ease;
}

.yt-rec-card:hover {
    border-color: rgba(229, 9, 20, 0.18);
    transform: translateY(-2px);
}

.yt-rec-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #1a1a1a, #111111);
    color: rgba(255, 255, 255, 0.18);
    font-size: 28px;
    font-weight: 700;
}

.yt-rec-live {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--watch-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.yt-rec-body {
    display: flex;
    gap: 10px;
    padding: 12px;
}

.yt-modal-bg {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.72);
    padding: 20px;
}

.yt-modal-bg.open {
    display: flex;
}

.yt-modal {
    width: min(520px, 100%);
    border-radius: 20px;
    overflow: hidden;
}

.yt-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--watch-line);
}

.yt-modal-head h3 {
    margin: 0;
    font-size: 18px;
}

.yt-modal-head button {
    background: transparent;
    border: 0;
    cursor: pointer;
}

.yt-modal-body {
    padding: 18px;
}

.yt-share-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.yt-share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--watch-text);
    font-size: 12px;
}

.yt-share-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.yt-copy-row {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    padding: 10px;
    border: 1px solid var(--watch-line);
    border-radius: 14px;
    background: #0d0d0d;
}

.yt-copy-row input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--watch-text);
    font-size: 13px;
}

.yt-copy-row button {
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: var(--watch-accent);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.yt-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 100;
    width: 48px;
    height: 48px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--watch-line);
    border-radius: 50%;
    background: #151515;
    cursor: pointer;
}

.yt-top.show {
    display: flex;
}

.yt-top:hover {
    background: var(--watch-accent);
    border-color: var(--watch-accent);
}

.yt-top svg {
    width: 20px;
    height: 20px;
    fill: var(--watch-text);
}

.plyr__control--overlaid {
    background: rgba(229, 9, 20, 0.84) !important;
}

.plyr__control--overlaid:hover,
.plyr__control:hover {
    background: #e50914 !important;
}

.plyr--full-ui input[type=range] {
    color: #e50914 !important;
}

.yt-player:fullscreen .player-container video,
.yt-player:fullscreen .plyr video,
.yt-player:-webkit-full-screen .player-container video,
.yt-player:-webkit-full-screen .plyr video,
.yt-player .plyr:fullscreen video,
.yt-player .plyr:-webkit-full-screen video {
    object-fit: contain;
    background: #000;
}

@media (max-width: 1180px) {
    .yt-page {
        grid-template-columns: 1fr;
    }

    .yt-secondary {
        position: static;
    }

    .yt-sb-list {
        max-height: 46vh;
    }
}

@media (max-width: 760px) {
    .yt-page {
        padding: 14px 12px 28px;
        gap: 16px;
    }

    .yt-player {
        padding: 8px;
        border-radius: 18px;
    }

    .yt-title {
        font-size: 24px;
    }

    .yt-below {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .yt-btns {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .yt-btns::-webkit-scrollbar {
        display: none;
    }

    .yt-btn,
    .yt-btn-group button {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .yt-sb {
        padding: 14px;
        border-radius: 18px;
    }

    .yt-share-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .yt-copy-row {
        flex-direction: column;
    }

    .yt-top {
        right: 14px;
        bottom: 14px;
    }
}
