/*
Theme Name: TubeX V5 Final
Author: Bro Developer
Description: Grid Home 6 Kolom (Rapat) & Single Page V3 Layout.
Version: 5.0
*/

:root {
    --bg-body: #0b0b0b;
    --bg-header-top: #380000;
    --bg-nav: #0e0e0e;
    --bg-card: #161616;
    --primary-red: #b91c1c;
    --text-white: #e1e1e1;
    --text-grey: #9ca3af;
}

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 (Sama seperti V4 - Sudah OK) --- */
.site-header { display: flex; flex-direction: column; width: 100%; position: relative; z-index: 1000; }
.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-text { font-family: 'Impact', sans-serif; font-size: 28px; text-transform: uppercase; color:#fff; display:flex; align-items:center; }
.logo-text span { color: #fff; }
.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 { display: flex; align-items: center; gap: 12px; }
.btn-creators { background: #0f172a; 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; }
.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; }

.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 (FIXED: 6 Columns Rapat) --- */
.main-container {
    width: 98%; /* Lebih lebar agar muat 6 kolom */
    max-width: 1920px;
    margin: 20px auto;
    padding: 0 10px;
}

.video-grid {
    display: grid;
    /* PERBAIKAN DISINI: Menggunakan minmax lebih kecil (210px) agar muat 6 kolom di 1400px+ */
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px; /* Gap diperkecil agar rapat */
}

/* Hardcode Breakpoints agar persis referensi */
@media (min-width: 1600px) { .video-grid { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 1599px) and (min-width: 1300px) { .video-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1299px) and (min-width: 1000px) { .video-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 999px) { .video-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }

.video-card { background: transparent; cursor: pointer; position: relative; border-radius: 4px; overflow: hidden; }
.thumb-box { position: relative; width: 100%; padding-top: 56.25%; 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; }

.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; }
.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; }

/* --- SINGLE PAGE (KEMBALI KE V3) --- */
.single-wrap { max-width: 1400px; margin: 0 auto; padding: 20px; }
.video-main-title { font-size: 18px; color: #fff; margin-bottom: 15px; text-transform: uppercase; font-weight: bold; }
.user-strip { display: flex; align-items: center; margin-bottom: 15px; gap: 10px; }
.user-strip img { width: 30px; height: 30px; border-radius: 50%; }
.user-strip span { font-weight: bold; font-size: 13px; color: #fff; }
.btn-follow { background: var(--primary-red); color: #fff; padding: 4px 10px; font-size: 11px; border-radius: 3px; border:none; cursor:pointer; font-weight:bold; }

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

.action-bar { background: #1a1a1a; padding: 10px 15px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-radius: 4px; }
.ab-left button { background: #2a2a2a; border: none; color: #aaa; padding: 6px 12px; margin-right: 5px; border-radius: 3px; cursor: pointer; }
.ab-left button:hover { color: #fff; background: #333; }
.ab-right button { background: #2a2a2a; border: none; color: #aaa; padding: 6px 10px; border-radius: 3px; cursor: pointer; }

.tags-list a { display: inline-block; background: #222; color: #ccc; padding: 4px 10px; margin: 0 5px 5px 0; border-radius: 3px; font-size: 11px; border: 1px solid #333; }
.related-section { margin-top: 40px; }
.related-title { color: #fff; font-size: 16px; margin-bottom: 15px; border-bottom: 1px solid #333; padding-bottom: 10px; font-weight: bold; display: flex; align-items: center; gap: 10px; }

/* --- FOOTER & PAGINATION --- */
.site-footer { background: #080808; margin-top: 50px; padding-top: 40px; border-top: 1px solid #222; }
.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; color: #fff; border-color: #52525b; }

.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; }
.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); }
.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; }

.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 */
.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); }
.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; }
