/* ==========================================
   CSS RESET
========================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

html,
body {
    -webkit-text-size-adjust: 100%;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section,
main {
    display: block;
}

/* ==========================================
   STYLE GUIDE & CSS VARIABLES
========================================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&display=swap');

:root {
    /* 1. Thay Ä‘á»•i MÃ u sáº¯c theo yÃªu cáº§u */
    --color-bg-main: #06090F;
    --color-bg-sidebar: rgba(15, 20, 25, 0.45);
    --color-text-title: #FFFFFF;
    --color-text-muted: #8E9BAE;

    /* CÃ¡c mÃ u phá»¥ trá»£ */
    --color-border: rgba(255, 255, 255, 0.08);
    --color-primary: #00E5FF;
    --color-hover: rgba(0, 229, 255, 0.1);
    --color-active-bar: #00E5FF;

    /* 2. Font chá»¯ */
    --font-primary: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

    /* Framework Metrics */
    --sidebar-width: 240px;
}

/* ==========================================
   RESET & GLOBAL STYLES
========================================== */


body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-main);
    background-image: 
        radial-gradient(circle at top right, rgba(0, 229, 255, 0.08), transparent 500px),
        radial-gradient(circle at bottom left, rgba(185, 0, 255, 0.08), transparent 500px);
    background-attachment: fixed;
    color: var(--color-text-title);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-text-title);
    font-weight: 600;
}

p,
span,
div {
    color: var(--color-text-title);
}

.text-muted {
    color: var(--color-text-muted);
}

/* ==========================================
   3. KHUNG LAYOUT CÆ  Báº¢N (FLEXBOX)
========================================== */
/* Container bao ngoÃ i toÃ n bá»™ trang */
.app-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* --- SIDEBAR TRÃI --- */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background-color: var(--color-bg-sidebar);
    height: calc(100vh - 32px);
    margin: 16px;
    border-radius: 24px;
    position: sticky;
    top: 16px;
    border: 1px solid var(--color-border);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 20px 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* --- SIDEBAR BRANDING --- */
.sidebar-branding {
    padding: 0 24px 32px;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    font-size: 1.3rem;
    background: linear-gradient(90deg, #00f2fe 0%, #4facfe 100%, #00f2fe 200%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    text-decoration: none;
    display: block;
    width: 100%;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 10px;
    margin-bottom: 5px;
    padding-top: 5px;
    line-height: 1.2;
    word-break: keep-all;
    white-space: nowrap;
    text-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
    animation: shineLogo 3s linear infinite;
}

@keyframes shineLogo {
    to {
        background-position: 200% center;
    }
}

/* --- SIDEBAR NAVIGATION --- */
.sidebar-nav {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    flex-grow: 1;
    /* Pushes the footer to the bottom */
}

.nav-item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    padding: 12px 24px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    -webkit-transition: all 0.2s ease;
    -moz-transition: all 0.2s ease;
    -ms-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

/* Khoáº£ng cÃ¡ch giá»¯a icon vÃ  text */
.nav-item i {
    font-size: 1.3rem;
    margin-right: 16px;
}

/* Hover: ná»n xÃ¡m nháº¡t, chá»¯ Ä‘en */
.nav-item:hover {
    background-color: var(--color-hover);
    color: var(--color-text-title);
}

/* Äang Ä‘Æ°á»£c chá»n (Active) */
.nav-item.active {
    background-color: var(--color-hover);
    color: var(--color-text-title);
    font-weight: 600;
    /* Äáº­m hÆ¡n chÃºt */
    border-left-color: var(--color-active-bar);
    /* Thanh mÃ u xanh sÃ¡t mÃ©p trÃ¡i */
}

/* --- SIDEBAR FOOTER --- */
.sidebar-footer {
    padding-top: 16px;
}

.sidebar .logout-link {
    margin-bottom: 24px;
    /* Chi ap dung trong sidebar */
}

.bottom-nav .logout-link {
    margin-bottom: 0 !important;
    /* Reset de khong lech hang */
}

.copyright {
    padding: 0 24px;
    font-size: 0.72rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* --- VÃ™NG CONTENT PHáº¢I --- */
.main-content {
    flex-grow: 1;
    /* Tá»± co giÃ£n chiáº¿m toÃ n bá»™ pháº§n khÃ´ng gian cÃ²n láº¡i */
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    min-width: 0;
    /* Sá»­a lá»—i ná»™i dung to quÃ¡ lÃ m vá»¡ flexbox (text/image overflow) */
}

.topbar {
    height: 64px;
    padding: 0 32px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: end;
    -ms-flex-pack: end;
    -webkit-justify-content: flex-end;
    justify-content: flex-end;
    background-color: transparent;
    margin: 16px 16px 16px 0;
    position: sticky;
    top: 16px;
    z-index: 10;
    border: none;
    box-shadow: none;
    pointer-events: none;
}

/* Div trá»‘ng bÃªn trÃ¡i phá»¥c vá»¥ flexbox cÃ¢n báº±ng 2 bÃªn giÃºp Ã´ search á»Ÿ giá»¯a */
.topbar-left {
    display: none;
}

/* --- SEARCH BAR --- */
.search-container {
    flex: 2;
    max-width: 500px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 10px 16px;
    margin: 0 24px;
    -webkit-transition: border-color 0.3s, background-color 0.3s;
    transition: border-color 0.3s, background-color 0.3s;
}
.search-container:focus-within {
    border-color: var(--color-primary);
    background-color: rgba(255, 255, 255, 0.1);
}

.search-container i {
    color: var(--color-text-muted);
    font-size: 1.15rem;
    margin-right: 12px;
}

.search-container input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--color-text-title);
}

.search-container input::placeholder {
    color: var(--color-text-muted);
}

/* --- USER ACTIONS (Cá»¤M BÃŠN PHáº¢I) --- */
.user-actions {
    flex: 1;
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: flex-end;
    -ms-flex-pack: flex-end;
    -webkit-justify-content: flex-end;
    justify-content: flex-end;
    gap: 16px;
    pointer-events: auto; /* Allow clicking on buttons even when topbar is unclickable */
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    color: var(--color-text-title);
    -webkit-transition: background-color 0.2s;
    -moz-transition: background-color 0.2s;
    -ms-transition: background-color 0.2s;
    -o-transition: background-color 0.2s;
    transition: background-color 0.2s;
}

