/* Theme the existing gallery DOM; the cross-origin YouTube player keeps its native UI. */
.videos-page { max-width: 1200px; padding-block: 3.5rem 4rem; }
.videos-page-header { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 2rem; }
.videos-page-header > div { max-width: 720px; }
.videos-page-header h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; letter-spacing: -.045em; margin: 1rem 0; }
.videos-page-header p { color: var(--text-muted); line-height: 1.8; font-size: .95rem; }
.video-gallery-surface { border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--panel-shadow); background: var(--surface-raised); overflow: hidden; min-width: 0; }
.video-gallery-surface > p { padding: 1.5rem; }
.videos-page .yottie-widget { width: 100% !important; max-width: 100% !important; font-family: var(--font) !important; color: var(--text-main) !important; background: var(--bg-card) !important; }
.videos-page .yottie-widget-inner, .videos-page .yottie-widget-contents, .videos-page .yottie-widget-feed, .videos-page .yottie-widget-feed-section, .videos-page .yottie-widget-feed-section-inner, .videos-page .yottie-widget-feed-section-slide { background: transparent !important; }
/* Swiper moves its track with transforms. Browser focus/scrolling must not add a second offset. */
.videos-page .yottie-widget-feed-section-inner { overflow: clip !important; }
.videos-page .yottie-widget-header { background: var(--surface-raised) !important; }
.videos-page .yottie-widget-header-channel-title a { color: var(--text-main) !important; }
.videos-page .yottie-widget-header-channel-title a:hover { color: var(--accent) !important; }
.videos-page .yottie-widget-header-channel-caption, .videos-page .yottie-widget-header-channel-properties, .videos-page .yottie-widget-header-channel-properties-item { color: var(--text-muted) !important; }
.videos-page .yottie-widget-header-channel-caption a { color: var(--accent) !important; }
.videos-page .yottie-widget-nav { background: var(--bg-main) !important; border-block: 1px solid var(--border); }
.videos-page .yottie-widget-nav-list-item { color: var(--text-muted) !important; }
.videos-page .yottie-widget-nav-list-item a, .videos-page .yottie-widget-nav-list-item span { color: inherit !important; }
.videos-page .yottie-widget-nav-list-item:hover, .videos-page .yottie-widget-nav-list-item.yottie-active { color: var(--accent) !important; }
.videos-page .yottie-widget-nav-list-item.yottie-active { background: color-mix(in srgb, var(--accent) 10%, transparent) !important; }
.videos-page .yottie-widget-nav-list-item.yottie-active::after, .videos-page .yottie-widget-nav-list-item.yottie-active::before { background-color: var(--accent) !important; }
.videos-page .yottie-widget-nav-list-item:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.videos-page .yottie-widget-nav-control { background: var(--bg-main) !important; color: var(--text-main) !important; }
.videos-page .yottie-widget-nav-control-left::before { background: linear-gradient(to left, transparent, var(--bg-main) 60%) !important; }
.videos-page .yottie-widget-nav-control-right::before { background: linear-gradient(to right, transparent, var(--bg-main) 60%) !important; }
.videos-page .yottie-widget-nav-control svg { fill: var(--text-main) !important; }
.videos-page .yottie-widget-nav-control span::before, .videos-page .yottie-widget-nav-control span::after { background: currentColor !important; }
.videos-page .yottie-widget-video { background: var(--bg-card) !important; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-sizing: border-box; }
.videos-page .yottie-widget-video-info { background: var(--bg-card) !important; }
.videos-page .yottie-widget-video-info-title { color: var(--text-main) !important; }
.videos-page .yottie-widget-video-info-caption, .videos-page .yottie-widget-video-info-passed-time, .videos-page .yottie-widget-video-info-properties, .videos-page .yottie-widget-video-info-properties-item { color: var(--text-muted) !important; }
.videos-page .yottie-widget-video-info-caption a { color: var(--accent) !important; }
.videos-page .yottie-widget-video-overlay { background: color-mix(in srgb, var(--bg-card) 94%, transparent) !important; color: var(--text-main) !important; }
.videos-page .yottie-widget-feed-section-arrow { width: 44px !important; height: 44px !important; background: var(--bg-card) !important; color: var(--text-main) !important; border: 1px solid var(--border); box-shadow: var(--panel-shadow); cursor: pointer; }
.videos-page .yottie-widget-feed-section-arrow span { margin: 14px 17px !important; }
.videos-page .yottie-widget-feed-section-arrow span::before, .videos-page .yottie-widget-feed-section-arrow span::after, .videos-page .yottie-widget-feed-section-arrow::before { background: currentColor !important; }
.videos-page .yottie-widget-feed-section-arrow:hover { color: var(--accent) !important; background: var(--bg-card-hover) !important; }
.videos-page .yottie-widget-feed-section-pagination { padding-block: 1rem !important; }
.videos-page .yottie-widget-feed-section-pagination-bullet { min-width: 44px !important; height: 44px !important; padding: 0 .5rem !important; margin: .2rem !important; line-height: 42px !important; border: 1px solid var(--border); border-radius: 10px !important; background: var(--bg-main) !important; color: var(--text-main) !important; font: 600 .85rem/42px var(--font) !important; cursor: pointer; }
.videos-page .yottie-widget-feed-section-pagination-bullet:hover { background: var(--bg-card-hover) !important; color: var(--accent) !important; }
.videos-page .yottie-widget-feed-section-pagination-bullet.swiper-pagination-bullet-active { background: var(--accent) !important; border-color: var(--accent); color: #0b0f19 !important; }
.videos-page .yottie-widget-feed-section-pagination-bullet-more::before, .videos-page .yottie-widget-feed-section-pagination-bullet-more::after { background: currentColor !important; top: 21px !important; }
.videos-page .yottie-widget-feed-section-arrow:focus-visible, .videos-page .yottie-widget-feed-section-pagination-bullet:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.videos-page .yottie-error-content { background: var(--bg-card) !important; color: var(--text-main) !important; }
.yottie-popup-inner, .yottie-popup-content, .yottie-popup-video, .yottie-popup-video-info { background: var(--bg-card) !important; color: var(--text-main) !important; }
.yottie-popup-overlay { background: #020617d9 !important; }
.yottie-popup-video-title, .yottie-popup-video-channel-name, .yottie-popup-video-channel-name a, .yottie-popup-video-description, .yottie-popup-video-comments-item-text { color: var(--text-main) !important; }
.yottie-popup-video-info a, .yottie-popup-video-description a, .yottie-popup-video-comments-item-name { color: var(--accent) !important; }
.yottie-popup-video-passed-time, .yottie-popup-video-counters, .yottie-popup-video-comments-item-time { color: var(--text-muted) !important; }
.yottie-popup-close, .yottie-popup-control { color: var(--text-main) !important; }
.video-player-open { overflow: hidden; }
.video-player-dialog:not([open]) { display: none; }
.video-player-dialog { position: fixed; inset: 0; width: min(1060px, calc(100% - 2rem)); max-width: none; max-height: calc(100dvh - 2rem); margin: auto; padding: 1.5rem; overflow: auto; overscroll-behavior: contain; color: var(--text-main); background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 25px 100px #0006; }
.video-player-dialog::backdrop { background: #020617d9; backdrop-filter: blur(6px); }
.video-player-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.25rem; }
.video-player-heading h2 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); line-height: 1.45; margin-top: .65rem; letter-spacing: -.025em; }
.video-player-close { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-main); color: var(--text-main); font-size: 1.5rem; cursor: pointer; }
.video-player-frame { aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.video-player-frame iframe { display: block; width: 100% !important; height: 100% !important; border: 0; }
.video-player-links { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .75rem 1rem; margin-top: 1rem; }
.video-player-links a { color: var(--accent); font-size: .85rem; }
.video-player-links > span { color: var(--text-muted); font-size: .7rem; }
.video-player-description { border-top: 1px solid var(--border); margin-top: 1.25rem; padding-top: 1rem; }
.video-player-description summary { cursor: pointer; font-size: .85rem; font-weight: 600; }
.video-player-description p { white-space: pre-line; overflow-wrap: anywhere; margin-top: 1rem; color: var(--text-muted); font-size: .85rem; line-height: 1.8; }
.video-playlists { margin-top: 2rem; border: 1px solid var(--border); border-radius: 14px; padding: 1.25rem; background: var(--surface-raised); }
.video-playlists summary { display: flex; justify-content: space-between; gap: 1rem; cursor: pointer; font-size: .9rem; font-weight: 600; list-style: none; }
.video-playlists summary::-webkit-details-marker { display: none; }
.video-playlists summary > span { color: var(--accent); }
.video-playlists > p { font-size: .8rem; color: var(--text-muted); margin-top: .75rem; }
.video-playlist-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; margin-top: 1rem; }
.video-playlist-grid article { padding: 1rem; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-main); }
.video-playlist-grid h2 { font-size: .85rem; line-height: 1.5; margin-bottom: .65rem; }
.video-playlist-grid a { display: block; color: var(--accent); font-size: .8rem; padding-block: .3rem; }
@media (max-width: 700px) {
    .videos-page { padding-top: 2rem; }
    .video-playlist-grid { grid-template-columns: minmax(0, 1fr); }
    .videos-page .yottie-widget-header { padding-inline: .75rem !important; }
    .video-player-dialog { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); padding: 1rem; border-radius: 14px; }
    .video-player-heading { gap: 1rem; }
}
