/*
Theme Name: TubeX Pro V2
Author: Bro Developer
Description: Replika UI Persis dengan Support Plugin PVE & Ad Manager Lengkap.
Version: 2.0
*/

:root {
    --bg-body: #080808;       /* Hitam pekat background */
    --bg-header: #121212;     /* Header sedikit lebih terang */
    --bg-card: #161616;       /* Kartu video */
    --bg-input: #202020;
    --primary-red: #cc0000;   /* Merah Khas Tube */
    --text-main: #f5f5f5;
    --text-sub: #aaaaaa;
    --border-color: #2a2a2a;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Arial', 'Helvetica', sans-serif; /* Font standar tube sites */
    margin: 0;
    padding: 0;
    font-size: 14px;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
a:hover { color: var(--primary-red); }
* { box-sizing: border-box; }

/* --- HEADER (Sesuai 'home page.png') --- */
.site-header {
    background: var(--bg-header);
    height: 60px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.logo h1 {
    margin: 0;
    font-size: 22px;
    font-weight: bold;
    letter-spacing: -0.5px;
    color: #fff;
    background: #000;
    padding: 5px 10px;
    border-radius: 4px;
}
.logo span { color: var(--primary-red); }

/* Search Bar Tengah */
.search-container { flex: 1; max-width: 600px; margin: 0 20px; }
.search-form { display: flex; }
.search-form input {
    width: 100%;
    background: #000;
    border: 1px solid #333;
    padding: 8px 15px;
    color: #fff;
    border-radius: 2px 0 0 2px;
    outline: none;
}
.search-form input:focus { border-color: #555; }
.search-form button {
    background: #333;
    border: 1px solid #333;
    color: #999;
    padding: 0 20px;
    cursor: pointer;
    border-radius: 0 2px 2px 0;
}
.search-form button:hover { color: #fff; }

/* Tombol Kanan */
.header-actions { display: flex; gap: 10px; align-items: center; }
.btn {
    padding: 7px 15px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    text-transform: uppercase;
    border: none;
}
.btn-red { background: var(--primary-red); color: #fff; }
.btn-red:hover { background: #e60000; }
.btn-grey { background: #333; color: #fff; }
.btn-grey:hover { background: #444; }

/* Sub Menu (Bawah Header - Opsional) */
.sub-nav {
    background: #111;
    padding: 10px 20px;
    border-bottom: 1px solid #222;
    display: flex;
    gap: 20px;
    font-size: 12px;
    font-weight: bold;
    color: #ccc;
}
.sub-nav a.active { color: var(--primary-red); border-bottom: 2px solid var(--primary-red); padding-bottom: 8px; }

/* --- GRID LAYOUT (Home) --- */
.main-container {
    max-width: 98%; /* Full width tapi ada margin dikit */
    margin: 20px auto;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #222;
}
.section-title h2 { font-size: 18px; margin: 0; color: #fff; text-transform: uppercase; }

.video-grid {
    display: grid;
    /* Grid responsif: muat banyak di layar lebar */
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); 
    gap: 15px;
}

.video-card {
    background: var(--bg-card);
    transition: 0.2s;
    position: relative;
    border: 1px solid #1a1a1a;
}
.video-card:hover { border-color: #333; background: #222; }

.thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background: #000;
}
.thumb img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: 0.3s;
}
.video-card:hover .thumb img { opacity: 0.8; }

/* Overlay info di thumbnail */
.duration-badge {
    position: absolute;
    bottom: 5px; right: 5px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 2px 4px;
    font-size: 11px;
    border-radius: 2px;
    font-weight: bold;
    border: 1px solid #333;
}
.hd-badge {
    position: absolute;
    bottom: 5px; left: 5px;
    background: transparent;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    text-shadow: 1px 1px 2px black;
}

.card-info { padding: 8px; }
.card-title {
    display: block;
    font-size: 13px;
    font-weight: bold;
    color: #ddd;
    line-height: 1.4;
    height: 36px; /* Limit 2 baris */
    overflow: hidden;
    margin-bottom: 5px;
}
.card-meta {
    font-size: 11px;
    color: #777;
    display: flex;
    justify-content: space-between;
}

/* --- SINGLE PAGE (Video Player) --- */
.single-container {
    max-width: 1200px;
    margin: 20px auto;
    display: flex;
    gap: 20px;
}
.main-content { flex: 3; }
.sidebar-content { flex: 1; display: none; } /* Default full width */
@media(min-width: 1400px) { .sidebar-content { display: block; } }

/* Player Wrapper - INI KUNCI UNTUK SHORTCODE */
.player-wrapper {
    background: #000;
    width: 100%;
    position: relative;
    margin-bottom: 15px;
    border: 1px solid #333;
}
/* Memaksa iframe dari shortcode PVE jadi responsif */
.player-wrapper iframe, .player-wrapper video, .player-wrapper .pve-video {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/9;
    display: block;
}

.video-header h1 { font-size: 20px; margin: 0 0 10px 0; color: #fff; }

.action-bar {
    background: #1a1a1a;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 4px;
    margin-bottom: 20px;
}
.user-info img { width: 40px; height: 40px; border-radius: 50%; vertical-align: middle; margin-right: 10px; }
.user-info span { font-weight: bold; color: #fff; }

.tag-cloud { margin: 20px 0; }
.tag-cloud a {
    display: inline-block;
    background: #222;
    color: #aaa;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    margin: 0 5px 5px 0;
    border: 1px solid #333;
}
.tag-cloud a:hover { background: #333; color: #fff; border-color: var(--primary-red); }

/* --- AD MANAGER ZONES --- */
.ad-box {
    width: 100%;
    background: #111;
    color: #444;
    text-align: center;
    padding: 10px;
    margin: 15px 0;
    border: 1px dashed #333;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* --- MODAL LOGIN (Sesuai 'login.png') --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); /* Darker overlay */
    z-index: 2000;
    backdrop-filter: blur(2px);
}
.modal-box {
    background: #161616;
    width: 380px;
    margin: 10vh auto;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #333;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}
.close-btn {
    position: absolute; right: 15px; top: 10px;
    font-size: 24px; color: #666; cursor: pointer;
}
.modal-title { font-size: 20px; margin-bottom: 20px; color: #fff; font-weight: bold; }

.input-group { margin-bottom: 15px; }
.input-group input {
    width: 100%;
    padding: 12px;
    background: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
}
.btn-login {
    width: 100%;
    padding: 12px;
    background: var(--primary-red);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

/* Creators Page Round Grid */
.creator-circle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 20px;
    text-align: center;
    padding: 20px;
}
.creator-circle-img {
    width: 110px; height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #222;
    transition: 0.3s;
}
.creator-item:hover .creator-circle-img { border-color: var(--primary-red); transform: scale(1.05); }

/* Footer */
footer {
    background: #000;
    padding: 30px;
    text-align: center;
    color: #555;
    margin-top: 50px;
    border-top: 2px solid var(--primary-red);
}
