/* ==========================================
   RESET
========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {

    font-family:
        Inter,
        Segoe UI,
        Arial,
        sans-serif;

    background: #0b0b0b;
    color: #ffffff;

    min-height: 100vh;
    overflow-x: hidden;
}

/* ==========================================
   HEADER
========================================== */

#pageHeader {

    background:
        linear-gradient(
            135deg,
            #101010,
            #181818
        );

    border-bottom:
        1px solid rgba(255,255,255,.08);

    padding: 40px 20px;
}

.header-content {

    max-width: 1600px;
    margin: auto;
}

.header-content h1 {

    font-size: 42px;
    font-weight: 700;

    margin-bottom: 10px;
}

.header-content p {

    opacity: .8;
    font-size: 16px;
}

/* ==========================================
   SEARCH
========================================== */

#searchSection {

    max-width: 1600px;

    margin: 20px auto;

    padding: 0 20px;
}

#replaySearch {

    width: 100%;

    padding: 14px 18px;

    border: none;
    border-radius: 12px;

    background: #181818;

    color: white;

    font-size: 15px;
}

#replaySearch::placeholder {
    color: rgba(255,255,255,.5);
}

#replaySearch:focus {

    outline: 2px solid #2196f3;
}

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

#replayPlayerContainer {

    max-width: 1600px;

    margin: 25px auto;

    padding: 0 20px;
}

.player-header {

    display: flex;

    justify-content: space-between;
    align-items: center;

    background: #151515;

    padding: 15px 20px;

    border-radius:
        14px 14px 0 0;
}

.player-header h2 {

    font-size: 20px;
    font-weight: 600;
}

.player-actions {

    display: flex;
    gap: 10px;
}

.player-actions button {

    border: none;

    background: #242424;

    color: white;

    cursor: pointer;

    padding: 10px 14px;

    border-radius: 8px;

    transition: .25s;
}

.player-actions button:hover {

    background: #333;
}

.video-wrapper {

    position: relative;

    width: 100%;

    padding-bottom: 56.25%;

    background: black;

    border-radius:
        0 0 14px 14px;

    overflow: hidden;
}

.video-wrapper iframe {

    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    border: none;
}

/* ==========================================
   LIBRARY
========================================== */

#replayLibrary {

    max-width: 1600px;

    margin: auto;

    padding: 0 20px 50px;
}

.section-header {

    display: flex;

    justify-content: space-between;
    align-items: center;

    margin-bottom: 18px;
}

.section-header h2 {

    font-size: 24px;
}

.replay-controls {

    display: flex;
    gap: 10px;
}

.replay-controls button {

    width: 42px;
    height: 42px;

    border: none;

    border-radius: 50%;

    background: #202020;

    color: white;

    cursor: pointer;

    transition: .25s;
}

.replay-controls button:hover {

    background: #333;
}

/* ==========================================
   REPLAY ROW
========================================== */

#replayGrid {

    display: flex;

    gap: 16px;

    overflow-x: auto;

    scroll-behavior: auto;

    -webkit-overflow-scrolling: touch;

    padding-bottom: 10px;
}

/* Hide scrollbar */

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

#replayGrid {
    scrollbar-width: none;
}

/* ==========================================
   CARD
========================================== */

.replay-card {

    flex: 0 0 auto;

    width: 280px;

    background: #171717;

    border-radius: 14px;

    overflow: hidden;

    cursor: pointer;

    transition:
        transform .25s,
        box-shadow .25s;
}

.replay-card:hover {

    transform: translateY(-5px);

    box-shadow:
        0 10px 30px rgba(0,0,0,.4);
}

.replay-card img {

    width: 100%;

    aspect-ratio: 16/9;

    object-fit: cover;

    display: block;
}

.replay-info {

    padding: 12px;
}

.replay-title {

    font-size: 15px;

    font-weight: 600;

    line-height: 1.4;

    margin-bottom: 8px;

    min-height: 42px;
}

.replay-competition {

    font-size: 13px;

    color: #bdbdbd;

    margin-bottom: 6px;
}

.replay-meta {

    font-size: 12px;

    color: #8c8c8c;

    line-height: 1.5;
}

/* ==========================================
   HIDDEN
========================================== */

.hidden {
    display: none;
}

/* ==========================================
   FOOTER
========================================== */

#pageFooter {

    margin-top: 40px;

    border-top:
        1px solid rgba(255,255,255,.08);

    text-align: center;

    padding: 30px 20px;

    opacity: .75;
}

#pageFooter p {

    margin-bottom: 8px;
}
/* ==========================================
   MOBILE
========================================== */

@media (max-width: 768px) {

    .header-content h1 {
        font-size: 30px;
    }

    .header-content p {
        font-size: 14px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .replay-card {
        width: 220px;
    }

    .player-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .player-actions {
        width: 100%;
    }

    .player-actions button {
        flex: 1;
    }

    /* 🔥 INCREASE VIDEO HEIGHT ON MOBILE */
    .video-wrapper {
        padding-bottom: 95%; /* was 56.25% → makes video taller */
    }
}

/* ==========================================
   LARGE TV / DESKTOP
========================================== */

@media (min-width: 1600px) {

    .replay-card {

        width: 320px;
    }

    .header-content h1 {

        font-size: 48px;
    }
}

.back-tv-btn {
    border: none;
    background: #1f1f1f;
    color: white;
    cursor: pointer;

    padding: 10px 14px;
    border-radius: 8px;

    font-size: 14px;

    transition: .25s;

    white-space: nowrap;
}

/* desktop hover */
.back-tv-btn:hover {
    background: #333;
}

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

@media (max-width: 768px) {

    .player-actions {
        flex-wrap: wrap; /* allows buttons to drop naturally */
        gap: 8px;
    }

    .back-tv-btn {
        flex: 1 1 100%;   /* full width button */
        text-align: center;
        font-size: 14px;
        padding: 12px;
    }
}