
/* ArtPlayer Custom Styles */
    .artplayer {
        width: 100% !important;
        height: auto !important;
        min-height: 400px;
        aspect-ratio: 16/9;
    }
    
    /* Hide default ArtPlayer loading - we use custom loading layer instead */
    .artplayer-video-player .artplayer-loading {
        display: none !important;
    }

    .artplayer-video {
        width: 100% !important;
        height: auto !important;
        min-height: 400px;
        object-fit: contain;
    }

    #art-player-container {
        min-height: 400px;
        width: 100%;
    }

    #art-player-container .art-video-player {
        min-height: 400px;
        width: 100%;
    }

    #art-player-container video {
        min-height: 400px;
        width: 100%;
    }

    /* Video Player Container - Tính toán theo tài liệu: AspectRatio 16:9 */
    /* Công thức: Height = Width * (9 / 16) = Width * 0.5625 */
    #artplayer-container {
        position: relative;
        width: 100%;
        max-width: 100%;
        min-height: 300px;
        aspect-ratio: 16/9; /* AspectRatio 16:9 - tự động tính height = width * 0.5625 */
        z-index: 1;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 1 1 auto;
    }

    #artplayer {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        margin: 0 auto;
        background: #000;
        min-height: 300px;
        z-index: 1;
    }
    
    /* Mobile: Sticky positioning với orientation detection */
    /* Base: Portrait mode - sticky với top: 57px (14.25 * 0.25rem = 57px) */
    @media (max-width: 767px) {
        #video-player-wrapper {
            position: sticky;
            top: 57px; /* 14.25 * 0.25rem = 57px */
            z-index: 20;
        }
        
        /* Landscape mode: relative (không sticky) - sẽ được override bởi JS */
        #video-player-wrapper.landscape-mode {
            position: relative !important;
            top: 0 !important;
            z-index: 1 !important;
        }
        
        /* Portrait mode: đảm bảo sticky nhưng không che content bên dưới */
        #video-player-wrapper.portrait-mode {
            position: sticky !important;
            top: 57px !important;
            z-index: 5 !important;
            max-height: calc(100vh - 57px) !important;
            overflow: hidden !important;
        }
    }
    
    /* Video Player Wrapper - Center alignment */
    #artplayer-container + div {
        display: none;
    }
    
    /* Ensure parent container centers video */
    .mt-2.w-full.flex-1 {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Ensure banner doesn't overlap video */
    #main-bg-info {
        position: relative;
        z-index: 0;
    }
    
    .border-primary.relative.mt-1 {
        position: relative;
        z-index: 0;
    }
    
    /* Ensure Match Details Content is always visible and not covered by video */
    #ck-live-match-content {
        position: relative;
        z-index: 2;
    }
    
    /* Ensure video player wrapper doesn't overflow and cover content below */
    #video-player-wrapper {
        contain: layout style paint;
    }

    /* Responsive Layout Styles */
    .video-chat-box {
        display: flex;
        flex-direction: row;
        gap: 24px;
    }
    .col-video {
        width: 70%;
    }
    .col-chat {
        width: 30%;
        overflow: hidden; /* Ensure only inner content scrolls */
    }

    @media (max-width: 1023px) {
        .video-chat-box {
            flex-direction: column;
        }
        .col-video {
            width: 100%;
        }
        .col-chat {
            width: 100%;
        }
    }

    @media (max-width: 1023px) {
        .container {
            padding-left: 16px;
            padding-right: 16px;
        }
        
        /* Ensure proper spacing on mobile */
        .flex-col.gap-2 > * {
            margin-bottom: 16px;
        }
        
        /* Chat section height adjustment for mobile */
        #match-details-content {
            margin-top: 16px;
            
        }
        
        /* Chat section minimum height on small screens */
        .chat-section-mobile {
            min-height: 30vh;
        }
    }

    @media (max-width: 767px) {
        /* Chat section minimum height on small screens */
        .chat-section-mobile {
            min-height: 80vh;
        }
        .container {
            padding-left: 12px;
            padding-right: 12px;
        }
        
        /* Smaller gaps on very small screens */
        .flex-col.gap-2 > * {
            margin-bottom: 12px;
        }
        
        /* Ensure video player has height on mobile */
        #main-content-video-sidebar {
            min-height: auto !important;
            height: auto !important;
        }
        
        /* Video player container - ensure it has height on mobile */
        /* Mobile: giảm min-height xuống 250px để phù hợp với màn hình nhỏ */
        #artplayer-container {
            min-height: 250px !important;
            aspect-ratio: 16/9 !important;
            height: auto !important;
            position: relative !important;
            margin: 0 auto !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            flex: 1 1 auto !important;
        }
        
        #artplayer {
            min-height: 250px !important;
            position: absolute !important;
            top: 0 !important;
            left: 0 !important;
            width: 100% !important;
            height: 100% !important;
            margin: 0 auto !important;
        }
        
        /* Video player section on mobile */
        .w-full.rounded.border.p-2.lg\:w-3\/4 {
            min-height: auto;
            height: auto;
        }
        
        /* Ensure video wrapper has proper height */
        .mt-2.w-full.dark\:shadow-\[rgba\(255\2c 86\2c 0\2c 0\.34\)\_0px_1px_10\.6px_0px\].flex-1 {
            min-height: 200px;
        }
    }

    /* Match Content Styles */
    .match-content {
        padding: 30px;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 10px;
        margin-bottom: 30px;
        line-height: 1.8;
    }

    .match-content h2,
    .match-content h3 {
        margin-top: 0;
    }

    .match-content p {
        margin-bottom: 15px;
    }

    /* Commentators Styles */
    .match-commentators {
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 10px;
        padding: 20px;
    }

    .section-title {
        margin: 0 0 15px;
        font-size: 18px;
        font-weight: bold;
    }

    .commentators-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .commentator-item {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 15px;
        border-bottom: 1px solid #eee;
    }

    .commentator-item.main-commentator {
        background: #fff9e6;
        font-weight: bold;
    }

    .commentator-item:last-child {
        border-bottom: none;
    }

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

    .commentator-name {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .badge {
        background: #ff9800;
        color: white;
        padding: 2px 8px;
        border-radius: 3px;
        font-size: 0.8em;
    }

    .status-online {
        color: #00b300;
        margin-left: auto;
        font-size: 12px;
    }

    /* Loading animation */
    @keyframes spin {
        to {
            transform: rotate(360deg);
        }
    }

    .animate-spin {
        animation: spin 1s linear infinite;
    }

    /* Loading and error states */
    #ranking-loading {
        background: rgba(11, 10, 110, 0.8);
    }

    #ranking-list .text-center {
        
    }

    .scrollbar-custom {
        scrollbar-width: thin;
        scrollbar-color: #FF6601 #f1f1f1;
    }

    .scrollbar-custom::-webkit-scrollbar {
        width: 6px;
    }

    .scrollbar-custom::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }

    .scrollbar-custom::-webkit-scrollbar-thumb {
        background: #FF6601;
        border-radius: 3px;
    }

    .scrollbar-custom::-webkit-scrollbar-thumb:hover {
        background: #FFF17A;
    }

    /* Align ranking UI with match-template.php */
    .font-fz-kn-game {
        font-family: 'Arial', sans-serif;
    }

    #ranking-list {
        background: #f4f4f5;
        height: 100%; /* Fill parent so inner wrapper can scroll */
    }

    #ranking-list {
        background: #f4f4f5;
    }

    #ranking-list li:hover {
        background-color: #e5e7eb;
    }

    /* Match Details Content Styles */
    #match-details-content {
        margin-top: 24px;
        margin-bottom: 24px;
    }

    #match-details-content .container {
        
    }

    .hidden-match-not-found {
        display: block;
    }

    @media (max-width: 1023px) {
        #match-details-content {
            margin-top: 16px;
        }
        
        #match-details-content .container {
            padding-left: 12px;
            padding-right: 12px;
        }
    }

    @media (max-width: 767px) {
        #match-details-content .container {
            padding-left: 8px;
            padding-right: 8px;
        }
    }

    /* Other Commentators Section - Enhanced Styling */
    #other-commentators-new-section {
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }

    #other-commentators-blv-container {
        box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
    }

    #other-commentators-blv-container:hover {
        box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
        transform: translateY(-1px);
        transition: all 0.3s ease;
    }

    .swiper-blv-button-next-new {
        transition: all 0.2s ease;
    }

    .swiper-blv-button-next-new:hover:not(.swiper-button-lock) {
        transform: scale(1.1);
    }

    /* Prevent overflow in swiper container */
    #other-commentators-swiper-new {
        overflow: hidden !important;
        max-width: 100%;
    }

    #other-commentators-swiper-new .swiper-wrapper {
        display: flex;
        align-items: center;
    }

    #other-commentators-swiper-new .swiper-slide {
        width: auto !important;
        flex-shrink: 0;
        height: auto;
    }

    /* Ensure parent containers don't overflow */
    #other-commentators-blv-container {
        overflow: hidden;
        position: relative;
    }

    #other-commentators-new-section {
        overflow: hidden;
    }


    #isportslive8-animation {
        padding: 10px 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;

        iframe {
            aspect-ratio: 2;
            width: 80%;
            height: 100%;
        }
    }

    @media (max-width: 767px) {
        #isportslive8-animation {
            width: 100%;
            height: 100%;
            iframe {
                aspect-ratio: 3/4;
                width: 100%;
                height: 100%;
            }
        }
    }

    .cakhia-breadcrumb ol {
        display: flex;
        gap: 8px;
        list-style: none;
        padding: 0;
        margin: 0;
        flex-wrap: wrap;
    }
    
    .cakhia-breadcrumb li {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .cakhia-breadcrumb li::after {
        content: "›";
        margin-left: 8px;
    }
    
    .cakhia-breadcrumb li:last-child::after {
        content: "";
    }
    
    .cakhia-breadcrumb a {
        text-decoration: none;
        color: #0073aa;
    }
    
    /* Mobile breadcrumb - reduce size */
    @media (max-width: 767px) {
        .cakhia-breadcrumb ol {
            gap: 4px;
            font-size: 12px;
        }
        
        .cakhia-breadcrumb li {
            font-size: 12px;
            line-height: 1.4;
        }
        
        .cakhia-breadcrumb li::after {
            margin-left: 4px;
            font-size: 12px;
        }
        
        .cakhia-breadcrumb a {
            font-size: 12px;
        }
    }
    
    @media (max-width: 480px) {
        .cakhia-breadcrumb ol {
            gap: 3px;
            font-size: 11px;
        }
        
        .cakhia-breadcrumb li {
            font-size: 11px;
            line-height: 1.3;
        }
        
        .cakhia-breadcrumb li::after {
            margin-left: 3px;
            font-size: 11px;
        }
        
        .cakhia-breadcrumb a {
            font-size: 11px;
        }
    }
    .hidden-tw {
        display: none;
    }