.action-btn:hover {
    background-color: var(--color-hover);
    /* Hover vÃ²ng trÃ²n xÃ¡m nháº¡t */
}

.action-btn i {
    font-size: 1.25rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid var(--color-border);
}

/* VÃ¹ng chá»©a ná»™i dung chÃ­nh */
.content-wrapper {
    padding: 8px 32px 32px 16px;
    flex-grow: 1;
}

/* ==========================================
   4. Ná»˜I DUNG CHÃNH - PROFILE HEADER
========================================== */
.profile-header {
    margin-bottom: 24px;
}

/* --- áº¢NH BÃŒA --- */
.cover-image {
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    position: relative;
    background-color: #222;
}

.cover-text {
    position: absolute;
    bottom: 24px;
    right: 32px;
    color: white;
    font-size: 2.2rem;
    font-family: 'Dancing Script', cursive;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

/* --- Cáº¤U TRÃšC 2 Cá»˜T PROFILE --- */
.profile-content-layout {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    gap: 32px;
    -webkit-box-align: start;
    -ms-flex-align: start;
    -webkit-align-items: flex-start;
    align-items: flex-start;
}

/* --- CONTAINER THÃ”NG TIN KÃŠNH (Cá»™t trÃ¡i) --- */
.channel-info-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    width: 300px;
    flex-shrink: 0;
    padding: 24px;
    background-color: var(--color-bg-sidebar);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    margin-top: -60px;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* --- Cá»¤M AVATAR --- */
.channel-avatar-wrapper {
    margin-right: 0;
    margin-bottom: 20px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
}

.channel-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--color-bg-main);
    object-fit: cover;
    background-color: var(--color-bg-main);
}

/* --- CHI TIáº¾T THÃ”NG TIN --- */
.channel-details {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    text-align: center;
    width: 100%;
}

.channel-title-row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    text-align: center;
    gap: 16px;
    margin-bottom: 16px;
}

.channel-name {
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    word-break: break-word;
    color: var(--color-text-title);
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.channel-id {
    font-size: 0.95rem;
    margin-top: 4px;
    font-weight: 500;
}

.channel-bio {
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* --- NÃšT CHá»ˆNH Sá»¬A --- */
.btn-edit-channel {
    background-color: transparent;
    color: var(--color-text-title);
    border: 1px solid var(--color-border);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.btn-edit-channel:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* --- THá»NG KÃŠ (STATS) --- */
.channel-stats {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 16px;
    border-top: 1px solid var(--color-border);
    padding-top: 20px;
}

.stat-item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    width: 100%;
}

.stat-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text-title);
}

.stat-label {
    font-size: 0.85rem;
}

.stat-divider {
    display: none;
}

/* Cá»˜T PHáº¢I (Ná»™i dung main) */
.profile-main-area {
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
    min-width: 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
}

/* ==========================================
   5. TABS & ACTIONS
========================================== */
.content-tabs-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: space-between;
    -ms-flex-pack: space-between;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    margin-bottom: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.tabs-group {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    gap: 12px;
}

.tab-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--color-text-title);
    -webkit-transition: all 0.2s ease;
    -moz-transition: all 0.2s ease;
    -ms-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.tab-btn.active {
    background-color: var(--color-primary);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.25);
}

.tabs-actions {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    gap: 12px;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
}

.btn-upload {
    background-color: var(--color-primary);
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

.btn-upload:hover {
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
}

.btn-sort {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--color-text-title);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-sort:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* ==========================================
   6. VIDEO GRID & EMPTY STATE
========================================== */
.empty-state {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--color-text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: #CCC;
}

.empty-state p {
    font-size: 1.1rem;
    font-weight: 500;
}

.video-grid {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.video-card {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 12px;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -ms-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.video-card:hover {
    -webkit-transform: translateY(-8px);
    -moz-transform: translateY(-8px);
    -ms-transform: translateY(-8px);
    -o-transform: translateY(-8px);
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.15);
    border-color: rgba(0, 229, 255, 0.3);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-transition: transform 0.3s ease;
    -moz-transition: transform 0.3s ease;
    -ms-transition: transform 0.3s ease;
    -o-transition: transform 0.3s ease;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    -webkit-transform: scale(1.05);
    -moz-transform: scale(1.05);
    -ms-transform: scale(1.05);
    -o-transform: scale(1.05);
    transform: scale(1.05);
    /* Hiá»‡u á»©ng phÃ³ng to mÆ°á»£t mÃ  */
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #FFFFFF;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 3px 6px;
    border-radius: 4px;
}

.video-info {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 4px;
}

.video-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Hiá»‡n tá»‘i Ä‘a 2 dÃ²ng */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Táº¡o dáº¥u 3 cháº¥m náº¿u dÆ° */
}

.video-meta {
    font-size: 0.85rem;
}

/* ==========================================
   7. MODAL EDIT PROFILE
========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    /* Bá»‹ áº©n máº·c Ä‘á»‹nh */
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    opacity: 0;
    -webkit-transition: opacity 0.3s ease;
    -moz-transition: opacity 0.3s ease;
    -ms-transition: opacity 0.3s ease;
    -o-transition: opacity 0.3s ease;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    opacity: 1;
}

.modal-container {
    background-color: var(--color-bg-sidebar);
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    -webkit-transform: translateY(20px);
    -moz-transform: translateY(20px);
    -ms-transform: translateY(20px);
    -o-transform: translateY(20px);
    transform: translateY(20px);
    -webkit-transition: transform 0.3s ease;
    -moz-transition: transform 0.3s ease;
    -ms-transition: transform 0.3s ease;
    -o-transition: transform 0.3s ease;
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-container {
    -webkit-transform: translateY(0);
    -moz-transform: translateY(0);
    -ms-transform: translateY(0);
    -o-transform: translateY(0);
    transform: translateY(0);
}

.modal-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: space-between;
    -ms-flex-pack: space-between;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
    font-size: 1.25rem;
    margin: 0;
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-muted);
    -webkit-transition: color 0.2s;
    -moz-transition: color 0.2s;
    -ms-transition: color 0.2s;
    -o-transition: color 0.2s;
    transition: color 0.2s;
}

.btn-close-modal:hover {
    color: var(--color-text-title);
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
}

