/* =================================================================== */
/* TEMA DASAR & GAYA GLOBAL                       */
/* =================================================================== */
:root {
    --primary-color: #e50914;
    --primary-color-hover: #f40612;
    --dark-bg: #101010;
    --card-bg: #1a1a1a;
    --border-color: #2f2f2f;
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --success-color: #28a745;
    --danger-color: #dc3545;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-primary);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 1.5;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--primary-color-hover);
}

main {
    padding: 20px 0;
}

.main-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.page-title {
    font-size: 1.8em;
    margin-bottom: 20px;
}

/* =================================================================== */
/* HEADER UTAMA SITUS                          */
/* =================================================================== */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 10px 24px;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-left { display: flex; align-items: center; flex-shrink: 0; }
.logo { font-size: 1.6em; font-weight: bold; color: var(--primary-color); }
.main-nav-link { font-weight: 500; margin-left: 20px; color: var(--text-primary); text-decoration: none; }
.header-center { flex-grow: 1; max-width: 600px; }
.header-right { display: flex; align-items: center; gap: 20px; }
.header-link { color: var(--text-primary); font-size: 1.2em; }
.header-right .btn { padding: 8px 16px; border-radius: 20px; text-decoration: none; font-weight: 500; }
.header-right .btn-primary { background-color: var(--primary-color); color: white; }
.header-right .btn-outline { border: 1px solid var(--border-color); }


