/* Shared YouTube section styles — used by channel.php and movies.php */
.channel-section {
    scroll-margin-top: 20px;
    margin-bottom: 40px;
}
.channel-section h2 {
    color: #ffd84d;
    font-size: 24px;
    padding: 10px 0 5px;
    border-bottom: 2px solid rgba(255,216,77,0.3);
    margin-bottom: 15px;
}
.channel-desc {
    color: #898fa8;
    font-size: 14px;
    margin-bottom: 15px;
}
#yt-panel {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 16px;
}
#yt-search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}
#yt-query {
    flex: 1;
    padding: 11px 16px;
    border: none;
    border-radius: 25px;
    background: #1a1a3e;
    color: white;
    font-size: 14px;
    outline: 1px solid rgba(255,255,255,0.1);
}
#yt-query:focus {
    outline-color: #e50914;
}
#yt-search-btn {
    background: #e50914;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
}
#yt-search-btn:hover {
    background: #ff0a16;
}
#yt-embed-frame {
    position: relative;
    width: 100%;
}
#yt-embed-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}
#yt-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
#yt-iframe iframe {
    width: 100% !important;
    height: 100% !important;
    border: none;
}
#yt-local-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
    display: none;
}
/* Google IMA ad layer shown over the YouTube embed while a pre-roll plays */
#yt-ima-ad-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 6;
    background: #000;
    display: none;
}
/* Groove frame on desktop; inner wrap stays 16:9 so the video fills the full width */
@media screen and (min-width: 1024px) {
    #yt-embed-frame {
        border: 42px groove black;
        border-bottom: 50px groove black;
        border-radius: 0;
    }
    #yt-embed-wrap {
        border-radius: 0;
    }
}
/* Fullscreen (Enlarge): keep the groove border, but stop the width-driven
   16:9 padding from overflowing the bottom edge. Instead the wrap fills the
   space INSIDE the border (height:100% resolves to the frame's content box,
   i.e. viewport minus border), and YouTube letterboxes the video within it. */
#yt-embed-frame.yt-section-fs #yt-embed-wrap {
    padding-top: 0;
    height: 100%;
    border-radius: 0;
}
/* Mobile portrait: give the YouTube player full width (edge to edge) so
   movies play as wide as the screen. Removes the stacked container padding
   (#right-display + #yt-panel) and pulls the section out to the viewport. */
@media screen and (max-width: 768px) {
    #yt-section {
        width: 100vw;
        margin-left: calc(50% - 50vw);
    }
    #yt-panel {
        padding: 0;
        border: 0;
        background: transparent;
    }
    #yt-search-bar {
        padding: 0 8px;
    }
    #yt-movies-list {
        padding: 0 8px;
    }
}
/* ========== PLAYER CONTROLS (match home screen player) ========== */
#yt-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
}
#yt-speaker-mute {
    width: 30px;
    height: 21px;
    border-radius: 50%;
    cursor: pointer;
}
#yt-volumeControl {
    -webkit-appearance: none;
    appearance: none;
    background: #333;
    height: 4px;
    border-radius: 5px;
    width: 90px;
}
#yt-volumeControl::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff0000;
    cursor: pointer;
    border: none;
}
#yt-volumeControl::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: red !important;
    cursor: pointer;
    border: none;
}
#yt-volumeControl::-ms-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: red !important;
    cursor: pointer;
}
#yt-play {
    width: 55px;
    height: 22px;
    font-size: 12px;
    color: #ffffff;
    background: green;
    border-radius: 9px;
    cursor: pointer;
    border: none;
    box-shadow: 2px 2px 2px #000000;
}
#yt-play:hover {
    transform: translateY(1.5px);
}
#yt-pause {
    width: 55px;
    height: 22px;
    font-size: 12px;
    color: #ffffff;
    background: maroon;
    border-radius: 9px;
    cursor: pointer;
    border: none;
    box-shadow: 2px 2px 2px #000000;
}
#yt-pause:hover {
    transform: translateY(1.5px);
}
#yt-upload {
    position: relative;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: blue;
    cursor: pointer;
    border: none;
    overflow: hidden;
}
#yt-fileInput {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0;
    cursor: pointer;
}
#yt-resize {
    width: 26px;
    height: 26px;
    background: #000000;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#yt-zoom-image {
    width: 18px;
    height: 18px;
    object-fit: contain;
}
@media screen and (max-width: 480px) {
    #yt-controls {
        gap: 8px;
    }
    #yt-play,
    #yt-pause {
        width: 48px;
        height: 18px;
        font-size: 10px;
    }
    #yt-volumeControl {
        width: 70px;
    }
    #yt-speaker-mute {
        width: 22px;
        height: 15px;
    }
    #yt-upload {
        width: 22px;
        height: 22px;
    }
    #yt-resize {
        width: 22px;
        height: 22px;
    }
}
#yt-movies-list {
    margin-top: 18px;
}
#yt-movies-list h3 {
    color: #ffd84d;
    font-size: 15px;
    margin-bottom: 12px;
}
.yt-movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.yt-movie-card {
    position: relative;
    background: #141633;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.2s, border-color 0.2s;
}
.yt-movie-card:hover {
    transform: scale(1.03);
    border-color: #e50914;
}
.yt-movie-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}
.yt-movie-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 44px;
    height: 44px;
    background: rgba(229,9,20,0.92);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    padding-left: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    pointer-events: none;
}
.yt-movie-card p {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
