/* ==========================================
   GOALWIRE — LIVE SCORES
========================================== */

:root {

    --bg: #05070b;
    --bg-soft: #0b0f16;

    --card: #101620;
    --card-hover: #151d29;

    --border: rgba(255, 255, 255, 0.08);

    --accent: #00e676;
    --accent-dark: #00b85f;

    --text: #ffffff;
    --text-soft: #d7dce4;
    --muted: #8490a0;

    --danger: #ff5969;
    --yellow: #ffd54a;

    --header-height: 72px;

}


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

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


html {
    scroll-behavior: smooth;
}


body {

    min-height: 100vh;

    background:

        radial-gradient(
            circle at 15% 0%,
            rgba(0, 230, 118, 0.07),
            transparent 28%
        ),

        radial-gradient(
            circle at 90% 40%,
            rgba(0, 120, 255, 0.05),
            transparent 25%
        ),

        var(--bg);

    color: var(--text);

    font-family:
        "Inter",
        Arial,
        sans-serif;

    overflow-x: hidden;

}


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


button,
input {
    font-family: inherit;
}


button {
    cursor: pointer;
}


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

.site-header {

    position: sticky;

    top: 0;

    z-index: 1000;

    height: var(--header-height);

    background:
        rgba(5, 7, 11, 0.88);

    border-bottom:
        1px solid var(--border);

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);

}


.header-inner {

    width:
        min(
            1200px,
            calc(100% - 32px)
        );

    height: 100%;

    margin: auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 25px;

}


/* ==========================================
   LOGO
========================================== */

.logo {

    display: flex;

    align-items: center;

    gap: 10px;

    font-size: 20px;

    font-weight: 900;

    letter-spacing: -0.7px;

    white-space: nowrap;

}


.logo > span:last-child span {
    color: var(--accent);
}


.logo-mark {

    width: 37px;
    height: 37px;

    display: flex;

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

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            var(--accent),
            var(--accent-dark)
        );

    font-size: 18px;

    box-shadow:
        0 8px 20px
        rgba(0, 230, 118, 0.15);

}


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

.desktop-nav {

    display: flex;

    align-items: center;

    gap: 6px;

    margin-left: auto;

}


.desktop-nav a {

    position: relative;

    padding:
        9px 12px;

    border-radius: 9px;

    color: var(--muted);

    font-size: 13px;

    font-weight: 600;

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

}


.desktop-nav a:hover {

    color: var(--text);

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

}


.desktop-nav a.active {

    color: var(--accent);

}


.desktop-nav a.active::after {

    content: "";

    position: absolute;

    left: 12px;
    right: 12px;

    bottom: 2px;

    height: 2px;

    border-radius: 10px;

    background:
        var(--accent);

}


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

.header-actions {

    display: flex;

    align-items: center;

    gap: 9px;

}


.search-button,
.menu-button {

    width: 38px;
    height: 38px;

    display: flex;

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

    border:
        1px solid var(--border);

    border-radius: 10px;

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

    color: var(--text);

    font-size: 15px;

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

}


.search-button:hover,
.menu-button:hover {

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

    transform:
        translateY(-1px);

}


.menu-button {
    display: none;
}


/* ==========================================
   PROFILE BUTTON
========================================== */

.profile-button {

    width: 38px;
    height: 38px;

    display: flex;

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

    overflow: hidden;

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

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #18212d,
            #0d131c
        );

    color: var(--text);

    font-size: 17px;

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

}


.profile-button:hover {

    transform:
        translateY(-1px);

    border-color:
        rgba(0, 230, 118, 0.45);

    box-shadow:
        0 0 0 3px
        rgba(0, 230, 118, 0.07);

}


.profile-button img {

    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;

}


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

.search-bar {

    position: absolute;

    left: 0;
    right: 0;

    top: 100%;

    padding:
        0 0 14px;

    background:
        rgba(5, 7, 11, 0.96);

    border-bottom:
        1px solid var(--border);

    opacity: 0;

    visibility: hidden;

    transform:
        translateY(-8px);

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

}


.search-bar.open {

    opacity: 1;

    visibility: visible;

    transform:
        translateY(0);

}


.search-inner {

    width:
        min(
            700px,
            calc(100% - 32px)
        );

    margin: auto;

    display: flex;

    gap: 8px;

}


.search-inner input {

    flex: 1;

    height: 45px;

    padding:
        0 14px;

    border:
        1px solid var(--border);

    border-radius: 10px;

    outline: none;

    background:
        var(--card);

    color:
        var(--text);

}


