/* =========================================================
   PREMIER LEAGUE 2026/27
   Professional Responsive Sports UI
   ========================================================= */


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

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


html {
    scroll-behavior: smooth;
}


body {
    min-height: 100vh;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background:
        linear-gradient(
            180deg,
            #07111f 0%,
            #0b1728 35%,
            #0e1b2e 100%
        );

    color: #f5f7fb;

    line-height: 1.5;

    overflow-x: hidden;
}


button,
input {
    font: inherit;
}


button {
    cursor: pointer;
}


a {
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


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

#pageHeader {
    position: relative;

    display: flex;
    flex-direction: column;

    gap: 22px;

    padding:
        18px
        16px
        30px;

    background:
        radial-gradient(
            circle at top right,
            rgba(107, 62, 255, 0.25),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            #07101f,
            #111b32
        );

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

    box-shadow:
        0 12px 40px
        rgba(0, 0, 0, 0.22);
}


.header-left {
    display: flex;

    align-items: center;

    gap: 10px;
}


.menu-btn,
.back-tv-btn {
    border: 0;

    border-radius: 10px;

    background:
        rgba(255, 255, 255, 0.08);

    color: #ffffff;

    padding: 10px 14px;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}


.menu-btn:hover,
.back-tv-btn:hover {
    background:
        rgba(255, 255, 255, 0.15);

    transform: translateY(-1px);
}


.header-content {
    text-align: center;

    max-width: 900px;

    margin: 0 auto;
}


.league-badge {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 7px 13px;

    margin-bottom: 10px;

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.09);

    border:
        1px solid
        rgba(255, 255, 255, 0.12);

    font-size: 0.8rem;

    font-weight: 800;

    letter-spacing: 0.08em;

    text-transform: uppercase;
}


.header-content h1 {
    font-size:
        clamp(2rem, 7vw, 4.4rem);

    line-height: 1.05;

    font-weight: 900;

    letter-spacing: -0.04em;
}


.header-content p {
    margin-top: 12px;

    color: #b8c2d6;

    font-size:
        clamp(0.9rem, 2.5vw, 1.08rem);
}


/* =========================================================
   STATUS BAR
   ========================================================= */

#eplStatusBar {
    width: min(1200px, calc(100% - 24px));

    margin: 18px auto 0;

    padding: 13px 16px;

    display: flex;

    flex-direction: column;

    gap: 6px;

    border:
        1px solid
        rgba(255, 255, 255, 0.08);

    border-radius: 14px;

    background:
        rgba(255, 255, 255, 0.045);

    backdrop-filter:
        blur(12px);
}


#eplStatusBar strong {
    font-weight: 800;
}


#seasonStatus,
#lastUpdated {
    color: #9eabc0;

    font-size: 0.82rem;
}


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

#searchSection {
    width: min(1000px, calc(100% - 24px));

    margin: 18px auto;
}


#eplSearch {
    width: 100%;

    min-height: 54px;

    padding:
        0 18px;

    border:
        1px solid
        rgba(255, 255, 255, 0.12);

    border-radius: 15px;

    outline: none;

    background:
        rgba(255, 255, 255, 0.07);

    color: #ffffff;

    font-size: 1rem;

    box-shadow:
        0 10px 35px
        rgba(0, 0, 0, 0.12);

    transition:
        border 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}


#eplSearch::placeholder {
    color: #8290a7;
}


#eplSearch:focus {
    border-color:
        rgba(145, 111, 255, 0.75);

    background:
        rgba(255, 255, 255, 0.09);

    box-shadow:
        0 0 0 4px
        rgba(111, 78, 255, 0.12);
}


/* =========================================================
   FILTER NAVIGATION
   ========================================================= */

#eplFilters {
    width: min(1200px, calc(100% - 24px));

    margin: 0 auto 26px;

    display: flex;

    gap: 8px;

    overflow-x: auto;

    padding-bottom: 5px;

    scrollbar-width: none;
}


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