/* =================================================================== */
/* KARTU VIDEO (Tampilan Utama, Pencarian, dll) */
/* =================================================================== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.video-card-new {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.thumbnail-container {
    position: relative;
    display: block;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #333;
    border-radius: 12px;
    overflow: hidden;
}
.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease-in-out;
}
.video-card-new:hover .video-thumbnail {
    transform: scale(1.05);
}
.duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}
.video-details {
    display: flex;
    gap: 12px;
}
.creator-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    flex-shrink: 0;
    text-decoration: none;
}
.video-metadata {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.video-title-link {
    font-size: 1.1em;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.creator-name-link {
    font-size: 0.9em;
    color: var(--text-secondary);
    text-decoration: none;
}
.creator-name-link:hover {
    color: var(--text-primary);
}
.video-stats-card {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin: 2px 0 0 0;
}

/* =================================================================== */
/* HALAMAN TONTON (WATCH.PHP)                     */
/* =================================================================== */
.watch-layout-container { max-width: 1800px; margin: 20px auto; padding: 0 24px; display: flex; flex-direction: column; gap: 32px; }
@media (min-width: 1280px) { .watch-layout-container { flex-direction: row; align-items: flex-start; } }
.watch-content-col { flex: 1; min-width: 0; }
.watch-sidebar-col { width: 100%; flex-shrink: 0; }
@media (min-width: 1280px) { .watch-sidebar-col { width: 400px; } }
.video-player-container { width: 100%; aspect-ratio: 16 / 9; background-color: #000; position: relative; border-radius: 12px; overflow: hidden; }
#reward-overlay { position: absolute; top: 10px; left: 10px; background-color: rgba(0,0,0,0.7); color: white; padding: 8px 12px; border-radius: 20px; font-size: 0.9em; z-index: 100; pointer-events: none; }
.video-primary-info { padding: 16px 0 0 0; }
.video-title-main { font-size: 1.6em; line-height: 1.3; margin: 0; }
.video-secondary-info { display: flex; flex-direction: column; gap: 15px; margin-top: 15px; padding-bottom: 15px; border-bottom: 1px solid var(--border-color); }
@media (min-width: 768px) { .video-secondary-info { flex-direction: row; justify-content: space-between; align-items: center; } }
.uploader-info-box { display: flex; align-items: center; gap: 12px; }
.uploader-avatar { width: 40px; height: 40px; border-radius: 50%; background-color: var(--primary-color); color: white; display: flex; justify-content: center; align-items: center; font-weight: bold; }
.uploader-details .uploader-name-link { font-weight: 500; color: var(--text-primary); text-decoration: none; }
.uploader-details span { display: block; font-size: 0.85em; color: var(--text-secondary); }
.uploader-info-box .subscribe-btn { margin-left: 15px; padding: 10px 18px; }
.main-actions-group { display: flex; gap: 10px; }
.like-dislike-group { display: flex; }
.action-btn { background: var(--card-bg); color: var(--text-primary); border: 1px solid var(--border-color); padding: 8px 15px; border-radius: 20px; cursor: pointer; }
.like-dislike-group .action-btn i { margin-right: 8px; }
.like-dislike-group .action-btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: 1px solid #444; }
.like-dislike-group .action-btn:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.video-description-box.expandable { background-color: var(--card-bg); border-radius: 12px; padding: 15px; margin-top: 20px; }
.description-meta { display: flex; flex-wrap: wrap; gap: 15px; font-size: 0.9em; font-weight: 500; margin-bottom: 10px; }
.description-meta i { margin-right: 5px; color: var(--text-secondary); }
.description-text { margin: 0; max-height: 60px; overflow: hidden; line-height: 1.5; transition: max-height 0.3s ease-out; }
.video-description-box.expanded .description-text { max-height: 1000px; }
.expand-btn { background: none; border: none; color: var(--text-primary); font-weight: bold; cursor: pointer; margin-top: 10px; padding: 0; }
.comments-section { margin-top: 24px; }
.comment-form-new { display: flex; align-items: flex-start; gap: 15px; }
.comment-form-avatar { width: 40px; height: 40px; border-radius: 50%; background-color: #555; color: white; display: flex; justify-content: center; align-items: center; font-weight: bold; flex-shrink: 0; }
.comment-form-new textarea { flex-grow: 1; }
.comment-item { display: flex; align-items: flex-start; gap: 15px; }
.comment-avatar { width: 40px; height: 40px; border-radius: 50%; background-color: #333; color: white; display: flex; justify-content: center; align-items: center; font-weight: bold; flex-shrink: 0; }


/* =================================================================== */
/* HALAMAN PROFIL, CHANNEL, DLL                */
/* =================================================================== */
.profile-container { max-width: 900px; margin: 30px auto; padding: 20px; }
.profile-header { display: flex; align-items: center; gap: 20px; margin-bottom: 30px; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; background-color: var(--primary-color); color: white; display: flex; justify-content: center; align-items: center; font-size: 2.5em; font-weight: bold; flex-shrink: 0; }
.profile-header-info h1 { margin: 0 0 5px 0; font-size: 2em; }
.profile-header-info p { margin: 0; color: var(--text-secondary); }
.profile-grid { display: grid; grid-template-columns: 1fr; gap: 25px; margin-bottom: 25px; }
@media(min-width: 768px) { .profile-grid { grid-template-columns: 2fr 1fr; } }
.profile-section { background-color: var(--card-bg); border-radius: 8px; padding: 25px; }
.profile-section h2 { margin-top: 0; margin-bottom: 20px; font-size: 1.3em; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
.info-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.info-label { color: var(--text-secondary); }
.info-value { font-weight: 500; }
.balance-amount { font-size: 2.2em; font-weight: bold; color: #28a745; margin: 0 0 10px 0; }
.role-badge { font-size: 0.8em; padding: 4px 10px; border-radius: 20px; font-weight: 500; text-transform: uppercase; }
.role-badge.role-admin { background-color: #fee2e2; color: #991b1b; }
.role-badge.role-creator { background-color: #dcfce7; color: #166534; }
.role-badge.role-user { background-color: #e0e7ff; color: #3730a3; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; }
.form-group input[type="password"] { width: 100%; padding: 10px; background-color: var(--dark-bg); border: 1px solid var(--border-color); color: var(--text-primary); border-radius: 5px; box-sizing: border-box; }
.btn-primary { background-color: var(--primary-color); color: white; padding: 12px 20px; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; margin-top: 10px; }


/* =================================================================== */
/* FITUR LAIN (SEARCH, NOTIFIKASI, DLL)         */
/* =================================================================== */
.search-bar { display: flex; width: 100%; border: 1px solid var(--border-color); border-radius: 20px; overflow: hidden; }
.search-bar input { width: 100%; border: none; background-color: var(--dark-bg); padding: 10px 15px; color: var(--text-primary); outline: none; }
.search-bar button { background-color: var(--card-bg); border: none; padding: 0 15px; color: var(--text-secondary); cursor: pointer; }
.notification-icon { position: relative; cursor: pointer; }
.notification-badge { position: absolute; top: -5px; right: -8px; background-color: var(--primary-color); color: white; width: 18px; height: 18px; border-radius: 50%; font-size: 0.6em; font-weight: bold; display: flex; justify-content: center; align-items: center; }
.notification-panel { position: absolute; top: 60px; right: 20px; width: 380px; background-color: var(--card-bg); border: 1px solid var(--border-color); border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); z-index: 1100; }