.search-inner input::placeholder {
    color: #687382;
}


.search-inner button {

    padding:
        0 18px;

    border: none;

    border-radius: 10px;

    background:
        var(--accent);

    color:
        #031009;

    font-weight:
        800;

}


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

.mobile-menu {

    display: none;

    position: absolute;

    top: 100%;

    left: 0;
    right: 0;

    padding:
        10px 16px 18px;

    background:
        rgba(5, 7, 11, 0.98);

    border-bottom:
        1px solid var(--border);

}


.mobile-menu.open {

    display: flex;

    flex-direction: column;

    gap: 4px;

}


.mobile-menu a {

    padding:
        13px;

    border-radius:
        10px;

    color:
        var(--text-soft);

    font-size:
        14px;

    font-weight:
        600;

}


.mobile-menu a:hover,
.mobile-menu a.active {

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

    color:
        var(--accent);

}


/* ==========================================
   PAGE HERO
========================================== */

.page-hero {

    position: relative;

    width:
        min(
            1200px,
            calc(100% - 32px)
        );

    min-height:
        250px;

    margin:
        30px auto 0;

    padding:
        45px 50px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    overflow: hidden;

    border:
        1px solid var(--border);

    border-radius:
        24px;

    background:

        linear-gradient(
            120deg,
            #0d1820 0%,
            #091019 52%,
            #08100c 100%
        );

    box-shadow:
        0 25px 70px
        rgba(0, 0, 0, 0.24);

}


.page-hero::before {

    content: "";

    position: absolute;

    width: 430px;
    height: 430px;

    right: -150px;
    top: -170px;

    border-radius: 50%;

    background:
        rgba(0, 230, 118, 0.10);

    filter:
        blur(60px);

}


.page-hero > div:first-child {

    position: relative;

    z-index: 2;

}


.page-kicker {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    margin-bottom:
        12px;

    padding:
        7px 11px;

    border:
        1px solid
        rgba(0, 230, 118, 0.18);

    border-radius:
        999px;

    background:
        rgba(0, 230, 118, 0.07);

    color:
        var(--accent);

    font-size:
        10px;

    font-weight:
        800;

    letter-spacing:
        0.9px;

}


.live-dot {

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background:
        var(--accent);

    box-shadow:
        0 0 10px
        var(--accent);

    animation:
        pulse 1.6s infinite;

}


@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.35;
    }

}


.page-hero h1 {

    font-size:
        clamp(
            40px,
            6vw,
            65px
        );

    line-height:
        1;

    letter-spacing:
        -3px;

    font-weight:
        900;

}


.page-hero p {

    max-width:
        560px;

    margin-top:
        15px;

    color:
        var(--muted);

    font-size:
        14px;

    line-height:
        1.7;

}


.league-badge {

    position:
        relative;

    z-index:
        2;

    width:
        110px;

    height:
        110px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

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

    border-radius:
        28px;

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

    font-size:
        52px;

    opacity:
        0.85;

}


/* ==========================================
   SCORE SECTION
========================================== */

.score-section {

    width:
        min(
            1000px,
            calc(100% - 32px)
        );

    margin:
        55px auto 0;

}


.score-tabs {

    display:
        flex;

    align-items:
        center;

    gap:
        7px;

    padding:
        5px;

    width:
        fit-content;

    border:
        1px solid var(--border);

    border-radius:
        13px;

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

}


.score-tab {

    min-height:
        38px;

    padding:
        0 14px;

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        7px;

    border:
        none;

    border-radius:
        9px;

    background:
        transparent;

    color:
        var(--muted);

    font-size:
        11px;

    font-weight:
        800;

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

}


.score-tab:hover {

    color:
        var(--text);

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

}


.score-tab.active {

    background:
        var(--accent);

    color:
        #031009;

}


.tab-live-dot {

    width:
        6px;

    height:
        6px;

    border-radius:
        50%;

    background:
        var(--danger);

}


.last-updated {

    margin:
        13px 2px 18px;

    color:
        #657080;

    font-size:
        10px;

}


/* ==========================================
   MATCH LIST
========================================== */

.match-list {

    display:
        flex;

    flex-direction:
        column;

    gap:
        10px;

}


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

.match-card {

    position:
        relative;

    display:
        block;

    padding:
        18px 20px;

    border:
        1px solid var(--border);

    border-radius:
        16px;

    background:
        var(--card);

    overflow:
        hidden;

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

}


