body {
    font-family: var(--shortvideo-font-family), 'Be Vietnam Pro', sans-serif;
    background-color: var(--shortvideo-body-bg, #f8f9fa);
    color: var(--shortvideo-text-color, #212529);
    transition: var(--shortvideo-transition-theme);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--shortvideo-primary, #ef4444);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--shortvideo-primary-hover, #dc2626);
}

/* Khung hình đứng tỷ lệ 9:16 chuẩn video ngắn */
.video-container {
    aspect-ratio: 9 / 16;
    max-height: calc(100vh - 180px);
    width: 100%;
    position: relative;
    margin: 0 auto;
}

/* Tối ưu hóa trình phát Plyr cho khung đứng 9:16 */
.video-container .plyr {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    background-color: #000 !important;
    border-radius: 8px;
    overflow: hidden;
}

.video-container .plyr__video-wrapper {
    height: 100% !important;
    width: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000 !important;
}

.video-container .plyr video {
    object-fit: contain !important;
    width: 100% !important;
    height: 100% !important;
}

/* Đảm bảo giao diện controls của Plyr hiển thị đẹp mắt */
.video-container .plyr--full-ui {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.video-container .plyr__controls {
    background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75)) !important;
    padding: 15px 10px 10px 10px !important;
}

/* Custom Tab menu */
.nav-link-custom {
    text-decoration: none;
    color: #6c757d;
    font-weight: 500;
    font-size: 0.875rem;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 0.75rem 0.5rem;
    transition: all 0.2s ease;
    background: none;
    border: none;
}

.nav-link-custom:hover {
    color: var(--shortvideo-primary, #ef4444);
}

.nav-link-custom.active-tab {
    border-bottom-color: var(--shortvideo-primary, #ef4444);
    color: var(--shortvideo-primary, #ef4444) !important;
    font-weight: 900;
}

/* Custom Segmented Control (New/Hot Tabs) */
.btn-group.bg-light {
    background-color: var(--shortvideo-bg-search, #f1f3f4) !important;
    border: 1px solid var(--shortvideo-border-card, #e0e0e0) !important;
    padding: 3px !important;
    transition: var(--shortvideo-transition-theme);
}

[data-theme="dark"] .btn-group.bg-light {
    background-color: var(--shortvideo-bg-body, #0f172a) !important;
    border-color: var(--shortvideo-border-card, #334155) !important;
}

.btn-group.bg-light .btn {
    transition: all 0.2s ease-in-out;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

/* Active tab style */
.btn-group.bg-light .btn.btn-white {
    background-color: #ffffff !important;
    color: var(--shortvideo-text-dark, #212529) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="dark"] .btn-group.bg-light .btn.btn-white {
    background-color: var(--shortvideo-bg-card, #1e293b) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

/* Inactive tab style */
.btn-group.bg-light .btn.btn-light {
    background-color: transparent !important;
    color: var(--shortvideo-text-muted, #6c757d) !important;
}

.btn-group.bg-light .btn.btn-light:hover {
    color: var(--shortvideo-primary, #ef4444) !important;
    background-color: rgba(0, 0, 0, 0.03) !important;
}

[data-theme="dark"] .btn-group.bg-light .btn.btn-light {
    background-color: transparent !important;
    color: var(--shortvideo-text-muted, #94a3b8) !important;
}

[data-theme="dark"] .btn-group.bg-light .btn.btn-light:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Ô tập phim vuông tối giản */
.ep-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

/* Giới hạn chiều cao cho đúng 2 dòng tập phim */
.episode-grid-collapsed {
    max-height: 84px;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

/* Tự động cuộn mượt */
html {
    scroll-behavior: smooth;
    overflow-x: hidden !important;
}

/* Ẩn thanh cuộn ngang di động */
.scrollbar-none::-webkit-scrollbar {
    display: none;
}

.scrollbar-none {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Hiệu ứng trượt xuất hiện bình luận */
.animate-slide-up {
    animation: slideUp 0.35s ease forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(12px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Hover opacity utilities */
.hover-opacity:hover {
    opacity: 1 !important;
}

.transition {
    transition: all 0.2s ease;
}

.cursor-pointer {
    cursor: pointer;
}

.hover-shadow:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.075);
}

/* Tối ưu hóa nút tương tác và căn chỉnh trên di động */
.interaction-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease;
}

@media (max-width: 576px) {
    .interaction-btn {
        font-size: 11px !important;
        padding: 5px 8px !important;
        gap: 4px;
    }

    .score-display {
        font-size: 0.8rem !important;
        padding-left: 2px !important;
        padding-right: 2px !important;
    }

    #toast-container {
        left: 0 !important;
        right: 0 !important;
        padding: 10px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    #toast-container .toast {
        width: 100% !important;
        max-width: calc(100vw - 20px) !important;
    }
}

/* ==========================================================================
   LIGHT & DARK MODE CONFIGURATION
   ========================================================================== */
:root {
    --shortvideo-bg-body: #f8f9fa;
    --shortvideo-bg-card: #ffffff;
    --shortvideo-border-card: #e0e0e0;
    --shortvideo-border-header: #e2e8f0;
    --shortvideo-bg-search: #f1f3f4;
    --shortvideo-text-dark: #212529;
    --shortvideo-text-muted: #6c757d;
    --shortvideo-bg-dropdown: #ffffff;
    --shortvideo-border-dropdown: #f1f5f9;
    --shortvideo-text-dropdown: #212529;
    --shortvideo-bg-footer: #1e293b;
    --shortvideo-transition-theme: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

html[data-theme="dark"] {
    --shortvideo-bg-body: #0f172a;
    --shortvideo-body-bg: #0f172a;
    --shortvideo-text-color: #f8fafc;
    --shortvideo-bg-card: #1e293b;
    --shortvideo-border-card: #334155;
    --shortvideo-border-header: #334155;
    --shortvideo-bg-search: #334155;
    --shortvideo-text-dark: #f8fafc;
    --shortvideo-text-muted: #94a3b8;
    --shortvideo-bg-dropdown: #1e293b;
    --shortvideo-border-dropdown: #334155;
    --shortvideo-text-dropdown: #f8fafc;
    --shortvideo-bg-footer: #0f172a;
    --shortvideo-header-bg: #0f172a;
    --shortvideo-header-text: #f8fafc;
    --shortvideo-header-search-bg: rgba(255, 255, 255, 0.12);
    --shortvideo-footer-bg: #0f172a;
}

/* Body transitions and variables are defined at the root level */

.navbar-custom {
    background-color: var(--shortvideo-header-bg, #ffffff) !important;
    border-bottom: 1px solid var(--shortvideo-border-header) !important;
    transition: var(--shortvideo-transition-theme);
}

.search-container {
    background-color: var(--shortvideo-header-search-bg, #f1f3f4) !important;
    border-radius: 50px !important;
    border: 1.5px solid transparent !important;
    padding: 2px 14px !important;
    display: flex;
    align-items: center;
    transition: all 0.2s ease-in-out;
}

.search-container:focus-within {
    border-color: var(--shortvideo-primary, #ef4444) !important;
    background-color: var(--shortvideo-bg-card, #ffffff) !important;
    box-shadow: 0 0 0 4px rgba(var(--shortvideo-primary-rgb), 0.12) !important;
}

[data-theme="dark"] .search-container:focus-within {
    background-color: var(--shortvideo-bg-search, #334155) !important;
}

/* Specific overrides to wipe out bootstrap form-control defaults inside the search pill */
.search-container input.form-control,
[data-theme="dark"] .search-container input.form-control {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 14px;
    height: auto !important;
    padding: 8px 4px !important;
    color: var(--shortvideo-text-dark) !important;
    border-radius: 0 !important;
}

.search-container input.form-control:focus,
[data-theme="dark"] .search-container input.form-control:focus {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

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

.search-container button {
    background: transparent !important;
    border: none !important;
    color: var(--shortvideo-primary, #ef4444) !important;
    padding: 6px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.search-container button:hover {
    transform: scale(1.15);
}

.wallet-badge {
    background-color: var(--shortvideo-header-search-bg, #f1f3f4) !important;
    color: var(--shortvideo-header-text, #1e293b) !important;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--shortvideo-transition-theme);
    white-space: nowrap;
    flex-shrink: 0;
}

.wallet-badge:hover {
    background-color: var(--shortvideo-primary) !important;
    color: #ffffff !important;
}

.theme-toggle-btn {
    width: 36px;
    height: 36px;
    background-color: var(--shortvideo-header-search-bg, #f1f3f4) !important;
    color: var(--shortvideo-header-text, #1e293b) !important;
    transition: var(--shortvideo-transition-theme);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-btn:hover {
    background-color: var(--shortvideo-primary) !important;
    color: #ffffff !important;
}

/* Mobile toggle custom styles */
.mobile-theme-container {
    background-color: var(--shortvideo-bg-search) !important;
    border-color: var(--shortvideo-border-card) !important;
    transition: var(--shortvideo-transition-theme);
}

#theme-toggle-mobile {
    background-color: var(--shortvideo-bg-card) !important;
    color: var(--shortvideo-text-dark) !important;
    transition: var(--shortvideo-transition-theme);
}

/* ==========================================================================
   NOTIFICATION STYLES
   ========================================================================== */
.sv-notification-bell {
    position: relative;
    padding: 6px;
    border-radius: 50%;
    transition: var(--shortvideo-transition-theme);
}

.sv-notification-bell:hover {
    background-color: var(--shortvideo-bg-search);
}

.sv-notification-dropdown-menu {
    background-color: var(--shortvideo-bg-card) !important;
    border: 1px solid var(--shortvideo-border-card) !important;
}

.sv-notification-item {
    transition: background-color 0.15s ease;
    border-bottom-color: var(--shortvideo-border-card) !important;
}

.sv-notification-item:hover {
    background-color: var(--shortvideo-bg-search) !important;
}

.sv-notif-unread {
    background-color: rgba(var(--shortvideo-primary-rgb, 239, 68, 68), 0.04);
}

.sv-notif-read {
    opacity: 0.7;
}

/* ==========================================================================
   ACCOUNT PAGE STYLES  
   ========================================================================== */
.shortvideo-auth-wrapper .nav-pills .nav-link {
    color: var(--shortvideo-text-dark, #212529);
    background-color: var(--shortvideo-bg-search, #f1f3f4);
}

.shortvideo-auth-wrapper .nav-pills .nav-link.active {
    background-color: var(--shortvideo-primary, #ef4444) !important;
    color: #fff !important;
}

.shortvideo-auth-wrapper .card {
    background-color: var(--shortvideo-bg-card) !important;
}

.shortvideo-account-wrapper .nav-pills .nav-link:not(.active) {
    background-color: var(--shortvideo-bg-search, #f1f3f4);
    color: var(--shortvideo-text-dark, #212529);
}

/* ==========================================================================
   DARK MODE OVERRIDES (comprehensive)
   ========================================================================== */
[data-theme="dark"] .bg-white {
    background-color: var(--shortvideo-bg-card) !important;
}

[data-theme="dark"] .bg-light {
    background-color: var(--shortvideo-bg-body) !important;
}

[data-theme="dark"] .text-dark {
    color: var(--shortvideo-text-dark) !important;
}

[data-theme="dark"] .text-muted {
    color: var(--shortvideo-text-muted) !important;
}

[data-theme="dark"] .card {
    background-color: var(--shortvideo-bg-card) !important;
    border-color: var(--shortvideo-border-card) !important;
}

[data-theme="dark"] .dropdown-menu {
    background-color: var(--shortvideo-bg-dropdown) !important;
    border-color: var(--shortvideo-border-dropdown) !important;
}

[data-theme="dark"] .dropdown-item {
    color: var(--shortvideo-text-dropdown) !important;
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: var(--shortvideo-bg-search) !important;
}

[data-theme="dark"] .dropdown-divider {
    border-color: var(--shortvideo-border-card) !important;
}

[data-theme="dark"] .list-group-item {
    background-color: var(--shortvideo-bg-card) !important;
    color: var(--shortvideo-text-dark) !important;
    border-color: var(--shortvideo-border-card) !important;
}

[data-theme="dark"] .list-group-item-action:hover {
    background-color: var(--shortvideo-bg-search) !important;
    color: var(--shortvideo-text-dark) !important;
}

[data-theme="dark"] .border {
    border-color: var(--shortvideo-border-card) !important;
}

[data-theme="dark"] .border-bottom {
    border-bottom-color: var(--shortvideo-border-card) !important;
}

[data-theme="dark"] .border-top {
    border-top-color: var(--shortvideo-border-card) !important;
}

[data-theme="dark"] .modal-content {
    background-color: var(--shortvideo-bg-card) !important;
    color: var(--shortvideo-text-dark) !important;
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: var(--shortvideo-border-card) !important;
}

[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%) !important;
}

/* Form controls */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: var(--shortvideo-bg-search) !important;
    color: var(--shortvideo-text-dark) !important;
    border-color: var(--shortvideo-border-card) !important;
}

[data-theme="dark"] .form-control::placeholder {
    color: var(--shortvideo-text-muted) !important;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    border-color: var(--shortvideo-primary, #ef4444) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--shortvideo-primary-rgb, 239, 68, 68), 0.15) !important;
}

[data-theme="dark"] .input-group-text {
    background-color: var(--shortvideo-bg-search) !important;
    color: var(--shortvideo-text-muted) !important;
    border-color: var(--shortvideo-border-card) !important;
}

/* Tables */
[data-theme="dark"] .table {
    color: var(--shortvideo-text-dark) !important;
    --bs-table-bg: var(--shortvideo-bg-card);
    --bs-table-border-color: var(--shortvideo-border-card);
}

[data-theme="dark"] .table thead th {
    background-color: var(--shortvideo-bg-search) !important;
    color: var(--shortvideo-text-dark) !important;
    border-color: var(--shortvideo-border-card) !important;
}

[data-theme="dark"] .table td,
[data-theme="dark"] .table th {
    border-color: var(--shortvideo-border-card) !important;
}

[data-theme="dark"] .table-striped>tbody>tr:nth-of-type(odd)>* {
    background-color: rgba(255, 255, 255, 0.02) !important;
    --bs-table-bg-type: transparent;
}

/* Pagination */
[data-theme="dark"] .page-link {
    background-color: var(--shortvideo-bg-card) !important;
    color: var(--shortvideo-text-dark) !important;
    border-color: var(--shortvideo-border-card) !important;
}

[data-theme="dark"] .page-item.active .page-link {
    background-color: var(--shortvideo-primary) !important;
    border-color: var(--shortvideo-primary) !important;
    color: #fff !important;
}

/* Breadcrumb */
[data-theme="dark"] .breadcrumb {
    background-color: var(--shortvideo-bg-card) !important;
}

[data-theme="dark"] .breadcrumb-item a {
    color: var(--shortvideo-primary) !important;
}

[data-theme="dark"] .breadcrumb-item.active {
    color: var(--shortvideo-text-muted) !important;
}

/* Alerts */
[data-theme="dark"] .alert {
    border-color: var(--shortvideo-border-card) !important;
}

[data-theme="dark"] .alert-success {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: #6ee7b7 !important;
}

[data-theme="dark"] .alert-danger {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: #fca5a5 !important;
}

[data-theme="dark"] .alert-warning {
    background-color: rgba(245, 158, 11, 0.1) !important;
    color: #fcd34d !important;
}

[data-theme="dark"] .alert-info {
    background-color: rgba(59, 130, 246, 0.1) !important;
    color: #93c5fd !important;
}

/* Badge & Tabs */
[data-theme="dark"] .badge.bg-light {
    background-color: var(--shortvideo-bg-search) !important;
    color: var(--shortvideo-text-dark) !important;
}

[data-theme="dark"] .nav-tabs {
    border-bottom-color: var(--shortvideo-border-card) !important;
}

[data-theme="dark"] .nav-tabs .nav-link {
    color: var(--shortvideo-text-muted) !important;
}

[data-theme="dark"] .nav-tabs .nav-link.active {
    background-color: var(--shortvideo-bg-card) !important;
    color: var(--shortvideo-text-dark) !important;
    border-color: var(--shortvideo-border-card) var(--shortvideo-border-card) var(--shortvideo-bg-card) !important;
}

/* Sidebar */
[data-theme="dark"] .sidebar,
[data-theme="dark"] .widget {
    background-color: var(--shortvideo-bg-card) !important;
    color: var(--shortvideo-text-dark) !important;
}

/* Comments */
[data-theme="dark"] .comment-body {
    background-color: var(--shortvideo-bg-card) !important;
    color: var(--shortvideo-text-dark) !important;
}

/* Footer dark mode */
[data-theme="dark"] footer {
    background-color: var(--shortvideo-bg-footer, #0f172a) !important;
}

[data-theme="dark"] .text-white-50 {
    color: var(--shortvideo-text-muted) !important;
}

/* Toast */
[data-theme="dark"] .toast {
    background-color: var(--shortvideo-bg-card) !important;
    color: var(--shortvideo-text-dark) !important;
    border-color: var(--shortvideo-border-card) !important;
}

/* Scrollbar dark mode */
[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #1e293b;
}

/* Mobile menu panel */
[data-theme="dark"] .mobile-menu-panel {
    background-color: var(--shortvideo-bg-card) !important;
    border-color: var(--shortvideo-border-card) !important;
}

/* Btn outline */
[data-theme="dark"] .btn-outline-primary {
    color: var(--shortvideo-primary) !important;
    border-color: var(--shortvideo-primary) !important;
}

[data-theme="dark"] .btn-outline-danger {
    color: #fca5a5 !important;
    border-color: #fca5a5 !important;
}

[data-theme="dark"] .btn-outline-danger:hover {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
}

/* Shadow soften in dark */
[data-theme="dark"] .shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .shadow {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

/* Hover white for footer links */
.hover-white:hover {
    color: #ffffff !important;
}

/* ==========================================================================
   ACCOUNT DASHBOARD STYLES
   ========================================================================== */
.shortvideo-account-dashboard {
    max-width: 1140px !important;
    margin: 0 auto;
}

/* --- Profile Summary Card --- */
.profile-summary-card {
    border: 1px solid var(--shortvideo-border-card) !important;
    transition: var(--shortvideo-transition-theme);
}

.profile-banner-gradient {
    height: 140px;
    background: linear-gradient(135deg, var(--shortvideo-primary, #f43f5e), #a855f7);
}

/* Avatar */
.profile-avatar-wrapper {
    position: absolute;
    top: -50px;
    left: 24px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--shortvideo-bg-card, #fff);
    background-color: var(--shortvideo-primary, #ef4444);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 10;
    transition: border-color 0.3s ease;
}

.profile-avatar-initials {
    color: #fff;
    font-weight: 700;
    font-size: 28px;
    text-transform: uppercase;
    z-index: 1;
}

.profile-avatar-img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    z-index: 2 !important;
}

/* Profile details */
.profile-details-section {
    padding-bottom: 15px;
}

.profile-details-section h4 {
    color: var(--shortvideo-text-dark, #1e293b);
}

.profile-details-section .text-muted {
    color: var(--shortvideo-text-muted, #64748b) !important;
}

.profile-details-section .badge {
    background-color: var(--shortvideo-bg-search, #f1f3f4) !important;
    color: var(--shortvideo-text-dark, #1e293b) !important;
    border-color: var(--shortvideo-border-card, #e0e0e0) !important;
}

/* --- Navigation Tabs --- */
.account-dashboard-tabs .nav-link {
    background-color: var(--shortvideo-bg-card, #fff) !important;
    color: var(--shortvideo-text-muted, #6c757d) !important;
    border: 1px solid var(--shortvideo-border-card, #e0e0e0) !important;
    border-radius: 30px !important;
    font-size: 13px !important;
    transition: all 0.2s ease;
    text-decoration: none;
}

.account-dashboard-tabs .nav-link.active {
    background-color: rgba(var(--shortvideo-primary-rgb, 239, 68, 68), 0.1) !important;
    color: var(--shortvideo-primary, #ef4444) !important;
    border-color: var(--shortvideo-primary, #ef4444) !important;
    font-weight: 700 !important;
}

.account-dashboard-tabs .nav-link:hover:not(.active) {
    background-color: var(--shortvideo-bg-search, #f1f3f4) !important;
    color: var(--shortvideo-text-dark, #212529) !important;
}

/* --- Tab Content Panel --- */
.account-content-panel {
    border: 1px solid var(--shortvideo-border-card) !important;
    transition: var(--shortvideo-transition-theme);
}

/* --- Sidebar Cards --- */
.sidebar-category-card,
.sidebar-featured-series-card {
    border: 1px solid var(--shortvideo-border-card) !important;
    transition: var(--shortvideo-transition-theme);
}

.sidebar-category-card a {
    color: var(--shortvideo-text-muted) !important;
    border-radius: 8px;
    padding: 6px 8px;
    transition: all 0.2s ease;
}

.sidebar-category-card a:hover {
    background-color: var(--shortvideo-bg-search) !important;
    color: var(--shortvideo-primary, #ef4444) !important;
    opacity: 1 !important;
}

/* Series hover row */
.group-hover {
    transition: background-color 0.2s ease;
    padding: 6px;
    border-radius: 8px;
}

.group-hover:hover {
    background-color: var(--shortvideo-bg-search) !important;
}

/* --- Dark Mode Overrides for Account Dashboard --- */
[data-theme="dark"] .profile-avatar-wrapper {
    border-color: var(--shortvideo-bg-card, #1e293b) !important;
}

[data-theme="dark"] .profile-details-section h4 {
    color: #f8fafc !important;
}

[data-theme="dark"] .profile-details-section .badge {
    background-color: #334155 !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}

[data-theme="dark"] .account-dashboard-tabs .nav-link:not(.active) {
    background-color: var(--shortvideo-bg-card, #1e293b) !important;
    color: var(--shortvideo-text-muted, #94a3b8) !important;
    border-color: var(--shortvideo-border-card, #334155) !important;
}

[data-theme="dark"] .account-dashboard-tabs .nav-link.active {
    background-color: rgba(var(--shortvideo-primary-rgb, 239, 68, 68), 0.15) !important;
    border-color: var(--shortvideo-primary) !important;
}

[data-theme="dark"] .sidebar-category-card a {
    color: var(--shortvideo-text-muted, #94a3b8) !important;
}

[data-theme="dark"] .sidebar-category-card a:hover {
    background-color: #334155 !important;
    color: var(--shortvideo-primary) !important;
}

[data-theme="dark"] .group-hover:hover {
    background-color: #334155 !important;
}

/* --- Responsive --- */
@media (max-width: 767.98px) {
    .profile-banner-gradient {
        height: 100px !important;
    }

    .profile-avatar-wrapper {
        width: 80px !important;
        height: 80px !important;
        top: -40px !important;
        left: 50% !important;
        transform: translateX(-50%);
        font-size: 22px !important;
    }

    .profile-details-section {
        padding-left: 0 !important;
        padding-top: 55px !important;
        text-align: center;
    }

    .profile-details-section h4 {
        justify-content: center;
    }

    .profile-details-section .d-flex {
        justify-content: center;
    }

    .account-dashboard-tabs {
        justify-content: center;
    }
}

/* ==========================================================================
   PREMIUM OVERLAYS & INTERACTIONS (Lights Out, Poster, TikTok Fallback)
   ========================================================================== */

/* Lights Out styles */
.lights-out-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1080;
    display: none;
    transition: opacity 0.3s ease;
}

body.lights-out-active .lights-out-overlay {
    display: block !important;
}

body.lights-out-active .video-card {
    position: relative !important;
    z-index: 1085 !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9) !important;
    background-color: #1e293b !important;
}

body.lights-out-active .video-card .card-header,
body.lights-out-active .video-card .card-footer,
body.lights-out-active .video-card .comment-section {
    background-color: #1e293b !important;
    color: #ffffff !important;
}

body.lights-out-active .video-card .card-title,
body.lights-out-active .video-card .score-display,
body.lights-out-active .video-card .comment-count-num {
    color: #ffffff !important;
}

body.lights-out-active .lights-out-btn {
    background-color: #0f172a !important;
    color: #f59e0b !important;
    border-color: #f59e0b !important;
}

/* Premium Poster Overlay */
.shortvideo-video-poster-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: all 0.4s ease;
}

.shortvideo-video-poster-overlay:hover .bt-play-btn-glow {
    transform: scale(1.12);
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: #fff !important;
    box-shadow: 0 0 35px rgba(254, 44, 85, 0.7), 0 0 55px rgba(37, 244, 238, 0.5) !important;
}

/* TikTok Fallback Overlay & Button Glow */
.tiktok-fallback-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 8;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    color: #fff;
    transition: opacity 0.3s ease;
}

.tiktok-icon-glow {
    transition: all 0.3s ease;
}

.tiktok-fallback-overlay:hover .tiktok-icon-glow {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(254, 44, 85, 0.8), 0 0 50px rgba(37, 244, 238, 0.6) !important;
}

/* Hide mobile drawers on desktop */
.drawer-mobile-container {
    display: none !important;
}

/* ==========================================================================
   MOBILE TIKTOK-LIKE INTERFACE (Media Query < 768px)
   ========================================================================== */
@media (max-width: 767.98px) {

    /* Hide desktop elements globally on mobile */
    header.navbar-custom,
    #header-mobile-menu,
    footer,
    .card-header,
    /* Hide default card header */
    .card-footer,
    /* Hide default card footer */
    .comment-section,
    /* Hide default card comments */
    .tiktok-direct-link-wrapper {
        display: none !important;
    }

    /* Fixed body viewport for app experience */
    body.mobile-tiktok-layout {
        overflow: hidden !important;
        background-color: #000 !important;
        padding: 0 !important;
        margin: 0 !important;
        height: 100vh !important;
        width: 100vw !important;
    }

    /* Main container full screen adjustments */
    .mobile-tiktok-layout .container.py-4 {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        height: calc(100vh - 60px) !important;
        /* Exclude bottom nav */
    }

    .mobile-tiktok-layout .row.g-4 {
        margin: 0 !important;
        padding: 0 !important;
        height: 100% !important;
        width: 100% !important;
    }

    .mobile-tiktok-layout .col-lg-8 {
        padding: 0 !important;
        margin: 0 !important;
        height: 100% !important;
        width: 100% !important;
    }

    /* Scroll snapping feed container */
    #video-feed-container {
        height: 100% !important;
        overflow-y: scroll !important;
        scroll-snap-type: y mandatory !important;
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Hide scrollbars but keep functionality */
    #video-feed-container::-webkit-scrollbar {
        display: none !important;
    }

    #video-feed-container {
        -ms-overflow-style: none !important;
        scrollbar-width: none !important;
    }

    /* Full screen video card */
    .video-card {
        height: 100% !important;
        width: 100vw !important;
        max-width: 100% !important;
        scroll-snap-align: start !important;
        scroll-snap-stop: always !important;
        position: relative !important;
        border-radius: 0 !important;
        margin: 0 !important;
        border: none !important;
        background: #000 !important;
        box-shadow: none !important;
        overflow: hidden !important;
        flex-shrink: 0 !important;
    }

    /* Video player wrappers */
    .shortvideo-player-wrapper {
        height: 100% !important;
        max-height: 100% !important;
        width: 100% !important;
        background: #000 !important;
        border-radius: 0 !important;
    }

    .video-container {
        height: 100% !important;
        width: 100% !important;
        max-height: 100% !important;
        max-width: 100% !important;
        aspect-ratio: auto !important;
        border-radius: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .video-container .plyr {
        border-radius: 0 !important;
        height: 100% !important;
        width: 100% !important;
    }

    .video-container .plyr video {
        object-fit: contain !important;
    }

    /* Hide the top server switcher bar on mobile */
    .server-switcher-bar {
        display: none !important;
    }

    .server-switcher-bar .server-select-btn {
        background-color: transparent !important;
        border: none !important;
        color: rgba(255, 255, 255, 0.6) !important;
        padding: 3px 8px !important;
        font-size: 11px !important;
    }

    .server-switcher-bar .server-select-btn.btn-primary {
        background-color: rgba(255, 255, 255, 0.2) !important;
        color: #fff !important;
        border-radius: 15px !important;
        font-weight: 700 !important;
    }

    /* Top navigation header bar inside video card */
    .video-top-bar-mobile {
        position: absolute;
        top: 28px;
        left: 0;
        width: 100%;
        display: flex !important;
        justify-content: justify;
        padding: 0 15px;
        z-index: 15;
    }

    .top-bar-back-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        color: #fff;
        text-decoration: none;
        font-size: 15px;
        font-weight: 600;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
        max-width: 70%;
    }

    .top-bar-back-btn span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .top-bar-search-btn {
        margin-left: auto;
        color: #fff;
        text-decoration: none;
        font-size: 20px;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    }

    /* Left Bottom Video Details Overlay */
    .video-details-overlay {
        position: absolute;
        bottom: 60px;
        /* Raised from 12px to clear Plyr controls on pause */
        left: 15px;
        right: 80px;
        /* Leave space for actions */
        z-index: 11;
        color: #fff;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
        display: flex !important;
        flex-direction: column;
        gap: 4px;
        pointer-events: none;
        /* Allows click-through to player */
        transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.35s ease;
    }

    .video-details-overlay.hidden-overlay {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    .video-details-overlay a,
    .video-details-overlay button {
        pointer-events: auto;
        /* Clickable elements */
    }

    .details-series-line {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 2px;
    }

    .details-series-name {
        font-weight: 800;
        font-size: 14px;
        color: #ffc107;
        text-decoration: none;
    }

    .details-follow-badge {
        font-size: 10px;
        padding: 3px 8px;
        background-color: var(--shortvideo-primary, #fe2c55);
        color: #fff;
        border: none;
        border-radius: 12px;
        font-weight: 700;
        box-shadow: 0 2px 5px rgba(254, 44, 85, 0.3);
    }

    .details-follow-badge.following {
        background-color: rgba(255, 255, 255, 0.25);
        color: #eee;
    }

    .details-title-line {
        font-weight: 600;
        font-size: 13px;
        line-height: 1.4;
        color: #fff;
        margin-bottom: 2px;
    }

    .details-meta-line {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 11px;
        color: rgba(255, 255, 255, 0.7);
    }

    .details-cat-badge {
        background: rgba(255, 255, 255, 0.2);
        color: #fff;
        padding: 1px 6px;
        border-radius: 4px;
        font-size: 9px;
        font-weight: 700;
    }

    /* Right Side Action Icons Overlay */
    .video-actions-overlay {
        position: absolute;
        right: 12px;
        bottom: 75px;
        z-index: 12;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .series-avatar-btn {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        border: 2px solid #fff;
        position: relative;
        background-size: cover;
        background-position: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
        cursor: pointer;
        margin-bottom: 5px;
    }

    .series-avatar-btn .plus-badge {
        position: absolute;
        bottom: -6px;
        left: 50%;
        transform: translateX(-50%);
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background-color: var(--shortvideo-primary, #fe2c55);
        border: 1.5px solid #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 10px;
        font-weight: 900;
    }

    .video-action-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50px;
    }

    .video-action-btn-circle {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1.5px solid rgba(255, 255, 255, 0.2);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    }

    .video-action-btn-circle:active {
        transform: scale(0.9);
        background: rgba(255, 255, 255, 0.25);
    }

    .video-action-btn-circle i {
        font-size: 17px;
    }

    .video-action-btn-circle.voted-up {
        background-color: rgba(255, 255, 255, 0.12) !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
    }

    .video-action-btn-circle.voted-up i {
        color: #fe2c55 !important;
    }

    .server-drawer-list .server-select-btn.active {
        background-color: var(--shortvideo-primary, #fe2c55) !important;
        border-color: var(--shortvideo-primary, #fe2c55) !important;
        color: #fff !important;
    }

    .video-action-label {
        font-size: 11px;
        font-weight: 700;
        color: #fff;
        margin-top: 3px;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
        text-align: center;
    }

    /* Fixed Bottom Navigation Bar */
    .bottom-nav-mobile {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        height: 60px !important;
        background-color: var(--shortvideo-bg-dropdown, #1e293b) !important;
        border-top: 1px solid var(--shortvideo-border-card, rgba(255, 255, 255, 0.08)) !important;
        z-index: 1040 !important;
        display: flex !important;
        justify-content: space-around !important;
        align-items: center !important;
        padding: 4px 0 !important;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.06) !important;
    }

    [data-theme="dark"] .bottom-nav-mobile {
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.4) !important;
    }

    .nav-item-mobile {
        color: var(--shortvideo-text-muted, rgba(255, 255, 255, 0.55)) !important;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex-grow: 1;
        height: 100%;
        transition: color 0.15s ease;
    }

    .nav-item-mobile:active {
        color: var(--shortvideo-primary, #ef4444) !important;
    }

    .nav-item-mobile.active {
        color: var(--shortvideo-primary, #ef4444) !important;
        font-weight: 800;
    }

    .nav-item-mobile i {
        font-size: 21px;
        margin-bottom: 2px;
    }

    .nav-item-mobile span {
        font-size: 10px;
        font-weight: 500;
    }

    /* Special Center Plus/New button in bottom bar */
    .nav-item-mobile.nav-special-new {
        background: linear-gradient(135deg, #25f4ee, #fe2c55);
        color: #fff !important;
        border-radius: 12px;
        height: 38px;
        max-width: 48px;
        margin: 0 10px;
        box-shadow: 0 2px 10px rgba(254, 44, 85, 0.4);
    }

    .nav-item-mobile.nav-special-new .nav-new-text {
        font-size: 13px;
        font-weight: 900;
        letter-spacing: 1px;
        color: #fff;
        margin: 0;
        line-height: 1;
    }

    /* Hide the HOT/MỚI tab switcher on mobile - bottom nav handles it */
    .home-tab-switcher {
        display: none !important;
    }

    /* Bottom Sheet Drawers (Episode / Comment / Category) */
    .drawer-mobile-container {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 2000;
        visibility: hidden;
        transition: visibility 0.3s;
    }

    .drawer-mobile-container.show {
        visibility: visible;
    }

    .drawer-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.6);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .drawer-mobile-container.show .drawer-overlay {
        opacity: 1;
    }

    .drawer-content-box {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: #1e293b;
        /* Slate-800 */
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
        display: flex;
        flex-direction: column;
        max-height: 75vh;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.5);
    }

    .drawer-mobile-container.show .drawer-content-box {
        transform: translateY(0);
    }

    .drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .drawer-title {
        font-size: 15px;
        font-weight: 800;
        color: #fff;
        margin: 0;
    }

    .drawer-body-scroll {
        padding: 15px;
        overflow-y: auto;
        flex-grow: 1;
    }

    /* Episode list design in Drawer */
    .drawer-episode-item {
        display: flex;
        gap: 12px;
        padding: 10px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.05);
        margin-bottom: 10px;
        text-decoration: none !important;
        transition: background 0.2s;
    }

    .drawer-episode-item:active,
    .drawer-episode-item.active {
        background: rgba(255, 255, 255, 0.1);
        border-color: var(--shortvideo-primary, #fe2c55);
    }

    .drawer-episode-thumb-wrapper {
        position: relative;
        width: 75px;
        height: 48px;
        border-radius: 6px;
        overflow: hidden;
        background: #000;
        flex-shrink: 0;
    }

    .drawer-episode-thumb {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .drawer-episode-duration {
        position: absolute;
        bottom: 2px;
        right: 4px;
        background: rgba(0, 0, 0, 0.7);
        color: #fff;
        font-size: 9px;
        padding: 1px 4px;
        border-radius: 3px;
        font-weight: bold;
    }

    .drawer-episode-info {
        flex-grow: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .drawer-episode-title {
        font-size: 12.5px;
        font-weight: 700;
        color: #f8fafc;
        margin-bottom: 2px;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
    }

    .drawer-episode-meta {
        font-size: 10.5px;
        color: #94a3b8;
    }

    /* Comment list design in Drawer */
    .drawer-comment-item {
        display: flex;
        gap: 12px;
        margin-bottom: 16px;
    }

    .drawer-comment-avatar {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
    }

    .drawer-comment-avatar-fallback {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background-color: var(--shortvideo-primary, #fe2c55);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: bold;
        flex-shrink: 0;
    }

    .drawer-comment-content {
        flex-grow: 1;
    }

    .drawer-comment-user {
        font-size: 11px;
        font-weight: 700;
        color: #f1f5f9;
        margin-right: 8px;
    }

    .drawer-comment-time {
        font-size: 9px;
        color: #64748b;
    }

    .drawer-comment-text {
        font-size: 12.5px;
        line-height: 1.4;
        color: #cbd5e1;
        margin: 3px 0 0 0;
    }

    /* Comment Form footer */
    .drawer-footer-input {
        padding: 12px 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        background-color: #1e293b;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    /* Category list in Category Drawer */
    .cat-drawer-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 20px;
    }

    .cat-drawer-pill {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 12px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 10px;
        color: #cbd5e1;
        text-decoration: none !important;
        font-size: 12.5px;
        font-weight: 700;
        transition: background 0.2s;
    }

    .cat-drawer-pill:active {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }

    .cat-drawer-pill i {
        font-size: 16px;
    }

    /* Series grid in Category Drawer */
    .series-drawer-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .series-drawer-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 10px;
        text-decoration: none !important;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .series-drawer-item:active {
        background: rgba(255, 255, 255, 0.08);
    }

    .series-drawer-thumb {
        width: 44px;
        height: 44px;
        border-radius: 6px;
        object-fit: cover;
        background-color: rgba(255, 255, 255, 0.05);
    }

    .series-drawer-name {
        font-size: 12.5px;
        font-weight: 700;
        color: #fff;
        margin-bottom: 2px;
    }

    .series-drawer-count {
        font-size: 10px;
        color: #ffc107;
        font-weight: 600;
    }

    /* Adjust video feed cards positioning to support 100vh height */
    article.video-card .plyr-player-container,
    article.video-card .embed-player-container {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    /* Keep the overlay play controls centered */
    .shortvideo-video-poster-overlay {
        background-size: cover !important;
        height: 100% !important;
        width: 100% !important;
    }

    .plyr__video-wrapper {
        background: #000 !important;
    }

    /* Mobile Account UI Refresh */
    .shortvideo-account-dashboard {
        padding-top: 15px !important;
        padding-bottom: 120px !important;
        /* clear bottom nav with extra safe margin */
        padding-left: 12px !important;
        padding-right: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .shortvideo-account-dashboard .row {
        margin-left: -6px !important;
        margin-right: -6px !important;
        width: auto !important;
    }

    .shortvideo-account-dashboard .row>[class*="col-"] {
        padding-left: 6px !important;
        padding-right: 6px !important;
        box-sizing: border-box !important;
    }

    .shortvideo-account-dashboard .profile-summary-card {
        border-radius: 20px !important;
        background: var(--shortvideo-bg-card, #1e293b) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
        margin-bottom: 12px !important;
    }

    .shortvideo-account-dashboard .profile-summary-card .card-body {
        padding: 12px 16px 14px 16px !important;
    }

    .shortvideo-account-dashboard .profile-banner-gradient {
        height: 80px !important;
        background: linear-gradient(135deg, #fe2c55, #833ab4) !important;
    }

    .shortvideo-account-dashboard .profile-avatar-wrapper {
        width: 90px !important;
        height: 90px !important;
        border: 3px solid var(--shortvideo-bg-card, #1e293b) !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
        top: -55px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }

    .shortvideo-account-dashboard .profile-details-section {
        padding-top: 30px !important;
        padding-bottom: 0 !important;
    }

    /* Profile Statistics Row */
    .profile-stats-row {
        display: flex !important;
        justify-content: center !important;
        margin-top: 8px !important;
        gap: 35px !important;
    }

    .profile-stat-val {
        font-size: 17px !important;
        font-weight: 800 !important;
        color: var(--shortvideo-text-dark, #0f172a) !important;
        display: block !important;
    }

    [data-theme="dark"] .profile-stat-val {
        color: #fff !important;
    }

    .profile-stat-lbl {
        font-size: 11.5px !important;
        color: var(--shortvideo-text-muted, #64748b) !important;
        font-weight: 500 !important;
    }

    .profile-stat-divider {
        border-color: rgba(0, 0, 0, 0.08) !important;
    }

    [data-theme="dark"] .profile-stat-divider {
        border-color: rgba(255, 255, 255, 0.08) !important;
    }

    .shortvideo-account-dashboard .profile-details-section h4 {
        font-weight: 800 !important;
        color: #fff !important;
        font-size: 1.3rem !important;
    }

    [data-theme="light"] .shortvideo-account-dashboard .profile-details-section h4 {
        color: #0f172a !important;
    }

    /* TikTok-like Horizontal Pill / Underline Tabs (Sticky on Scroll) */
    .shortvideo-account-dashboard .account-dashboard-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        justify-content: space-around !important;
        /* Distribute tabs evenly on mobile */
        border-bottom: 1px solid var(--shortvideo-border-card, rgba(0, 0, 0, 0.08)) !important;
        padding-bottom: 0 !important;
        margin-bottom: 20px !important;
        gap: 0 !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 1020 !important;
        background-color: var(--shortvideo-bg-body, #f8f9fa) !important;
        padding-top: 10px !important;
        margin-top: 0 !important;
    }

    .shortvideo-account-dashboard .account-dashboard-tabs::-webkit-scrollbar {
        display: none !important;
    }

    .shortvideo-account-dashboard .account-dashboard-tabs .nav-item {
        flex: 1 !important;
        text-align: center !important;
    }

    .shortvideo-account-dashboard .account-dashboard-tabs .nav-link {
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        color: var(--shortvideo-text-muted, #64748b) !important;
        border-bottom: 2px solid transparent !important;
        padding: 14px 10px !important;
        font-size: 13.5px !important;
        font-weight: 700 !important;
        transition: all 0.2s ease !important;
        display: block !important;
        width: 100% !important;
    }

    .shortvideo-account-dashboard .account-dashboard-tabs .nav-link .tab-text {
        display: none !important;
        /* Hide text on mobile */
    }

    .shortvideo-account-dashboard .account-dashboard-tabs .nav-link i {
        font-size: 22px !important;
        margin: 0 !important;
    }

    .shortvideo-account-dashboard .account-dashboard-tabs.nav-pills .nav-link.active,
    .shortvideo-account-dashboard .account-dashboard-tabs .nav-link.active {
        background: transparent !important;
        background-color: transparent !important;
        color: var(--shortvideo-primary, #fe2c55) !important;
        border: none !important;
        border-bottom: 2px solid var(--shortvideo-primary, #fe2c55) !important;
        border-radius: 0 !important;
        font-weight: 900 !important;
    }

    [data-theme="dark"] .shortvideo-account-dashboard .account-dashboard-tabs.nav-pills .nav-link.active,
    [data-theme="dark"] .shortvideo-account-dashboard .account-dashboard-tabs .nav-link.active {
        color: #fff !important;
        background: transparent !important;
        background-color: transparent !important;
    }

    .shortvideo-account-dashboard .account-content-panel {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    .shortvideo-account-dashboard .account-content-panel .card-body {
        padding: 0 !important;
    }

    /* TikTok 3-column Video Grid for history tab */
    .profile-history-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 2px !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .profile-history-grid .col-md-6 {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .profile-history-grid .card {
        border-radius: 0 !important;
        background: #000 !important;
        border: none !important;
        box-shadow: none !important;
    }

    .profile-history-grid .card .profile-history-thumb-wrapper {
        aspect-ratio: 3/4 !important;
        /* TikTok vertical ratio */
        border-radius: 0 !important;
        position: relative !important;
    }

    .profile-history-grid .card img {
        border-radius: 0 !important;
        height: 100% !important;
        width: 100% !important;
        object-fit: cover !important;
    }

    /* Mobile view badge sizing */
    .profile-history-grid .history-views-badge {
        top: 4px !important;
        left: 4px !important;
        font-size: 8.5px !important;
        padding: 1px 5px !important;
        border-radius: 4px !important;
    }

    .profile-history-grid .history-views-badge i {
        font-size: 8px !important;
    }

    /* Custom layout for followed series on mobile */
    .profile-followed-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    .profile-followed-row .col-md-6 {
        width: 100% !important;
        padding: 0 !important;
    }

    .profile-followed-row div[id^="followed-series-"]>div {
        background: var(--shortvideo-bg-card, #1e293b) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        border-radius: 14px !important;
        padding: 14px 16px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    }

    /* Modern Forms for mobile */
    .shortvideo-account-dashboard form {
        background: var(--shortvideo-bg-card, #1e293b) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        border-radius: 16px !important;
        padding: 20px !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1) !important;
        max-width: 100% !important;
    }

    .shortvideo-account-dashboard form .form-control,
    .shortvideo-account-dashboard form textarea {
        background: rgba(255, 255, 255, 0.04) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        color: #fff !important;
        border-radius: 10px !important;
        padding: 10px 14px !important;
        font-size: 13.5px !important;
    }

    [data-theme="light"] .shortvideo-account-dashboard form .form-control,
    [data-theme="light"] .shortvideo-account-dashboard form textarea {
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        color: #0f172a !important;
    }

    .shortvideo-account-dashboard form .form-control:focus {
        border-color: var(--shortvideo-primary, #fe2c55) !important;
        box-shadow: none !important;
    }

    .shortvideo-account-dashboard form button[type="submit"] {
        width: 100% !important;
        border-radius: 25px !important;
        padding: 10px !important;
        font-size: 14px !important;
    }

    /* Reset scroll lock on mobile for account page */
    body.shortvideo-account-page {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Clean active/focus state for account tabs on mobile - no background block */
    .shortvideo-account-dashboard .account-dashboard-tabs.nav-pills .nav-link,
    .shortvideo-account-dashboard .account-dashboard-tabs.nav-pills .nav-link.active,
    .shortvideo-account-dashboard .account-dashboard-tabs .nav-link,
    .shortvideo-account-dashboard .account-dashboard-tabs .nav-link.active,
    .shortvideo-account-dashboard .account-dashboard-tabs .nav-link:hover,
    .shortvideo-account-dashboard .account-dashboard-tabs .nav-link:focus,
    .shortvideo-account-dashboard .account-dashboard-tabs .nav-link:active,
    .shortvideo-account-dashboard .account-dashboard-tabs .nav-link.active:hover,
    .shortvideo-account-dashboard .account-dashboard-tabs .nav-link.active:focus,
    .shortvideo-account-dashboard .account-dashboard-tabs .nav-link.active:active {
        background: transparent !important;
        background-color: transparent !important;
        outline: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    /* Mobile Watch History Overlay */
    .profile-history-grid .profile-history-overlay-footer {
        opacity: 1 !important;
        pointer-events: auto !important;
        padding: 8px 6px 6px 6px !important;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.55) 75%, rgba(0, 0, 0, 0) 100%) !important;
    }

    .profile-history-grid .profile-history-overlay-footer .history-series-name {
        font-size: 8.5px !important;
    }

    .profile-history-grid .profile-history-overlay-footer .history-video-title {
        font-size: 10px !important;
        font-weight: 600 !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
    }
}

/* --- Watch History Cards Overlay & Hover Effects --- */
.profile-history-card {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
}

.profile-history-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25) !important;
}

.profile-history-card .profile-history-thumb-wrapper img {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.profile-history-card:hover .profile-history-thumb-wrapper img {
    transform: scale(1.08);
}

/* View count badge — top-left corner */
.history-views-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 6;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    line-height: 1.4;
}

.history-views-badge i {
    font-size: 10px;
}

/* Overlay footer — always visible */
.profile-history-overlay-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.5) 65%, rgba(0, 0, 0, 0) 100%) !important;
    padding: 20px 10px 8px 10px !important;
    z-index: 5;
    opacity: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-history-overlay-footer .history-series-name {
    font-size: 10px;
    font-weight: 700;
    color: #ffc107 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-history-overlay-footer .history-video-title {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff !important;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Refined Followed Series Cards --- */
.profile-followed-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
    transition: all 0.2s ease;
}

.profile-followed-card:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.profile-followed-card .series-drawer-name {
    color: #fff !important;
    font-weight: 700 !important;
    transition: color 0.2s ease;
}

.profile-followed-card .series-drawer-name:hover {
    color: var(--shortvideo-primary, #fe2c55) !important;
}

/* Light theme overrides for followed series cards */
[data-theme="light"] .profile-followed-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .profile-followed-card:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

[data-theme="light"] .profile-followed-card .series-drawer-name {
    color: #0f172a !important;
}

/* ==========================================================================
   WALLET STYLES (Tabs & Packages)
   ========================================================================== */
#shortvideo-wallet-tabs {
    margin-top: 10px;
    background-color: var(--shortvideo-bg-card, #ffffff) !important;
    border: 1px solid var(--shortvideo-border-card, #e2e8f0) !important;
    border-radius: 12px !important;
    padding: 6px !important;
    display: flex;
    gap: 4px;
}

#shortvideo-wallet-tabs .nav-item {
    flex: 1;
}

#shortvideo-wallet-tabs .nav-link {
    width: 100%;
    background-color: transparent !important;
    color: var(--shortvideo-text-muted, #6c757d) !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-transform: none !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    transition: all 0.2s ease-in-out !important;
    border: none !important;
}

#shortvideo-wallet-tabs .nav-link:hover {
    color: var(--shortvideo-primary, #ef4444) !important;
    background-color: rgba(var(--shortvideo-primary-rgb, 239, 68, 68), 0.05) !important;
}

#shortvideo-wallet-tabs .nav-link.active {
    background-color: var(--shortvideo-primary, #ef4444) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(var(--shortvideo-primary-rgb, 239, 68, 68), 0.25) !important;
}

[data-theme="dark"] #shortvideo-wallet-tabs .nav-link.active {
    background-color: var(--shortvideo-primary, #ef4444) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* Custom Deposit Packages (Gói nạp) */
.shortvideo-topup-pkg {
    background-color: var(--shortvideo-bg-card, #ffffff) !important;
    border: 1.5px solid var(--shortvideo-border-card, #e2e8f0) !important;
    border-radius: 14px !important;
    padding: 20px 15px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .shortvideo-topup-pkg {
    background-color: var(--shortvideo-bg-card, #1e293b) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.shortvideo-topup-pkg:hover {
    transform: translateY(-3px);
    border-color: var(--shortvideo-primary, #ef4444) !important;
    box-shadow: 0 8px 20px rgba(var(--shortvideo-primary-rgb, 239, 68, 68), 0.08) !important;
}

/* Dynamic active state */
.shortvideo-topup-pkg.border-primary {
    border-width: 2px !important;
    border-color: var(--shortvideo-primary, #ef4444) !important;
    background-color: rgba(var(--shortvideo-primary-rgb, 239, 68, 68), 0.03) !important;
    box-shadow: 0 8px 24px rgba(var(--shortvideo-primary-rgb, 239, 68, 68), 0.12) !important;
}

[data-theme="dark"] .shortvideo-topup-pkg.border-primary {
    background-color: rgba(var(--shortvideo-primary-rgb, 239, 68, 68), 0.08) !important;
}

.shortvideo-topup-pkg .pkg-vnd {
    font-size: 1.45rem !important;
    font-weight: 800 !important;
    line-height: 1.2;
    margin-bottom: 2px;
    letter-spacing: -0.5px;
    transition: color 0.25s ease;
}

.shortvideo-topup-pkg .check-icon {
    top: 8px !important;
    right: 8px !important;
    padding: 0 !important;
    font-size: 1.1rem;
    color: var(--shortvideo-primary, #ef4444) !important;
    z-index: 2;
}

.shortvideo-topup-pkg .border-top {
    border-top: 1px dashed var(--shortvideo-border-card, #e2e8f0) !important;
    font-size: 12px !important;
    font-weight: 500;
    color: var(--shortvideo-text-muted, #6c757d) !important;
}

[data-theme="dark"] .shortvideo-topup-pkg .border-top {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* Align and polish payment button and inputs */
#shortvideo-btn-pay {
    border-radius: 50px !important;
    padding: 12px 40px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 15px rgba(var(--shortvideo-primary-rgb, 239, 68, 68), 0.2) !important;
}

#shortvideo-btn-pay:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--shortvideo-primary-rgb, 239, 68, 68), 0.3) !important;
}

#shortvideo-btn-pay:disabled {
    opacity: 0.65;
    transform: none !important;
    box-shadow: none !important;
    background-color: var(--shortvideo-text-muted, #6c757d) !important;
}

/* VIP Packages styling */
.shortvideo-wallet-wrapper #buyvip-pane .card {
    background-color: var(--shortvideo-bg-card, #ffffff) !important;
    border: 1.5px solid var(--shortvideo-border-card, #e2e8f0) !important;
    border-radius: 16px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02) !important;
}

.shortvideo-wallet-wrapper #buyvip-pane .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08) !important;
    border-color: var(--shortvideo-primary, #ef4444) !important;
}

.shortvideo-wallet-wrapper #buyvip-pane .card-body {
    padding: 24px 20px !important;
}

@media (max-width: 767.98px) {
    .shortvideo-wallet-wrapper #buyvip-pane .card {
        max-width: 320px;
        margin: 0 auto 15px auto;
    }
}

[data-theme="dark"] .shortvideo-wallet-wrapper #buyvip-pane .card {
    background-color: var(--shortvideo-bg-card, #1e293b) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.shortvideo-wallet-wrapper #buyvip-pane .card h5.text-warning {
    font-size: 1.2rem !important;
    font-weight: 800 !important;
}

.shortvideo-btn-buyvip {
    border-radius: 50px !important;
    padding: 10px 20px !important;
    transition: all 0.25s ease !important;
}

.shortvideo-btn-buyvip:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--shortvideo-primary-rgb, 239, 68, 68), 0.2) !important;
}

/* Tables styling inside wallet */
.shortvideo-wallet-wrapper .table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1px solid var(--shortvideo-border-card, #e2e8f0) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

[data-theme="dark"] .shortvideo-wallet-wrapper .table {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.shortvideo-wallet-wrapper .table thead th {
    background-color: var(--shortvideo-bg-search, #f1f3f4) !important;
    color: var(--shortvideo-text-dark, #212529) !important;
    font-weight: 600 !important;
    border-bottom: 1.5px solid var(--shortvideo-border-card, #e2e8f0) !important;
}

[data-theme="dark"] .shortvideo-wallet-wrapper .table thead th {
    background-color: var(--shortvideo-bg-body, #0f172a) !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

.shortvideo-wallet-wrapper .table td {
    padding: 12px 16px !important;
}

@media (max-width: 576px) {
    .shortvideo-topup-pkg .pkg-vnd {
        font-size: 1.25rem !important;
    }

    .shortvideo-topup-pkg {
        padding: 15px 10px !important;
    }
}

/* ==========================================================================
   BALANCE, VIP STATUS CARDS & SECTION HEADERS
   ========================================================================== */
.shortvideo-wallet-wrapper h5.text-dark {
    color: var(--shortvideo-text-dark, #212529) !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.2px;
    margin-top: 10px;
    margin-bottom: 18px !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Balance Card (bg-primary) */
.shortvideo-wallet-wrapper .card.bg-primary {
    background: linear-gradient(135deg, var(--shortvideo-primary, #ef4444) 0%, var(--shortvideo-primary-hover, #dc2626) 100%) !important;
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 8px 24px rgba(var(--shortvideo-primary-rgb, 239, 68, 68), 0.2) !important;
}

[data-theme="dark"] .shortvideo-wallet-wrapper .card.bg-primary {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

/* VIP Card (bg-dark) */
.shortvideo-wallet-wrapper .card.bg-dark {
    background-color: var(--shortvideo-bg-card, #ffffff) !important;
    border: 1.5px solid var(--shortvideo-border-card, #e2e8f0) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.02) !important;
    color: var(--shortvideo-text-dark, #212529) !important;
}

[data-theme="dark"] .shortvideo-wallet-wrapper .card.bg-dark {
    background-color: var(--shortvideo-bg-card, #1e293b) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}

.shortvideo-wallet-wrapper .card.bg-dark .card-title {
    color: var(--shortvideo-text-muted, #6c757d) !important;
}

.shortvideo-wallet-wrapper .card.bg-dark .text-white-50 {
    color: var(--shortvideo-text-muted, #6c757d) !important;
}

[data-theme="dark"] .shortvideo-wallet-wrapper .card.bg-dark .text-white-50 {
    color: var(--shortvideo-text-muted, #94a3b8) !important;
}

@media (max-width: 576px) {

    .shortvideo-wallet-wrapper .card.bg-primary .card-body,
    .shortvideo-wallet-wrapper .card.bg-dark .card-body {
        padding: 20px 15px !important;
    }

    .shortvideo-wallet-wrapper .card.bg-primary h1 {
        font-size: 1.8rem !important;
    }

    .shortvideo-wallet-wrapper .card.bg-dark h3 {
        font-size: 1.35rem !important;
    }
}

/* Mobile Search Overlay Styling */
.mobile-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.mobile-search-input:focus {
    color: #fff !important;
    background-color: transparent !important;
}

/* Make mobile search input taller and spacious */
.mobile-search-form-wrapper form {
    padding: 8px 18px !important;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.mobile-search-input {
    font-size: 14px !important;
    height: 24px !important;
    line-height: 24px !important;
    color: #fff !important;
}

.mobile-search-form-wrapper button[type="submit"] {
    font-size: 14px !important;
    margin-left: 12px !important;
}

.mobile-search-form-wrapper .btn-close-search-mobile {
    font-size: 11px !important;
    margin-left: 12px !important;
}

/* ==========================================================================
   MATCHED SERIES IN SEARCH PAGE
   ========================================================================== */
.matched-series-section {
    background-color: var(--shortvideo-bg-card, #ffffff) !important;
    border: 1px solid var(--shortvideo-border-card, #e2e8f0) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
}

[data-theme="dark"] .matched-series-section {
    background-color: var(--shortvideo-bg-card, #1e293b) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

.matched-series-card {
    background-color: var(--shortvideo-bg-card, #ffffff) !important;
    border: 1.5px solid var(--shortvideo-border-card, #e2e8f0) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

[data-theme="dark"] .matched-series-card {
    background-color: var(--shortvideo-bg-body, #0f172a) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.matched-series-card:hover {
    transform: translateY(-2px);
    border-color: var(--shortvideo-primary, #ef4444) !important;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="dark"] .matched-series-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
}

/* Matched Series Tags */
.matched-series-tag {
    background-color: rgba(var(--shortvideo-primary-rgb, 239, 68, 68), 0.1) !important;
    color: var(--shortvideo-primary, #ef4444) !important;
    border: 1px solid rgba(var(--shortvideo-primary-rgb, 239, 68, 68), 0.15) !important;
    font-weight: 700 !important;
}

.matched-series-tag:hover {
    background-color: var(--shortvideo-primary, #ef4444) !important;
    color: #ffffff !important;
    transform: translateY(-1.5px);
    box-shadow: 0 4px 12px rgba(var(--shortvideo-primary-rgb, 239, 68, 68), 0.25) !important;
}

.matched-series-tag span {
    transition: all 0.2s ease;
}

.matched-series-tag:hover span {
    color: var(--shortvideo-primary, #ef4444) !important;
    background-color: #ffffff !important;
}

[data-theme="dark"] .matched-series-tag {
    background-color: rgba(var(--shortvideo-primary-rgb, 239, 68, 68), 0.15) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .matched-series-tag:hover {
    background-color: var(--shortvideo-primary, #ef4444) !important;
}

/* Search page video card vertical grid */
.search-video-card .profile-history-thumb-wrapper {
    aspect-ratio: 9 / 16 !important;
}

@media (max-width: 767.98px) {
    .search-video-card .profile-history-overlay-footer {
        padding: 10px 6px 4px 6px !important;
    }

    .search-video-card .history-video-title {
        font-size: 9.5px !important;
        font-weight: 600 !important;
    }

    .search-video-card .history-views-badge {
        font-size: 9px !important;
        padding: 1px 5px !important;
    }
}


/* Autocomplete Dropdown Styling */
.search-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background-color: var(--shortvideo-bg-card, #ffffff);
    border: 1px solid var(--shortvideo-border-header, #e2e8f0);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    max-height: 380px;
    overflow-y: auto;
    padding: 10px 0;
    text-align: left;
}

[data-theme="dark"] .search-autocomplete-dropdown {
    background-color: #1e293b;
    border-color: #334155;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

.autocomplete-section-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--shortvideo-text-muted, #64748b);
    padding: 6px 16px 4px 16px;
    letter-spacing: 0.5px;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--shortvideo-text-dark, #0f172a);
    transition: background-color 0.15s ease;
}

[data-theme="dark"] .autocomplete-item {
    color: #f8fafc;
}

.autocomplete-item:hover {
    background-color: rgba(0, 86, 145, 0.08);
    color: var(--shortvideo-primary, #ef4444);
}

[data-theme="dark"] .autocomplete-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.autocomplete-series-item {
    font-size: 13px;
    font-weight: 600;
    gap: 8px;
}

.autocomplete-series-item i {
    color: var(--shortvideo-primary, #ef4444);
}

.autocomplete-video-item {
    gap: 12px;
}

.autocomplete-video-thumb {
    width: 36px;
    height: 48px;
    border-radius: 4px;
    object-fit: cover;
    background-color: #0f172a;
    flex-shrink: 0;
}

.autocomplete-video-fallback {
    width: 36px;
    height: 48px;
    border-radius: 4px;
    background-color: #334155;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.autocomplete-video-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.autocomplete-video-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-video-series {
    font-size: 10px;
    color: var(--shortvideo-text-muted, #64748b);
    margin-top: 2px;
}

.autocomplete-no-results {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--shortvideo-text-muted, #64748b);
    text-align: center;
}

.autocomplete-view-all {
    display: block;
    text-align: center;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--shortvideo-primary, #ef4444);
    text-decoration: none;
    border-top: 1px solid var(--shortvideo-border-header, #e2e8f0);
    margin-top: 8px;
}

[data-theme="dark"] .autocomplete-view-all {
    border-top-color: #334155;
}

/* Mobile Tiktok search dropdown adjustments */
.mobile-search-form-wrapper .search-autocomplete-dropdown {
    background-color: rgba(15, 23, 42, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(8px);
    color: #f8fafc !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
}

.mobile-search-form-wrapper .autocomplete-item {
    color: #f8fafc !important;
}

.mobile-search-form-wrapper .autocomplete-item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffc107 !important;
}

.mobile-search-form-wrapper .autocomplete-view-all {
    color: #ffc107 !important;
    border-top-color: rgba(255, 255, 255, 0.15) !important;
}

/* Mobile search results page alignment and spacing */
@media (max-width: 767.98px) {
    .results-search-wrapper {
        margin: 16px 0 8px 0 !important;
    }

    .matched-series-section {
        margin: 0 0 8px 0 !important;
    }
}

/* Glassmorphic theme toggle button micro-interactions */
.theme-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.4) !important;
    transform: scale(1.08);
}

.theme-toggle-btn:active {
    transform: scale(0.95);
}

/* Mobile Account & Bottom Nav explicit theme overrides */
@media (max-width: 767.98px) {

    /* 1. Body & Container Backgrounds */
    [data-theme="light"] body.shortvideo-account-page,
    html:not([data-theme="dark"]) body.shortvideo-account-page {
        background-color: #f8f9fa !important;
        color: #0f172a !important;
    }

    [data-theme="dark"] body.shortvideo-account-page {
        background-color: #0f172a !important;
        color: #f8fafc !important;
    }

    /* 2. Account Tabs wrapper */
    [data-theme="light"] .shortvideo-account-dashboard .account-dashboard-tabs,
    html:not([data-theme="dark"]) .shortvideo-account-dashboard .account-dashboard-tabs {
        background-color: #ffffff !important;
        border-bottom: 1px solid #e2e8f0 !important;
    }

    [data-theme="dark"] .shortvideo-account-dashboard .account-dashboard-tabs {
        background-color: #1e293b !important;
        border-bottom: 1px solid #334155 !important;
    }

    /* 3. Account Tab Links */
    [data-theme="light"] .shortvideo-account-dashboard .account-dashboard-tabs .nav-link,
    html:not([data-theme="dark"]) .shortvideo-account-dashboard .account-dashboard-tabs .nav-link {
        color: #64748b !important;
    }

    [data-theme="light"] .shortvideo-account-dashboard .account-dashboard-tabs .nav-link.active,
    html:not([data-theme="dark"]) .shortvideo-account-dashboard .account-dashboard-tabs .nav-link.active {
        color: var(--shortvideo-primary, #fe2c55) !important;
        border-bottom: 2px solid var(--shortvideo-primary, #fe2c55) !important;
    }

    [data-theme="dark"] .shortvideo-account-dashboard .account-dashboard-tabs .nav-link {
        color: #94a3b8 !important;
    }

    [data-theme="dark"] .shortvideo-account-dashboard .account-dashboard-tabs .nav-link.active {
        color: #ffffff !important;
        border-bottom: 2px solid var(--shortvideo-primary, #fe2c55) !important;
    }

    /* 4. Cards Background (Profile card, Followed Series card, Content Panel) */
    [data-theme="light"] .shortvideo-account-dashboard .profile-summary-card,
    html:not([data-theme="dark"]) .shortvideo-account-dashboard .profile-summary-card {
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05) !important;
    }

    [data-theme="dark"] .shortvideo-account-dashboard .profile-summary-card {
        background: #1e293b !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    }

    [data-theme="light"] .profile-followed-row div[id^="followed-series-"]>div,
    html:not([data-theme="dark"]) .profile-followed-row div[id^="followed-series-"]>div {
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
    }

    [data-theme="dark"] .profile-followed-row div[id^="followed-series-"]>div {
        background: #1e293b !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    }

    [data-theme="light"] .profile-followed-card .series-drawer-name,
    html:not([data-theme="dark"]) .profile-followed-card .series-drawer-name {
        color: #0f172a !important;
    }

    [data-theme="dark"] .profile-followed-card .series-drawer-name {
        color: #ffffff !important;
    }

    /* 5. Forms on Mobile Account page */
    [data-theme="light"] .shortvideo-account-dashboard form,
    html:not([data-theme="dark"]) .shortvideo-account-dashboard form {
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05) !important;
    }

    [data-theme="dark"] .shortvideo-account-dashboard form {
        background: #1e293b !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
    }

    /* 6. Profile Avatar Wrapper */
    [data-theme="light"] .shortvideo-account-dashboard .profile-avatar-wrapper,
    html:not([data-theme="dark"]) .shortvideo-account-dashboard .profile-avatar-wrapper {
        border-color: #ffffff !important;
    }

    [data-theme="dark"] .shortvideo-account-dashboard .profile-avatar-wrapper {
        border-color: #1e293b !important;
    }

    /* 7. Text colors */
    [data-theme="light"] .profile-stat-val,
    html:not([data-theme="dark"]) .profile-stat-val {
        color: #0f172a !important;
    }

    [data-theme="dark"] .profile-stat-val {
        color: #ffffff !important;
    }

    [data-theme="light"] .profile-details-section h4,
    html:not([data-theme="dark"]) .profile-details-section h4 {
        color: #0f172a !important;
    }

    [data-theme="dark"] .profile-details-section h4 {
        color: #ffffff !important;
    }

    /* 8. Fixed Bottom Navigation Bar overrides */
    [data-theme="light"] .bottom-nav-mobile,
    html:not([data-theme="dark"]) .bottom-nav-mobile {
        background-color: #ffffff !important;
        border-top: 1px solid #e2e8f0 !important;
    }

    [data-theme="dark"] .bottom-nav-mobile {
        background-color: #1e293b !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    [data-theme="light"] .nav-item-mobile,
    html:not([data-theme="dark"]) .nav-item-mobile {
        color: #64748b !important;
    }

    [data-theme="dark"] .nav-item-mobile {
        color: rgba(255, 255, 255, 0.55) !important;
    }
}

/* ==========================================================================
   CATEGORY PAGE STYLES (page-danh-muc.php)
   ========================================================================== */

/* Page Header */
.sv-cat-page-header {
    text-align: center;
    padding: 10px 0 5px;
}

.sv-cat-page-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--shortvideo-text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
}

.sv-cat-page-title i {
    color: var(--shortvideo-primary);
    font-size: 1.3rem;
}

.sv-cat-page-subtitle {
    color: var(--shortvideo-text-muted);
    font-size: 0.85rem;
    margin-top: 6px;
    font-weight: 500;
}

/* Filter Bar */
.sv-cat-filter-wrapper {
    position: sticky;
    top: 56px;
    z-index: 20;
    background-color: var(--shortvideo-bg-body, #f8f9fa);
    padding: 10px 0;
    transition: var(--shortvideo-transition-theme);
}

.sv-cat-filter-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sv-cat-filter-scroll::-webkit-scrollbar {
    display: none;
}

.sv-cat-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 50px;
    border: 1.5px solid var(--shortvideo-border-card, #e0e0e0);
    background-color: var(--shortvideo-bg-card, #ffffff);
    color: var(--shortvideo-text-dark, #212529);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.sv-cat-filter-pill:hover {
    border-color: var(--shortvideo-primary);
    color: var(--shortvideo-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(var(--shortvideo-primary-rgb), 0.15);
}

.sv-cat-filter-pill.active {
    background: linear-gradient(135deg, var(--shortvideo-primary), var(--shortvideo-primary-hover));
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 3px 12px rgba(var(--shortvideo-primary-rgb), 0.35);
    transform: translateY(-1px);
}

.sv-cat-filter-pill.active i {
    color: #ffffff;
}

.sv-cat-filter-count {
    background-color: rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
}

.sv-cat-filter-pill.active .sv-cat-filter-count {
    background-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Series Card */
.sv-cat-card {
    display: block;
    text-decoration: none;
    background-color: var(--shortvideo-bg-card, #ffffff);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--shortvideo-border-card, #e0e0e0);
    transition: all 0.3s ease;
    height: 100%;
}

.sv-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: var(--shortvideo-primary);
}

.sv-cat-card-img-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background-color: var(--shortvideo-bg-search, #f1f3f4);
}

.sv-cat-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.sv-cat-card:hover .sv-cat-card-thumb {
    transform: scale(1.08);
}

.sv-cat-card-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--shortvideo-bg-search) 0%, var(--shortvideo-bg-card) 100%);
}

.sv-cat-card-thumb-placeholder i {
    font-size: 2.5rem;
    color: var(--shortvideo-text-muted);
    opacity: 0.4;
}

.sv-cat-card-ep-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background-color: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}

.sv-cat-card-body {
    padding: 10px 10px 12px;
}

.sv-cat-card-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--shortvideo-text-dark);
    margin: 0 0 4px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sv-cat-card-views {
    font-size: 11px;
    color: var(--shortvideo-text-muted);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sv-cat-card-views i {
    font-size: 12px;
}

/* Empty State */
.sv-cat-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--shortvideo-text-muted);
}

.sv-cat-empty i {
    font-size: 3.5rem;
    opacity: 0.35;
    display: block;
    margin-bottom: 15px;
}

.sv-cat-empty p {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

/* Skeleton Loader */
.sv-cat-card-skeleton {
    background-color: var(--shortvideo-bg-card, #ffffff);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--shortvideo-border-card, #e0e0e0);
}

.sv-cat-skeleton-img {
    aspect-ratio: 3 / 4;
    background-color: var(--shortvideo-bg-search, #f1f3f4);
}

.sv-cat-skeleton-body {
    padding: 10px;
}

.sv-cat-skeleton-title {
    height: 14px;
    border-radius: 4px;
    background-color: var(--shortvideo-bg-search, #f1f3f4);
    margin-bottom: 8px;
    width: 80%;
}

.sv-cat-skeleton-meta {
    height: 10px;
    border-radius: 4px;
    background-color: var(--shortvideo-bg-search, #f1f3f4);
    width: 50%;
}

.skeleton-pulse {
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

@keyframes skeletonPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* Results Info */
.sv-cat-results-info {
    min-height: 20px;
}

/* Mobile responsiveness */
@media (max-width: 576px) {
    .sv-cat-page-header {
        padding: 5px 0 0;
    }

    .sv-cat-page-title {
        font-size: 1.2rem;
    }

    .sv-cat-filter-pill {
        padding: 6px 14px;
        font-size: 12px;
    }

    .sv-cat-card-body {
        padding: 8px 8px 10px;
    }

    .sv-cat-card-title {
        font-size: 12px;
    }

    .sv-cat-card-ep-badge {
        font-size: 10px;
        padding: 2px 6px;
    }

    .sv-cat-filter-wrapper {
        top: 0;
    }
}

/* Dark mode support for category page */
[data-theme="dark"] .sv-cat-filter-wrapper {
    background-color: var(--shortvideo-bg-body) !important;
}

[data-theme="dark"] .sv-cat-filter-pill {
    background-color: var(--shortvideo-bg-card);
    border-color: var(--shortvideo-border-card);
    color: var(--shortvideo-text-dark);
}

[data-theme="dark"] .sv-cat-filter-pill:hover {
    border-color: var(--shortvideo-primary);
    color: var(--shortvideo-primary);
}

[data-theme="dark"] .sv-cat-card {
    background-color: var(--shortvideo-bg-card);
    border-color: var(--shortvideo-border-card);
}

[data-theme="dark"] .sv-cat-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .sv-cat-card-skeleton {
    background-color: var(--shortvideo-bg-card);
    border-color: var(--shortvideo-border-card);
}

[data-theme="dark"] .sv-cat-skeleton-img,
[data-theme="dark"] .sv-cat-skeleton-title,
[data-theme="dark"] .sv-cat-skeleton-meta {
    background-color: var(--shortvideo-bg-search);
}

/* ==========================================================================
   MOBILE LAYOUT & COMPONENT IMPROVEMENTS (SERIES, GENRE, CUSTOM MODALS)
   ========================================================================== */

/* 1. Mobile Series Header (Hero block) */
.taxonomy-series-mobile {
    background-color: var(--shortvideo-bg-body, #f8f9fa) !important;
    min-height: 100vh;
}

.series-hero-mobile {
    position: relative;
    padding: 30px 16px 20px;
    background: #0f172a;
    overflow: hidden;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.series-hero-mobile::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.45) 0%, rgba(15, 23, 42, 0.85) 100%) !important;
    z-index: 2;
    pointer-events: none;
}

.series-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(15px) !important;
    opacity: 0.65 !important;
    transform: scale(1.15);
    z-index: 1;
}

.series-hero-content {
    position: relative;
    z-index: 3 !important;
    display: flex;
    gap: 16px;
    align-items: center;
}

.series-hero-poster {
    width: 105px;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.series-hero-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.series-hero-title {
    font-size: 18px;
    font-weight: 900;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.3px;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.series-hero-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.series-glass-pill {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
}

.sv-follow-btn-mobile {
    background: linear-gradient(135deg, var(--shortvideo-primary, #ef4444) 0%, var(--shortvideo-primary-hover, #dc2626) 100%);
    color: #ffffff !important;
    border: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.sv-follow-btn-mobile.following {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    box-shadow: none;
}

.series-hero-desc-wrapper {
    position: relative;
    z-index: 3 !important;
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.series-hero-desc {
    font-size: 12.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.series-hero-desc.expanded {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    color: rgba(255, 255, 255, 0.95);
}

.series-hero-desc-toggle {
    background: none;
    border: none;
    color: #ffc107;
    font-size: 11px;
    font-weight: 700;
    padding: 0;
    margin-top: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* 2. Segmented sorting control on Mobile */
.segmented-control-wrap {
    padding: 10px 16px;
    background-color: var(--shortvideo-bg-body, #f8f9fa);
    position: sticky;
    top: 0;
    z-index: 20;
}

[data-theme="dark"] .segmented-control-wrap {
    background-color: #0f172a;
}

.segmented-control {
    display: flex;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 30px;
    padding: 3px;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .segmented-control {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.03);
}

.segmented-item {
    flex: 1;
    border: none;
    background: none;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 30px;
    color: var(--shortvideo-text-muted, #64748b);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.segmented-item.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .segmented-item.active {
    background: #1e293b;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 3. Three column episode grid on Mobile */
.sv-episode-grid-card {
    display: block;
    text-decoration: none;
    background-color: var(--shortvideo-bg-card, #ffffff);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--shortvideo-border-card, #e2e8f0);
    transition: all 0.2s ease;
    height: 100%;
}

[data-theme="dark"] .sv-episode-grid-card {
    background-color: #1e293b;
    border-color: rgba(255, 255, 255, 0.06);
}

.sv-episode-grid-card:hover {
    transform: translateY(-2px);
    border-color: var(--shortvideo-primary);
}

.ep-thumb-wrap {
    position: relative;
    aspect-ratio: 3/4 !important;
    background-color: #000;
    overflow: hidden;
}

.ep-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ep-badge-overlay {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    padding: 1.5px 5px;
    border-radius: 3px;
    backdrop-filter: blur(2px);
}

.ep-views-overlay {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 8px;
    font-weight: 700;
    padding: 1.5px 5px;
    border-radius: 3px;
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    gap: 2px;
}

.ep-card-body {
    padding: 6px 8px 8px;
}

.ep-card-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--shortvideo-text-dark, #0f172a);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

[data-theme="dark"] .ep-card-title {
    color: #f8fafc;
}

/* Skeleton loader for episodes */
.sv-episode-skeleton {
    background: var(--shortvideo-bg-card, #ffffff);
    border-radius: 8px;
    border: 1px solid var(--shortvideo-border-card, #e2e8f0);
    overflow: hidden;
}

[data-theme="dark"] .sv-episode-skeleton {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.06);
}

.sv-ep-skeleton-thumb {
    aspect-ratio: 3/4 !important;
    background-color: var(--shortvideo-bg-search, #f1f3f4);
}

[data-theme="dark"] .sv-ep-skeleton-thumb {
    background-color: #334155;
}

.sv-ep-skeleton-title {
    height: 10px;
    background-color: var(--shortvideo-bg-search, #f1f3f4);
    margin: 6px 8px 8px;
    border-radius: 3px;
    width: 70%;
}

[data-theme="dark"] .sv-ep-skeleton-title {
    background-color: #334155;
}

/* 4. Mobile Genre Header */
.genre-header-mobile {
    padding: 20px 16px 15px;
    background-color: var(--shortvideo-bg-card, #ffffff);
    border-bottom: 1px solid var(--shortvideo-border-card, #e2e8f0);
}

[data-theme="dark"] .genre-header-mobile {
    background-color: #1e293b;
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.genre-title-mobile {
    font-size: 20px;
    font-weight: 900;
    color: var(--shortvideo-text-dark, #0f172a);
    margin: 0 0 6px;
    display: flex;
    align-items: center;
}

[data-theme="dark"] .genre-title-mobile {
    color: #ffffff;
}

.genre-desc-mobile {
    font-size: 12.5px;
    color: var(--shortvideo-text-muted, #64748b);
    line-height: 1.5;
    margin: 0;
}

/* Mobile Genre Tab Bar (Sticky) */
.genre-tabs-bar {
    display: flex;
    background-color: var(--shortvideo-bg-card, #ffffff);
    border-bottom: 1.5px solid var(--shortvideo-border-card, #e2e8f0);
    position: sticky;
    top: 0;
    z-index: 25;
}

[data-theme="dark"] .genre-tabs-bar {
    background-color: #1e293b;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.genre-tab-item {
    flex: 1;
    border: none;
    background: none;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--shortvideo-text-muted, #64748b);
    padding: 12px 10px;
    text-align: center;
    position: relative;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

.genre-tab-item.active {
    color: var(--shortvideo-primary, #ef4444);
}

.genre-tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -1.5px;
    left: 25%;
    right: 25%;
    height: 3px;
    background-color: var(--shortvideo-primary, #ef4444);
    border-radius: 3px;
}

/* 5. Mobile Series Card (2 columns, similar to reference image) */
.sv-mobile-series-card {
    display: block;
    text-decoration: none;
    background-color: var(--shortvideo-bg-card, #ffffff);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--shortvideo-border-card, #e2e8f0);
    transition: all 0.25s ease;
    height: 100%;
}

[data-theme="dark"] .sv-mobile-series-card {
    background-color: #1e293b;
    border-color: rgba(255, 255, 255, 0.06);
}

.sv-mobile-series-card:hover {
    transform: translateY(-2px);
    border-color: var(--shortvideo-primary);
}

.sv-series-thumb-wrap {
    position: relative;
    aspect-ratio: 3/4;
    background-color: #000;
    overflow: hidden;
}

.sv-series-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.sv-mobile-series-card:hover .sv-series-thumb {
    transform: scale(1.06);
}

.sv-series-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: rgba(255, 255, 255, 0.4);
}

.sv-series-thumb-placeholder i {
    font-size: 2.2rem;
}

.sv-series-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 4px;
    color: #ffffff;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    z-index: 5;
}

.badge-hot {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    /* Orange */
}

.badge-new {
    background: linear-gradient(135deg, #10b981, #059669);
    /* Green */
}

.badge-full {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    /* Blue */
}

.sv-series-bookmark-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid #ffffff !important;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    padding: 0;
}

.sv-series-bookmark-btn.following {
    background: rgba(0, 0, 0, 0.5) !important;
    border-color: #ffffff !important;
    color: var(--shortvideo-primary, #ef4444) !important;
}

.sv-series-bookmark-btn:hover {
    transform: scale(1.1);
}

.sv-series-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.sv-series-play-overlay i {
    font-size: 2.2rem;
    color: #ffffff;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.sv-mobile-series-card:hover .sv-series-play-overlay {
    opacity: 1;
}

.sv-series-body {
    padding: 8px 10px 10px;
}

.sv-series-title {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--shortvideo-text-dark, #0f172a);
    margin: 0 0 5px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .sv-series-title {
    color: #f8fafc;
}

.sv-series-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10.5px;
    color: var(--shortvideo-text-muted, #64748b);
    font-weight: 600;
}

.sv-series-eps {
    color: var(--shortvideo-primary, #ef4444);
}

.sv-series-views {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* 6. Mobile Video Card (2 columns) */
.sv-video-grid-card {
    display: block;
    text-decoration: none;
    background-color: var(--shortvideo-bg-card, #ffffff);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--shortvideo-border-card, #e2e8f0);
    transition: all 0.25s ease;
    height: 100%;
}

[data-theme="dark"] .sv-video-grid-card {
    background-color: #1e293b;
    border-color: rgba(255, 255, 255, 0.06);
}

.sv-video-grid-card:hover {
    transform: translateY(-2px);
    border-color: var(--shortvideo-primary);
}

.sv-vid-thumb-wrap {
    position: relative;
    aspect-ratio: 9/16;
    background-color: #000;
    overflow: hidden;
}

.sv-vid-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.sv-video-grid-card:hover .sv-vid-thumb {
    transform: scale(1.05);
}

.sv-vid-views {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 5px;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 3px;
    z-index: 4;
}

.sv-vid-ep-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #fe2c55, #fe2c55);
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 4px;
    z-index: 4;
    box-shadow: 0 4px 10px rgba(254, 44, 85, 0.3);
}

.sv-vid-body {
    padding: 8px 10px 10px;
}

.sv-vid-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--shortvideo-text-dark, #0f172a);
    margin: 0 0 4px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .sv-vid-title {
    color: #f8fafc;
}

.sv-vid-time {
    font-size: 10px;
    color: var(--shortvideo-text-muted, #64748b);
    font-weight: 500;
}

/* Skeleton loader for Genre grid */
.sv-genre-skeleton-card {
    background: var(--shortvideo-bg-card, #ffffff);
    border-radius: 12px;
    border: 1px solid var(--shortvideo-border-card, #e2e8f0);
    overflow: hidden;
    padding-bottom: 10px;
}

[data-theme="dark"] .sv-genre-skeleton-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.06);
}

.sv-genre-skeleton-img {
    aspect-ratio: 9/16;
    background-color: var(--shortvideo-bg-search, #f1f3f4);
}

[data-theme="dark"] .sv-genre-skeleton-img {
    background-color: #334155;
}

.sv-genre-skeleton-title {
    height: 12px;
    background-color: var(--shortvideo-bg-search, #f1f3f4);
    margin: 8px 10px 4px;
    border-radius: 3px;
    width: 80%;
}

[data-theme="dark"] .sv-genre-skeleton-title {
    background-color: #334155;
}

.sv-genre-skeleton-meta {
    height: 10px;
    background-color: var(--shortvideo-bg-search, #f1f3f4);
    margin: 4px 10px 6px;
    border-radius: 3px;
    width: 40%;
}

[data-theme="dark"] .sv-genre-skeleton-meta {
    background-color: #334155;
}

/* 7. Premium Modal Theme styles (Light & Dark overrides) */
#sv-confirm-modal .modal-content,
#sv-alert-modal .modal-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15) !important;
}

#sv-confirm-modal .modal-body,
#sv-alert-modal .modal-body {
    padding: 2.2rem !important;
}

#sv-confirm-modal .text-warning i {
    color: var(--shortvideo-primary, #ef4444) !important;
    filter: drop-shadow(0 4px 12px rgba(239, 68, 68, 0.2));
}

#sv-alert-modal .text-info i {
    color: #3b82f6 !important;
    filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.2));
}

#sv-confirm-modal #sv-confirm-title,
#sv-alert-modal #sv-alert-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a !important;
    margin-top: 12px;
}

#sv-confirm-modal #sv-confirm-message,
#sv-alert-modal #sv-alert-message {
    font-size: 13.5px;
    color: #64748b !important;
    line-height: 1.6;
    margin-top: 10px;
    margin-bottom: 24px !important;
}

#sv-confirm-modal #sv-confirm-btn-cancel {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569 !important;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 24px !important;
    transition: all 0.2s ease;
}

#sv-confirm-modal #sv-confirm-btn-cancel:hover {
    background: #e2e8f0;
    color: #1e293b !important;
}

#sv-confirm-modal #sv-confirm-btn-ok,
#sv-alert-modal .btn-primary {
    background: linear-gradient(135deg, var(--shortvideo-primary, #ef4444), var(--shortvideo-primary-hover, #dc2626)) !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 28px !important;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3) !important;
    transition: all 0.2s ease;
}

#sv-confirm-modal #sv-confirm-btn-ok:hover,
#sv-alert-modal .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4) !important;
}

/* Dark mode overrides for Modals */
[data-theme="dark"] #sv-confirm-modal .modal-content,
[data-theme="dark"] #sv-alert-modal .modal-content {
    background: rgba(15, 23, 42, 0.98);
    /* slate-900 */
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45) !important;
}

[data-theme="dark"] #sv-confirm-modal #sv-confirm-title,
[data-theme="dark"] #sv-alert-modal #sv-alert-title {
    color: #f8fafc !important;
    /* slate-50 */
}

[data-theme="dark"] #sv-confirm-modal #sv-confirm-message,
[data-theme="dark"] #sv-alert-modal #sv-alert-message {
    color: #94a3b8 !important;
    /* slate-400 */
}

[data-theme="dark"] #sv-confirm-modal #sv-confirm-btn-cancel {
    background: #1e293b;
    /* slate-800 */
    border: 1px solid #334155;
    color: #cbd5e1 !important;
    /* slate-300 */
}

[data-theme="dark"] #sv-confirm-modal #sv-confirm-btn-cancel:hover {
    background: #334155;
    color: #f8fafc !important;
}

/* VIP User Name & Badge Styling */
.sv-vip-name-badge {
    background: linear-gradient(135deg, #fef08a 0%, #fde047 100%) !important;
    color: #854d0e !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    border: 1px solid rgba(234, 179, 8, 0.4) !important;
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(234, 179, 8, 0.15) !important;
}

[data-theme="dark"] .sv-vip-name-badge {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%) !important;
    color: #000000 !important;
    border-color: rgba(254, 240, 138, 0.4) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

.sv-vip-badge-small {
    font-size: 8px !important;
    font-weight: 900 !important;
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #ffffff !important;
    padding: 1px 4px !important;
    border-radius: 4px !important;
    text-transform: uppercase;
    line-height: 1 !important;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .sv-vip-badge-small {
    background: linear-gradient(135deg, #ffffff, #f1f5f9) !important;
    color: #854d0e !important;
}

/* Global Profile Statistics Styling (applied on both Desktop & Mobile) */
.profile-stat-val {
    font-size: 17px !important;
    font-weight: 800 !important;
    color: var(--shortvideo-text-dark, #0f172a) !important;
    display: block !important;
}

[data-theme="dark"] .profile-stat-val {
    color: #ffffff !important;
}

.profile-stat-lbl {
    font-size: 11.5px !important;
    color: var(--shortvideo-text-muted, #64748b) !important;
    font-weight: 500 !important;
    display: block !important;
    margin-top: 2px !important;
}

.profile-stat-divider {
    border-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="dark"] .profile-stat-divider {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* PC Grid Layout: 5 columns per row */
@media (min-width: 992px) {
    .col-lg-5-cols {
        flex: 0 0 20% !important;
        width: 20% !important;
        max-width: 20% !important;
    }
}

/* Mobile Dashboard layout adjustments */
@media (max-width: 767.98px) {
    .shortvideo-account-dashboard .account-content-panel .card-body {
        padding: 8px 0 !important;
    }
}

/* ==========================================================================
   TASKS SYSTEM PREMIUM ADAPTIVE INTERFACE (LIGHT & DARK MODES)
   ========================================================================== */

/* 1. Hide the theme's page title on the tasks page slug */
body.shortvideo-tasks-page article h2.fw-black {
    display: none !important;
}

/* 2. Transparent wrapper sitting directly inside the card */
.sv-tasks-wrapper {
    background-color: transparent !important;
    padding: 0 !important;
    color: inherit !important;
    text-align: left !important;
    min-height: auto;
}

/* 3. Adaptive Progress Card */
.sv-progress-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px;
    padding: 20px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.sv-progress-title {
    color: #1e293b !important;
}

.sv-progress-count {
    color: #64748b !important;
}

.sv-progress-bar-track {
    background: #e2e8f0 !important;
    border-radius: 10px;
    overflow: hidden;
}

.sv-progress-bar-fill {
    background: linear-gradient(90deg, #fe2c55 0%, #a855f7 100%) !important;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(254, 44, 85, 0.3);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 4. Adaptive Task Items */
.sv-task-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    padding: 16px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    transition: all 0.25s ease;
    text-align: left !important;
}

.sv-task-item:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-2px);
}

.sv-task-content {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    flex-grow: 1 !important;
    min-width: 0 !important;
}

.sv-task-icon-circle {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #fe2c55 !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.sv-task-text {
    flex-grow: 1 !important;
    min-width: 0 !important;
    text-align: left !important;
}

.sv-task-text h6 {
    margin: 0 0 2px 0 !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    font-size: 13.5px !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    text-align: left !important;
}

.sv-task-text p {
    margin: 0 0 4px 0 !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
    color: #64748b !important;
    text-align: left !important;
}

.sv-task-text span {
    display: inline-block !important;
    text-align: left !important;
}

.sv-task-action {
    flex-shrink: 0 !important;
}

/* 5. Buttons and Badges styling */
.sv-task-item .btn-outline-danger {
    color: #fe2c55 !important;
    border: 1px solid rgba(254, 44, 85, 0.3) !important;
    border-radius: 20px !important;
    background: transparent !important;
    font-weight: 600 !important;
    transition: all 0.2s ease;
}

.sv-task-item .btn-outline-danger:hover {
    background: #fe2c55 !important;
    color: #ffffff !important;
    border-color: #fe2c55 !important;
    box-shadow: 0 0 12px rgba(254, 44, 85, 0.4);
}

.sv-task-item .btn-outline-info {
    color: #0284c7 !important;
    border: 1px solid rgba(2, 132, 199, 0.3) !important;
    border-radius: 20px !important;
    background: transparent !important;
    font-weight: 600 !important;
    transition: all 0.2s ease;
}

.sv-task-item .btn-outline-info:hover {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.4);
}

.sv-task-item .btn-claim {
    background: linear-gradient(135deg, #fe2c55 0%, #dc2626 100%) !important;
    border-radius: 20px !important;
    font-weight: 700 !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(254, 44, 85, 0.3) !important;
    transition: all 0.2s ease;
}

.sv-task-item .btn-claim:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(254, 44, 85, 0.5) !important;
}

/* 6. Disclaimer Box */
.sv-tasks-note-box {
    background: #fffbeb !important;
    border: 1px solid #fef3c7 !important;
    border-radius: 12px !important;
    padding: 16px !important;
}

.sv-tasks-note-text {
    color: #b45309 !important;
}

/* 7. Modal overrides */
#sv-invite-modal .modal-content {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

#sv-ref-link-input {
    background: #f8fafc !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
}

/* ==========================================================================
   DARK MODE OVERRIDES
   ========================================================================== */
[data-theme="dark"] .sv-progress-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .sv-progress-title {
    color: #ffffff !important;
}

[data-theme="dark"] .sv-progress-count {
    color: rgba(255, 255, 255, 0.5) !important;
}

[data-theme="dark"] .sv-progress-bar-track {
    background: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .sv-task-item {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
}

[data-theme="dark"] .sv-task-item:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .sv-task-icon-circle {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

[data-theme="dark"] .sv-task-text h6 {
    color: #ffffff !important;
}

[data-theme="dark"] .sv-task-text p {
    color: rgba(255, 255, 255, 0.5) !important;
}

[data-theme="dark"] .sv-tasks-note-box {
    background: rgba(245, 158, 11, 0.04) !important;
    border: 1px solid rgba(245, 158, 11, 0.1) !important;
}

[data-theme="dark"] .sv-tasks-note-text {
    color: rgba(255, 255, 255, 0.6) !important;
}

[data-theme="dark"] #sv-invite-modal .modal-content {
    background-color: #121824 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] #sv-ref-link-input {
    background: rgba(255, 255, 255, 0.04) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN AND MOBILE OPTIMIZATIONS
   ========================================================================== */
@media (max-width: 576px) {
    .sv-tasks-wrapper {
        padding: 0 !important;
    }
}

@media (max-width: 480px) {
    .sv-task-item {
        padding: 12px 10px !important;
        gap: 10px !important;
    }
    .sv-task-content {
        gap: 10px !important;
    }
    .sv-task-icon-circle {
        width: 38px !important;
        height: 38px !important;
        font-size: 16px !important;
    }
    .sv-task-text h6 {
        font-size: 12.5px !important;
    }
    .sv-task-text p {
        font-size: 10px !important;
    }
    .sv-task-item .btn-outline-danger,
    .sv-task-item .btn-outline-info {
        padding: 6px 12px !important;
        font-size: 11px !important;
    }
    .sv-task-item .btn-claim {
        width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
    }
    .sv-task-item .badge {
        padding: 6px 10px !important;
        font-size: 10px !important;
    }
}

@media (max-width: 767.98px) {
    /* Remove padding of main page container for tasks to make it wider */
    body.shortvideo-tasks-page .container.py-4 {
        padding-left: 6px !important;
        padding-right: 6px !important;
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }
    
    /* Make the outer article card use more space */
    body.shortvideo-tasks-page article.card {
        padding: 12px 8px !important;
        border-radius: 12px !important;
    }
    
    /* Ensure the nested inner container uses 100% width with 0 padding */
    body.shortvideo-tasks-page .sv-tasks-wrapper .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
    }

    body.shortvideo-tasks-page .sv-tasks-header {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }
}

/* Withdraw Task Xu Card - Dark Mode Support */
[data-theme="dark"] .sv-wallet-withdraw-card {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}
[data-theme="dark"] .sv-wallet-withdraw-card .card-header {
    background: rgba(255, 255, 255, 0.04) !important;
}
[data-theme="dark"] .sv-wallet-withdraw-card .card-header h6 {
    color: #ffffff !important;
}
[data-theme="dark"] .sv-wallet-withdraw-card .bg-light {
    background: rgba(255, 255, 255, 0.03) !important;
}
[data-theme="dark"] .sv-wallet-withdraw-card .form-control {
    background: rgba(255, 255, 255, 0.04) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
[data-theme="dark"] .sv-wallet-withdraw-card .form-control:focus {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
    border-color: rgba(254, 44, 85, 0.5) !important;
    box-shadow: 0 0 0 0.25rem rgba(254, 44, 85, 0.25) !important;
}
[data-theme="dark"] .sv-wallet-withdraw-card .btn-outline-secondary {
    color: rgba(255, 255, 255, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
[data-theme="dark"] .sv-wallet-withdraw-card .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

/* Custom padding overrides for sv-wallet-withdraw-card to prevent global card-body overrides */
.shortvideo-account-dashboard .account-content-panel .sv-wallet-withdraw-card .card-body {
    padding: 24px !important;
}
@media (max-width: 767.98px) {
    .shortvideo-account-dashboard .account-content-panel .sv-wallet-withdraw-card .card-body {
        padding: 16px 12px !important;
    }
}

/* Flatten the middle border corners of the withdraw card input group */
.sv-wallet-withdraw-card .input-group > .form-control {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
.sv-wallet-withdraw-card .input-group > .btn {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* ==========================================================================
   SPLIT-SCREEN VIDEO FEED CARD LAYOUT (Desktop/Tablet)
   ========================================================================== */
.card-main-row-layout {
    display: flex;
    flex-direction: row;
    background-color: var(--shortvideo-bg-card, #ffffff);
    min-height: 280px;
}

.card-left-player-col {
    background-color: #000000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 8px !important;
    overflow: hidden;
}

/* Ensure the vertical video player fits nicely inside the left column */
.card-left-player-col .shortvideo-player-wrapper {
    height: 100% !important;
    max-height: 480px !important;
    width: 100% !important;
    background-color: #000000 !important;
    border: none !important;
}

.card-left-player-col .video-container {
    max-width: 100%;
    max-height: 480px !important;
    width: 100%;
    margin: 0 auto;
}

.card-right-details-col {
    padding: 20px !important;
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--shortvideo-bg-card, #ffffff);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.hover-primary {
    transition: color 0.2s ease;
}

.hover-primary:hover {
    color: var(--shortvideo-primary, #ef4444) !important;
    text-decoration: none;
}

.video-info-excerpt {
    color: #ff6600 !important; /* Orange/red color like haivl */
    font-size: 13.5px !important;
    font-weight: 500;
    font-family: 'Be Vietnam Pro', sans-serif;
    max-height: 80px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.video-info-excerpt::-webkit-scrollbar {
    width: 4px;
}

.video-info-excerpt::-webkit-scrollbar-thumb {
    background: rgba(255, 102, 0, 0.3);
    border-radius: 2px;
}

[data-theme="dark"] .card-right-details-col {
    background-color: var(--shortvideo-bg-card, #1e293b) !important;
    border-color: var(--shortvideo-border-card, #334155) !important;
}

body.lights-out-active .video-card .card-right-details-col {
    background-color: #1e293b !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.lights-out-active .video-card .card-right-details-col .card-title a,
body.lights-out-active .video-card .card-right-details-col .text-muted,
body.lights-out-active .video-card .card-right-details-col .text-muted span {
    color: #e2e8f0 !important;
}

/* ==========================================================================
   DESKTOP 1-VIDEO-PER-VIEWPORT SCREEN LAYOUT & SCROLL SNAPPING
   ========================================================================== */
@media (min-width: 768px) {
    /* Enable Scroll Snapping on HTML root */
    html {
        scroll-snap-type: y proximity;
        scroll-behavior: smooth;
    }

    /* Force video card to exactly fit one screen height (excluding sticky header + gaps) */
    .video-feed-container .video-card,
    #video-feed-container .video-card {
        height: calc(100vh - 105px) !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        margin-bottom: 24px !important;
        scroll-snap-align: start;
        scroll-margin-top: 85px; /* Offset to align perfectly under sticky header */
        overflow: hidden !important;
    }

    /* Keep layout inside card container exactly 100% of height and prevent wrapping */
    .card-main-row-layout {
        height: 100% !important;
        flex-wrap: nowrap !important;
    }

    /* Left column: fixed width based on 9:16 aspect ratio fitting the card height */
    .card-left-player-col {
        height: 100% !important;
        /* Width = card height * 9/16  */
        width: calc((100vh - 105px) * 9 / 16) !important;
        flex: 0 0 calc((100vh - 105px) * 9 / 16) !important;
        max-width: 60% !important;
        background-color: #000000 !important;
    }

    /* Right details column: flex to fill remaining space, NO overflow-y on the column itself */
    .card-right-details-col {
        height: 100% !important;
        flex: 1 1 0% !important;
        min-width: 0 !important;
        max-width: none !important;
        width: auto !important;
        overflow-y: hidden !important;
        overflow-x: hidden !important;
        padding: 15px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Let player wrappers take 100% height and width to fill the column */
    .card-left-player-col .shortvideo-player-wrapper {
        height: 100% !important;
        max-height: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background-color: #000000 !important;
    }

    .card-left-player-col .video-container {
        width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        max-width: 100% !important;
        aspect-ratio: 9 / 16 !important;
        margin: 0 !important;
    }

    /* Ensure plyr inside has full height & width inside aspect ratio box */
    .card-left-player-col .plyr,
    .card-left-player-col .plyr__video-wrapper {
        height: 100% !important;
        width: 100% !important;
    }

    /* Style desktop comment section: flex-grow to fill remaining right column space */
    .video-card .comment-section:not(.d-none) {
        border-top: 1px solid rgba(0,0,0,0.08) !important;
        margin-top: 10px;
        background-color: transparent !important;
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 0% !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    /* Comment list scrolls internally */
    .video-card .comment-list {
        flex: 1 1 0% !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow-y: auto !important;
        padding: 0 !important;
    }

    /* Premium Custom Scrollbar for comment list */
    .video-card .comment-list::-webkit-scrollbar {
        width: 5px;
    }
    .video-card .comment-list::-webkit-scrollbar-track {
        background: transparent;
    }
    .video-card .comment-list::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.15);
        border-radius: 4px;
    }
    [data-theme="dark"] .video-card .comment-list::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.15);
    }

    /* Comment input box: stays at bottom, never scrolls */
    .video-card .comment-section > div.bg-white {
        flex-shrink: 0 !important;
        border-top: 1px solid rgba(0,0,0,0.08) !important;
        background-color: var(--shortvideo-bg-card, #ffffff) !important;
    }

    [data-theme="dark"] .video-card .comment-section > div.bg-white {
        background-color: var(--shortvideo-bg-card, #1e293b) !important;
        border-color: var(--shortvideo-border-card, #334155) !important;
    }

    body.lights-out-active .video-card .comment-section > div.bg-white {
        background-color: #1e293b !important;
        border-color: rgba(255, 255, 255, 0.1) !important;
    }

    /* Prevent horizontal overflow in actions row */
    .video-card .interaction-btn {
        padding: 6px 8px !important;
        font-size: 11.5px !important;
        gap: 4px;
    }
    .video-card .server-select-dropdown {
        padding-left: 8px !important;
        padding-right: 22px !important;
        font-size: 11.5px !important;
        border-radius: 8px !important;
    }
}

/* Extra responsiveness for smaller screen heights/widths to prevent actions row horizontal overflow */
@media (min-width: 768px) and (max-width: 1200px) {
    .video-card .interaction-btn {
        padding: 5px 6px !important;
        font-size: 10px !important;
        height: 30px !important;
        min-width: 30px !important;
    }
    .video-card .server-select-dropdown {
        padding-left: 6px !important;
        padding-right: 18px !important;
        font-size: 10px !important;
        height: 30px !important;
        max-width: 100px !important;
    }
    .video-card .card-footer .d-flex {
        gap: 4px !important;
    }
}

/* Global Utilities */
.min-width-0 {
    min-width: 0 !important;
}

/* Footer hover effect (moved from inline) */
.hover-white:hover {
    color: #ffffff !important;
}