.form-row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    gap: 16px;
    -webkit-box-align: flex-start;
    -ms-flex-align: flex-start;
    -webkit-align-items: flex-start;
    align-items: flex-start;
    /* Sáº¯p xáº¿p gá»n gÃ ng, khÃ´ng bá»‹ kÃ©o chá»¯ */
}

.form-row .form-group {
    flex: 1;
    width: 100%;
    /* Äáº£m báº£o khÃ´ng bá»‹ láº¥n chÃ©o */
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text-title);
}

.form-group input[type="text"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--color-text-title);
    background-color: rgba(255, 255, 255, 0.05);
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
    resize: vertical;
}

.form-group input[type="text"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: rgba(255, 255, 255, 0.1);
}

.form-group select option {
    background-color: #06090F;
    color: #FFFFFF;
}

.avatar-preview-box,
.cover-preview-box {
    margin-top: 12px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    gap: 16px;
}

.avatar-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--color-border);
}

.cover-preview {
    width: 100%;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--color-border);
}

.form-group input[type="file"] {
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px dashed var(--color-border);
    cursor: pointer;
    font-size: 0.85rem;
    border-radius: 8px;
}

.form-group input[type="file"]::file-selector-button {
    background-color: var(--color-primary);
    color: #000;
    font-weight: 600;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 12px;
    -webkit-transition: opacity 0.2s;
    transition: opacity 0.2s;
}

.form-group input[type="file"]::file-selector-button:hover {
    opacity: 0.85;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--color-border);
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: flex-end;
    -ms-flex-pack: flex-end;
    -webkit-justify-content: flex-end;
    justify-content: flex-end;
    gap: 12px;
}

.btn-cancel {
    padding: 10px 20px;
    background-color: transparent;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    color: var(--color-text-title);
    -webkit-transition: background-color 0.2s;
    -moz-transition: background-color 0.2s;
    -ms-transition: background-color 0.2s;
    -o-transition: background-color 0.2s;
    transition: background-color 0.2s;
}

.btn-cancel:hover {
    background-color: var(--color-hover);
}

.btn-save {
    padding: 10px 24px;
    background-color: var(--color-primary);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    -webkit-transition: all 0.2s ease-in-out;
    -moz-transition: all 0.2s ease-in-out;
    -ms-transition: all 0.2s ease-in-out;
    -o-transition: all 0.2s ease-in-out;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.25);
}

.btn-save:hover {
    opacity: 1;
    box-shadow: 0 4px 25px rgba(0, 229, 255, 0.6);
}

/* ==========================================
   8. MODAL UPLOAD VIDEO
========================================== */
/* Äáº£m báº£o Form luÃ´n áº©n máº·c Ä‘á»‹nh, chá»‰ hiá»‡n qua JS */
#upload-modal {
    display: none;
}

/* Khi upload-modal káº¿t há»£p cÃ¹ng class show (JS) */
#upload-modal.show {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
}

/* Vi chá»‰nh kÃ­ch thÆ°á»›c cho Modal 2 cá»™t vÃ  Ä‘á»• bÃ³ng má» chuáº©n */
#upload-modal .modal-container {
    max-width: 750px;
    width: 90%;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

/* Má»Ÿ rá»™ng style cho input date, number */
.form-group input[type="date"],
.form-group input[type="number"] {
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--color-text-title);
    background-color: rgba(255, 255, 255, 0.05);
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
    width: 100%;
}

.form-group input[type="date"]:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: rgba(255, 255, 255, 0.1);
}

/* CÄƒn chá»‰nh nhÃ£n cÃ³ Icon */
#upload-modal label {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    gap: 6px;
    /* Khoáº£ng cÃ¡ch giá»¯a icon vÃ  chá»¯ */
}

/* Thiáº¿t láº­p mÃ u sáº¯c riÃªng biá»‡t cho tá»«ng icon thá»‘ng kÃª */
#upload-modal label i.ph-eye {
    color: #2196F3;
    /* Máº¯t xanh dÆ°Æ¡ng */
    font-size: 1.2rem;
}

#upload-modal label i.ph-thumbs-up {
    color: #F44336;
    /* Tim Ä‘á» */
    font-size: 1.2rem;
}

#upload-modal label i.ph-chat-circle {
    color: #FF9800;
    /* Tin nháº¯n cam */
    font-size: 1.2rem;
}

#upload-modal label i.ph-share-network {
    color: #4CAF50;
    /* Chia sáº» xanh lÃ¡ */
    font-size: 1.2rem;
}

/* --- VÃ¹ng chá»n file Video --- */
.video-drop-zone {
    border: 2px dashed #90CAF9;
    background-color: #E3F2FD;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    -webkit-transition: all 0.2s ease;
    -moz-transition: all 0.2s ease;
    -ms-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
    transition: all 0.2s ease;
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
}

.video-drop-zone:hover {
    background-color: #BBDEFB;
    border-color: #42A5F5;
}

.video-drop-zone p {
    color: #1976D2;
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0;
}

/* ==========================================
   9. VIDEO VIEW PAGE (video.html)
========================================== */
.video-view-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: row-reverse;
    -ms-flex-direction: row-reverse;
    flex-direction: row-reverse;
    gap: 20px;
    -webkit-box-align: flex-start;
    -ms-flex-align: flex-start;
    -webkit-align-items: flex-start;
    align-items: flex-start;
}

/* --- Cá»™t TrÃ¡i: Chá»‰ Khung Video --- */
.video-left-col {
    flex: 7;
    /* Chiáº¿m 70% */
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    /* Canh giá»¯a khung video dá»c */
    height: calc(100vh - 120px);
}

.video-player-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
    background-color: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-placeholder {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 120px);
    object-fit: contain;
    border-radius: 15px;
    display: block;
}

/* FullScreen: video luÃ´n hiá»ƒn thá»‹ Ä‘Ãºng tá»‰ lá»‡ gá»‘c */
.video-placeholder:fullscreen {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    background-color: #000;
    border-radius: 0;
}

.video-placeholder:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    background-color: #000;
    border-radius: 0;
}

.video-placeholder:-moz-full-screen {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    background-color: #000;
    border-radius: 0;
}

.video-placeholder:-ms-fullscreen {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    background-color: #000;
    border-radius: 0;
}

/* Wrapper khi fullscreen */
.video-player-wrapper:fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    border-radius: 0;
    background: #000;
}

.video-player-wrapper:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    border-radius: 0;
    background: #000;
}