.match-card:hover {

    transform:
        translateY(-2px);

    background:
        var(--card-hover);

    border-color:
        rgba(0, 230, 118, 0.18);

    box-shadow:
        0 15px 35px
        rgba(0, 0, 0, 0.16);

}


.match-card.status-live {

    border-color:
        rgba(255, 89, 105, 0.25);

}


.match-card.status-live::before {

    content:
        "";

    position:
        absolute;

    left:
        0;

    top:
        0;

    bottom:
        0;

    width:
        3px;

    background:
        var(--danger);

}


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

.match-card-top {

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        15px;

}


.match-status {

    display:
        inline-flex;

    align-items:
        center;

    gap:
        6px;

    padding:
        5px 8px;

    border-radius:
        999px;

    font-size:
        9px;

    font-weight:
        900;

    letter-spacing:
        0.4px;

}


.status-upcoming {

    color:
        var(--accent);

    background:
        rgba(0, 230, 118, 0.08);

}


.status-live {

    color:
        var(--danger);

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

}


.status-finished {

    color:
        var(--muted);

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

}


.live-small-dot {

    width:
        6px;

    height:
        6px;

    border-radius:
        50%;

    background:
        var(--danger);

    box-shadow:
        0 0 8px
        rgba(255, 89, 105, 0.8);

    animation:
        livePulse 1.2s infinite;

}


@keyframes livePulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }

}


.gameweek {

    color:
        #657080;

    font-size:
        9px;

    font-weight:
        800;

}


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

.match-date {

    margin:
        10px 0 18px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        7px;

    color:
        var(--muted);

    font-size:
        10px;

}


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

.teams {

    display:
        grid;

    grid-template-columns:
        1fr 100px 1fr;

    align-items:
        center;

    gap:
        15px;

}


.team {

    min-width:
        0;

}


.team-name {

    font-size:
        15px;

    font-weight:
        800;

    line-height:
        1.3;

}


.home-team {

    text-align:
        right;

}


.away-team {

    text-align:
        left;

}


/* ==========================================
   SCORE
========================================== */

.score {

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        9px;

}


.score strong {

    min-width:
        25px;

    text-align:
        center;

    font-size:
        25px;

    line-height:
        1;

    font-weight:
        900;

}


.score span {

    color:
        #596474;

    font-size:
        15px;

    font-weight:
        800;

}


.upcoming-score {

    gap:
        12px;

}


.upcoming-score span {

    color:
        #4f5a69;

    font-size:
        20px;

}


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

.live-message,
.finished-message,
.upcoming-message {

    margin-top:
        16px;

    padding-top:
        12px;

    border-top:
        1px solid var(--border);

    text-align:
        center;

    font-size:
        9px;

    font-weight:
        700;

}


.live-message {

    color:
        var(--danger);

}


.finished-message {

    color:
        var(--muted);

}


.upcoming-message {

    color:
        #687382;

}


/* ==========================================
   LOADING / EMPTY / ERROR
========================================== */

.loading-card,
.empty-card,
.error-card {

    min-height:
        180px;

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    justify-content:
        center;

    padding:
        25px;

    border:
        1px solid var(--border);

    border-radius:
        16px;

    background:
        var(--card);

    text-align:
        center;

}


.loading-card {

    flex-direction:
        row;

    color:
        var(--muted);

    font-size:
        12px;

}


.loading-spinner {

    width:
        18px;

    height:
        18px;

    margin-right:
        10px;

    border:
        2px solid
        rgba(255, 255, 255, 0.1);

    border-top-color:
        var(--accent);

    border-radius:
        50%;

    animation:
        spin 0.8s linear infinite;

}


@keyframes spin {

    to {
        transform:
            rotate(360deg);
    }

}


.empty-icon,
.error-icon {

    width:
        50px;

    height:
        50px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    margin-bottom:
        12px;

    border-radius:
        15px;

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

    font-size:
        23px;

}


.empty-card h3,
.error-card h3 {

    font-size:
        15px;

}


.empty-card p,
.error-card p {

    max-width:
        400px;

    margin-top:
        7px;

    color:
        var(--muted);

    font-size:
        11px;

    line-height:
        1.6;

}


.error-card {

    color:
        var(--danger);

}


.error-card p {

    color:
        var(--muted);

}


.error-card button {

    margin-top:
        15px;

    min-height:
        38px;

    padding:
        0 15px;

    border:
        none;

    border-radius:
        9px;

    background:
        var(--accent);

    color:
        #031009;

    font-size:
        11px;

    font-weight:
        800;

}


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

.site-footer {

    margin-top:
        90px;

    padding:
        35px 0;

    border-top:
        1px solid var(--border);

    background:
        #070a0f;

}


