/*
Theme Name: Dark Tube Pro
Author: Bro Developer
Description: Tema Tube Style Dark Mode dengan Ad Manager Full Control.
Version: 1.0
*/

:root {
    --bg-dark: #0f0f0f;
    --bg-card: #1f1f1f;
    --primary-red: #b91c1c;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

a { text-decoration: none; color: inherit; }

/* Header */
.site-header {
    background: #000;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid var(--primary-red);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo h2 { margin: 0; font-size: 24px; color: #fff; text-transform: uppercase; letter-spacing: 1px; }
.logo span { color: var(--primary-red); }

.search-bar form { display: flex; }
.search-bar input {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    padding: 10px;
    width: 450px;
    border-radius: 4px 0 0 4px;
    outline: none;
}
.search-bar button {
    background: #333;
    border: 1px solid #333;
    color: #fff;
    padding: 0 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.btn-red {
    background-color: var(--primary-red);
    color: white;
    padding: 8px 25px;
    border-radius: 4px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
}
.btn-dark { background: #333; margin-left: 10px; }

/* Ad Spots */
.ad-spot {
    text-align: center;
    margin: 20px auto;
    padding: 10px;
    background: #111;
    border: 1px dashed #333;
    max-width: 100%;
    color: #555;
    font-size: 12px;
}

/* Layout */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* Grid Video */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.video-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.thumb-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    background: #000;
}
.thumb-wrapper img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
}
.duration {
    position: absolute;
    bottom: 8px; right: 8px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 4px;
}

.video-info { padding: 12px; }
.video-title {
    font-size: 15px;
    font-weight: 600;
    color: #e1e1e1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    margin-bottom: 8px;
}
.video-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Single Page */
.video-player-wrapper {
    width: 100%;
    background: #000;
    margin-bottom: 20px;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-player-wrapper iframe { width: 100%; height: 100%; border: none; }

.video-actions {
    background: #1a1a1a;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.btn-icon {
    background: transparent;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 16px;
    margin-right: 15px;
}
.btn-icon:hover { color: #fff; }

.tags-container { margin: 20px 0; }
.tags-container a {
    display: inline-block;
    background: #333;
    color: #ccc;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-right: 8px;
    margin-bottom: 8px;
}
.tags-container a:hover { background: var(--primary-red); color: white; }

/* Creator Page */
.creator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 30px;
    text-align: center;
    padding: 20px 0;
}
.creator-img {
    width: 120px; height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 3px solid #333;
    transition: 0.3s;
}
.creator-item:hover .creator-img { border-color: var(--primary-red); }

/* Footer */
.site-footer {
    background: #050505;
    padding: 40px 20px;
    margin-top: 50px;
    border-top: 1px solid #222;
    text-align: center;
    color: #777;
}
.footer-links a { margin: 0 10px; color: #aaa; font-size: 13px; }

/* 404 Page */
.page-404 { text-align: center; padding: 100px 20px; }
.page-404 h1 { font-size: 80px; color: var(--primary-red); margin: 0; }
.page-404 p { font-size: 20px; color: #fff; }

/* Modal */
.modal { display: none; position: fixed; z-index: 999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.9); }
.modal-content {
    background-color: #1a1a1a;
    margin: 10vh auto;
    padding: 40px;
    border: 1px solid #333;
    width: 400px;
    border-radius: 12px;
    text-align: center;
    position: relative;
}
.modal input { width: 100%; box-sizing: border-box; margin: 10px 0; background: #2a2a2a; border: 1px solid #444; }
.close-modal { position: absolute; top: 10px; right: 20px; color: #fff; font-size: 28px; cursor: pointer; }
