/*
Theme Name: YouPro
Theme URI: https://example.com/youpro
Author: YouPro Team
Author URI: https://example.com
Description: Complete YouTube-style video platform theme with full Customizer control
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: youpro
Tags: video, youtube, responsive, customizer, dark-mode
*/


/* Reset */
*{margin:0;padding:0;box-sizing:border-box}
:root{--yp-primary:#ff0000;--yp-bg-primary:#fff;--yp-bg-secondary:#f9f9f9;--yp-text-primary:#0f0f0f;--yp-text-secondary:#606060;--yp-border:#e5e5e5;--yp-header-bg:#fff;--yp-button-bg:#065fd4;--yp-button-text:#fff;--yp-hover-bg:#f2f2f2;--yp-font-body:'Roboto',sans-serif;--yp-font-heading:'Roboto',sans-serif;--yp-font-size-base:14px;--yp-font-size-h1:20px;--yp-font-size-h2:16px;--yp-spacing-xs:4px;--yp-spacing-sm:8px;--yp-spacing-md:16px;--yp-spacing-lg:24px;--yp-spacing-xl:32px;--yp-header-height:56px;--yp-sidebar-width:240px;--yp-mobile-nav-height:56px}
body{font-family:var(--yp-font-body);font-size:var(--yp-font-size-base);color:var(--yp-text-primary);background-color:var(--yp-bg-primary);line-height:1.5}
body.dark-mode{--yp-bg-primary:#0f0f0f;--yp-bg-secondary:#212121;--yp-text-primary:#f1f1f1;--yp-text-secondary:#aaa;--yp-border:#3f3f3f;--yp-header-bg:#212121;--yp-hover-bg:#3f3f3f}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto;display:block}
button{font-family:inherit;cursor:pointer;border:none;background:none}
.yp-container{max-width:1280px;margin:0 auto;padding:0 var(--yp-spacing-md)}
.custom-logo-link {width: 120px;}

/* Category Bar */
.yp-category-bar{position:fixed;top:var(--yp-header-height);left:0;right:0;background:var(--yp-bg-primary);border-bottom:1px solid var(--yp-border);z-index:999;overflow-x:auto;overflow-y:hidden}
.yp-category-bar::-webkit-scrollbar{display:none}
.yp-category-list{display:flex;padding:var(--yp-spacing-sm) var(--yp-spacing-md);gap:var(--yp-spacing-sm);white-space:nowrap}
.yp-category-item{padding:8px 12px;background:var(--yp-bg-secondary);border-radius:8px;font-size:14px;font-weight:500;transition:all .2s}
.yp-category-item:hover{background:var(--yp-hover-bg)}
.yp-category-item.active{background:var(--yp-text-primary);color:var(--yp-bg-primary)}

/* Main Content */
.yp-main{margin-top:calc(var(--yp-header-height) + 52px);padding:var(--yp-spacing-lg) 0;min-height:calc(100vh - var(--yp-header-height) - 52px)}

/* Video Grid */
.yp-video-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:var(--yp-spacing-lg)}
.yp-video-card{cursor:pointer}
.yp-video-thumbnail{position:relative;width:100%;padding-bottom:56.25%;border-radius:12px;overflow:hidden;background:var(--yp-bg-secondary)}
.yp-video-thumbnail img{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover}
.yp-video-duration{position:absolute;bottom:8px;right:8px;background:rgba(0,0,0,.8);color:#fff;padding:2px 4px;border-radius:4px;font-size:12px;font-weight:500}
.yp-video-info{display:flex;gap:var(--yp-spacing-sm);margin-top:var(--yp-spacing-sm)}
.yp-channel-avatar{width:36px;height:36px;border-radius:50%;overflow:hidden;flex-shrink:0}
.yp-channel-avatar img{width:100%;height:100%;object-fit:cover}
.yp-video-details{flex:1}
.yp-video-title{font-size:var(--yp-font-size-h2);font-weight:500;line-height:1.4;margin-bottom:4px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.yp-video-meta{font-size:12px;color:var(--yp-text-secondary)}

/* Shorts Section */
.yp-shorts-section{margin:var(--yp-spacing-xl) 0}
.yp-section-title{font-size:var(--yp-font-size-h1);font-weight:500;margin-bottom:var(--yp-spacing-md);display:flex;align-items:center;gap:var(--yp-spacing-sm)}
.yp-shorts-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:var(--yp-spacing-md)}
.yp-short-card{cursor:pointer}
.yp-short-thumbnail{position:relative;width:100%;padding-bottom:177.78%;border-radius:12px;overflow:hidden;background:var(--yp-bg-secondary)}
.yp-short-thumbnail img{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover}
.yp-short-info{margin-top:var(--yp-spacing-sm)}
.yp-short-title{font-size:14px;font-weight:500;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.yp-short-views{font-size:12px;color:var(--yp-text-secondary);margin-top:4px}

/* Video Player Page */
.yp-video-page{display:grid;grid-template-columns:1fr 400px;gap:var(--yp-spacing-lg);max-width:1800px;margin:0 auto}
.yp-video-player-wrapper{position:relative;width:100%;padding-bottom:56.25%;background:#000;border-radius:12px;overflow:hidden}
.yp-video-player,.yp-video-embed{position:absolute;top:0;left:0;width:100%;height:100%}
.yp-video-info-section{margin-top:var(--yp-spacing-md)}
.yp-video-actions{display:flex;justify-content:space-between;align-items:center;margin-top:var(--yp-spacing-sm);padding:var(--yp-spacing-md) 0;border-bottom:1px solid var(--yp-border)}
.yp-action-buttons{display:flex;gap:var(--yp-spacing-sm)}
.yp-action-btn{display:flex;align-items:center;gap:var(--yp-spacing-xs);padding:10px 16px;background:var(--yp-bg-secondary);border-radius:20px;font-weight:500;transition:background .2s}
.yp-action-btn:hover{background:var(--yp-hover-bg)}
.yp-channel-info-section{display:flex;align-items:center;gap:var(--yp-spacing-md);padding:var(--yp-spacing-md) 0}
.yp-channel-details{flex:1}
.yp-channel-name{font-size:16px;font-weight:500;margin:0}
.yp-subscriber-count{font-size:12px;color:var(--yp-text-secondary)}
.yp-subscribe-btn{padding:10px 16px;background:var(--yp-primary);color:#fff;border-radius:20px;font-weight:500}
.yp-subscribe-btn.subscribed{background:var(--yp-bg-secondary);color:var(--yp-text-primary)}
.yp-video-sidebar{position:sticky;top:calc(var(--yp-header-height) + 60px);height:fit-content}
.yp-sidebar-videos{display:flex;flex-direction:column;gap:var(--yp-spacing-sm)}
.yp-ad-slot{margin:var(--yp-spacing-md) 0;padding:var(--yp-spacing-md);background:var(--yp-bg-secondary);border-radius:8px;text-align:center}

/* Mobile Navigation */
.yp-mobile-nav{display:none;position:fixed;bottom:0;left:0;right:0;height:var(--yp-mobile-nav-height);background:var(--yp-header-bg);border-top:1px solid var(--yp-border);z-index:1000}
.yp-mobile-nav-list{display:flex;height:100%}
.yp-mobile-nav-item{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:10px;color:var(--yp-text-secondary)}
.yp-mobile-nav-item.active{color:var(--yp-text-primary)}
.yp-mobile-nav-item svg{width:24px;height:24px}

/* Forms */
.yp-input,.yp-textarea,.yp-select{width:100%;padding:12px 16px;border:1px solid var(--yp-border);border-radius:8px;background:var(--yp-bg-primary);color:var(--yp-text-primary);font-size:14px;font-family:inherit;transition:border-color .2s}
.yp-input:focus,.yp-textarea:focus,.yp-select:focus{outline:none;border-color:var(--yp-button-bg)}
.yp-textarea{resize:vertical}
.yp-btn{padding:10px 20px;border:none;border-radius:8px;font-weight:500;font-size:14px;cursor:pointer;transition:all .2s}
.yp-btn-primary{background:var(--yp-button-bg);color:var(--yp-button-text)}
.yp-btn-primary:hover{opacity:.9}
.yp-btn-secondary{background:var(--yp-bg-secondary);color:var(--yp-text-primary)}
.yp-btn-secondary:hover{background:var(--yp-hover-bg)}
.yp-btn-block{width:100%;padding:14px;font-size:16px}

/* Dashboard */
.yp-dashboard{max-width:1400px;margin:0 auto}
.yp-dashboard-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:var(--yp-spacing-xl)}
.yp-analytics-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:var(--yp-spacing-lg);margin-bottom:var(--yp-spacing-xl)}
.yp-analytics-card{display:flex;align-items:center;gap:var(--yp-spacing-md);padding:var(--yp-spacing-lg);background:var(--yp-bg-primary);border:1px solid var(--yp-border);border-radius:12px}
.yp-card-icon{width:60px;height:60px;display:flex;align-items:center;justify-content:center;background:var(--yp-bg-secondary);border-radius:12px;color:var(--yp-button-bg)}
.yp-card-details h3{font-size:28px;font-weight:600;margin:0}
.yp-card-details p{color:var(--yp-text-secondary);font-size:14px;margin:4px 0 0}

/* Footer */
.yp-footer{background:var(--yp-bg-secondary);border-top:1px solid var(--yp-border);padding:var(--yp-spacing-xl) 0;margin-top:var(--yp-spacing-xl)}
.yp-footer-content{display:flex;flex-direction:column;align-items:center;gap:var(--yp-spacing-md)}
.yp-footer-menu{display:flex;flex-wrap:wrap;gap:var(--yp-spacing-md);list-style:none}
.yp-footer-menu a{color:var(--yp-text-secondary);font-size:14px;transition:color .2s}
.yp-footer-menu a:hover{color:var(--yp-text-primary)}
.yp-footer-copyright p{color:var(--yp-text-secondary);font-size:12px;text-align:center}

/* Responsive */
@media(max-width:1024px){.yp-video-page{grid-template-columns:1fr}.yp-video-sidebar{position:static}}
@media(max-width:768px){.yp-header-center{display:none}.yp-video-grid{grid-template-columns:1fr;gap:var(--yp-spacing-md)}.yp-shorts-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}.yp-mobile-nav{display:block}.yp-main{padding-bottom:calc(var(--yp-mobile-nav-height) + var(--yp-spacing-md))}}
@media(min-width:769px)and (max-width:1024px){.yp-video-grid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}}

/* Utility */
.yp-hidden{display:none!important}
.yp-text-center{text-align:center}
.yp-mt-lg{margin-top:var(--yp-spacing-lg)}
.yp-mb-lg{margin-bottom:var(--yp-spacing-lg)}

/* Theater Mode */
.yp-video-page.yp-theater-mode{background:#000}
.yp-video-page.yp-theater-mode .yp-video-player-wrapper{max-width:100%;border-radius:0}
.yp-video-page.yp-theater-mode .yp-video-sidebar{display:none}
.yp-video-page.yp-theater-mode{grid-template-columns:1fr}

/* Mini Player */
.yp-mini-player{animation:slideIn .3s ease}
@keyframes slideIn{from{transform:translateY(100px);opacity:0}to{transform:translateY(0);opacity:1}}

/* Video Player Controls */
.yp-player-controls{transition:opacity .3s}
.yp-video-player-wrapper:hover .yp-player-controls{display:block!important}

/* Playlist Modal */
#yp-playlist-modal{animation:fadeIn .3s}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