.filter-btn {
    flex:
        0 0 auto;

    border:
        1px solid
        rgba(255, 255, 255, 0.09);

    border-radius: 999px;

    padding:
        9px 15px;

    background:
        rgba(255, 255, 255, 0.055);

    color: #aeb9cc;

    font-size: 0.85rem;

    font-weight: 700;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


.filter-btn:hover {
    transform: translateY(-1px);

    color: #ffffff;

    background:
        rgba(255, 255, 255, 0.1);
}


.filter-btn.active {
    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #704cff,
            #9c65ff
        );

    border-color:
        transparent;

    box-shadow:
        0 7px 20px
        rgba(112, 76, 255, 0.25);
}


/* =========================================================
   SECTIONS
   ========================================================= */

.epl-section {
    width: min(1200px, calc(100% - 24px));

    margin:
        0 auto 38px;
}


.section-heading {
    margin-bottom: 16px;
}


.section-kicker {
    display: block;

    margin-bottom: 5px;

    color: #9d80ff;

    font-size: 0.72rem;

    font-weight: 900;

    letter-spacing: 0.13em;

    text-transform: uppercase;
}


.section-heading h2,
.section-heading + h2,
.teams-section h2 {
    font-size:
        clamp(1.35rem, 4vw, 2rem);

    line-height: 1.15;

    font-weight: 850;

    letter-spacing: -0.025em;
}


.section-heading p {
    margin-top: 6px;

    color: #8f9db2;

    font-size: 0.9rem;
}


/* =========================================================
   MATCH GRID
   ========================================================= */

.match-grid {
    display: grid;

    grid-template-columns:
        1fr;

    gap: 14px;
}


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

.match-card {
    position: relative;

    padding: 16px;

    border:
        1px solid
        rgba(255, 255, 255, 0.08);

    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.075),
            rgba(255, 255, 255, 0.035)
        );

    box-shadow:
        0 12px 32px
        rgba(0, 0, 0, 0.16);

    overflow: hidden;

    transition:
        transform 0.2s ease,
        border 0.2s ease,
        box-shadow 0.2s ease;
}


.match-card::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;
    bottom: 0;

    width: 3px;

    background:
        linear-gradient(
            180deg,
            #7652ff,
            #a875ff
        );

    opacity: 0.7;
}


.match-card:hover {
    transform: translateY(-3px);

    border-color:
        rgba(146, 111, 255, 0.35);

    box-shadow:
        0 18px 45px
        rgba(0, 0, 0, 0.24);
}


/* =========================================================
   MATCH CARD TOP
   ========================================================= */

.match-card-top {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    margin-bottom: 9px;
}


.matchweek {
    color: #8492a8;

    font-size: 0.72rem;

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: 0.06em;
}


.match-status {
    padding:
        5px 9px;

    border-radius: 999px;

    font-size: 0.68rem;

    font-weight: 900;

    letter-spacing: 0.04em;

    background:
        rgba(255, 255, 255, 0.07);

    color: #aeb9ca;
}


.match-status.live {
    background:
        rgba(255, 59, 59, 0.14);

    color: #ff7676;

    animation:
        livePulse 1.8s infinite;
}


.match-status.completed {
    background:
        rgba(75, 197, 125, 0.12);

    color: #70d797;
}


.match-status.upcoming {
    background:
        rgba(116, 91, 255, 0.13);

    color: #ad96ff;
}


@keyframes livePulse {

    0%,
    100% {
        box-shadow:
            0 0 0 0
            rgba(255, 80, 80, 0.25);
    }

    50% {
        box-shadow:
            0 0 0 5px
            rgba(255, 80, 80, 0);
    }

}


/* =========================================================
   DATE
   ========================================================= */

.match-date {
    color: #8997ac;

    font-size: 0.8rem;

    margin-bottom: 15px;
}


/* =========================================================
   TEAMS
   ========================================================= */

.teams {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto
        minmax(0, 1fr);

    align-items: center;

    gap: 10px;
}


.team {
    min-width: 0;
}


.team-name {
    display: block;

    font-size:
        clamp(0.95rem, 3vw, 1.12rem);

    font-weight: 850;

    line-height: 1.2;

    overflow-wrap: anywhere;
}


.home-team {
    text-align: right;
}


.away-team {
    text-align: left;
}


.match-score {
    min-width: 55px;

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 6px;

    color: #ffffff;

    font-size: 1.2rem;
}


