/*
Theme Name: StarterVideo Theme
Theme URI: https://starter-theme.dev
Description: Dark video catalog theme — video grid, mega menu, featured slider, Customizer colors.
Version: 1.2.0
Author: StarterPlayer Team
License: GPL v2 or later
Text Domain: starter-theme
*/

:root {
    --st-bg:#0f0f0f; --st-bg2:#1a1a1a; --st-bg3:#242424;
    --st-card:#1e1e1e; --st-border:#2a2a2a;
    --st-text:#e4e4e4; --st-text2:#999;
    --st-accent:#6366f1; --st-accent-hover:#818cf8;
    --st-radius:8px; --st-max-w:1360px; --st-grid-cols:4; --st-slider-cols:4;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
body{font-family:'Inter','Noto Sans Thai',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;background:var(--st-bg);color:var(--st-text);line-height:1.6;font-size:14px;-webkit-font-smoothing:antialiased;}
a{color:inherit;text-decoration:none;transition:color .2s;}
img{max-width:100%;height:auto;display:block;}
.st-container{max-width:var(--st-max-w);margin:0 auto;padding:0 16px;}

/* ═══ HEADER ═══ */
.st-header{background:var(--st-bg2);position:sticky;top:0;z-index:1000;border-bottom:1px solid var(--st-border);}
.st-header-inner{display:flex;align-items:center;height:56px;max-width:var(--st-max-w);margin:0 auto;padding:0 16px;gap:16px;}
.st-logo a{font-size:20px;font-weight:800;color:var(--st-accent);white-space:nowrap;}
.st-logo img{height:32px;width:auto;}
.st-nav{display:flex;align-items:center;gap:2px;flex:1;overflow-x:auto;scrollbar-width:none;}
.st-nav::-webkit-scrollbar{display:none;}
.st-nav .menu-item a,.st-nav>a{padding:6px 14px;border-radius:6px;font-size:13px;font-weight:500;color:var(--st-text2);white-space:nowrap;transition:all .15s;}
.st-nav .menu-item a:hover,.st-nav>a:hover{color:#fff;background:var(--st-bg3);}
.st-nav .current-menu-item a,.st-nav .current_page_item a{color:#fff;background:var(--st-bg3);}
.st-nav ul{list-style:none;display:flex;gap:2px;}
.st-search{position:relative;min-width:200px;max-width:260px;}
.st-search form{display:flex;}
.st-search input{width:100%;padding:7px 12px 7px 32px;background:var(--st-bg3);border:1.5px solid var(--st-border);border-radius:20px;color:var(--st-text);font-size:13px;outline:none;}
.st-search input:focus{border-color:var(--st-accent);}
.st-search .st-search-icon{position:absolute;left:10px;top:50%;transform:translateY(-50%);font-size:13px;pointer-events:none;}
.st-header-right{display:flex;align-items:center;gap:10px;}
.st-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 16px;border-radius:6px;font-size:12.5px;font-weight:600;cursor:pointer;transition:all .15s;border:none;white-space:nowrap;}
.st-btn-primary{background:var(--st-accent);color:#fff;}
.st-btn-primary:hover{background:var(--st-accent-hover);color:#fff;}
.st-btn-ghost{background:transparent;color:var(--st-text2);border:1.5px solid var(--st-border);}
.st-btn-ghost:hover{border-color:var(--st-accent);color:#fff;}
.st-user-avatar{width:30px;height:30px;border-radius:50%;overflow:hidden;background:var(--st-bg3);}
.st-user-avatar img{width:100%;height:100%;object-fit:cover;}

/* ═══ MEGA BAR — HIDDEN by default, user controls via menu ═══ */
.st-mega-bar{display:none;}

/* ═══ MOBILE ═══ */
.st-mobile-toggle{display:none;background:none;border:none;color:var(--st-text);font-size:22px;cursor:pointer;padding:4px 8px;}
.st-mobile-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:1100;}
.st-mobile-overlay.open{display:block;}
.st-mobile-drawer{position:fixed;top:0;left:-280px;width:280px;height:100%;background:var(--st-bg2);z-index:1101;transition:left .3s;overflow-y:auto;display:flex;flex-direction:column;}
.st-mobile-drawer.open{left:0;}
.st-mobile-drawer-head{display:flex;justify-content:space-between;align-items:center;padding:16px;border-bottom:1px solid var(--st-border);font-weight:700;font-size:16px;}
.st-mobile-drawer-head button{background:none;border:none;color:var(--st-text);font-size:20px;cursor:pointer;}
.st-mobile-search{padding:12px 16px;}
.st-mobile-search input{width:100%;padding:10px 14px;background:var(--st-bg3);border:1.5px solid var(--st-border);border-radius:8px;color:var(--st-text);font-size:14px;outline:none;}
.st-mobile-links{flex:1;overflow-y:auto;padding:0 16px;}
.st-mobile-links a,.st-mobile-links .menu-item a{display:block;padding:10px 0;font-size:14px;color:var(--st-text2);border-bottom:1px solid var(--st-border);}
.st-mobile-links a:hover,.st-mobile-links .menu-item a:hover{color:#fff;}
.st-mobile-links ul{list-style:none;margin:0;padding:0;}
.st-mobile-links li{list-style:none;}
.st-mobile-divider{height:1px;background:var(--st-accent);margin:12px 0;opacity:.3;}
.st-mobile-user{padding:16px;border-top:1px solid var(--st-border);}
.st-mobile-user span{font-size:13px;color:var(--st-text2);}
.st-mobile-user a{font-size:13px;color:var(--st-accent);}
.st-mobile-user a.st-btn-primary{color:#fff!important;font-size:14px!important;}
.st-mobile-login-btn{display:flex!important;width:100%;justify-content:center;padding:12px 16px!important;font-size:14px!important;color:#fff!important;background:var(--st-accent)!important;border-radius:8px;text-align:center;}

/* ═══ MOBILE: login button must show text ═══ */
.st-header-right .st-btn-primary{min-width:auto;font-size:12.5px;padding:7px 16px;}

@media(max-width:900px){
    .st-desktop-only{display:none!important;}
    .st-mobile-toggle{display:block;}
    .st-nav{display:none;}
    /* Mobile login button in header — SHOW TEXT */
    .st-header-right{display:flex!important;}
    .st-header-right .st-btn-primary{font-size:11px;padding:6px 12px;min-width:80px;text-align:center;justify-content:center;}
    .st-header-right .st-user-avatar{width:28px;height:28px;}
    .st-header-right .st-btn-ghost{font-size:10px;padding:5px 10px;}
}

/* ═══ FEATURED SLIDER — 5 slides visible on desktop ═══ */
.st-slider-section{padding:16px 0 8px;}
.st-slider{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:0;cursor:grab;user-select:none;-webkit-user-select:none;}
.st-slider::-webkit-scrollbar{display:none;}
.st-slider.grabbing{cursor:grabbing;}
.st-slide{flex:0 0 calc(100% / var(--st-slider-cols) - 8px);scroll-snap-align:start;position:relative;border-radius:var(--st-radius);overflow:hidden;aspect-ratio:16/9;background:var(--st-bg3);}
.st-slide img{width:100%;height:100%;object-fit:cover;transition:transform .4s;pointer-events:none;}
.st-slide:hover img{transform:scale(1.05);}
.st-slide-overlay{position:absolute;inset:0;background:linear-gradient(transparent 50%,rgba(0,0,0,.85));display:flex;align-items:flex-end;padding:10px;}
.st-slide-title{font-size:12px;font-weight:600;color:#fff;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.st-slide-badge{position:absolute;top:6px;left:6px;background:var(--st-accent);color:#fff;padding:2px 8px;border-radius:4px;font-size:10px;font-weight:700;}
@media(max-width:1200px){.st-slide{flex:0 0 calc(25% - 8px);}}
@media(max-width:900px){.st-slide{flex:0 0 calc(33.333% - 7px);}}
@media(max-width:600px){.st-slide{flex:0 0 calc(50% - 5px);}}

/* ═══ SECTION HEADERS ═══ */
.st-section{padding:20px 0;}
.st-section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;}
.st-section-head h2{font-size:17px;font-weight:700;display:flex;align-items:center;gap:8px;}
.st-section-head h2 span{font-size:11px;color:var(--st-accent);background:rgba(99,102,241,.12);padding:3px 10px;border-radius:4px;font-weight:600;}

/* ═══ VIDEO GRID — LARGE thumbnails matching slider size ═══ */
.st-grid{display:grid;grid-template-columns:repeat(var(--st-grid-cols),1fr);gap:12px;}
.st-card{background:var(--st-card);border-radius:var(--st-radius);overflow:hidden;transition:transform .2s,box-shadow .2s;}
.st-card:hover{transform:translateY(-3px);box-shadow:0 10px 30px rgba(0,0,0,.5);}
.st-card-thumb{position:relative;aspect-ratio:16/9;overflow:hidden;background:var(--st-bg3);}
.st-card-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .35s;}
.st-card:hover .st-card-thumb img{transform:scale(1.06);}
.st-card-duration{position:absolute;bottom:6px;right:6px;background:rgba(0,0,0,.85);color:#fff;padding:1px 7px;border-radius:3px;font-size:11px;font-weight:600;}
.st-card-body{padding:8px 10px 10px;}
/* ═══ TITLE 3 lines (was 2) ═══ */
.st-card-title{font-size:12.5px;font-weight:500;line-height:1.45;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;margin-bottom:4px;}
.st-card-title a:hover{color:var(--st-accent-hover);}
.st-card-meta{display:flex;align-items:center;gap:10px;font-size:11px;color:var(--st-text2);}
.st-card-meta span{display:flex;align-items:center;gap:3px;}
.st-card-tags{display:flex;flex-wrap:wrap;gap:3px;margin-top:5px;}
.st-card-tags a{font-size:10px;background:var(--st-bg3);color:var(--st-text2);padding:2px 7px;border-radius:3px;}
.st-card-tags a:hover{background:var(--st-accent);color:#fff;}

@media(max-width:1200px){:root{--st-grid-cols:4;}}
@media(max-width:900px){:root{--st-grid-cols:3;}}
@media(max-width:600px){:root{--st-grid-cols:2;}.st-card-body{padding:6px 8px;}.st-card-title{font-size:11.5px;-webkit-line-clamp:2;}}

/* ═══ PAGINATION ═══ */
.st-pagination{display:flex;justify-content:center;gap:5px;padding:28px 0;flex-wrap:wrap;}
.st-pagination a,.st-pagination span{display:inline-flex;align-items:center;justify-content:center;min-width:36px;height:36px;padding:0 10px;border-radius:6px;font-size:13px;font-weight:500;background:var(--st-card);color:var(--st-text2);border:1px solid var(--st-border);}
.st-pagination a:hover{border-color:var(--st-accent);color:#fff;}
.st-pagination .current{background:var(--st-accent);color:#fff;border-color:var(--st-accent);}

/* ═══ SINGLE VIDEO PAGE ═══ */
.st-single{padding:20px 0;}
.st-single-poster{margin-bottom:16px;border-radius:var(--st-radius);overflow:hidden;}
.st-single-poster img{width:100%;height:auto;display:block;}
/* Content area — NO fixed aspect-ratio, content flows naturally */
.st-single-content-area{margin-bottom:16px;border-radius:var(--st-radius);overflow:hidden;}
/* Player inside content — let it size naturally */
.st-single-content-area .fluid_video_wrapper,
.st-single-content-area .spp-container,
.st-single-content-area video{width:100%!important;max-width:100%;border-radius:var(--st-radius);}
/* Vertical video support — don't force 16:9, let it be natural */
.st-single-content-area video[style*="height"]{max-height:80vh;}
/* Lock screen / VIP content details — show fully, no overflow hidden */
.st-single-content-area p,
.st-single-content-area div,
.st-single-content-area .vcl-lock-content,
.st-single-content-area .spp-lock-overlay{overflow:visible!important;max-height:none!important;}
/* ═══ FULLSCREEN FIX ═══ */
.st-single-content-area:fullscreen,
.st-single-content-area:-webkit-full-screen{overflow:visible!important;border-radius:0!important;width:100vw!important;height:100vh!important;max-height:none!important;max-width:none!important;background:#000;}
.fluid_video_wrapper:fullscreen,.fluid_video_wrapper:-webkit-full-screen,
.spp-container:fullscreen,.spp-container:-webkit-full-screen,
video:fullscreen,video:-webkit-full-screen{width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;border-radius:0!important;object-fit:contain;background:#000;}
:fullscreen .fluid_video_wrapper,:fullscreen .spp-container,:fullscreen video,
:-webkit-full-screen .fluid_video_wrapper,:-webkit-full-screen .spp-container,:-webkit-full-screen video{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;border-radius:0!important;}

.st-single-title{font-size:18px;font-weight:700;margin-bottom:10px;}
.st-single-meta{display:flex;align-items:center;gap:14px;font-size:13px;color:var(--st-text2);margin-bottom:14px;flex-wrap:wrap;}
.st-single-meta span{display:flex;align-items:center;gap:4px;}
.st-single-tags{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:20px;}
.st-single-tags a{font-size:12px;background:var(--st-bg3);color:var(--st-text2);padding:5px 14px;border-radius:20px;}
.st-single-tags a:hover{background:var(--st-accent);color:#fff;}
.st-related-section{margin-top:28px;}
.st-single-content{background:var(--st-card);border-radius:var(--st-radius);padding:20px;line-height:1.8;}

/* ═══ ARCHIVE / SEARCH ═══ */
.st-archive-header{padding:24px 0 8px;}
.st-archive-header h1{font-size:22px;font-weight:700;margin-bottom:4px;}
.st-archive-header p{color:var(--st-text2);font-size:13px;}
.st-tag-cloud{display:flex;flex-wrap:wrap;gap:5px;margin:12px 0;}
.st-tag-cloud a{font-size:11.5px;background:var(--st-bg3);color:var(--st-text2);padding:5px 14px;border-radius:20px;}
.st-tag-cloud a:hover{background:var(--st-accent);color:#fff;}

/* ═══ 404 ═══ */
.st-404{text-align:center;padding:80px 20px;}
.st-404 h1{font-size:64px;font-weight:800;color:var(--st-accent);margin-bottom:10px;}
.st-404 p{font-size:16px;color:var(--st-text2);margin-bottom:20px;}

/* ═══ FOOTER ═══ */
.st-footer{background:var(--st-bg2);border-top:1px solid var(--st-border);padding:24px 0;margin-top:30px;}
.st-footer-inner{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;max-width:var(--st-max-w);margin:0 auto;padding:0 16px;}
.st-footer-copy{font-size:12px;color:var(--st-text2);}
.st-footer-links{display:flex;gap:14px;}
.st-footer-links a{font-size:12px;color:var(--st-text2);}
.st-footer-links a:hover{color:var(--st-accent);}

/* ═══ SIDEBAR ═══ */
.st-sidebar .widget{background:var(--st-card);border-radius:var(--st-radius);padding:14px;margin-bottom:14px;}
.st-sidebar .widget-title{font-size:13px;font-weight:700;margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid var(--st-border);}

.screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!important;height:1px;width:1px;overflow:hidden;}
