/* CSS LAMA */
.media { max-width: 100%; margin: 10px 0; border-radius: 8px; }
.link-preview { margin: 10px 0; }
.add-friend-btn { background: #ffcc00; color: #000; padding: 5px 10px; border-radius: 6px; border: none; cursor: pointer; font-weight: bold;}
.add-friend-btn.added { background: #00cc66; color: #fff; }
.notification { position: relative; display: inline-block; margin-left: 15px; cursor: pointer; }
.notification .count { position: absolute; top: -5px; right: -8px; background: red; color: white; font-size: 12px; border-radius: 50%; padding: 2px 5px; }
#notif-popup { display: none; position: absolute; right: 20px; top: 60px; background: white; border-radius: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); width: 280px; z-index: 1000; padding: 10px; }
.request-item { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #eee; }
.request-item img { width: 40px; height: 40px; border-radius: 50%; margin-right: 8px; object-fit: cover; }
.request-buttons button { padding: 4px 8px; border: none; border-radius: 5px; cursor: pointer; }
.accept { background: #4CAF50; color: #fff; }
.decline { background: #f44336; color: #fff; }

/* CSS BARU UNTUK FLOATING ACTION BUTTON (FAB) */
.fab {
    position: fixed;
    bottom: 80px; /* Di atas footer */
    left: 20px; /* Dipindahkan ke kiri */
    background: #FFD700; /* Warna kuning/emas */
    color: #000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    font-size: 2em;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    z-index: 100; /* Pastikan di atas elemen lain */
    text-decoration: none;
    transition: transform 0.2s;
}

.fab:hover {
    transform: scale(1.1);
}

/* CSS BARU UNTUK REELS/VIDEO PENDEK */
body { margin: 0; overflow: hidden; /* Sembunyikan scrollbar body */ }
.header { position: fixed; width: 100%; top: 0; z-index: 10; background: rgba(0, 0, 0, 0.4); border-bottom: none; }
.dashboard { display: block; padding: 0; } /* Reset default dashboard style */

.reels-container {
    width: 100%;
    height: 100vh; /* Tinggi viewport penuh */
    margin: 0;
    padding-top: 60px; /* Jarak dari header */
}

.reels-feed {
    height: 100%;
    overflow-y: scroll; /* Aktifkan scroll vertikal */
    scroll-snap-type: y mandatory; /* Wajibkan snap */
}

.reel-item {
    width: 100%;
    height: calc(100vh - 60px); /* Tinggi reel = Tinggi viewport - Tinggi header */
    scroll-snap-align: start; /* Snap ke awal setiap item */
    background: #000; /* Latar belakang hitam untuk video */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Mengubah ini karena konten utama akan lebih sedikit */
    position: relative;
    padding: 0;
    overflow: hidden; /* Sembunyikan apapun yang keluar dari batas */
}

.reel-item video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover; /* Pastikan video memenuhi container */
    z-index: 1;
}

/* Konten Post (Teks dan Link) - Di Sisi Kiri Bawah */
.post-content-overlay {
    position: absolute; /* Ubah dari relative ke absolute */
    bottom: 30px; /* Diubah dari 0, untuk memberikan ruang dari bawah layar */
    left: 0;
    width: 65%; /* Beri ruang di kanan untuk tombol aksi */
    z-index: 5;
    color: #fff;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
    box-sizing: border-box; /* Agar padding tidak menambah lebar */
}

/* Konten Post (Info User, Text, Actions) */
.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    background: none; /* Hilangkan background default */
}
.post-header strong { color: #fff; }
.post-header a { color: #fff; text-decoration: none; font-weight: bold; }
.post-header small { color: #ccc; }

.post-body p {
    color: #fff;
    margin: 0 0 15px 0;
}

/* KONTEN BARU: Aksi Sisi Kanan (Vertical Bar) */
.reel-side-actions {
    position: absolute;
    bottom: 45px; /* Diubah dari 15px, untuk memberikan ruang dari bawah layar */
    right: 15px;
    z-index: 10;
    display: flex;
    flex-direction: column; /* Stack vertikal */
    align-items: center; /* Pusatkan horizontal */
    gap: 15px; /* Jarak antar elemen */
}

.reel-side-actions .post-header {
    flex-direction: column; /* Stack vertikal untuk avatar/nama */
    align-items: center;
    text-align: center;
    margin-bottom: 0; /* Hilangkan margin bawah default */
}

.reel-side-actions .post-header .avatar {
    width: 50px; /* Ukuran Avatar lebih besar */
    height: 50px;
    margin-bottom: 5px;
    border: 3px solid white; /* Border Putih seperti Reels */
}

.reel-side-actions .post-header strong {
    font-size: 1em;
}

/* Container untuk semua tombol aksi (like, comment, share, edit, delete) */
.post-actions {
    display: flex;
    flex-direction: column; /* Stack vertikal */
    align-items: center;
    gap: 15px; /* Jarak antar tombol */
    background: none;
    border-top: none;
    padding: 0;
}

/* Gaya Tombol Aksi */
.post-actions button, .post-actions a {
    background: none; 
    color: #fff;
    border: none;
    padding: 0;
    margin: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.8em; 
}
.post-actions button small, .post-actions a small {
    display: block; /* Pastikan angka like/teks kecil terlihat */
    margin-top: 2px;
}

/* Atribut data-icon digunakan untuk ikon besar */
.post-actions button::before, .post-actions a::before {
    font-size: 2em; 
    margin-bottom: 0px;
    content: attr(data-icon);
}

/* Tombol 'Suka' yang sudah di-like */
.post-actions .like-btn[data-liked="true"] {
    color: #ff3366; 
}

/* Tombol Tambah Teman (disingkat menjadi ikon) */
.reel-side-actions .add-friend-btn {
    background: #ffcc00;
    color: #000;
    padding: 10px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
    border: 3px solid white;
}
.reel-side-actions .add-friend-btn.added {
    background: #00cc66;
    color: #fff;
}
.reel-side-actions .add-friend-btn span {
    display: none; /* Sembunyikan teks label */
}


/* Hapus bagian yang tidak perlu di Reels */
.post-stats, .link-preview, .comment-box {
    display: none;
}
/* Hanya untuk menampung video non-media */
.reel-video-placeholder {
    height: 100%;
    width: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CSS BARU UNTUK KOMENTAR INLINE PADA REELS */
.comment-box-reel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 80%;
    background: #222;
    color: #fff;
    z-index: 1000; 
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

.comment-box-reel .comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #333;
}
.comment-box-reel .comment-header h4 {
    margin: 0;
    font-size: 1.1em;
}
.comment-box-reel .comment-header button {
    background: none;
    color: #fff;
    border: none;
    cursor: pointer;
}

.comment-box-reel .comment-form {
    display: flex;
    padding: 10px 15px;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
}
.comment-box-reel .comment-form input {
    flex-grow: 1;
    padding: 8px;
    border-radius: 20px;
    border: 1px solid #444;
    margin-right: 10px;
    background: #333;
    color: #fff;
}
.comment-box-reel .comment-form button {
    background: #FFD700;
    color: #000;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
}

.comment-box-reel .comment-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px 15px;
}
.comment-item {
    display: flex;
    margin-bottom: 10px;
    gap: 10px;
}
.comment-item .avatar-mini {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}
.comment-text {
    background: #333;
    padding: 8px 12px;
    border-radius: 15px;
    flex-grow: 1;
    word-break: break-word;
}
.comment-text strong {
    display: block;
    font-size: 0.9em;
    margin-bottom: 2px;
}
.comment-text span {
    font-size: 0.9em;
}

/* Pastikan elemen komentar tidak disembunyikan oleh CSS lama Reels */
/* Ini adalah override penting */
.post-actions + .comment-box { 
    display: block !important; 
} 



