/* assets/css/style.css */
:root {
    --primary: #fe2c55;
    --primary-cyan: #25f4ee;
    --bg-dark: #000000;
    --text-color: #ffffff;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-menu: 'Open Sans Condensed', 'Open Sans', -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    font-family: var(--font-family);
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-dark);
    color: var(--text-color);
}

/* App Container - Centered on Desktop like TikTok Web */
.app-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #0b0c10;
}

/* Phone Frame (Houses Fixed Header & Scrollable Feed) */
.phone-frame {
    width: 100%;
    max-width: 480px; /* Mobile aspect ratio on desktop */
    height: 100%;
    height: 100dvh;
    background-color: var(--bg-dark);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
}

/* Vertical Feed Container */
.feed-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide scrollbar Firefox */
}

.feed-container::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome/Safari/Edge */
}

/* Video Card (One full screen per video) */
.video-card {
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
    position: relative;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    flex-shrink: 0;
}

/* The HTML5 Video Element - Preserves 100% true Aspect Ratio */
.video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000;
    display: block;
    cursor: pointer;
}

/* Fixed App Header (Top Brand & Tabs) */
.top-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

.top-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: auto;
}

.brand-badge {
    background: linear-gradient(135deg, #fe2c55 0%, #25f4ee 100%);
    color: #fff;
    font-weight: 900;
    font-size: 12px;
    padding: 3px 6px;
    border-radius: 5px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    font-family: var(--font-menu);
}

.brand-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-menu);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Top Nav Tabs with Open Sans Condensed */
.top-nav {
    display: flex;
    gap: 16px;
    pointer-events: auto;
    font-family: var(--font-menu);
}

.nav-tab {
    color: rgba(255, 255, 255, 0.6);
    font-size: 17px;
    font-weight: 700;
    font-family: var(--font-menu);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.nav-tab.active {
    color: #ffffff;
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

.admin-link-btn {
    pointer-events: auto;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 6px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.2s;
}

.admin-link-btn:hover {
    background: rgba(254, 44, 85, 0.4);
}

/* Play / Pause Animated Icon Overlay */
.play-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.5);
    z-index: 10;
    color: rgba(255, 255, 255, 0.85);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
}

.play-indicator.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* YouTube Style Buffering Spinner */
.video-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-card.is-buffering .video-loading-spinner {
    opacity: 1;
    visibility: visible;
}

.yt-spinner-svg {
    width: 48px;
    height: 48px;
    animation: yt-rotate 2s linear infinite;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.7));
}

.yt-spinner-path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: yt-dash 1.4s ease-in-out infinite;
}

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

@keyframes yt-dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Sound Mute Toggle Floating Button */
.sound-toggle-btn {
    position: absolute;
    top: 58px;
    right: 14px;
    z-index: 45;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    transition: transform 0.15s ease, background-color 0.2s;
}

.sound-toggle-btn:active {
    transform: scale(0.9);
    background: rgba(254, 44, 85, 0.6);
}

/* Right Actions Column */
.actions-column {
    position: absolute;
    right: 12px;
    bottom: 36px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    padding: 0;
}

.action-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(30, 30, 30, 0.65);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.action-item:active .action-icon {
    transform: scale(0.85);
    background: var(--primary);
}

.action-count {
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Vinyl Rotating Music Disk */
.music-disk {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #111;
    border: 5px solid #222;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rotateDisk 4s linear infinite;
    animation-play-state: paused;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
    margin-top: 4px;
}

.music-disk.playing {
    animation-play-state: running;
}

.disk-center {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fe2c55, #25f4ee);
}

@keyframes rotateDisk {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Bottom Metadata (Title, Sound) */
.video-meta {
    position: absolute;
    bottom: 18px;
    left: 14px;
    right: 76px;
    z-index: 20;
    pointer-events: none;
}

.channel-name {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    gap: 6px;
}

.channel-name .verified-badge {
    color: var(--primary-cyan);
    display: inline-flex;
}

.video-title {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 6px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.music-marquee {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* Bottom Progress Bar & Interactive Scrubber */
.video-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 18px;
    display: flex;
    align-items: flex-end;
    cursor: pointer;
    z-index: 38;
    touch-action: none;
    user-select: none;
    padding-bottom: 0px;
}

.video-progress-bar-bg {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.25);
    position: relative;
    transition: height 0.15s ease;
}

.video-progress-container:hover .video-progress-bar-bg,
.video-progress-container.is-scrubbing .video-progress-bar-bg {
    height: 6px;
}

.video-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary);
    position: relative;
    transition: width 0.08s linear;
}