.footer-inner {

    width:
        min(
            1200px,
            calc(100% - 32px)
        );

    margin:
        auto;

    display:
        grid;

    grid-template-columns:
        1fr auto;

    gap:
        20px;

    align-items:
        center;

}


.footer-brand p {

    margin-top:
        8px;

    color:
        var(--muted);

    font-size:
        11px;

}


.footer-links {

    display:
        flex;

    gap:
        18px;

}


.footer-links a {

    color:
        var(--muted);

    font-size:
        11px;

    font-weight:
        600;

}


.footer-links a:hover {

    color:
        var(--accent);

}


.copyright {

    grid-column:
        1 / -1;

    padding-top:
        18px;

    border-top:
        1px solid var(--border);

    color:
        #535e6d;

    font-size:
        10px;

}


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

@media (max-width: 850px) {

    .desktop-nav {
        display: none;
    }


    .menu-button {
        display: flex;
    }


    .page-hero {
        padding:
            40px 35px;
    }


    .league-badge {

        width:
            90px;

        height:
            90px;

        font-size:
            42px;

    }

}


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

@media (max-width: 600px) {

    :root {
        --header-height: 64px;
    }


    .header-inner {

        width:
            calc(100% - 22px);

        gap:
            7px;

    }


    .logo {

        font-size:
            18px;

    }


    .logo-mark {

        width:
            34px;

        height:
            34px;

        font-size:
            16px;

    }


    .search-button,
    .profile-button,
    .menu-button {

        width:
            35px;

        height:
            35px;

    }


    .page-hero {

        width:
            calc(100% - 22px);

        min-height:
            240px;

        margin-top:
            18px;

        padding:
            32px 24px;

        border-radius:
            20px;

        align-items:
            flex-end;

    }


    .page-hero h1 {

        font-size:
            43px;

        letter-spacing:
            -2.3px;

    }


    .page-hero p {

        font-size:
            12px;

    }


    .league-badge {

        position:
            absolute;

        right:
            20px;

        top:
            20px;

        width:
            70px;

        height:
            70px;

        border-radius:
            20px;

        font-size:
            32px;

    }


    .score-section {

        width:
            calc(100% - 22px);

        margin-top:
            40px;

    }


    .score-tabs {

        width:
            100%;

        overflow-x:
            auto;

    }


    .score-tab {

        flex:
            1;

        white-space:
            nowrap;

        padding:
            0 11px;

    }


    .teams {

        grid-template-columns:
            1fr 70px 1fr;

        gap:
            8px;

    }


    .team-name {

        font-size:
            13px;

    }


    .score strong {

        font-size:
            21px;

    }


    .score span {

        font-size:
            12px;

    }


    .match-card {

        padding:
            16px 14px;

        border-radius:
            14px;

    }


    .match-date {

        margin-bottom:
            15px;

    }


    .footer-inner {

        grid-template-columns:
            1fr;

    }


    .footer-links {

        flex-wrap:
            wrap;

        gap:
            13px;

    }


    .copyright {

        grid-column:
            auto;

    }

}


/* ==========================================
   SMALL PHONES
========================================== */

@media (max-width: 380px) {

    .logo > span:last-child {
        display: none;
    }


    .page-hero h1 {

        font-size:
            38px;

    }


    .score-tab {

        font-size:
            10px;

        padding:
            0 8px;

    }


    .teams {

        grid-template-columns:
            1fr 58px 1fr;

    }


    .team-name {

        font-size:
            12px;

    }


    .score strong {

        font-size:
            19px;

    }

}


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

:focus-visible {

    outline:
        2px solid var(--accent);

    outline-offset:
        3px;

}


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

    *,
    *::before,
    *::after {

        animation-duration:
            0.01ms !important;

        animation-iteration-count:
            1 !important;

        scroll-behavior:
            auto !important;

        transition-duration:
            0.01ms !important;

    }

}

/* ==========================================
   TEAM BADGES
========================================== */

.team-badge {

    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 9px;

    flex-shrink: 0;
}

.team-badge img {

    width: 100%;
    height: 100%;

    object-fit: contain;

    display: block;
}

.team-badge-placeholder {

    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

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

    border:
        1px solid var(--border);

    font-size: 20px;
}


/* Mobile */

@media (max-width: 600px) {

    .team-badge {

        width: 44px;
        height: 44px;

        margin-bottom: 7px;
    }

    .team-badge-placeholder {

        width: 44px;
        height: 44px;

        font-size: 17px;
    }

}