.match-score strong {
    font-size: 1.35rem;

    font-weight: 900;
}


.match-score .vs {
    color: #6f7e95;

    font-size: 0.75rem;

    font-weight: 900;

    letter-spacing: 0.08em;
}


/* =========================================================
   MATCH DETAILS
   ========================================================= */

.match-details {
    margin-top: 13px;

    padding-top: 11px;

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

    color: #77859b;

    font-size: 0.76rem;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =========================================================
   MATCH ACTIONS
   ========================================================= */

.match-actions {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: 14px;
}


.match-action {
    flex: 1;

    min-width: 125px;

    border: 0;

    border-radius: 10px;

    padding:
        10px 12px;

    font-size: 0.8rem;

    font-weight: 800;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}


.match-action:hover {
    transform: translateY(-1px);

    opacity: 0.9;
}


.watch-action {
    background:
        linear-gradient(
            135deg,
            #5b46dc,
            #8b5cf6
        );

    color: #ffffff;

    box-shadow:
        0 7px 20px
        rgba(103, 77, 231, 0.2);
}


.replay-action {
    background:
        rgba(255, 255, 255, 0.08);

    color: #e5e9f2;

    border:
        1px solid
        rgba(255, 255, 255, 0.08);
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.empty-state {
    width: 100%;

    padding: 30px 18px;

    border:
        1px dashed
        rgba(255, 255, 255, 0.1);

    border-radius: 16px;

    text-align: center;

    color: #78869b;

    background:
        rgba(255, 255, 255, 0.025);
}


.empty-icon {
    font-size: 1.7rem;

    margin-bottom: 7px;
}


.empty-state.error {
    color: #ff8d8d;
}


/* =========================================================
   TEAMS
   ========================================================= */

#teamsSection {
    width: min(1200px, calc(100% - 24px));

    margin:
        0 auto 45px;
}


#teamGrid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 9px;

    margin-top: 15px;
}


.team-pill {
    min-height: 48px;

    padding:
        9px 10px;

    border:
        1px solid
        rgba(255, 255, 255, 0.07);

    border-radius: 12px;

    background:
        rgba(255, 255, 255, 0.045);

    color: #d9deea;

    font-size: 0.78rem;

    font-weight: 750;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border 0.2s ease;
}


.team-pill:hover {
    transform: translateY(-2px);

    background:
        rgba(255, 255, 255, 0.08);

    border-color:
        rgba(140, 109, 255, 0.3);
}


/* =========================================================
   SEO CONTENT
   ========================================================= */

.seo-content {
    width: min(900px, calc(100% - 28px));

    margin:
        10px auto 45px;

    padding:
        25px 0;

    border-top:
        1px solid
        rgba(255, 255, 255, 0.07);
}


.seo-content h2 {
    font-size:
        clamp(1.4rem, 4vw, 2rem);

    margin-bottom: 15px;

    font-weight: 850;
}


.seo-content p {
    margin-bottom: 13px;

    color: #9ba8bb;

    font-size:
        clamp(0.9rem, 2.2vw, 1rem);

    line-height: 1.75;
}


/* =========================================================
   FAQ
   ========================================================= */

.faq-section {
    width: min(900px, calc(100% - 28px));

    margin:
        0 auto 50px;
}


.faq-section h2 {
    margin-bottom: 14px;

    font-size:
        clamp(1.4rem, 4vw, 2rem);
}


.faq-section details {
    border:
        1px solid
        rgba(255, 255, 255, 0.07);

    border-radius: 12px;

    margin-bottom: 8px;

    background:
        rgba(255, 255, 255, 0.035);

    overflow: hidden;
}


.faq-section summary {
    padding:
        14px 16px;

    cursor: pointer;

    font-weight: 750;

    color: #e6e9f0;
}


.faq-section details p {
    padding:
        0 16px 16px;

    color: #9aa7bb;

    font-size: 0.9rem;

    line-height: 1.65;
}


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

#pageFooter {
    padding:
        30px 18px 40px;

    text-align: center;

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

    color: #6f7c90;

    font-size: 0.78rem;
}


