/*
Theme Name: TubeX Ultimate V3
Author: Bro Developer
Description: Replika UI Akurat + Fungsi Register Aktif + Ad Manager.
Version: 3.0
*/

:root {
    --bg-body: #080808;
    --bg-header: #3e0000; /* Deep Red Header background sesuai headeer.png */
    --bg-header-bottom: #111111;
    --bg-card: #161616;
    --primary-red: #b91c1c;
    --btn-red-hover: #dc2626;
    --text-white: #ffffff;
    --text-grey: #a1a1a1;
    --input-bg: #ffffff;
    --border-dark: #333333;
}

body {
    background-color: var(--bg-body);
    color: var(--text-white);
    font-family: 'Arial', sans-serif;
    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; }
ul { list-style: none; padding: 0; margin: 0; }

/* --- HEADER --- */
.site-header {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Top Bar (Merah Gelap) */
.header-top {
    background: linear-gradient(to bottom, #4a0404, #2b0000); /* Efek gradient deep red */
    height: 60px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #550000;
}

.logo img { height: 40px; }
.logo h1 { margin:0; font-family: 'Impact', sans-serif; font-size: 28px; text-transform: uppercase; color:#fff; }
.logo h1 span { color: #fff; } /* Logo text style */

/* Search Bar (Panjang, Putih) */
.search-box {
    flex: 1;
    max-width: 600px;
    margin: 0 40px;
    position: relative;
}
.search-form { display: flex; }
.search-form input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 4px 0 0 4px;
    border: none;
    outline: none;
    font-size: 14px;
}
.search-form button {
    background: var(--primary-red);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
}

/* Header Actions Right */
.header-right { display: flex; align-items: center; gap: 15px; }
.btn-creators {
    background: #1f1f1f;
    border: 1px solid #333;
    padding: 8px 15px;
    border-radius: 4px;
    color: #ddd;
    font-size: 12px;
    font-weight: bold;
    display: flex; align-items: center; gap: 5px;
}
.icon-btn { color: #ddd; font-size: 18px; cursor: pointer; }
.btn-auth {
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 13px;
    border: none;
    cursor: pointer;
}
.btn-login { background: #1f1f1f; color: #fff; border: 1px solid #333; }
.btn-signup { background: #1f1f1f; color: #fff; border: 1px solid #333; }
.btn-signup:hover, .btn-login:hover { background: #333; }

/* Bottom Bar (Hitam) */
.header-bottom {
    background: var(--bg-header-bottom);
    height: 50px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.nav-left a {
    display: flex; align-items: center; gap: 8px;
    font-weight: bold; font-size: 14px; color: #fff;
    text-transform: uppercase;
}
.nav-left i { color: var(--primary-red); font-size: 18px; }

.nav-right { display: flex; gap: 5px; }
.btn-pill {
    background: #222;
    color: #777;
    padding: 6px 15px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}
.btn-pill.active { background: var(--primary-red); color: #fff; }

/* --- LAYOUT & GRID --- */
.container {
    max-width: 98%;
    margin: 20px auto;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 15px;
}

.video-card {
    background: transparent;
    position: relative;
    cursor: pointer;
}
.thumb-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}
.thumb-wrap img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.badges {
    position: absolute;
    bottom: 5px; right: 5px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 2px 4px;
    font-size: 11px;
    border-radius: 3px;
}
.overlay-info {
    position: absolute;
    bottom: 5px; left: 5px;
    display: flex; gap: 5px;
}
.icon-badge {
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 10px;
}

.card-details { padding-top: 8px; display: flex; gap: 10px; }
.card-avatar img { width: 35px; height: 35px; border-radius: 50%; object-fit: cover; }
.card-meta h3 {
    margin: 0 0 4px 0;
    font-size: 13px;
    color: #fff;
    font-weight: normal;
    line-height: 1.3;
    max-height: 34px;
    overflow: hidden;
}
.meta-sub { font-size: 11px; color: #888; }
.meta-sub span { margin-right: 8px; }

/* --- SINGLE PAGE --- */
.single-wrap { max-width: 1400px; margin: 0 auto; padding: 20px; }

/* Title Area */
.video-main-title { font-size: 18px; color: #fff; margin-bottom: 15px; text-transform: uppercase; font-weight: bold; }

/* User Strip */
.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 */
.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 below player */
.action-bar {
    background: #1a1a1a;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.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 */
.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 Grid */
.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; }

/* --- MODALS (LOGIN & SIGNUP) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(3px);
    align-items: center;
    justify-content: center;
}
.modal-content {
    background-color: #111;
    border: 1px solid #333;
    width: 400px;
    border-radius: 10px;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    color: #fff;
}
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 24px; cursor: pointer; color: #666; }

.modal h2 { margin-top: 0; font-size: 20px; margin-bottom: 20px; text-transform: uppercase; }

/* Input Styles for Modal */
.modal input[type="text"], .modal input[type="password"], .modal input[type="email"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #fff;
    background: #fff;
    color: #000;
    font-size: 14px;
}
.modal label { font-size: 12px; color: #aaa; margin-bottom: 5px; display: block; }

.btn-google {
    width: 100%;
    background: #2d2d2d;
    color: #fff;
    padding: 10px;
    border: none;
    border-radius: 5px;
    margin-bottom: 15px;
    cursor: pointer;
    font-weight: bold;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.divider { text-align: center; color: #555; font-size: 12px; margin-bottom: 15px; }

.btn-submit-red {
    width: 100%;
    background: var(--primary-red);
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    text-transform: uppercase;
    margin-top: 10px;
}
.btn-submit-red:hover { background: var(--btn-red-hover); }

.benefits-list { font-size: 12px; color: #ccc; margin-top: 20px; text-align: left; }
.benefits-list div { margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.benefits-list i { color: var(--primary-red); }

/* --- FOOTER --- */
.site-footer {
    background: #050505;
    padding-top: 40px;
    margin-top: 60px;
}
.footer-ads { text-align: center; margin-bottom: 40px; }

/* Creators Carousel */
.footer-creators { text-align: center; margin-bottom: 40px; }
.creators-title { color: #aaa; font-size: 14px; font-weight: bold; margin-bottom: 20px; text-transform: uppercase; display: flex; align-items: center; justify-content: center; gap: 5px; }
.creators-list { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.creator-circle { width: 80px; text-align: center; }
.creator-circle img { width: 70px; height: 70px; border-radius: 50%; border: 2px solid transparent; }
.creator-circle:hover img { border-color: var(--primary-red); }
.creator-name { font-size: 11px; color: #aaa; margin-top: 5px; display: block; overflow: hidden; text-overflow: ellipsis; }

/* Trends */
.footer-trends { text-align: center; margin-bottom: 40px; max-width: 1000px; margin: 0 auto 40px; }
.trend-tag { 
    display: inline-block; background: #222; color: #aaa; 
    padding: 5px 12px; border-radius: 4px; margin: 3px; font-size: 11px; text-transform: capitalize; 
}

/* Bottom Footer (Deep Red) */
.footer-bottom {
    background: #3e0000; /* Deep Red sesuai footer.png */
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid #550000;
}
.footer-logo img { height: 30px; margin-bottom: 15px; }
.footer-links { margin-bottom: 15px; }
.footer-links a { color: #ddd; font-size: 12px; margin: 0 10px; font-weight: bold; text-transform: uppercase; }
.copyright { color: #888; font-size: 11px; max-width: 800px; margin: 0 auto; line-height: 1.5; }
