/*
Theme Name: BornHub Theme
Theme URI: https://example.com
Author: Dynamic Dev
Description: Custom Social & Video Feed Theme với tích hợp Cloudinary.
Version: 1.0.0
*/

:root {
    --bg-main: #0e0e0e;
    --bg-card: #1b1b1b;
    --bg-hover: #252525;
    --primary-orange: #ff9900;
    --text-main: #ffffff;
    --text-sub: #b0b0b0;
    --border-color: #2a2a2a;
    --msg-other-bg: #2a2a2a;
    --msg-user-bg: #ff9900;
    --green-rate: #2ecc71;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background-color: var(--bg-main); color: var(--text-main); display: flex; flex-direction: column; align-items: center; padding-top: 56px; min-height: 100vh; }

/* HEADER */
header { position: fixed; top: 0; width: 100%; height: 56px; background-color: #000000; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; padding: 0 16px; z-index: 1000; }
.header-left { display: flex; align-items: center; gap: 12px; flex: 1; max-width: 320px; }
.logo { font-size: 20px; font-weight: 800; display: flex; align-items: center; cursor: pointer; text-decoration: none; color: #fff; }
.logo .highlight { background-color: var(--primary-orange); color: #000; padding: 2px 6px; border-radius: 4px; margin-left: 2px; }
.search-bar { display: flex; align-items: center; background-color: #1f1f1f; border-radius: 20px; padding: 8px 12px; gap: 8px; width: 100%; max-width: 220px; }
.search-bar input { background: transparent; border: none; outline: none; color: #fff; font-size: 13px; width: 100%; }
.header-center { display: flex; justify-content: center; align-items: center; height: 100%; flex: 2; max-width: 580px; }
.nav-tab { flex: 1; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-sub); font-size: 19px; cursor: pointer; position: relative; border-radius: 8px; margin: 4px 2px; text-decoration: none; }
.nav-tab:hover, .nav-tab.active { color: var(--primary-orange); }
.header-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 1; max-width: 320px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; background-color: #1f1f1f; display: flex; align-items: center; justify-content: center; color: var(--text-main); font-size: 16px; border: none; cursor: pointer; }
.user-profile-btn { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 20px; background-color: #1f1f1f; }
.user-profile-btn img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid var(--primary-orange); }

/* KHUNG NÚT BORN CONTENT (FLOATING - KHÔNG STICKY, KHÔNG BORDER DƯỚI) */
.born-content-bar {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 10px 5px 10px;
    z-index: 10;
}

.born-content-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 580px;
    background-color: #d88000;
    color: #0d0d0d;
    font-size: 22px;
    font-weight: 800;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #b36b00;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.born-content-btn:hover {
    background-color: var(--primary-orange);
    color: #000;
    transform: translateY(-2px);
}

/* FEED POSTS */
.feed-container { width: 100%; max-width: 580px; padding: 15px 10px; margin: 0 auto; }
.post { background-color: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; margin-bottom: 20px; overflow: hidden; }
.post-header { display: flex; align-items: center; padding: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; margin-right: 12px; border: 2px solid var(--primary-orange); object-fit: cover; }
.user-info { display: flex; flex-direction: column; }
.username { font-weight: 600; font-size: 14px; color: var(--text-main); }
.post-time { font-size: 11px; color: var(--text-sub); }
.post-caption { padding: 0 12px 12px 12px; font-size: 14px; line-height: 1.4; }
.post-media { width: 100%; background-color: #000; display: block; max-height: 500px; object-fit: cover; }

/* WATCH & SHORTS GRID */
.watch-container { max-width: 1320px; margin: 0 auto; padding: 16px; width: 100%; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.video-card { background-color: var(--bg-card); border-radius: 6px; overflow: hidden; border: 1px solid var(--border-color); text-decoration: none; display: flex; flex-direction: column; }
.thumbnail-box { position: relative; width: 100%; padding-top: 56.25%; background-color: #000; }
.thumbnail-box img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.duration-badge { position: absolute; bottom: 8px; right: 8px; background-color: rgba(0, 0, 0, 0.85); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 3px; }
.video-info { padding: 10px 12px; }
.video-title { font-size: 13px; font-weight: 700; color: var(--text-main); }

/* SKELETON PLACEHOLDER STYLES */
@keyframes skeleton-loading {
    0% { background-color: #1f1f1f; }
    50% { background-color: #2c2c2c; }
    100% { background-color: #1f1f1f; }
}

.skeleton-box {
    animation: skeleton-loading 1.5s infinite ease-in-out;
}

.skeleton-text {
    height: 12px;
    border-radius: 4px;
    animation: skeleton-loading 1.5s infinite ease-in-out;
    margin-bottom: 6px;
}

.skeleton-title {
    width: 80%;
    height: 14px;
}

.skeleton-meta {
    width: 40%;
    height: 10px;
}

.no-posts-notice {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 15px;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    color: var(--text-sub);
    font-size: 14px;
    margin-top: 10px;
}

.quality-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: var(--primary-orange);
    color: #000;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 2px;
    text-transform: uppercase;
}