#pageFooter p + p {
    margin-top: 6px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (min-width: 600px) {

    #pageHeader {
        padding:
            22px
            24px
            38px;
    }


    #eplStatusBar {
        flex-direction: row;

        justify-content: space-between;

        align-items: center;
    }


    #teamGrid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }


    .match-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 900px) {

    #pageHeader {
        min-height: 290px;

        justify-content: center;
    }


    .header-left {
        position: absolute;

        top: 22px;

        left: 24px;
    }


    .header-content h1 {
        font-size:
            clamp(3rem, 5vw, 4.5rem);
    }


    #eplStatusBar {
        margin-top: 25px;
    }


    .match-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }


    #teamGrid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }


    .match-card {
        padding: 18px;
    }

}


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

@media (min-width: 1200px) {

    .match-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }


    #teamGrid {
        grid-template-columns:
            repeat(5, minmax(0, 1fr));
    }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration:
            0.01ms !important;

        animation-iteration-count:
            1 !important;

        transition-duration:
            0.01ms !important;
    }

}

/* =========================================
   Popular Premier League Searches
   ========================================= */

.epl-searches {
  margin: 40px auto;
  padding: 28px 24px;
  max-width: 1100px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.epl-searches h2 {
  margin: 0 0 22px;
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
  text-align: center;
}

.search-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.search-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  min-height: 38px;

  background: #ffffff;
  border: 1px solid #dbe3ec;
  border-radius: 999px;

  color: #334155;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

/* Hover effect */
.search-links span:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}


/* =========================================
   Tablet
   ========================================= */

@media (max-width: 768px) {

  .epl-searches {
    margin: 30px 16px;
    padding: 24px 18px;
  }

  .search-links {
    gap: 8px;
  }

  .search-links span {
    padding: 8px 12px;
    font-size: 13px;
  }
}


/* =========================================
   Mobile
   ========================================= */

@media (max-width: 480px) {

  .epl-searches {
    margin: 24px 12px;
    padding: 22px 14px;
    border-radius: 12px;
  }

  .epl-searches h2 {
    margin-bottom: 18px;
    font-size: 21px;
  }

  .search-links {
    justify-content: flex-start;
    gap: 7px;
  }

  .search-links span {
    padding: 8px 11px;
    font-size: 12px;
  }
}

/* =========================================================
   EPL JS ENHANCEMENTS
   ========================================================= */

.matchweek-group {
    grid-column: 1 / -1;
    margin-bottom: 24px;
}

.matchweek-heading {
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 850;
    color: #d9deea;
}

.local-kickoff {
    display: block;
}

.uk-kickoff {
    display: block;
    margin-top: 3px;
    font-size: 0.7rem;
    color: #68778d;
}

.team-logo,
.team-logo-placeholder {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
}

.team-logo {
    object-fit: contain;
}

.team-logo-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
}

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

.home-team {
    justify-content: flex-end;
}

.away-team {
    justify-content: flex-start;
}

.team-pill {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.details-action {
    background: transparent;
    color: #aeb9cc;
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.selected-match {
    border-color: rgba(166, 128, 255, 0.9);
    box-shadow:
        0 0 0 3px rgba(134, 94, 255, 0.16),
        0 20px 45px rgba(0, 0, 0, 0.3);
}

.match-postponed .match-status,
.match-status.postponed {
    color: #ffc870;
    background: rgba(255, 184, 69, 0.12);
}

.match-cancelled .match-status,
.match-status.cancelled {
    color: #ff8888;
    background: rgba(255, 82, 82, 0.12);
}

@media (max-width: 480px) {

    .team-logo,
    .team-logo-placeholder {
        width: 26px;
        height: 26px;
        flex-basis: 26px;
    }

    .teams {
        gap: 7px;
    }

}

/* =========================================================
   LIVE ESPN SCORE DETAIL
========================================================= */

.live-match-detail {
    margin-top: 12px;
    padding: 7px 10px;

    border-radius: 8px;

    background:
        rgba(255, 70, 70, 0.08);

    color: #ff8c8c;

    font-size: 0.76rem;

    font-weight: 800;

    text-align: center;
}

.match-live {
    border-color:
        rgba(255, 80, 80, 0.24);
}

.match-live::before {
    background:
        linear-gradient(
            180deg,
            #ff3f5f,
            #ff7878
        );
}