/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress Child Theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/* --- DARK MODE TUBE THEME START --- */

/* 1. Global Colors */
body, 
.site-content, 
.site-header, 
.site-footer, 
.inside-header, 
.inside-footer, 
.sidebar, 
.widget, 
.main-navigation, 
.main-navigation ul ul {
    background-color: #121212 !important;
    color: #e0e0e0 !important;
}

/* 2. Typography */
h1, h2, h3, h4, h5, h6, 
.entry-title a, 
.widget-title, 
.main-title a {
    color: #ffffff !important;
}

/* 3. Links */
a {
    color: #bb86fc;
    text-decoration: none;
}
a:hover {
    color: #ffffff;
}

/* 4. Content Area (Box) */
.inside-article, 
.comments-area, 
.page-header {
    background-color: #1e1e1e !important;
    border: 1px solid #333;
    box-shadow: none !important;
}

/* 5. Inputs & Form Elements */
input[type="text"], 
input[type="email"], 
input[type="url"], 
input[type="password"], 
input[type="search"], 
textarea, 
select {
    background-color: #2c2c2c !important;
    color: #ffffff !important;
    border: 1px solid #444 !important;
}

/* 6. Navigation Menu */
.main-navigation .main-nav ul li a {
    color: #e0e0e0 !important;
}
.main-navigation .main-nav ul li:hover > a, 
.main-navigation .main-nav ul li.current-menu-item > a {
    background-color: #333 !important;
    color: #ffffff !important;
}

/* 7. Footer */
.site-footer {
    display: none !important; /* Hide Default GP Footer */
}

/* Custom Skyli Footer */
.skyli-footer {
    background-color: #1e1e1e;
    border-top: 1px solid #333;
    padding: 40px 20px;
    margin-top: 40px;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.footer-logo h2 {
    margin: 0;
    color: #fff;
    font-size: 24px;
    letter-spacing: 1px;
}
.footer-links {
    display: flex;
    gap: 20px;
}
.footer-links a {
    color: #b0b0b0;
    font-size: 14px;
    transition: color 0.3s ease;
}
.footer-links a:hover {
    color: #fff;
}
.footer-copyright {
    color: #666;
    font-size: 13px;
}

/* Mobile Footer */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

/* 8. Tube Grid Specific (Video Cards) */
/* 13. Video Archive Grid */
.tube-archive-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}
@media(max-width:1024px) { .tube-archive-grid { grid-template-columns: repeat(4, 1fr) !important; } }
@media(max-width:768px) { .tube-archive-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 10px; } }
@media(max-width:480px) { .tube-archive-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; } }

/* Video Card & Overlays */
.vid-card { margin-bottom: 20px; text-align: center; position: relative; }
.vid-thumb {
    display: block;
    aspect-ratio: 2/3; 
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    z-index: 1;
}
.vid-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* CSS handle cropping visual */
    transition: transform 0.3s;
    position: relative;
    z-index: 1;
}
.vid-thumb:hover img { transform: scale(1.05); }

/* Overlays */
.vid-views {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0,0,0,0.8) !important;
    color: #fff !important;
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 3px;
    pointer-events: none;
    z-index: 10 !important;
}
.vid-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 5 !important;
}
.vid-title {
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    margin: 0 auto;
    max-width: 95%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
}
.vid-title a { color: #e0e0e0; text-decoration: none; }
.vid-title a:hover { color: #bb86fc; }

/* 9. Player & Tabs */
.lin-video-tabs button {
    background-color: #333 !important;
    color: #e0e0e0 !important;
}
.lin-video-tabs button:hover, 
.lin-video-tabs button[style*="#222"] { /* Active state override */
    background-color: #bb86fc !important;
    color: #000 !important;
}

/* 10. Scrollbar (Chrome/Edge/Safari) */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #121212;
}
::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 11. Custom Navbar (Comicshelf Style) */
.navbar { 
    position: sticky; 
    top: 0; 
    z-index: 9999; 
    width: 100%; 
    display: flex; 
    justify-content: center; 
    flex-wrap: wrap; 
    align-items: center; 
    padding: 10px 12px; 
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, transform 0.3s ease; 
} 

/* Transparan blur awal (Mobile) */ 
@media (max-width: 768px) { 
    .navbar { 
        background-color: rgba(24, 24, 24, 0.6); 
        backdrop-filter: blur(10px); 
    } 
    .navbar.solid { 
        background-color: #181818; 
        backdrop-filter: none; 
    } 
    .navbar.hidden { 
        transform: translateY(-100%); 
    } 
    /* Hide Default Header on Mobile if needed, but we do global hide below */
} 

/* Desktop tetap solid */ 
@media (min-width: 769px) { 
    .navbar { 
        background-color: #181818; 
        box-shadow: 0 2px 4px rgba(0,0,0,.4); 
    } 
} 

.navbar a { 
    color: #ccc; 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 14px; 
    margin: 6px 10px; 
    padding: 6px 10px; 
    border-radius: 6px; 
    transition: 0.2s; 
    text-align: center; 
} 

.navbar a:hover, 
.navbar a.active,
.navbar a.current-menu-item { /* Support WP active class */
    background: #0d47a1; 
    color: #fff; 
} 

/* Mobile layout */ 
@media (max-width: 768px) { 
    .navbar { 
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        padding: 10px;
    } 
    .navbar a { 
        font-size: 12px; 
        margin: 0; 
        padding: 8px 4px; 
        /* 3 Kolom Presisi: (100% - 2*gap) / 3 */
        flex: 0 0 calc((100% - 16px) / 3);
        max-width: calc((100% - 16px) / 3);
        
        background: #222;
        border: 1px solid #333;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        height: 40px; /* Tinggi fix biar rapi */
        line-height: 1.2;
    } 
    .navbar a.active {
        background: #0d47a1;
        border-color: #0d47a1;
    }
    .navbar a.tpd { 
        /* Partner Khusus Paling Bawah Full Width */
        flex: 0 0 100%; 
        max-width: 100%;
        margin-top: 5px;
        background: #222; 
        color: #ccc;
        font-weight: 600;
        letter-spacing: 0.5px;
    } 
}

/* HIDE DEFAULT HEADER & NAV */
.site-header, 
.main-navigation {
    display: none !important;
}

/* 12. Custom Pagination (Simple Numbered) */
.tube-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.tube-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    background: #2c2c2c;
    color: #e0e0e0;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #444;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}
.tube-pagination .page-numbers:hover {
    background: #444;
    color: #fff;
    border-color: #555;
}
.tube-pagination .page-numbers.current {
    background: #bb86fc; /* Active Color */
    color: #000;
    border-color: #bb86fc;
}
.tube-pagination .page-numbers.dots {
    background: transparent;
    border: none;
    color: #777;
    cursor: default;
}

/* --- DARK MODE TUBE THEME END --- */