.video-progress-container.is-scrubbing .video-progress-fill {
    transition: none;
}

.video-progress-thumb {
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.7);
    transition: transform 0.15s ease;
}

.video-progress-container:hover .video-progress-thumb,
.video-progress-container.is-scrubbing .video-progress-thumb {
    transform: translateY(-50%) scale(1);
}

/* Badge Thông Báo Tua Nhanh 2X khi Nhấn Giữ */
.speed-2x-badge {
    position: absolute;
    top: 72px;
    left: 50%;
    transform: translateX(-50%) scale(0.85);
    background: rgba(18, 18, 24, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.speed-2x-badge.active {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.speed-2x-badge svg {
    color: var(--primary);
    animation: speedPulse 0.8s ease-in-out infinite alternate;
}

@keyframes speedPulse {
    from { transform: scale(1); }
    to { transform: scale(1.25); }
}

/* Toast Message for Clipboard Copy */
.toast-notice {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(20, 20, 20, 0.92);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-notice.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.toast-notice svg {
    color: #10b981;
}

/* Empty State / Loading State */
.feed-empty-state, .feed-loading-state {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 24px;
    gap: 16px;
    color: rgba(255, 255, 255, 0.7);
}

.feed-empty-state a {
    color: #fff;
    background: var(--primary);
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Nút Xoay Ngang Xem Toàn Màn Hình cho Video Ngang */
.btn-landscape-fullscreen {
    position: absolute;
    bottom: 96px;
    left: 14px;
    z-index: 25;
    background: rgba(18, 18, 20, 0.75);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 15px;
    border-radius: 20px;
    display: none; /* Chỉ hiển thị khi video là video ngang */
    align-items: center;
    gap: 7px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.video-card.has-landscape-video .btn-landscape-fullscreen {
    display: inline-flex;
}

.btn-landscape-fullscreen:hover {
    background: rgba(254, 44, 85, 0.88);
    border-color: rgba(254, 44, 85, 0.9);
    transform: scale(1.06);
}

.btn-landscape-fullscreen:active {
    transform: scale(0.95);
}

/* Nút Thoát Toàn Màn Hình */
.btn-exit-fullscreen {
    position: fixed;
    top: 22px;
    left: 20px;
    z-index: 100000;
    background: rgba(18, 18, 20, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    padding: 9px 18px;
    border-radius: 26px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65);
    transition: all 0.2s ease;
}

.btn-exit-fullscreen:hover {
    background: rgba(254, 44, 85, 0.9);
    border-color: rgba(254, 44, 85, 1);
    transform: scale(1.05);
}

.btn-exit-fullscreen.hidden {
    display: none !important;
}

/* Chế độ Toàn Màn Hình Xoay Ngang */
.phone-frame.is-fullscreen-landscape {
    max-width: 100vw !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 99999 !important;
    background: #000000 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.phone-frame.is-fullscreen-landscape .top-header,
.phone-frame.is-fullscreen-landscape .sound-toggle-btn,
.phone-frame.is-fullscreen-landscape .scroll-nav-controls,
.phone-frame.is-fullscreen-landscape .actions-column,
.phone-frame.is-fullscreen-landscape .video-meta,
.phone-frame.is-fullscreen-landscape .btn-landscape-fullscreen {
    display: none !important;
}

.phone-frame.is-fullscreen-landscape .feed-container {
    overflow: hidden !important;
}

.phone-frame.is-fullscreen-landscape .video-card.active-landscape-card {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 1000 !important;
}

/* Khi ở thiết bị dọc (portrait): Xoay 90 độ để full màn ngang */
@media (orientation: portrait) {
    .phone-frame.is-fullscreen-landscape .video-card.active-landscape-card .video-player {
        transform: rotate(90deg);
        width: 100vh !important;
        height: 100vw !important;
        max-width: 100vh !important;
        max-height: 100vw !important;
        object-fit: contain !important;
    }
}

/* Khi ở màn hình ngang (landscape / PC / Laptop): Không xoay, phóng full màn hình */
@media (orientation: landscape) {
    .phone-frame.is-fullscreen-landscape .video-card.active-landscape-card .video-player {
        transform: none !important;
        width: 100vw !important;
        height: 100vh !important;
        object-fit: contain !important;
    }
}

/* Cụm Nút Mũi Tên Cuộn Lên Xuống Nhanh (Làm trong suốt mờ để tránh che nội dung) */
.scroll-nav-controls {
    position: absolute;
    right: 12px;
    top: 32%; /* Dời lên 32% để cách xa nút chuyển ảnh ở 50%, tránh bị đè nút chuyển ảnh */
    transform: translateY(-50%);
    z-index: 45;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: auto;
    opacity: 0.55; /* Trong suốt nhẹ tránh che nội dung */
    transition: opacity 0.25s ease;
}

.scroll-nav-controls:hover {
    opacity: 1; /* Khi rê chuột thì sáng rõ */
}

.scroll-nav-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(18, 18, 22, 0.45); /* Nền mờ kính trong suốt */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-nav-btn:hover {
    background: rgba(254, 44, 85, 0.85);
    border-color: rgba(254, 44, 85, 0.95);
    transform: scale(1.12);
    box-shadow: 0 6px 20px rgba(254, 44, 85, 0.45);
}

.scroll-nav-btn:active {
    transform: scale(0.92);
}

.scroll-nav-btn.disabled {
    opacity: 0.25;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==========================================================================
   GIAO DIỆN MÀN HÌNH LỚN: TRANG CHI TIẾT & CHIA SẺ DẠNG TIKTOK WEB (PC, TABLET, FOLDABLE)
   ========================================================================== */

/* Mặc định trên Mobile / Màn hình nhỏ (< 900px): Ẩn hoàn toàn thanh chi tiết, giữ nguyên 100% giao diện mobile */
.desktop-detail-panel {
    display: none !important;
}

/* Màn hình lớn (PC, Laptop, iPad/Tablet ngang, Foldable mở rộng >= 900px) */
@media screen and (min-width: 900px) {
    .app-container {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 28px;
        padding: 20px;
        max-width: 980px;
        margin: 0 auto;
        background-color: #08090d;
        background-image: radial-gradient(circle at 40% 50%, rgba(254, 44, 85, 0.06) 0%, rgba(8, 9, 13, 0.98) 75%);
        overflow: hidden;
    }

    .phone-frame {
        width: 460px;
        max-width: 480px;
        height: 100%;
        max-height: calc(100vh - 40px);
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 16px 50px rgba(0, 0, 0, 0.8), 0 0 24px rgba(254, 44, 85, 0.12);
        flex-shrink: 0;
        position: relative;
    }

    /* Hiển thị video và thanh thao tác chuẩn phong cách TikTok Web trên PC */
    .phone-frame .actions-column {
        display: flex !important;
        position: absolute;
        right: 12px;
        bottom: 80px;
        z-index: 15;
    }

    .phone-frame .video-meta {
        display: block !important;
        position: absolute;
        bottom: 18px;
        left: 14px;
        right: 80px;
        z-index: 12;
    }

    .desktop-detail-panel {
        display: flex !important;
        flex-direction: column;
        width: 380px;
        max-width: 420px;
        height: 100%;
        max-height: calc(100vh - 40px);
        background: rgba(18, 19, 26, 0.9);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 20px;
        padding: 24px;
        box-sizing: border-box;
        box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
        flex-shrink: 0;
        gap: 20px;
    }

    .desktop-detail-panel::-webkit-scrollbar {
        width: 5px;
    }

    .desktop-detail-panel::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 4px;
    }

    /* Author Profile Card */
    .panel-author-card {
        display: flex;
        align-items: center;
        gap: 14px;
        padding-bottom: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .author-avatar-wrap {
        position: relative;
    }

    .author-avatar {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: linear-gradient(135deg, #fe2c55, #25f4ee);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        box-shadow: 0 4px 14px rgba(254, 44, 85, 0.4);
    }

    .online-indicator {
        position: absolute;
        bottom: 2px;
        right: 2px;
        width: 10px;
        height: 10px;
        background: #10b981;
        border: 2px solid #12131a;
        border-radius: 50%;
    }

    .author-info {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .author-handle {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .handle-name {
        font-size: 16px;
        font-weight: 700;
        color: #ffffff;
    }

    .author-info .verified-badge {
        color: var(--primary-cyan);
        display: inline-flex;
    }

    .author-sub {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.55);
    }

    /* Video Info Section */
    .panel-video-info {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .panel-video-title {
        font-size: 16px;
        font-weight: 600;
        line-height: 1.45;
        color: rgba(255, 255, 255, 0.95);
        word-break: break-word;
    }

    .panel-music {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        color: rgba(255, 255, 255, 0.7);
        font-weight: 500;
    }

    .panel-music svg {
        color: var(--primary);
    }

    .panel-stats-row {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 4px;
    }

    .stat-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.08);
        padding: 5px 10px;
        border-radius: 8px;
        font-size: 12px;
        color: rgba(255, 255, 255, 0.85);
        font-weight: 500;
    }

    .stat-badge svg {
        color: var(--primary-cyan);
    }

    /* Sections */
    .panel-section {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .panel-section-label {
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.6px;
        font-weight: 700;
        color: rgba(255, 255, 255, 0.45);
    }

    /* Social Share Grid */
    .social-share-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .social-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 9px 12px;
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #ffffff;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .social-btn.btn-fb {
        background: rgba(24, 119, 242, 0.15);
        border-color: rgba(24, 119, 242, 0.3);
    }
    .social-btn.btn-fb:hover {
        background: #1877f2;
        border-color: #1877f2;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(24, 119, 242, 0.4);
    }

    .social-btn.btn-zalo {
        background: rgba(0, 104, 255, 0.15);
        border-color: rgba(0, 104, 255, 0.3);
    }
    .social-btn.btn-zalo .zalo-text {
        font-weight: 900;
        font-size: 14px;
        letter-spacing: -0.5px;
    }
    .social-btn.btn-zalo:hover {
        background: #0068ff;
        border-color: #0068ff;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 104, 255, 0.4);
    }

    .social-btn.btn-tele {
        background: rgba(36, 161, 222, 0.15);
        border-color: rgba(36, 161, 222, 0.3);
    }
    .social-btn.btn-tele:hover {
        background: #24a1de;
        border-color: #24a1de;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(36, 161, 222, 0.4);
    }

    .social-btn.btn-wa {
        background: rgba(37, 211, 102, 0.15);
        border-color: rgba(37, 211, 102, 0.3);
    }
    .social-btn.btn-wa:hover {
        background: #25d366;
        border-color: #25d366;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }

    /* Direct Copy Link Box */
    .copy-link-box {
        display: flex;
        align-items: center;
        background: rgba(0, 0, 0, 0.4);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 12px;
        padding: 4px 4px 4px 12px;
        transition: border-color 0.2s;
    }

    .copy-link-box:focus-within {
        border-color: var(--primary);
        box-shadow: 0 0 0 2px rgba(254, 44, 85, 0.2);
    }

    .copy-link-input {
        flex: 1;
        background: transparent;
        border: none;
        outline: none;
        color: rgba(255, 255, 255, 0.85);
        font-size: 13px;
        font-family: inherit;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .btn-copy-direct {
        display: flex;
        align-items: center;
        gap: 6px;
        background: var(--primary);
        color: #ffffff;
        border: none;
        outline: none;
        padding: 8px 14px;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .btn-copy-direct:hover {
        background: #e02449;
        transform: scale(1.03);
    }

    .btn-copy-direct:active {
        transform: scale(0.96);
    }

    /* Shortcuts */
    .shortcuts-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
        background: rgba(0, 0, 0, 0.25);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 12px;
        padding: 12px 14px;
    }

    .shortcut-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 12px;
        color: rgba(255, 255, 255, 0.7);
    }

    .kbd-wrap {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    kbd {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 4px;
        padding: 2px 6px;
        font-size: 11px;
        font-weight: 700;
        color: #ffffff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    }

    /* Footer */
    .panel-footer {
        margin-top: auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-top: 14px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        font-size: 12px;
    }

    .footer-brand {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .footer-copy {
        color: rgba(255, 255, 255, 0.4);
    }

    .admin-quick-link {
        color: var(--primary-cyan);
        text-decoration: none;
        font-weight: 600;
        transition: opacity 0.2s;
    }

    .admin-quick-link:hover {
        opacity: 0.8;
        text-decoration: underline;
    }
}

/* ==========================================================================
   PHOTO CAROUSEL (BỘ ẢNH CUỘN NGANG DẠNG TIKTOK PHOTO MODE)
   ========================================================================== */
.photo-carousel-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pan-y;
    user-select: none;
}

.photo-carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.photo-carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #000000;
}

.photo-carousel-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    pointer-events: none;
    -webkit-user-drag: none;
    transition: opacity 0.2s ease;
}

/* Badge số thứ tự ảnh góc trên (1/N) - Đặt góc trên bên trái để không bị nút loa che */
.carousel-badge-counter {
    position: absolute;
    top: 68px;
    left: 16px;
    right: auto;
    background: rgba(18, 18, 24, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    z-index: 35;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.carousel-badge-counter svg {
    color: var(--primary-cyan);
}

/* Nút bấm chuyển ảnh trái / phải - Hiệu ứng trong suốt mờ mờ (tránh che nội dung ảnh) */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(18, 18, 24, 0.3); /* Nền kính mờ trong suốt */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 46; /* Tăng z-index cao hơn để luôn click được nhạy */
    opacity: 0.45; /* Mờ mờ tự nhiên, chỉ rõ khi hover */
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.photo-carousel-wrapper:hover .carousel-arrow {
    opacity: 0.75;
}

.carousel-arrow:hover {
    opacity: 1 !important;
    background: rgba(254, 44, 85, 0.85);
    border-color: rgba(254, 44, 85, 1);
    color: #ffffff;
    transform: translateY(-50%) scale(1.12);
    box-shadow: 0 6px 18px rgba(254, 44, 85, 0.4);
}

.carousel-arrow:active {
    transform: translateY(-50%) scale(0.92);
}

.carousel-arrow.arrow-prev {
    left: 12px;
}

.carousel-arrow.arrow-next {
    right: 12px;
}

.carousel-arrow.disabled {
    opacity: 0 !important; /* Ở trang đầu/cuối thì ẩn để xem trọn vẹn ảnh */
    pointer-events: none;
}

/* Dải Dots chỉ báo vị trí ở đáy ảnh */
.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 35;
    pointer-events: none;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.carousel-dot.active {
    width: 18px;
    background: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}

/* ==========================================================================
   VIDEO & PHOTO DESCRIPTION (MÔ TẢ BÀI ĐĂNG)
   ========================================================================== */
.video-description-text {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.88);
    margin-top: 4px;
    margin-bottom: 6px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Style cho panel chi tiết bên phải PC */
.panel-meta-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.panel-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 3px 9px;
    border-radius: 6px;
    background: rgba(254, 44, 85, 0.15);
    border: 1px solid rgba(254, 44, 85, 0.35);
    color: #ff5779;
}

.panel-type-badge.badge-photo {
    background: rgba(37, 244, 238, 0.15);
    border-color: rgba(37, 244, 238, 0.35);
    color: var(--primary-cyan);
}

.panel-video-desc {
    font-size: 13.5px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 10px 14px;
    border-radius: 10px;
    word-break: break-word;
    white-space: pre-line;
    max-height: 160px;
    overflow-y: auto;
}

/* ==========================================================================
   TÍNH NĂNG PHÁT TRỰC TIẾP (LIVE STREAM - YOUTUBE & FACEBOOK LIVE)
   ========================================================================== */
.live-player-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    z-index: 1;
}

.yt-live-iframe,
.fb-live-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Lớp chặn click để hệ thống controls của TTKT Play quản lý Play/Pause */
.live-click-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 8;
    cursor: pointer;
    background: transparent;
}

/* Huy hiệu Đang phát trực tiếp đỏ rực rỡ phong cách TikTok LIVE */
.live-badge-top {
    position: absolute;
    top: 60px;
    left: 16px;
    z-index: 15;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.55);
}

.live-pulse-dot {
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    display: inline-block;
    animation: livePulseDot 1.2s infinite ease-in-out;
}

@keyframes livePulseDot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(0.65);
    }
}

.live-tag-pill {
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 6px;
    letter-spacing: 0.5px;
}

.panel-type-badge.badge-live {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.45);
    color: #ef4444;
}


