/* =================================================================
   StreamFlow.id - Professional Style Overhaul
   ================================================================= */

:root {
    /* --- Palet Warna Baru --- */
    --main-bg: #111827; 
    --secondary-bg: #1f2937; 
    --border-color: #374151; 
    --text-primary: #f9fafb; 
    --text-secondary: #9ca3af; 
    --accent-color: #3b82f6; 
    --accent-hover: #2563eb; 
    --success-color: #22c55e; 
    --danger-color: #ef4444;
    --shadow-color: rgba(0, 0, 0, 0.2);
}

/* --- Pengaturan Global & Tipografi --- */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--main-bg);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Layout Utama --- */
aside {
    background-color: var(--secondary-bg);
    border-right: 1px solid var(--border-color);
}

main {
    background-color: var(--main-bg);
}

/* --- Komponen UI yang Ditingkatkan --- */

/* Kartu dengan bayangan dan transisi yang lebih halus */
.card {
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem; /* Sudut yang lebih bulat */
    box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -2px var(--shadow-color);
}

/* Input form dengan status focus yang jelas */
.form-input {
    background-color: #374151;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 0.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Tombol utama dengan transisi halus */
.btn-primary {
    background-color: var(--accent-color);
    transition: background-color 0.2s ease-in-out;
}
.btn-primary:hover {
    background-color: var(--accent-hover);
}

/* Link sidebar yang aktif lebih menonjol */
.sidebar-link {
    transition: background-color 0.2s ease, color 0.2s ease;
    border-left: 3px solid transparent;
}
.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
}
.sidebar-link.active {
    border-left-color: var(--accent-color);
    background-color: rgba(59, 130, 246, 0.1);
    font-weight: 600;
    color: white;
}

/* Notifikasi Toast */
.toast {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--success-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    z-index: 110;
    transition: top 0.5s ease-in-out, opacity 0.5s ease-in-out;
    box-shadow: 0 10px 15px -3px var(--shadow-color);
}
.toast.show {
    top: 1.25rem;
}
.toast.error {
    background-color: var(--danger-color);
}

/* Latar belakang Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: opacity 0.3s ease;
}
.modal-content {
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.modal-backdrop.hidden {
    opacity: 0;
    pointer-events: none;
}
.modal-backdrop.hidden .modal-content {
    transform: scale(0.95) translateY(10px);
    opacity: 0;
}

/* Status Google Drive */
.gdrive-status-dot {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
}

/* Tombol Filter Galeri */
.gallery-filter-btn {
    background-color: #374151;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
}
.gallery-filter-btn:hover {
    background-color: #4b5563;
    color: white;
}
.gallery-filter-btn.active {
    background-color: var(--accent-color);
    color: white;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}

/* --- Tampilan Login Istimewa --- */
.bg-gradient-animation {
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #111827, #1f2937, #3b82f6, #111827);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

#login-view .form-input {
    background-color: rgba(31, 41, 55, 0.8);
    border-color: #4b5563;
}

#login-view .form-input:focus {
    background-color: rgba(55, 65, 81, 0.9);
}

/* Tambahan untuk Header Tabel Sticky */
.sticky-header th {
    position: -webkit-sticky; /* Untuk kompatibilitas Safari */
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #2c3e50; 
    border-bottom: 1px solid var(--border-color);
}

/* Gaya untuk ikon destinasi yang menumpuk */
.destination-icons {
    display: flex;
    align-items: center;
}

.destination-icons .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #1f2937; /* Warna latar belakang baris tabel */
    margin-left: -10px; /* Efek tumpukan */
    background-color: #374151; /* Warna lingkaran dasar */
    overflow: hidden;
}

/* === PERUBAHAN DI SINI === */
.destination-icons .icon.icon-youtube {
    background-color: #CD201F;
}
.destination-icons .icon.icon-facebook {
    background-color: #1877F2;
}
.destination-icons .icon.icon-twitch {
    background-color: #9146FF;
}
/* === AKHIR PERUBAHAN === */

.destination-icons .icon:first-child {
    margin-left: 0;
}

/* Gaya untuk progress bar sisa waktu */
.timer-progress-container {
    width: 100%;
    background-color: #374151; /* bg-gray-700 */
    border-radius: 9999px;
    height: 6px;
    margin-top: 6px;
    overflow: hidden;
}

.timer-progress-bar {
    height: 100%;
    border-radius: 9999px;
    transition: width 1s linear; /* Transisi halus saat waktu berkurang */
}

/* ====================================================== */
/* === PENAMBAHAN BARU: GAYA MODAL PEMUTAR VIDEO === */
/* ====================================================== */
.video-player-content {
    background-color: var(--secondary-bg);
    border-radius: 0.75rem;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
}

.video-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

#video-player-close-btn {
    font-size: 2rem;
    line-height: 1;
    font-weight: bold;
}

.video-player-body {
    flex-grow: 1;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 0;
}

#video-player-element {
    width: 100%;
    height: 100%;
    max-height: calc(90vh - 65px); /* Sesuaikan dengan tinggi header */
    object-fit: contain;
}

/* Membuat kartu video bisa diklik */
.video-card {
    cursor: pointer;
}
/* ====================================================== */
