/* --- RESET DASAR --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #000; /* Latar belakang hitam pekat */
    color: #fff; /* Teks putih secara default */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- HEADER --- */
header {
    background-color: #333; /* Abu-abu tua */
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-port {
    font-size: 32px;
    font-weight: bold;
    color: #fff;
}

.logo-hub {
    font-size: 32px;
    font-weight: bold;
    color: #fff;
    background-color: #00a6ff; /* Warna oranye */
    padding: 5px 15px;
    border-radius: 8px;
    margin-left: 5px;
}

.search-bar-container {
    flex: 0 0 40%;
    position: relative;
}

.search-bar {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border-radius: 25px;
    border: 1px solid #444;
    background-color: #222;
    color: #aaa;
    font-size: 16px;
}

.search-bar::placeholder {
    color: #888;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 18px;
    pointer-events: none;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.log-in-container {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.log-in-text {
    font-size: 14px;
    color: #aaa;
    margin-right: 5px;
}

.log-in-arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #888;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 20px;
    border: 2px solid #555;
}

.hamburger-menu {
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
}

/* --- NAVIGASI --- */
nav {
    background-color: #444;
    padding: 0 20px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links li a {
    text-decoration: none;
    color: #ccc;
    font-weight: bold;
    font-size: 18px;
    padding: 15px 0;
    display: inline-block;
    border-bottom: 3px solid transparent;
    transition: border-color 0.3s;
}

.nav-links li.active a {
    color: #fff;
    border-bottom-color: #00a6ff; /* Garis bawah oranye */
}

.nav-links li a:hover {
    color: #fff;
    border-bottom-color: #00a6ff;
}

/* --- KONTEN UTAMA --- */
main {
    padding: 30px;
    flex-grow: 1;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.card {
    background-color: transparent;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.thumbnail-container {
    position: relative;
    background-color: #222;
    width: 100%;
    padding-top: 56.25%; /* Rasio aspek 16:9 */
    border-radius: 10px;
    overflow: hidden;
}

.thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.card-details {
    padding: 15px 0 0;
    display: flex;
    gap: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 18px;
    flex-shrink: 0;
}

.text-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.video-title {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    line-height: 1.3;
}

.author-name {
    font-size: 12px;
    color: #aaa;
    text-transform: uppercase;
}

.post-time {
    font-size: 12px;
    color: #00a6ff; /* Warna oranye untuk waktu posting */
}

/* --- FOOTER --- */
footer {
    padding: 15px 30px;
    background-color: transparent;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.language-selector {
    color: #888;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-link{
    text-decoration:none;
    color:inherit;
    display:block;
}

.card{
    transition:0.3s;
    cursor:pointer;
}

.card:hover{
    transform:translateY(-8px);
}

.card:hover .thumbnail{
    transform:scale(1.05);
}

.thumbnail{
    transition:0.3s;
}

.rtnButton{
    display: inline-block; 
    padding: 10px 20px; 
    background-color: rgb(97, 149, 247); 
    color: white; 
    text-align: center; 
    text-decoration: none; 
    border-radius: 5px;
}

.post-header {
    display: flex;
    width: 100%;
    justify-content: center;
}

.post-pic {
    width: auto;
    height: 50vh;
    border-radius: 10px;
}

.post-main {
    max-width:1000px; 
    margin:auto; 
    padding:40px;
}

/* --- MEDIA QUERIES (RESPONSIF) --- */
@media (max-width: 768px) {
    header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .logo-container {
        order: 1;
    }

    .user-actions {
        order: 2;
    }

    .search-bar-container {
        order: 3;
        flex: 0 0 100%;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
}