.video-controls-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: flex-end;
    -ms-flex-pack: flex-end;
    -webkit-justify-content: flex-end;
    justify-content: flex-end;
}

.video-progress-bar {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin-bottom: 12px;
    cursor: pointer;
}

.progress-filled {
    height: 100%;
    width: 53%;
    background-color: #FF0000;
    border-radius: 2px;
}

.video-playback-controls {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: space-between;
    -ms-flex-pack: space-between;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
}

.playback-left,
.playback-right {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    gap: 16px;
}

.playback-left i,
.playback-right i {
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

.time-display {
    font-size: 0.9rem;
    color: white;
}

/* --- Cá»™t Pháº£i: ThÃ´ng tin & BÃ¬nh luáº­n --- */
.video-right-col {
    flex: 3;
    /* Chiáº¿m 30% */
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    height: calc(100vh - 120px);
    overflow-y: auto;
}

.video-right-col::-webkit-scrollbar {
    width: 6px;
}

.video-right-col::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}

.yt-video-title {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-text-title);
    margin: 0;
}

.yt-channel-group {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    gap: 14px;
}

.yt-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.yt-channel-info {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    flex-grow: 1;
}

.channel-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.yt-channel-name {
    font-weight: 600;
    font-size: 1.05rem;
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    gap: 6px;
}

.yt-channel-subs {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 3px;
}



.yt-action-buttons {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    /* In case the right column gets too narrow */
}

.yt-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--color-text-title);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 18px;
    border-radius: 24px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.yt-action-btn:hover {
    background-color: rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.4);
    color: var(--color-primary);
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.2);
}

.yt-action-btn i {
    font-size: 1.3rem;
}

.yt-description-box {
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
}

.yt-desc-meta {
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.yt-hashtags {
    color: var(--color-primary);
    margin-left: 8px;
    font-weight: 500;
}

.yt-desc-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--color-text-title);
    white-space: pre-wrap;
}

.video-description-container {
    max-height: 100px;
    overflow: hidden;
    -webkit-transition: max-height 0.3s ease-out;
    -moz-transition: max-height 0.3s ease-out;
    -ms-transition: max-height 0.3s ease-out;
    -o-transition: max-height 0.3s ease-out;
    transition: max-height 0.3s ease-out;
}

.video-description-container.expanded {
    max-height: none !important;
}

.yt-show-more-btn {
    background: transparent;
    border: none;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-text-title);
    cursor: pointer;
    margin-top: 8px;
    align-self: flex-start;
    padding: 0;
}

/* --- Comments Section --- */
.comments-section {
    margin-top: 10px;
    border-top: 1px solid var(--color-border);
    padding-top: 20px;
}

.comments-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: space-between;
    -ms-flex-pack: space-between;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    margin-bottom: 20px;
}

.comments-header h3 {
    font-size: 1.2rem;
    margin: 0;
}

.sort-comments {
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    gap: 4px;
}

.comment-input-area {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.comment-input-area .comment-avatar {
    width: 40px;
    height: 40px;
}

.comment-input-wrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--color-border);
    transition: border-color 0.2s;
}

.comment-input-wrapper:focus-within {
    border-bottom-color: var(--color-primary);
}

.comment-input {
    flex-grow: 1;
    border: none;
    padding: 8px 0;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    background: transparent;
    color: var(--color-text-title);
}

.comment-input::placeholder {
    color: var(--color-text-muted);
}

.comment-input:focus {
    border-bottom-color: var(--color-text-title);
}

.btn-send-comment {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 1.3rem;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s;
    pointer-events: none;
}

.btn-send-comment.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.btn-send-comment:hover {
    background: var(--color-hover);
}

/* ÄÃ¡nh giÃ¡ má»›i cá»§a ngÆ°á»i dÃ¹ng ná»•i báº­t hÆ¡n */
.comment-item.user-comment {
    background: rgba(0, 229, 255, 0.04);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(0, 229, 255, 0.1);
    animation: fadeInComment 0.4s ease;
}

@keyframes fadeInComment {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.comments-list {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 20px;
}

.comment-item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    gap: 12px;
}

.comment-item .comment-avatar {
    width: 40px;
    height: 40px;
}

.comment-content {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
}

.comment-author {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    gap: 8px;
}

.comment-time {
    font-weight: 400;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.comment-text {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 8px;
}

.comment-actions {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.comment-actions i {
    font-size: 1.1rem;
    cursor: pointer;
}

.reply-btn {
    cursor: pointer;
}

/* ==========================================
   GOOGLE SIGN-IN FOR COMMENTS
========================================== */
.google-login-prompt {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-bottom: 20px;
}

.google-login-prompt p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    flex: 1;
    margin: 0;
}

/* Override Google button container */
#google-signin-btn {
    flex-shrink: 0;
}

.btn-google-signout {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    color: var(--color-text-muted);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
    margin-left: 4px;
}

.btn-google-signout:hover {
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
}

/* ÄÃ¡nh giÃ¡ má»›i cá»§a ngÆ°á»i dÃ¹ng ná»•i báº­t */
.comment-item.user-comment {
    background: rgba(0, 229, 255, 0.04);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(0, 229, 255, 0.1);
    animation: fadeInComment 0.4s ease;
}

