/* ------------------------------------------------------ */
/* --- GENERAL STYLES (AFFECTS ALL PAGES) --- */
/* ------------------------------------------------------ */

body {
    font-family: sans-serif, Arial, Helvetica;
    margin: 0;
    background: #000; /* Latar belakang gelap seperti TikTok */
    color: #fff;
    padding-bottom: 60px; /* Ruang untuk navbar bawah */
    min-height: 100vh;
}

a {
    color: #25f4ee; /* Warna neon/accent */
    text-decoration: none;
    transition: color 0.2s;
}

/* ------------------------------------------------------ */
/* --- FEED STYLES (INDEX.HTML) --- */
/* ------------------------------------------------------ */

/* Penampung Video Feed */
.feed {
    height: 100vh;
    overflow-y: scroll; /* Bagian ini yang membuat feed bisa di-scroll vertikal */
    scroll-snap-type: y mandatory; /* Efek snap untuk setiap video */
    padding-bottom: 60px; /* Kompensasi untuk navbar bawah */
    box-sizing: border-box;
    /* Hilangkan margin/padding bawaan dari feed di index.html */
    padding: 0; 
    margin: 0;
}

/* Kartu Video Tunggal */
.video-card {
    height: calc(100vh - 60px); /* Mengambil tinggi penuh dikurangi tinggi navbar */
    width: 100%;
    position: relative;
    scroll-snap-align: start; /* Posisi snap */
    margin: 0; /* Pastikan tidak ada margin */
}

/* Kontainer Video dan Interaksi */
.video-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Pemain Video */
.video-player {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Memastikan video menutupi seluruh area */
    background: #111;
}

/* --- BILAH SISI KANAN (INTERAKSI) --- */

.interaction-sidebar {
    position: absolute;
    right: 15px;
    bottom: 120px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px; /* Jarak antar ikon */
    z-index: 10;
    text-shadow: 0 0 5px rgba(0,0,0,0.5); /* Bayangan untuk teks/ikon */
}

.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    text-decoration: none; 
    color: white;
    font-weight: bold;
}

.icon-item .icon {
    font-size: 30px;
    transition: transform 0.1s;
}

.icon-item:active .icon {
    transform: scale(0.9);
}

.icon-item .count {
    font-size: 14px;
    margin-top: 2px;
}

/* Profile Icon Styling */
.profile-info {
    margin-bottom: 15px;
    position: relative;
    cursor: pointer;
}

.profile-pic {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid white;
    object-fit: cover;
}

.follow-btn {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ff4500; /* Merah cerah */
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    line-height: 1;
    border: 2px solid #000; /* Border hitam agar terlihat di atas video */
}

/* --- INFO BAWAH VIDEO --- */

