/* ========================================
   SPORTS REPLAYS
======================================== */

#sportsReplays {
    padding: 15px;
    max-width: 1600px;
    margin: auto;
    position: relative;
}

/* Header */

.replay-header h2 {
    margin: 0;
    font-size: 24px;
}

.replay-header p {
    opacity: 0.8;
    margin-top: 5px;
    font-size: 14px;
}

/* ========================================
   PLAYER
======================================== */

#replayPlayerContainer {
    margin-top: 15px;
    margin-bottom: 20px;
    background: #111;
    border-radius: 12px;
    overflow: hidden;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
}

.player-header h3 {
    margin: 0;
    font-size: 16px;
}

#closeReplay {
    border: none;
    background: crimson;
    color: white;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
}

.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.hidden {
    display: none;
}

/* ========================================
   REPLAY CAROUSEL
======================================== */

#replayGrid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 5px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar */

#replayGrid::-webkit-scrollbar {
    display: none;
}

#replayGrid {
    scrollbar-width: none;
}

/* ========================================
   CARDS
======================================== */

.replay-card {
    min-width: 180px;
    max-width: 180px;
    flex: 0 0 auto;

    background: #181818;
    border-radius: 10px;
    overflow: hidden;

    cursor: pointer;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.replay-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,.35);
}

/* Thumbnail */

.replay-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

/* Card Info */

.replay-info {
    padding: 8px;
}

.replay-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 4px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
}

.replay-competition {
    font-size: 11px;
    opacity: 0.7;
}

/* ========================================
   EDGE FADE EFFECT
======================================== */

#sportsReplays::before,
#sportsReplays::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    pointer-events: none;
    z-index: 2;
}

#sportsReplays::before {
    left: 0;
    background: linear-gradient(
        to right,
        rgba(0,0,0,0.9),
        transparent
    );
}

#sportsReplays::after {
    right: 0;
    background: linear-gradient(
        to left,
        rgba(0,0,0,0.9),
        transparent
    );
}



#replayGrid {
    display: flex;
    overflow-x: auto;
    scroll-behavior: auto; /* IMPORTANT: NOT smooth */
}







/* ========================================
   MOBILE
======================================== */

@media (max-width: 768px) {

    #sportsReplays {
        padding: 10px;
    }

    .replay-header h2 {
        font-size: 20px;
    }

    .replay-card {
        min-width: 150px;
        max-width: 150px;
    }

    .replay-card img {
        height: 85px;
    }

    .replay-title {
        font-size: 12px;
    }

    .replay-competition {
        font-size: 10px;
    }

    .player-header h3 {
        font-size: 14px;
    }
}
.replay-meta {
    font-size: 11px;
    opacity: .65;
    margin-top: 2px;
}

.replay-carousel {
    position: relative;
}

.replay-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;

    width: 48px;
    height: 48px;

    border: none;
    border-radius: 50%;

    cursor: pointer;

    background: rgba(0,0,0,.75);
    color: white;

    font-size: 24px;
}

#replayPrev {
    left: 5px;
}

#replayNext {
    right: 5px;
}

.replay-nav:hover {
    background: rgba(0,0,0,.95);
}

@media (max-width:768px) {

    .replay-nav {
        display:none;
    }

}


.replay-search-container {
    margin-bottom: 15px;
}

#replaySearch {
    width: 100%;
    max-width: 450px;

    padding: 12px 16px;

    border: none;
    border-radius: 10px;

    background: #1d1d1d;
    color: white;
    font-size: 14px;
}

#replaySearch:focus {
    outline: 2px solid #0a84ff;
}


.replay-full-btn {
    margin-top: 10px;
    padding: 10px 16px;
    background: #e50914;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 600;
}

.replay-full-btn:hover {
    background: #ff1e2d;
    transform: scale(1.03);
}