@keyframes fadeInComment {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   11. UPLOAD PROGRESS & CONFIRM MODALS
========================================== */
.progress-bar-bg {
    width: 100%;
    height: 8px;
    background-color: #E0E0E0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background-color: #065fd4;
    -webkit-transition: width 0.1s linear;
    -moz-transition: width 0.1s linear;
    -ms-transition: width 0.1s linear;
    -o-transition: width 0.1s linear;
    transition: width 0.1s linear;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.spinner-icon {
    animation: spin 1s linear infinite;
    font-size: 1.5rem;
    color: #065fd4;
}

/* Card Options Menu */
.video-options {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
}

.btn-video-options {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    -webkit-transition: background 0.2s;
    -moz-transition: background 0.2s;
    -ms-transition: background 0.2s;
    -o-transition: background 0.2s;
    transition: background 0.2s;
}

.btn-video-options:hover {
    background: rgba(0, 0, 0, 0.8);
}

.video-options-menu {
    position: absolute;
    top: 40px;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: max-content;
    display: none;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
}

.video-options-menu.show {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
}

.video-options-menu button {
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    -webkit-transition: background 0.2s;
    -moz-transition: background 0.2s;
    -ms-transition: background 0.2s;
    -o-transition: background 0.2s;
    transition: background 0.2s;
}

.video-options-menu button:hover {
    background: #f0f0f0;
}

.video-options-menu button.text-danger {
    color: #f44336;
}

.video-options-menu button.text-danger:hover {
    background: #ffebee;
}

/* Biá»ƒu tÆ°á»£ng tráº¡ng thÃ¡i Public/Private */
.video-status-icon {
    font-size: 0.9rem;
    border-radius: 50%;
    background: #f2f2f2;
    padding: 4px;
    color: #333;
    margin-right: 4px;
    vertical-align: middle;
}

/* NÃºt xÃ³a Ä‘á» */
.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    -webkit-transition: background 0.2s, transform 0.1s;
    -moz-transition: background 0.2s, transform 0.1s;
    -ms-transition: background 0.2s, transform 0.1s;
    -o-transition: background 0.2s, transform 0.1s;
    transition: background 0.2s, transform 0.1s;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-danger:active {
    -webkit-transform: scale(0.98);
    -moz-transform: scale(0.98);
    -ms-transform: scale(0.98);
    -o-transform: scale(0.98);
    transform: scale(0.98);
}

.logo-text,
#sidebar-logo {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.5rem;
    letter-spacing: 1px;
    color: var(--color-primary);
    text-decoration: none;
}

/* ==========================================
   STATISTICS DASHBOARD
========================================== */

/* Page header */
.stats-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 8px;
}

.stats-page-title {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.stats-page-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 4px 0 0;
}

.stats-last-updated {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    background: rgba(255,255,255,0.05);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08);
}

/* Overview Cards Grid */
.stats-overview-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 18px;
    padding: 20px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: statCardIn 0.4s ease both;
    cursor: default;
}

@keyframes statCardIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.10s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.20s; }
.stat-card:nth-child(5) { animation-delay: 0.25s; }

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.25);
}

.stat-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon { font-size: 1.4rem; }