.video-info-bottom {
    position: absolute;
    bottom: 60px; /* Di atas navbar bawah */
    left: 0;
    padding: 15px;
    width: calc(100% - 150px); 
    z-index: 5;
    /* Gradasi dari bawah untuk teks */
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.video-info-bottom b {
    display: block;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.video-info-bottom p {
    margin: 0;
    font-size: 14px;
    color: #eee;
}

/* Volume Toggle */
.volume-toggle {
    position: absolute; 
    top: 15px; 
    left: 15px; 
    z-index: 10; 
    cursor: pointer; 
    background: rgba(0,0,0,0.4); 
    padding: 8px; 
    border-radius: 50%;
    color: white; 
    font-size: 20px;
    transition: background 0.2s;
}
.volume-toggle:hover {
    background: rgba(0,0,0,0.6);
}

/* ------------------------------------------------------ */
/* --- NAVIGASI BAWAH (COMMON) --- */
/* ------------------------------------------------------ */

.bottom-navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #000;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -5px 10px rgba(0,0,0,0.5);
    border-top: 1px solid #1a1a1a;
}

.nav-item {
    color: #999;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px;
    flex-grow: 1;
    transition: color 0.2s;
}

.nav-item.active {
    color: #fff;
    font-weight: bold;
}

.nav-item .icon-text {
    font-size: 18px;
    margin-bottom: 2px;
}

.upload-btn {
    /* Gaya untuk tombol 'Plus' di tengah */
    font-size: 1.5em;
    font-weight: bold;
    background-color: #25f4ee; /* Warna Neon */
    color: black;
    border-radius: 8px;
    width: 45px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: -5px; /* Sedikit naik */
}

/* ------------------------------------------------------ */
/* --- FORM STYLES (LOGIN, REGISTER, UPLOAD, EDIT) --- */
/* ------------------------------------------------------ */

.form-wrap {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    background-color: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.form-wrap h2 {
    text-align: center;
    color: #25f4ee;
    margin-bottom: 25px;
    font-weight: 700;
}

input[type="text"], 
input[type="email"], 
input[type="password"],
input[type="file"],
textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #333;
    background-color: #2a2a2a;
    color: white;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

input:focus, textarea:focus {
    border-color: #25f4ee;
    outline: none;
}

button[type="submit"], button:not(.action-btn) {
    width: 100%;
    padding: 12px;
    background-color: #ff4500;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

button:hover {
    background-color: #e03c00;
}

button:active {
    transform: scale(0.99);
}

.form-wrap p {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9em;
}

.error-message {
    color: #ff6666;
    text-align: center;
    margin-bottom: 15px;
    font-weight: bold;
}

/* ------------------------------------------------------ */
/* --- COMMENTS STYLES (COMMENTS.HTML) --- */
/* ------------------------------------------------------ */

.comment-list-container {
    max-width: 500px;
    margin: 20px auto;
    padding: 15px;
}

.comment-list-container h2 {
    color: #fff;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.comment-box {
    padding: 15px 0;
    border-bottom: 1px solid #333;
    font-size: 0.95em;
}

.comment-box:last-child {
    border-bottom: none;
}

.comment-box b {
    color: #25f4ee;
    font-size: 1.1em;
    display: block;
    margin-bottom: 4px;
}

.comment-box small {
    color: #888;
    display: block;
    margin-top: 5px;
    font-size: 0.8em;
}

/* ------------------------------------------------------ */
/* --- VIDEO DETAIL STYLES (VIDEO_DETAIL.HTML) --- */
/* ------------------------------------------------------ */

.detail-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 15px;
}

.detail-video-wrapper {
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #111;
}

.detail-video-wrapper video {
    width: 100%;
    max-height: 80vh;
    display: block;
}

.video-meta {
    padding: 10px 0;
    border-bottom: 1px solid #333;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meta-left a {
    font-weight: bold;
    font-size: 1.2em;
}

.like-status {
    font-size: 0.9em;
    color: #ff4500;
}

.like-btn-detail {
    background: #ff4500;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.like-btn-detail.liked {
    background: #444;
}

.delete-btn {
    background: #ff0000;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    margin-left: 10px;
}

/* ------------------------------------------------------ */
/* --- PROFILE STYLES (PROFILE.HTML & USER_PROFILE.HTML) --- */
/* ------------------------------------------------------ */

.profile-container {
    padding-bottom: 70px; /* Ruang untuk navbar bawah */
    max-width: 600px;
    margin: 0 auto;
}

.profile-header {
    position: relative;
    text-align: center;
    background-color: #1a1a1a;
    padding-bottom: 20px;
}

.background-banner {
    height: 120px;
    background-color: #333;
    background-size: cover;
    background-position: center;
    filter: brightness(0.8);
}

.profile-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #000;
    margin-top: -50px; 
    position: relative;
    z-index: 10;
}

.profile-info-content {
    padding: 0 15px;
}

.username-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.username {
    font-size: 1.6em;
    margin: 0;
    color: #fff;
}

.action-btn, .edit-btn {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
    text-decoration: none;
    border: none;
    line-height: 1;
}

.follow {
    background-color: #ff4500; 
    color: white;
}
.unfollow {
    background-color: #333; 
    color: #fff;
    border: 1px solid #555;
}
.edit-btn {
    background-color: transparent;
    border: 1px solid #555;
    color: #eee;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.9em;
    text-decoration: none;
}
.edit-btn:hover {
    background-color: #333;
}


.profile-stats {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    background-color: #111;
}

.stat-item {
    padding: 10px;
    flex-grow: 1;
    text-align: center;
}
.stat-item:not(:last-child) {
    border-right: 1px solid #333;
}

.stat-count {
    display: block;
    font-weight: bold;
    font-size: 1.1em;
    color: #25f4ee;
}

.stat-label {
    font-size: 0.8em;
    color: #aaa;
}

.user-bio {
    color: #ccc;
    font-size: 0.9em;
    margin-bottom: 20px;
    padding: 0 15px;
}

/* Tampilan Video (Grid Profil) */
.videos-heading {
    text-align: left;
    margin: 20px 10px 10px 10px;
    font-size: 1.2em;
    border-bottom: 2px solid #25f4ee;
    display: inline-block;
    color: #fff;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 2px; 
    padding: 2px;
    background-color: #111;
}

.video-thumbnail-link {
    display: block;
    aspect-ratio: 9/16; 
    overflow: hidden;
    position: relative;
    background-color: #000;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.video-thumbnail:hover {
    opacity: 1;
}

.empty-message {
    text-align: center;
    color: #777;
    padding: 40px;
}

