/*
Theme Name: TubeX V4 Perfect
Author: Bro Developer
Description: Replika 1:1 UI CumComing dengan Grid 5 Kolom, Pagination Custom, dan Ad Manager.
Version: 4.0
*/

:root {
    --bg-body: #0b0b0b;       /* Background utama sangat gelap */
    --bg-header-top: #380000; /* Merah gelap gradient start */
    --bg-header-bot: #4f0000; /* Merah gelap gradient end */
    --bg-nav: #0e0e0e;        /* Bar navigasi bawah header */
    --bg-card: #161616;
    --primary-red: #b91c1c;
    --text-white: #e1e1e1;
    --text-grey: #9ca3af;
    --pagination-bg: #27272a;
    --pagination-active: #3f3f46;
}

body {
    background-color: var(--bg-body);
    color: var(--text-white);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    font-size: 14px;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
* { box-sizing: border-box; }

/* --- HEADER --- */
.site-header {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    z-index: 1000;
}

/* Top Bar (Gradient Merah Gelap) */
.header-top {
    background: linear-gradient(to bottom, #420000 0%, #2b0000 100%);
    height: 60px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #5a0000;
}

.logo img { height: 35px; }
.logo-text { font-family: 'Impact', sans-serif; font-size: 28px; text-transform: uppercase; letter-spacing: 0.5px; color:#fff; display:flex; align-items:center; }
.logo-text span { color: #fff; }

/* Search Bar (Panjang & Putih) */
.search-container { flex: 1; margin: 0 40px; max-width: 650px; }
.search-form { display: flex; height: 36px; }
.search-form input {
    width: 100%;
    padding: 0 15px;
    border-radius: 4px 0 0 4px;
    border: none;
    outline: none;
    font-size: 14px;
    color: #333;
}
.search-form button {
    background: var(--primary-red);
    color: white;
    border: none;
    width: 50px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
}

/* Header Right Buttons */
.header-right { display: flex; align-items: center; gap: 12px; }
.btn-creators {
    background: #0f172a; /* Dark blue-ish black */
    border: 1px solid #1e293b;
    color: #cbd5e1;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: flex; align-items: center; gap: 6px;
    cursor: pointer;
}
.header-icon { font-size: 18px; color: #ccc; cursor: pointer; padding: 5px; }
.lang-select { display: flex; align-items: center; gap: 5px; font-size: 12px; cursor: pointer; }

.auth-btn {
    padding: 6px 16px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
}
.btn-login { background: #0f172a; border: 1px solid #333; color: #ccc; }
.btn-signup { background: #0f172a; border: 1px solid #333; color: #ccc; }
.btn-login:hover, .btn-signup:hover { background: #1e293b; color: #fff; }

/* Bottom Bar (Navigasi Hitam) */
.header-bottom {
    background: var(--bg-nav);
    height: 50px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-home { font-weight: 700; font-size: 14px; color: #fff; display: flex; align-items: center; gap: 8px; text-transform: uppercase; }
.nav-home i { color: var(--primary-red); font-size: 16px; }

.nav-filters { display: flex; gap: 6px; }
.filter-btn {
    background: #27272a;
    color: #71717a;
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}
.filter-btn.active { background: var(--primary-red); color: white; }

/* --- GRID LAYOUT (5 Kolom Strict) --- */
.main-container {
    width: 96%; /* Lebar container mirip referensi */
    max-width: 1800px;
    margin: 20px auto;
}

.video-grid {
    display: grid;
    /* KUNCI: 5 Kolom pada layar besar */
    grid-template-columns: repeat(5, 1fr); 
    gap: 16px;
}

/* Responsif manual agar layout tetap rapi */
@media (max-width: 1600px) { .video-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1200px) { .video-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .video-grid { grid-template-columns: 1fr; } }

.video-card {
    background: transparent;
    cursor: pointer;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}
.thumb-box {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}
.thumb-box img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s;
}
.video-card:hover .thumb-box img { transform: scale(1.05); opacity: 0.9; }

/* Overlays Thumbnail */
.overlay-top-right {
    position: absolute; top: 5px; right: 5px;
    background: rgba(0,0,0,0.6); padding: 2px 5px; border-radius: 3px;
    font-size: 10px; color: #fff; display: flex; align-items: center; gap: 3px;
}
.overlay-bottom-right {
    position: absolute; bottom: 5px; right: 5px;
    background: rgba(0,0,0,0.7); padding: 2px 4px; border-radius: 3px;
    font-size: 11px; color: #fff;
}
.overlay-bottom-left {
    position: absolute; bottom: 5px; left: 5px;
    font-size: 10px; color: #fff; text-shadow: 1px 1px 2px #000;
}

/* Info Card */
.card-info { padding: 8px 0; }
.card-icon { float: left; width: 24px; height: 24px; border-radius: 50%; margin-right: 8px; margin-top: 2px; }
.card-title {
    font-size: 13px; font-weight: 500; color: #e5e7eb;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; line-height: 1.3; margin-bottom: 4px;
}
.card-meta { font-size: 11px; color: #6b7280; display: flex; align-items: center; justify-content: space-between; }
.author-name { color: #3b82f6; } /* Warna biru nama author */

/* --- PAGINATION (Footer Style) --- */
.pagination-wrapper {
    margin: 40px 0;
    display: flex;
    justify-content: center;
    gap: 5px;
}
.page-numbers {
    background: #27272a;
    color: #a1a1aa;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #3f3f46;
    display: inline-block;
    min-width: 36px;
    text-align: center;
}
.page-numbers.current {
    background: #3f3f46; /* Lighter grey for active */
    color: #fff;
    border-color: #52525b;
}
.page-numbers.next {
    padding: 8px 20px;
}
.page-numbers:hover { background: #3f3f46; color: #fff; }

/* --- SINGLE PAGE --- */
.single-wrap { max-width: 1300px; margin: 20px auto; padding: 0 15px; }
.video-title-h1 { font-size: 20px; color: #fff; margin-bottom: 10px; text-transform: uppercase; font-weight: 700; }

.user-row { display: flex; align-items: center; margin-bottom: 15px; gap: 10px; }
.user-row img { width: 32px; height: 32px; border-radius: 50%; }
.user-row .username { font-weight: bold; font-size: 13px; color: #fff; }
.btn-subscribe { background: var(--primary-red); color: #fff; border: none; font-size: 11px; padding: 4px 10px; border-radius: 3px; font-weight: bold; cursor: pointer; text-transform: uppercase; }

.player-box {
    width: 100%;
    background: #000;
    margin-bottom: 10px;
    border: 1px solid #222;
}
/* Memaksa konten shortcode responsif */
.player-box iframe, .player-box video { width: 100%; aspect-ratio: 16/9; height: auto; display: block; }

.action-bar {
    background: #18181b;
    padding: 10px;
    border-radius: 4px;
    display: flex; justify-content: space-between; align-items: center;
    border: 1px solid #27272a;
}
.btn-action { background: #27272a; border: none; color: #a1a1aa; padding: 6px 12px; border-radius: 3px; cursor: pointer; font-size: 12px; margin-right: 5px; }
.btn-action:hover { color: #fff; background: #3f3f46; }

.tags-row { margin: 20px 0; }
.tag-pill { background: #27272a; color: #d4d4d8; padding: 4px 10px; border-radius: 3px; font-size: 11px; margin-right: 5px; display: inline-block; border: 1px solid #3f3f46; }

/* --- FOOTER (Mirip footer.png) --- */
.site-footer {
    background: #080808;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid #222;
}

/* 3 Ad Spots Container */
.footer-ads-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto 50px auto;
    flex-wrap: wrap;
}
.ad-box-footer {
    width: 300px;
    height: 250px;
    background: #111;
    border: 1px dashed #333;
    display: flex; align-items: center; justify-content: center;
    color: #444; font-size: 12px;
}

.section-label { color: #fff; font-size: 14px; font-weight: bold; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; text-transform: uppercase; }
.section-label i { color: var(--primary-red); }

.creators-strip { display: flex; justify-content: center; gap: 15px; margin-bottom: 40px; flex-wrap: wrap; }
.creator-bubble { text-align: center; width: 90px; }
.creator-bubble img { width: 70px; height: 70px; border-radius: 50%; border: 2px solid transparent; transition: 0.2s; object-fit: cover; }
.creator-bubble:hover img { border-color: var(--primary-red); }
.creator-bubble span { display: block; font-size: 11px; color: #aaa; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.trends-cloud { max-width: 1000px; margin: 0 auto 50px auto; text-align: center; }
.trend-pill { background: #1f2937; color: #9ca3af; padding: 5px 10px; font-size: 11px; border-radius: 3px; margin: 3px; display: inline-block; text-transform: capitalize; border: 1px solid #374151; }
.trend-pill:hover { background: #374151; color: #fff; }

/* Bottom Red Area */
.footer-bottom {
    background: linear-gradient(to bottom, #420000 0%, #2b0000 100%);
    padding: 30px 0;
    text-align: center;
    color: #ccc;
    border-top: 1px solid #5a0000;
}
.footer-links a { color: #fff; font-size: 11px; font-weight: bold; margin: 0 10px; text-transform: uppercase; }
.copyright-text { font-size: 10px; color: #999; margin-top: 15px; max-width: 800px; margin-left: auto; margin-right: auto; line-height: 1.4; }

/* --- MODAL (Login/Signup) --- */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); z-index: 2000; backdrop-filter: blur(2px);
    align-items: center; justify-content: center;
}
.modal-box {
    background: #111; border: 1px solid #333; width: 380px; padding: 30px; border-radius: 8px;
    position: relative; box-shadow: 0 20px 40px rgba(0,0,0,0.9);
}
.modal-box h2 { margin-top: 0; color: #fff; font-size: 18px; margin-bottom: 20px; text-transform: uppercase; }
.close-btn { position: absolute; top: 15px; right: 15px; color: #666; cursor: pointer; font-size: 20px; }

.inp-field { width: 100%; padding: 10px; margin-bottom: 12px; border-radius: 4px; border: none; background: #fff; font-size: 13px; color: #000; }
.btn-submit { width: 100%; background: var(--primary-red); color: #fff; padding: 10px; border: none; border-radius: 4px; font-weight: bold; cursor: pointer; margin-top: 10px; }
.btn-google { width: 100%; background: #2d2d2d; color: #fff; padding: 10px; border: none; border-radius: 4px; margin-bottom: 15px; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 13px; }