/* Card colour variants */
.stat-card--cyan   { border-color: rgba(0,229,255,0.2); }
.stat-card--cyan   .stat-icon-wrap { background: rgba(0,229,255,0.12); }
.stat-card--cyan   .stat-icon { color: #00e5ff; }
.stat-card--cyan   .stat-card-value { color: #00e5ff; }

.stat-card--blue   { border-color: rgba(66,133,244,0.2); }
.stat-card--blue   .stat-icon-wrap { background: rgba(66,133,244,0.12); }
.stat-card--blue   .stat-icon { color: #4285F4; }
.stat-card--blue   .stat-card-value { color: #4285F4; }

.stat-card--red    { border-color: rgba(229,57,53,0.2); }
.stat-card--red    .stat-icon-wrap { background: rgba(229,57,53,0.12); }
.stat-card--red    .stat-icon { color: #E53935; }
.stat-card--red    .stat-card-value { color: #E53935; }

.stat-card--orange { border-color: rgba(255,152,0,0.2); }
.stat-card--orange .stat-icon-wrap { background: rgba(255,152,0,0.12); }
.stat-card--orange .stat-icon { color: #FF9800; }
.stat-card--orange .stat-card-value { color: #FF9800; }

.stat-card--green  { border-color: rgba(76,175,80,0.2); }
.stat-card--green  .stat-icon-wrap { background: rgba(76,175,80,0.12); }
.stat-card--green  .stat-icon { color: #4CAF50; }
.stat-card--green  .stat-card-value { color: #4CAF50; }

.stat-card-info { flex: 1; min-width: 0; }

.stat-card-label {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-card-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
}

/* Middle row: Top Performer + Bar Chart */
.stats-middle-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 24px;
}

/* Top Performer */
.top-performer-section,
.bar-chart-section {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 18px;
    padding: 22px;
}

.section-heading {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.section-heading i { font-size: 1rem; color: #FFD700; }

.top-performer-card {
    display: flex;
    gap: 14px;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.2s;
}
.top-performer-card:hover { opacity: 0.82; }

.top-performer-thumb {
    width: 110px;
    height: 62px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.top-performer-info { flex: 1; min-width: 0; }

.top-performer-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.top-performer-date {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.top-performer-stats {
    display: flex;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.top-performer-stats span { display: flex; align-items: center; gap: 4px; }
.top-performer-stats i { font-size: 1rem; }

/* Bar Chart */
.bar-chart-list { display: flex; flex-direction: column; gap: 12px; }

.bar-chart-item { display: flex; flex-direction: column; gap: 5px; }

.bar-chart-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.bar-chart-name {
    font-size: 0.82rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.bar-chart-val {
    font-size: 0.78rem;
    color: var(--color-primary);
    font-weight: 700;
    flex-shrink: 0;
}

.bar-chart-track {
    width: 100%;
    height: 7px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    overflow: hidden;
}

.bar-chart-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
    background: linear-gradient(90deg, var(--color-primary), #0099ff);
}

/* Bar chart color variants per rank */
.bar-chart-item:nth-child(1) .bar-chart-fill { background: linear-gradient(90deg, #00e5ff, #0099ff); }
.bar-chart-item:nth-child(2) .bar-chart-fill { background: linear-gradient(90deg, #4285F4, #7b5ea7); }
.bar-chart-item:nth-child(3) .bar-chart-fill { background: linear-gradient(90deg, #E53935, #FF5722); }
.bar-chart-item:nth-child(4) .bar-chart-fill { background: linear-gradient(90deg, #FF9800, #FFC107); }
.bar-chart-item:nth-child(5) .bar-chart-fill { background: linear-gradient(90deg, #4CAF50, #8BC34A); }

/* Statistics Table */
.stats-table-container {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 18px;
    overflow: hidden;
}

.stats-table-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.stats-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.stats-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: background 0.15s;
    animation: tableRowIn 0.3s ease both;
}

@keyframes tableRowIn {
    from { opacity: 0; transform: translateX(-6px); }
    to   { opacity: 1; transform: translateX(0); }
}

.stats-table tbody tr:hover {
    background: rgba(255,255,255,0.04);
}

.stats-table tbody tr:last-child { border-bottom: none; }

.stats-table td {
    padding: 12px 16px;
    vertical-align: middle;
}

.stat-video-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-video-thumb {
    width: 72px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
}

.stat-video-title {
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Empty State */
.stats-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    gap: 12px;
}

.stats-empty-state i {
    font-size: 3rem;
    color: var(--color-text-muted);
    opacity: 0.4;
}

.stats-empty-state p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Animation delays for stat cards */
.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.10s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.20s; }
.stat-card:nth-child(5) { animation-delay: 0.25s; }


/* ==========================================
/* ==============================================
   RESPONSIVE - TABLET & MOBILE
=============================================== */

/* --- Tablet: 2-col video grid --- */
@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* --- Mobile <= 768px --- */
@media (max-width: 768px) {

    /* Layout */
    .sidebar { display: none !important; }
    .main-content { width: 100%; }
    .topbar { display: none; }
    .content-wrapper { padding: 12px 14px !important; }
    .app-container { padding-bottom: 58px !important; }

    /* Video grid: 1 col */
    .video-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* Banner */
    .cover-image { height: 110px !important; }
    .cover-text { font-size: 1.5rem; bottom: 12px; right: 16px; }

    /* Profile layout */
    .profile-content-layout { flex-direction: column; gap: 0; }
    .channel-info-container {
        width: 100%;
        flex-direction: column;
        align-items: center;
        margin-top: -40px;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
    }
    .channel-avatar-wrapper { margin-right: 0; margin-bottom: 12px; justify-content: center; }
    .channel-avatar { width: 100px; height: 100px; border-width: 4px; }
    .channel-details {
        display: flex; flex-direction: column; align-items: center;
        text-align: center; width: 100%; margin-top: 0;
    }
    .channel-title-row { flex-direction: column; align-items: center; gap: 12px; margin-bottom: 12px; }
    .channel-stats { flex-direction: row; gap: 16px; justify-content: center; border-top: none; padding-top: 0; }
    .stat-item { flex-direction: column; width: auto; }
    .stat-value { font-size: 1rem; }
    .stat-label { font-size: 0.75rem; }
    .channel-bio { margin-bottom: 16px; }

    /* Tabs */
    .content-tabs-container { flex-direction: column; gap: 16px; align-items: stretch; }
    .tabs-actions { justify-content: center; width: 100%; }
    .tabs-group { justify-content: center; width: 100%; overflow-x: auto; }

    /* Action buttons */
    .yt-action-btn { padding: 8px 14px; font-size: 0.85rem; }
    .yt-action-btn i { font-size: 1.3rem; }
    .action-btn { width: 45px; height: 45px; }

    /* Video page */
    .video-view-container { flex-direction: column; align-items: flex-start; gap: 0; }
    .video-left-col { width: 100vw; margin-left: -14px; margin-right: -14px; height: auto; }
    .video-player-wrapper { width: 100%; max-width: 100vw; height: auto; border-radius: 0; box-shadow: none; min-height: auto; max-height: none; }
    .video-right-col { width: 100%; height: auto; overflow-y: visible; padding: 16px 0; display: flex; flex-direction: column; gap: 12px; }
    .yt-description-box { display: contents; }
    .yt-video-title { order: 1; font-size: 1.15rem; margin-bottom: 0; }
    .yt-desc-meta { order: 2; margin-bottom: 0; font-size: 0.85rem; }
    .yt-action-buttons { order: 3; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -ms-overflow-style: none; scrollbar-width: none; gap: 8px; }
    .yt-action-buttons::-webkit-scrollbar { display: none; }
    .yt-action-btn { background-color: rgba(255,255,255,0.08); border: none; border-radius: 20px; white-space: nowrap; }
    .yt-channel-group { order: 4; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); padding: 12px 0; margin: 8px 0; }
    .yt-channel-name { font-size: 0.95rem; }
    .yt-avatar { width: 36px; height: 36px; }
    .video-description-container { order: 5; font-size: 0.85rem; }
    .yt-show-more-btn { order: 6; font-size: 0.85rem; margin-top: 0; }
    .comments-section { order: 7; margin-top: 8px; }

    /* Statistics dashboard */
    .stats-overview-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .stat-card { padding: 14px 12px !important; gap: 10px !important; }
    .stat-card-value { font-size: 1.3rem !important; }
    .stat-icon-wrap { width: 38px !important; height: 38px !important; }
    .stat-icon { font-size: 1.25rem !important; }
    .stats-middle-row { grid-template-columns: 1fr !important; }
    .stats-page-header { flex-direction: column !important; gap: 6px !important; }
    .stats-page-title { font-size: 1.2rem !important; }

    /* Modals */
    .modal-container { width: 95% !important; max-height: 90vh !important; border-radius: 16px !important; overflow-y: auto; }
    .vstat-modal { max-width: 100% !important; border-radius: 16px !important; padding: 20px 16px !important; }
    .vstat-numbers { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
    .vstat-num-val { font-size: 1.2rem !important; }

    /* =====================
       BOTTOM NAVIGATION
    ===================== */
    .bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0; left: 0;
        width: 100%;
        background: rgba(10, 14, 23, 0.96) !important;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255,255,255,0.08) !important;
        height: 58px;
        z-index: 1000;
        justify-content: space-around !important;
        align-items: stretch;
        padding: 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.35);
    }

    .bottom-nav-item {
        flex: 1 1 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        color: rgba(255,255,255,0.4);
        text-decoration: none;
        gap: 2px;
        padding: 5px 1px;
        transition: color 0.2s;
        position: relative;
        min-width: 0;
        overflow: visible;
    }

    .bottom-nav-item i {
        font-size: 1.25rem !important;
        line-height: 1;
        flex-shrink: 0;
    }

    .bottom-nav-item span {
        font-size: 0.56rem !important;
        font-weight: 500;
        display: block !important;
        overflow: visible !important;
        white-space: nowrap;
        max-width: none;
        line-height: 1.2;
        text-align: center;
    }

    .bottom-nav-item.active {
        color: var(--color-primary, #00e5ff) !important;
    }

    .bottom-nav-item.active span {
        font-weight: 700;
    }

    .bottom-nav-item.active::before {
        content: '';
        position: absolute;
        top: 0; left: 20%; right: 20%;
        height: 2px;
        border-radius: 0 0 3px 3px;
        background: var(--color-primary, #00e5ff);
        box-shadow: 0 0 8px var(--color-primary, #00e5ff);
    }
}

/* --- Desktop: hide bottom nav --- */
@media (min-width: 769px) {
    .bottom-nav { display: none !important; }
}

/* --- Landscape phone --- */
@media (max-width: 768px) and (orientation: landscape) {
    .bottom-nav { height: 48px !important; }
    .bottom-nav-item span { display: none !important; }
    .bottom-nav-item i { font-size: 1.2rem !important; }
    .cover-image { height: 80px !important; }
}

/* --- Extra small: <= 480px --- */
@media (max-width: 480px) {
    .content-wrapper { padding: 10px 12px !important; }
    .stats-overview-grid { grid-template-columns: 1fr 1fr !important; }
    .tabs-group { overflow-x: auto !important; flex-wrap: nowrap !important; -ms-overflow-style: none; scrollbar-width: none; }
    .tabs-group::-webkit-scrollbar { display: none; }
    .contact-grid { grid-template-columns: 1fr !important; }
    .owner-card { flex-direction: column !important; text-align: center; align-items: center !important; }
    .cf-grid { grid-template-columns: 1fr !important; }
    .bottom-nav-item i { font-size: 1.1rem !important; }
    .bottom-nav-item span { font-size: 0.52rem !important; overflow: visible !important; }
}

/* ==========================================
   STATS DASHBOARD - UPGRADED DESIGN
========================================== */

/* Section label dùng chung */
.stats-section-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}
.stats-section-label i { font-size: 1rem; color: #FFD700; }

/* Card label (in stat-card-info) */
.stat-card-title {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-bottom: 4px;
    display: block;
}

/* Upgrade: stat card hover glow */
.stat-card--cyan:hover   { box-shadow: 0 8px 32px rgba(0,229,255,0.15); }
.stat-card--blue:hover   { box-shadow: 0 8px 32px rgba(66,133,244,0.15); }
.stat-card--red:hover    { box-shadow: 0 8px 32px rgba(229,57,53,0.15); }
.stat-card--orange:hover { box-shadow: 0 8px 32px rgba(255,152,0,0.15); }
.stat-card--green:hover  { box-shadow: 0 8px 32px rgba(76,175,80,0.15); }

/* Top performer section & bar chart */
.stats-top-performer,
.stats-bar-chart-section {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 18px;
    padding: 22px;
    transition: box-shadow 0.25s;
}
.stats-top-performer:hover,
.stats-bar-chart-section:hover {
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

/* Stats table row: more padding & visual hover */
.stats-table tbody tr:hover td:first-child .stat-video-title {
    color: var(--color-primary);
}

/* Table row click cursor */
.stats-table tbody tr { cursor: pointer; }

/* ==========================================
   VIDEO STATS MODAL - PREMIUM REDESIGN
========================================== */

.vstat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: vstatFadeIn 0.2s ease;
}

@keyframes vstatFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.vstat-modal {
    background: linear-gradient(145deg, rgba(18,24,38,0.98), rgba(12,16,28,0.98));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
    animation: vstatSlideUp 0.28s cubic-bezier(0.34,1.56,0.64,1);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

@keyframes vstatSlideUp {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* Header bar */
.vstat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.vstat-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary, #00e5ff);
}

.vstat-badge i { font-size: 1rem; }

.vstat-close {
    width: 32px; height: 32px;
    border: none;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s, color 0.2s;
}
.vstat-close:hover { background: rgba(229,57,53,0.2); color: #E53935; }

/* Hero: thumbnail + title */
.vstat-hero {
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 20px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.vstat-thumb-wrap {
    position: relative;
    width: 160px;
    flex-shrink: 0;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
}

.vstat-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.vstat-thumb-wrap:hover .vstat-thumb { transform: scale(1.04); }

.vstat-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    transition: opacity 0.2s;
}
.vstat-thumb-wrap:hover .vstat-play-overlay { opacity: 1; }
.vstat-play-overlay i { font-size: 2.5rem; color: #fff; }

.vstat-title-block { flex: 1; min-width: 0; }

.vstat-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 8px;
}

.vstat-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
}

/* 4 Stat Number Boxes */
.vstat-numbers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.vstat-num-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 12px;
    border-right: 1px solid rgba(255,255,255,0.05);
    position: relative;
    transition: background 0.2s;
}
.vstat-num-item:last-child { border-right: none; }
.vstat-num-item:hover { background: rgba(255,255,255,0.03); }

.vstat-num-item i {
    font-size: 1.4rem;
    line-height: 1;
}

.vstat-num-val {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.vstat-num-label {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    font-weight: 500;
    text-align: center;
}

/* Color variants for num items */
.vstat-num--blue i, .vstat-num--blue .vstat-num-val { color: #4285F4; }
.vstat-num--red  i, .vstat-num--red  .vstat-num-val { color: #E53935; }
.vstat-num--orange i, .vstat-num--orange .vstat-num-val { color: #FF9800; }
.vstat-num--green i, .vstat-num--green .vstat-num-val { color: #4CAF50; }

/* Glow accent top border on active stat */
.vstat-num--blue::before   { content:''; position:absolute; top:0; left:20%; right:20%; height:2px; background:#4285F4; border-radius:0 0 3px 3px; }
.vstat-num--red::before    { content:''; position:absolute; top:0; left:20%; right:20%; height:2px; background:#E53935; border-radius:0 0 3px 3px; }
.vstat-num--orange::before { content:''; position:absolute; top:0; left:20%; right:20%; height:2px; background:#FF9800; border-radius:0 0 3px 3px; }
.vstat-num--green::before  { content:''; position:absolute; top:0; left:20%; right:20%; height:2px; background:#4CAF50; border-radius:0 0 3px 3px; }

/* Engagement ratio */
.vstat-ratio-section {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.vstat-ratio-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    margin-bottom: 10px;
    color: var(--color-text-muted);
}

.vstat-ratio-pct {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary, #00e5ff);
}

.vstat-ratio-track {
    height: 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
    overflow: hidden;
    display: flex;
}

.vstat-ratio-seg {
    height: 100%;
    transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}

.vstat-seg--red    { background: #E53935; }
.vstat-seg--orange { background: #FF9800; }
.vstat-seg--green  { background: #4CAF50; }

.vstat-ratio-legend {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    vertical-align: middle;
}
.dot--red    { background: #E53935; }
.dot--orange { background: #FF9800; }
.dot--green  { background: #4CAF50; }

/* Watch button */
.vstat-watch-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 44px);
    margin: 18px 22px;
    padding: 13px 0;
    background: linear-gradient(90deg, var(--color-primary, #00e5ff), #0099ff);
    border: none;
    border-radius: 14px;
    color: #000;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(0,229,255,0.25);
}

.vstat-watch-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,229,255,0.35);
}

.vstat-watch-btn i { font-size: 1.2rem; }

/* Mobile modal */
@media (max-width: 600px) {
    .vstat-modal { border-radius: 20px 20px 0 0; margin-top: auto; max-height: 88vh; }
    .vstat-overlay { align-items: flex-end; padding: 0; }
    .vstat-hero { flex-direction: column; align-items: flex-start; }
    .vstat-thumb-wrap { width: 100%; }
    .vstat-numbers { grid-template-columns: repeat(2, 1fr); }
    .vstat-num-item:nth-child(2) { border-right: none; }
    .vstat-num-item:nth-child(3) { border-top: 1px solid rgba(255,255,255,0.05); }
    .vstat-num-item:nth-child(4) { border-top: 1px solid rgba(255,255,255,0.05); }
}

/* ============================================================
   RESPONSIVE - TỐI ƯU MỌI THIẾT BỊ
   Thêm hoàn toàn mới - không sửa CSS cũ
   
   Breakpoints:
   - 480px    : Điện thoại nhỏ (iPhone SE, Redmi 9A...)
   - 768px    : Điện thoại lớn / Phablet
   - 1024px   : Tablet (iPad)
   - 1280px   : Laptop 13" (MacBook Air, Surface)
   - 1440px   : Laptop 14-15" (ThinkPad, Dell XPS)
   - 1920px   : Desktop 24" Full HD
   - 2560px+  : Desktop 27" 2K / 4K
============================================================ */

/* ── Laptop nhỏ 13" (1024px – 1280px) ─────────────────── */
@media (min-width: 1024px) and (max-width: 1280px) {
    :root { --sidebar-width: 210px; }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
    }

    .stats-overview-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .content-wrapper { padding: 20px 22px; }
}

/* ── Laptop 14-15" (1280px – 1440px) ──────────────────── */
@media (min-width: 1280px) and (max-width: 1440px) {
    :root { --sidebar-width: 230px; }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    }

    .stats-overview-grid {
        grid-template-columns: repeat(5, 1fr) !important;
    }

    .content-wrapper { padding: 24px 28px; }
    .channel-avatar { width: 130px !important; height: 130px !important; }
}

/* ── Desktop 24" Full HD (1440px – 1920px) ─────────────── */
@media (min-width: 1440px) and (max-width: 1920px) {
    :root { --sidebar-width: 260px; }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)) !important;
    }

    .stats-overview-grid {
        grid-template-columns: repeat(5, 1fr) !important;
    }

    .content-wrapper { padding: 28px 36px; }

    .channel-avatar { width: 150px !important; height: 150px !important; }
    .channel-name   { font-size: 2.4rem !important; }

    .video-card-title { font-size: 1rem !important; }

    /* Topbar lớn hơn trên Desktop */
    .topbar { padding: 0 28px; height: 64px; }

    /* Sidebar rộng hơn */
    .sidebar { padding: 20px 14px; }
    .nav-item { padding: 11px 14px; font-size: 0.95rem; }
}

/* ── Màn 2K / 27"+ (1920px+) ────────────────────────────── */
@media (min-width: 1920px) {
    :root { --sidebar-width: 280px; }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
        gap: 20px !important;
    }

    .stats-overview-grid {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 20px !important;
    }

    .content-wrapper { padding: 32px 48px; }

    /* Giới hạn chiều rộng tối đa để không bị loãng quá */
    .main-content {
        max-width: 1800px;
        margin-left: auto;
        margin-right: auto;
    }

    .channel-avatar { width: 170px !important; height: 170px !important; }
    .channel-name   { font-size: 2.8rem !important; }
    .cover-image    { height: 300px !important; border-radius: 20px !important; }

    .video-card-title    { font-size: 1.05rem !important; }
    .video-card-meta     { font-size: 0.82rem !important; }

    .topbar { padding: 0 36px; height: 68px; }
    .nav-item { padding: 12px 16px; font-size: 1rem; }
    .logo-text { font-size: 1.3rem !important; }
}

/* ── Màn 4K (2560px+) ──────────────────────────────────── */
@media (min-width: 2560px) {
    :root { --sidebar-width: 300px; }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)) !important;
        gap: 24px !important;
    }

    .main-content { max-width: 2200px; }
    .content-wrapper { padding: 40px 60px; }
    .channel-avatar { width: 200px !important; height: 200px !important; }
    .cover-image    { height: 360px !important; }
    .channel-name   { font-size: 3.2rem !important; }
}

/* ── Điện thoại nhỏ 320-375px (iPhone SE, Redmi cũ) ───── */
@media (max-width: 375px) {
    .content-wrapper { padding: 8px 10px !important; }
    .channel-avatar  { width: 80px  !important; height: 80px  !important; }
    .cover-image     { height: 90px !important; }
    .channel-name    { font-size: 1.1rem !important; }

    .stat-card-value { font-size: 1rem !important; }

    .yt-action-btn   { padding: 6px 10px !important; font-size: 0.78rem !important; }
    .yt-action-btn i { font-size: 1.1rem !important; }

    .bottom-nav      { height: 54px !important; }
    .bottom-nav-item span { font-size: 0.5rem !important; }
    .bottom-nav-item i    { font-size: 1.1rem !important; }
    .app-container   { padding-bottom: 54px !important; }
}

/* NUT TIENG VIDEO MOBILE */
.video-player-wrapper { position: relative; width: 100%; background: #000; border-radius: 12px; overflow: hidden; }
.mute-toggle-btn { position: absolute; bottom: 52px; right: 12px; z-index: 50; width: 42px; height: 42px; border-radius: 50%; background: rgba(0,0,0,0.65); border: 1.5px solid rgba(255,255,255,0.25); color: #fff; font-size: 1.3rem; cursor: pointer; display: none; align-items: center; justify-content: center; backdrop-filter: blur(6px); transition: background 0.2s, transform 0.15s; }
.mute-toggle-btn:active { transform: scale(0.9); background: rgba(0,229,255,0.3); }
@media (max-width: 768px) { .mute-toggle-btn { display: flex !important; } }
