@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&display=swap');

/* Container Styles */
.dkl-highlights-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);
    margin: 20px 0;
}

/* Header Styles */
.dkl-highlights-header {
    text-align: center;
    margin-bottom: 30px;
}

.dkl-highlights-title {
    font-size: 28px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.dkl-highlights-subtitle {
    color: #666666;
    font-size: 14px;
}

/* Stats Bar */
.dkl-highlights-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    flex-wrap: wrap;
}

.dkl-stat {
    text-align: center;
}

.dkl-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #aa2217;
}

.dkl-stat-label {
    color: #999999;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

/* Filter Bar */
.dkl-highlights-filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.dkl-highlights-search {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.dkl-highlights-search input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-family: 'Kanit', sans-serif;
    font-size: 14px;
    transition: all 0.3s;
}

.dkl-highlights-search input:focus {
    outline: none;
    border-color: #aa2217;
}

.dkl-highlights-search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.dkl-filter-select {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-family: 'Kanit', sans-serif;
    font-size: 14px;
    background: #fff;
    transition: all 0.3s;
}

.dkl-filter-select:focus {
    outline: none;
    border-color: #aa2217;
}

.dkl-filter-btn {
    padding: 10px 16px;
    background: #aa2217;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Kanit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.dkl-filter-btn:hover {
    background: #d63031;
    transform: translateY(-2px);
}

/* Highlights Grid */
.dkl-highlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* Highlight Card - Modern Style */
.dkl-highlight-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.dkl-highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(170,34,23,0.15);
    border-color: #aa2217;
}

.dkl-thumb-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f8f9fa;
    cursor: pointer;
    overflow: hidden;
}

.dkl-highlight-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.dkl-highlight-card:hover .dkl-highlight-thumb {
    transform: scale(1.05);
}

.dkl-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(170,34,23,0.9);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.dkl-highlight-card:hover .dkl-play-overlay {
    background: rgba(229,0,0,0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.dkl-play-icon {
    width: 0;
    height: 0;
    border-left: 20px solid #fff;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 5px;
}

.dkl-duration-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.dkl-highlight-content {
    padding: 20px;
}

.dkl-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.dkl-team {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.dkl-team.home {
    justify-content: flex-start;
}

.dkl-team.away {
    justify-content: flex-end;
    text-align: right;
}

.dkl-team img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e9ecef;
    padding: 3px;
}

.dkl-team-name {
    font-weight: 600;
    color: #333;
}

.dkl-score {
    font-size: 18px;
    font-weight: 700;
    color: #aa2217;
    padding: 0 12px;
}

.dkl-league-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
    color: #666;
    font-size: 14px;
}

.dkl-league-info img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.dkl-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #888;
    font-size: 13px;
}

.dkl-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dkl-meta-icon {
    font-size: 14px;
}

/* Buttons */
.dkl-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.dkl-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.dkl-btn:hover {
    background: #f8f9fa;
    border-color: #aa2217;
    color: #aa2217;
    transform: translateY(-1px);
}

.dkl-btn-primary {
    background: #aa2217;
    color: #fff;
    border-color: #aa2217;
}

.dkl-btn-primary:hover {
    background: #d63031;
    border-color: #d63031;
}

/* Video Container */
.dkl-video-container {
    margin-top: 15px;
}

.dkl-video-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border: none;
}

/* Pagination */
.dkl-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.dkl-page-btn {
    padding: 8px 16px;
    background: #fff;
    color: #333;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Kanit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
}

.dkl-page-btn:hover {
    background: #f8f9fa;
    border-color: #aa2217;
    color: #aa2217;
}

.dkl-page-btn.active {
    background: #aa2217;
    color: #fff;
    border-color: #aa2217;
}

.dkl-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dkl-page-info {
    color: #666;
    font-size: 14px;
}

/* Loading State */
.dkl-loading {
    text-align: center;
    padding: 50px;
}

.dkl-loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid #e9ecef;
    border-radius: 50%;
    border-top-color: #aa2217;
    animation: spin 1s ease-in-out infinite;
}

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

/* Error & Empty States */
.dkl-error, .dkl-empty {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    color: #666666;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.dkl-error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.dkl-error-icon, .dkl-empty-icon {
    font-size: 48px;
}

/* Modal for Video */
.dkl-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    animation: fadeIn 0.3s;
}

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

.dkl-modal-content {
    position: relative;
    margin: 5% auto;
    padding: 0;
    max-width: 960px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: popIn 0.3s ease;
}

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

.dkl-modal-close {
    position: absolute;
    right: 15px;
    top: 10px;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    z-index: 2;
}

.dkl-modal-content iframe,
.dkl-modal-content video {
    width: 100%;
    height: 540px;
    border: none;
    background: #000;
}

@media (max-width: 768px) {
    .dkl-highlights-container {
        padding: 15px;
    }

    .dkl-highlight-grid {
        grid-template-columns: 1fr;
    }

    .dkl-modal-content {
        width: 95%;
        margin-top: 10%;
    }

    .dkl-modal-content iframe,
    .dkl-modal-content video {
        height: 220px;
    }
}
