
    @import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&display=swap');
    
.dkl-live-container {
    font-family: 'Kanit', sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

@keyframes slideDown {
    from { transform: translateX(-50%) translateY(-100%); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateX(-50%) translateY(0); opacity: 1; }
    to { transform: translateX(-50%) translateY(-100%); opacity: 0; }
}
    
    .dkl-live-header {
        background: linear-gradient(135deg, #aa2217 0%, #d63031 100%);
        color: #fff;
        padding: 20px;
        border-radius: 10px 10px 0 0;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .dkl-live-match-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
    }
    
    .dkl-live-team {
        display: flex;
        align-items: center;
        gap: 15px;
        flex: 1;
    }
    
    .dkl-live-team.home {
        justify-content: flex-end;
        text-align: right;
    }
    
    .dkl-live-team.away {
        justify-content: flex-start;
        text-align: left;
    }
    
    .dkl-live-team img {
        width: 50px;
        height: 50px;
        object-fit: contain;
        background: #fff;
        padding: 5px;
        border-radius: 50%;
    }
    
    .dkl-live-team-name {
        font-size: 20px;
        font-weight: 600;
    }
    
    .dkl-live-vs {
        font-size: 18px;
        font-weight: 500;
        padding: 0 20px;
        opacity: 0.8;
    }
    
    .dkl-live-status {
        text-align: center;
        padding: 10px;
        background: rgba(255,255,255,0.1);
        border-radius: 5px;
        margin-top: 10px;
    }
    
    .dkl-live-badge {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        background: #fff;
        color: #dc3545;
        padding: 5px 15px;
        border-radius: 20px;
        font-weight: 600;
        animation: pulse 2s infinite;
    }
    
    @keyframes pulse {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.7; }
    }
    
    .dkl-live-player-wrapper {
        background: #000;
        border-radius: 0 0 10px 10px;
        overflow: hidden;
        position: relative;
        box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    }
    
    .dkl-live-player {
        width: 100%;
        aspect-ratio: 16/9;
        background: #000;
        position: relative;
    }
    
    .dkl-live-player video,
    .dkl-live-player iframe {
        width: 100%;
        height: 100%;
        border: none;
        position: absolute;
        top: 0;
        left: 0;
    }
    
    /* ปุ่ม Refresh สำหรับ Mobile */
    .dkl-live-refresh-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background: rgba(0,0,0,0.7);
        color: #fff;
        border: 1px solid rgba(255,255,255,0.3);
        padding: 8px 12px;
        border-radius: 5px;
        cursor: pointer;
        z-index: 100;
        font-family: 'Kanit', sans-serif;
        font-size: 14px;
        transition: all 0.3s;
    }
    
    .dkl-live-refresh-btn:hover {
        background: rgba(170,34,23,0.9);
    }
    
    .dkl-live-refresh-btn.refreshing {
        animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
        to { transform: rotate(360deg); }
    }
    
    .dkl-live-controls {
        background: rgba(0,0,0,0.8);
        padding: 15px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .dkl-live-quality {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .dkl-live-quality button {
        background: rgba(255,255,255,0.1);
        color: #fff;
        border: 1px solid rgba(255,255,255,0.3);
        padding: 5px 15px;
        border-radius: 5px;
        cursor: pointer;
        transition: all 0.3s;
        font-family: 'Kanit', sans-serif;
    }
    
    .dkl-live-quality button:hover,
    .dkl-live-quality button.active {
        background: #aa2217;
        border-color: #aa2217;
    }
    
    .dkl-live-fullscreen {
        background: #aa2217;
        color: #fff;
        border: none;
        padding: 8px 20px;
        border-radius: 5px;
        cursor: pointer;
        font-weight: 600;
        transition: all 0.3s;
        font-family: 'Kanit', sans-serif;
    }
    
    .dkl-live-fullscreen:hover {
        background: #d63031;
        transform: scale(1.05);
    }
    
    .dkl-live-ad-space {
        margin: 30px 0;
        background: #f8f9fa;
        border: 2px dashed #dee2e6;
        padding: 40px;
        text-align: center;
        border-radius: 10px;
        color: #6c757d;
    }
    
    .dkl-live-info {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
        margin-top: 30px;
    }
    
    .dkl-live-info-box {
        background: #fff;
        border: 1px solid #e9ecef;
        border-radius: 10px;
        padding: 20px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }
    
    .dkl-live-info-title {
        font-size: 14px;
        color: #6c757d;
        margin-bottom: 10px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    .dkl-live-info-content {
        font-size: 18px;
        font-weight: 600;
        color: #333;
    }
    
    .dkl-live-loading {
        text-align: center;
        padding: 50px;
        color: #fff;
    }
    
    .dkl-live-spinner {
        display: inline-block;
        width: 50px;
        height: 50px;
        border: 3px solid rgba(255,255,255,0.3);
        border-radius: 50%;
        border-top-color: #fff;
        animation: spin 1s ease-in-out infinite;
    }
    
    .dkl-live-error {
        background: #f8d7da;
        color: #721c24;
        padding: 20px;
        border-radius: 10px;
        border: 1px solid #f5c6cb;
        margin: 20px 0;
        text-align: center;
    }
    
    .dkl-live-error-actions {
        margin-top: 20px;
        display: flex;
        gap: 10px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .dkl-live-error-btn {
        padding: 10px 20px;
        border-radius: 5px;
        border: none;
        cursor: pointer;
        font-family: 'Kanit', sans-serif;
        font-weight: 500;
        transition: all 0.3s;
    }
    
    .dkl-live-error-btn.primary {
        background: #aa2217;
        color: #fff;
    }
    
    .dkl-live-error-btn.secondary {
        background: #6c757d;
        color: #fff;
    }
    
    /* Mobile Responsive */
    @media (max-width: 768px) {
        .dkl-live-container {
            padding: 10px;
        }
        
        .dkl-live-match-info {
            flex-direction: column;
            gap: 15px;
        }
        
        .dkl-live-team {
            justify-content: center !important;
            text-align: center !important;
        }
        
        .dkl-live-team-name {
            font-size: 16px;
        }
        
        .dkl-live-team img {
            width: 40px;
            height: 40px;
        }
        
        .dkl-live-controls {
            flex-direction: column;
            gap: 15px;
        }
        
        .dkl-live-quality {
            width: 100%;
            justify-content: center;
        }
        
        .dkl-live-fullscreen {
            width: 100%;
        }
        
        .dkl-live-refresh-btn {
            padding: 6px 10px;
            font-size: 12px;
        }
        
        .dkl-live-ad-space {
            padding: 20px;
        }
    }
    
    /* iOS specific fixes */
    @supports (-webkit-touch-callout: none) {
        .dkl-live-player video {
            -webkit-playsinline: true;
            playsinline: true;
        }
    }
    


    @import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&display=swap');
    
    .dkl-container {
        font-family: 'Kanit', 'Segoe UI', sans-serif;
        background: #ffffff;
        color: #333333;
        padding: 20px;
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    }
    
    /* Loading Overlay */
    .dkl-loading-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 9999;
        justify-content: center;
        align-items: center;
    }
    
    .dkl-loading-overlay.active {
        display: flex;
    }
    
    .dkl-loading-content {
        background: #fff;
        padding: 20px;
        border-radius: 10px;
        text-align: center;
    }
    
    .dkl-loading-spinner {
        width: 40px;
        height: 40px;
        border: 3px solid #f3f3f3;
        border-top: 3px solid #aa2217;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin: 0 auto 10px;
    }
    
    /* Tab Styles */
    .dkl-tabs-header {
        display: flex;
        gap: 10px;
        margin-bottom: 25px;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 10px;
        overflow-x: auto;
        align-items: center;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }
    
    .dkl-tabs-header::-webkit-scrollbar {
        height: 6px;
    }
    
    .dkl-tabs-header::-webkit-scrollbar-track {
        background: #e9ecef;
        border-radius: 3px;
    }
    
    .dkl-tabs-header::-webkit-scrollbar-thumb {
        background: #aa2217;
        border-radius: 3px;
    }
    
    .dkl-tab-btn {
        background: #ffffff;
        color: #666666;
        border: 2px solid #e9ecef;
        padding: 10px 20px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        transition: all 0.3s ease;
        white-space: nowrap;
        text-align: center;
        min-width: fit-content;
        -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
    }
    
    .dkl-tab-btn:hover {
        background: #fff0f0;
        border-color: #aa2217;
        color: #aa2217;
    }
    
    .dkl-tab-btn.active {
        background: #aa2217;
        border-color: #aa2217;
        color: #ffffff;
        font-weight: 600;
    }
    
    .dkl-tab-btn.today {
        background: #28a745;
        border-color: #28a745;
        color: #ffffff;
    }
    
    .dkl-tab-btn.live {
        background: #dc3545;
        color: #ffffff;
        animation: pulse 2s infinite;
    }
    
    @keyframes pulse {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.8; }
    }
    
    .dkl-tab-content {
        display: none;
        animation: fadeIn 0.5s ease;
    }
    
    .dkl-tab-content.active {
        display: block;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .dkl-date-header {
        text-align: center;
        font-size: 22px;
        font-weight: 600;
        margin-bottom: 25px;
        color: #333333;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 10px;
        border-left: 4px solid #aa2217;
    }
    
    .dkl-league {
        margin-bottom: 30px;
        border-radius: 12px;
        overflow: hidden;
        background: #ffffff;
        border: 1px solid #e9ecef;
    }
    
    .dkl-league-header {
        display: flex;
        align-items: center;
        gap: 15px;
        background: #aa2217;
        padding: 15px 20px;
        font-size: 16px;
        font-weight: 600;
        color: #ffffff;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .dkl-league-header img {
        height: 30px;
        width: 30px;
        object-fit: contain;
        background: #FFFFFF;
        padding: 3px;
        border-radius: 5px;
    }
    
    .dkl-fixture {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 20px;
        background: #ffffff;
        border-bottom: 1px solid #e9ecef;
        transition: all 0.3s ease;
        gap: 15px;
        position: relative;
        min-height: 80px; /* Ensure minimum height for mobile */
    }
    
    .dkl-fixture:hover {
        background: #f8f9fa;
    }
    
    .dkl-fixture:last-child {
        border-bottom: none;
    }
    
    .dkl-fixture img {
        /* Ensure images load properly */
        background: #f0f0f0;
        border: 1px solid #e0e0e0;
    }
    
    .dkl-time-venue {
        min-width: 60px;
        text-align: center;
        flex-shrink: 0;
    }
    
    .dkl-time {
        font-size: 14px;
        font-weight: 600;
        color: #333333;
        margin-bottom: 3px;
    }
    
    .dkl-venue {
        font-size: 11px;
        color: #999999;
        font-weight: 300;
    }

    .dkl-match-wrapper {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f8f9fa;
        border-radius: 8px;
        padding: 10px;
        min-width: 0; /* Allow shrinking on mobile */
    }

    .dkl-teams {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        max-width: 500px;
        gap: 10px;
    }

    .dkl-team {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 1;
        min-width: 0; /* Allow text truncation */
    }
    
    .dkl-team.home {
        justify-content: flex-end;
        text-align: right;
    }
    
    .dkl-team.away {
        justify-content: flex-start;
        text-align: left;
    }

    .dkl-team img {
        height: 28px;
        width: 28px;
        object-fit: contain;
        flex-shrink: 0;
    }
    
    .dkl-team-name {
        font-size: 14px;
        font-weight: 500;
        color: #333333;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .dkl-score-box {
        background: #aa2217;
        padding: 5px 12px;
        border-radius: 6px;
        min-width: 60px;
        text-align: center;
        flex-shrink: 0;
    }

    .dkl-score {
        font-size: 16px;
        font-weight: 700;
        color: #ffffff;
        letter-spacing: 1px;
    }
    
    .dkl-vs {
        font-size: 14px;
        font-weight: 600;
        color: #999999;
        text-transform: uppercase;
    }
    
    .dkl-status-badge {
        position: absolute;
        top: 8px;
        right: 8px;
        padding: 3px 8px;
        border-radius: 4px;
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
    }
    
    .dkl-status-badge.live {
        background: #dc3545;
        color: #ffffff;
        animation: pulse 2s infinite;
    }
    
    .dkl-status-badge.finished {
        background: #6c757d;
        color: #ffffff;
    }
    
    .dkl-status-badge.not-started {
        background: #f8f9fa;
        color: #666666;
        border: 1px solid #dee2e6;
    }
    
    .dkl-status-badge.postponed {
        background: #ffc107;
        color: #000000;
    }
    
    .dkl-status-badge.halftime {
        background: #17a2b8;
        color: #ffffff;
    }

    .dkl-play {
        background: #000000;
        color: #ffffff;
        padding: 8px 16px;
        border-radius: 6px;
        font-weight: 600;
        font-size: 13px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        transition: all 0.3s ease;
        text-decoration: none;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border: none;
        cursor: pointer;
        flex-shrink: 0;
        -webkit-tap-highlight-color: transparent;
    }
    
    .dkl-play:hover {
        background: #e50000;
        color: #ffffff;
        text-decoration: none;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(255,102,0,0.3);
    }
    
    .dkl-play:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }
    
    .dkl-play-icon {
        font-size: 14px;
    }
    
    .dkl-details-btn {
        background: #000;
        color: #FFF;
        padding: 8px 16px;
        border-radius: 6px;
        font-size: 12px;
        border: 2px solid #000;
        cursor: pointer;
        transition: all 0.3s ease;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-weight: 600;
        flex-shrink: 0;
        -webkit-tap-highlight-color: transparent;
    }
    
    .dkl-details-btn:hover {
        border-color: #aa2217;
        color: #aa2217;
        background: #fff0f0;
    }
    
    .dkl-elapsed {
        color: #28a745;
        font-weight: 600;
        font-size: 12px;
        margin-top: 3px;
    }
    
    .dkl-extra-time {
        color: #aa2217;
        font-size: 11px;
        font-weight: 500;
    }
    
    .dkl-status {
        font-weight: 600;
        font-size: 11px;
        margin-top: 3px;
        padding: 2px 6px;
        border-radius: 4px;
        display: inline-block;
    }
    
    .dkl-status.not-started {
        background: #f8f9fa;
        color: #666666;
    }
    
    .dkl-status.live {
        background: #dc3545;
        color: #ffffff;
    }
    
    .dkl-status.halftime {
        background: #17a2b8;
        color: #ffffff;
    }
    
    .dkl-status.finished {
        background: #6c757d;
        color: #ffffff;
    }
    
    .dkl-status.postponed {
        background: #ffc107;
        color: #000000;
    }
    
    /* Score update animation */
    .score-update {
        animation: scoreFlash 0.5s ease-in-out;
    }
    
    @keyframes scoreFlash {
        0% { transform: scale(1); }
        50% { transform: scale(1.2); background: #28a745; }
        100% { transform: scale(1); }
    }
    
    /* Modal Styles */
    .dkl-modal {
        display: none;
        position: fixed;
        z-index: 999999;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.8);
        animation: fadeIn 0.3s ease;
        -webkit-overflow-scrolling: touch;
    }
    
    .dkl-modal-content {
        position: relative;
        background: #ffffff;
        margin: 2% auto;
        padding: 20px;
        width: 90%;
        max-width: 1200px;
        border-radius: 12px;
        max-height: 90vh;
        overflow-y: auto;
        box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    }
    
    .dkl-modal-content::-webkit-scrollbar {
        width: 10px;
    }
    
    .dkl-modal-content::-webkit-scrollbar-track {
        background: #f8f9fa;
        border-radius: 10px;
    }
    
    .dkl-modal-content::-webkit-scrollbar-thumb {
        background: #aa2217;
        border-radius: 10px;
    }
    
    .dkl-close {
        color: #999999;
        float: right;
        font-size: 28px;
        font-weight: bold;
        cursor: pointer;
        transition: all 0.3s ease;
        line-height: 1;
    }
    
    .dkl-close:hover {
        color: #aa2217;
    }

    .dkl-detail-header {
        text-align: center;
        padding: 20px 0;
        border-bottom: 2px solid #e9ecef;
        margin-bottom: 30px;
    }
    
    .dkl-detail-teams {
        display: flex;
        justify-content: space-around;
        align-items: center;
        margin-bottom: 20px;
    }
    
    .dkl-detail-team {
        text-align: center;
    }
    
    .dkl-detail-team img {
        width: 80px;
        height: 80px;
        object-fit: contain;
        margin-bottom: 10px;
    }
    
    .dkl-detail-team-name {
        font-size: 18px;
        font-weight: 600;
        color: #333333;
    }
    
    .dkl-detail-score {
        font-size: 36px;
        font-weight: 700;
        color: #aa2217;
    }
    
    /* Empty State */
    .dkl-no-matches {
        text-align: center;
        padding: 60px 20px;
        background: #f8f9fa;
        border-radius: 12px;
        border: 1px solid #e9ecef;
    }
    
    .dkl-no-matches-icon {
        font-size: 48px;
        margin-bottom: 15px;
    }
    
    .dkl-no-matches-text {
        font-size: 18px;
        color: #666666;
    }
    
    /* Mobile Responsive - Enhanced for better display */
    @media (max-width: 768px) {
        .dkl-container {
            padding: 10px;
        }
        
        .dkl-tabs-header {
            padding: 10px;
            gap: 8px;
        }
        
        .dkl-tab-btn {
            padding: 8px 15px;
            font-size: 12px;
        }
        
        .dkl-fixture {
            padding: 10px;
            gap: 8px;
            min-height: 70px;
        }
        
        .dkl-match-wrapper {
            padding: 8px;
        }
        
        .dkl-teams {
            gap: 8px;
        }
        
        .dkl-team img {
            height: 24px;
            width: 24px;
        }
        
        /* Show team names on mobile but with smaller font */
        .dkl-team-name {
            font-size: 11px;
            max-width: 60px;
        }
        
        .dkl-score-box {
            min-width: 50px;
            padding: 3px 8px;
        }
        
        .dkl-score {
            font-size: 14px;
        }
        
        .dkl-time-venue {
            min-width: 50px;
        }
        
        .dkl-time {
            font-size: 12px;
        }
        
        .dkl-elapsed {
            font-size: 10px;
        }
        
        .dkl-play,
        .dkl-details-btn {
            padding: 6px 10px;
            font-size: 10px;
        }
        
        /* Hide text on very small screens */
        .dkl-play span:last-child,
        .dkl-details-btn span {
            display: none;
        }
        
        .dkl-league-header {
            font-size: 14px;
            padding: 12px 15px;
        }
        
        .dkl-league-header img {
            height: 24px;
            width: 24px;
        }
        
        .dkl-modal-content {
            width: 95%;
            margin: 5% auto;
            padding: 15px;
        }
        
        .dkl-status-badge {
            position: static;
            margin-bottom: 5px;
            font-size: 9px;
            padding: 2px 6px;
        }
    }
    
    /* Extra small devices */
    @media (max-width: 480px) {
        .dkl-team-name {
            /*display: none;*/ /* Hide team names on very small screens */
        }
        
        .dkl-fixture {
            padding: 8px;
        }
        
        .dkl-play,
        .dkl-details-btn {
            padding: 8px;
            min-width: auto;
        }
    }
    
    /* iOS specific fixes */
    @supports (-webkit-touch-callout: none) {
        .dkl-fixture,
        .dkl-tab-btn,
        .dkl-play,
        .dkl-details-btn {
            -webkit-touch-callout: none;
            -webkit-user-select: none;
        }
    }
    
