/**
 * Layer 66 - Event Highlights & Replay Engine Styles
 * Sport IQ Platform
 */

/* ========== HIGHLIGHTS SECTION ========== */
.highlights-section {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.highlights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--color-primary, #0066cc);
}

.highlights-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-dark, #1a1a1a);
    margin: 0;
}

.highlights-refresh-btn {
    background: var(--color-primary, #0066cc);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.highlights-refresh-btn:hover {
    background: var(--color-primary-dark, #0052a3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

/* ========== CATEGORY FILTER ========== */
.category-filter {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding: 10px 0;
}

.category-tab {
    background: white;
    border: 2px solid var(--color-gray-300, #d1d5db);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-gray-700, #374151);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-transform: capitalize;
}

.category-tab:hover {
    border-color: var(--color-primary, #0066cc);
    color: var(--color-primary, #0066cc);
}

.category-tab.active {
    background: var(--color-primary, #0066cc);
    border-color: var(--color-primary, #0066cc);
    color: white;
}

/* ========== HIGHLIGHTS GRID ========== */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .highlights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .highlights-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== HIGHLIGHT CARD ========== */
.highlight-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.highlight-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.highlight-thumbnail {
    position: relative;
    padding-top: 56.25%;
    /* 16:9 aspect ratio */
    background: #000;
    overflow: hidden;
}

.highlight-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.highlight-card:hover .highlight-thumbnail img {
    transform: scale(1.05);
}

.highlight-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.highlight-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: 0;
    transition: all 0.3s;
}

.highlight-card:hover .highlight-play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.highlight-info {
    padding: 16px;
}

.highlight-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-dark, #1a1a1a);
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.highlight-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.highlight-league {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary, #0066cc);
}

.highlight-views {
    font-size: 13px;
    color: var(--color-gray-600, #6b7280);
}

.highlight-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--color-gray-500, #9ca3af);
}

.highlight-sport {
    text-transform: capitalize;
    font-weight: 500;
}

/* ========== VIDEO MODAL ========== */
.highlight-video-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.video-modal-content {
    background: #1a1a1a;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    padding: 0;
    position: relative;
    animation: slideUp 0.3s ease;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.video-container {
    position: relative;
    padding-top: 56.25%;
    /* 16:9 */
    background: #000;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-poster {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-play-large {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s;
}

.video-play-large:hover {
    transform: scale(1.1);
    background: white;
}

.video-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}

.video-info-overlay h2 {
    color: white;
    font-size: 24px;
    margin: 0 0 8px 0;
}

.video-info-overlay p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.video-actions {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.video-action-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.video-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ========== ANIMATIONS ========== */
.highlight-card {
    animation: slideInUp 0.4s ease backwards;
}

.highlight-card:nth-child(1) {
    animation-delay: 0.05s;
}

.highlight-card:nth-child(2) {
    animation-delay: 0.1s;
}

.highlight-card:nth-child(3) {
    animation-delay: 0.15s;
}

.highlight-card:nth-child(4) {
    animation-delay: 0.2s;
}

.highlight-card:nth-child(5) {
    animation-delay: 0.25s;
}

.highlight-card:nth-child(6) {
    animation-delay: 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== DARK MODE ========== */
@media (prefers-color-scheme: dark) {
    .highlights-header h2 {
        color: white;
    }

    .highlight-card {
        background: #1f2937;
    }

    .highlight-title {
        color: white;
    }

    .category-tab {
        background: #1f2937;
        border-color: #374151;
        color: #9ca3af;
    }

    .category-tab:hover {
        color: white;
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .highlights-section {
        margin: 40px auto;
    }

    .highlights-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .highlights-header h2 {
        font-size: 24px;
    }

    .highlights-refresh-btn {
        width: 100%;
    }

    .category-filter {
        gap: 8px;
    }

    .category-tab {
        padding: 8px 16px;
        font-size: 14px;
    }

    .video-modal-content {
        max-width: 100%;
    }

    .video-info-overlay h2 {
        font-size: 18px;
    }

    .video-actions {
        flex-direction: column;
    }
}