
:root {
    --bg: #080d18;
    --panel: #101827;
    --panel-light: #151f30;
    --border: rgba(255,255,255,.075);
    --text: #f4f7fb;
    --muted: #8491a5;
    --accent: #52e0c0;
    --blue: #6c91ff;
    --red: #ff5268;
    --radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input {
    font: inherit;
}

button {
    cursor: pointer;
}

/* HEADER */

.topbar {
    height: 76px;
    background: rgba(8,13,24,.94);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(18px);
}

.topbar-inner {
    max-width: 1600px;
    height: 100%;
    margin: auto;
    padding: 0 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.8px;
}

.brand-icon {
    font-size: 27px;
}

.brand-accent,
.footer-brand span {
    color: var(--accent);
}

.desktop-nav {
    display: flex;
    gap: 35px;
    height: 100%;
    align-items: center;
}

.desktop-nav a {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    transition: .2s;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--accent);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
}

.live-dot,
.summary-pulse {
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 12px rgba(255,82,104,.7);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    50% { opacity: .45; }
}

.menu-toggle,
.mobile-nav {
    display: none;
}

/* PAGE LAYOUT */

.page-layout {
    max-width: 1600px;
    margin: auto;
    padding: 28px 35px 60px;
    display: grid;
    grid-template-columns: 225px minmax(0, 1fr) 250px;
    gap: 25px;
    align-items: start;
}

.left-sidebar,
.right-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.3px;
    margin: 8px 0 19px;
}

.heading-icon {
    font-size: 18px;
}

.league-search,
.match-search {
    height: 43px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--muted);
}

.league-search input,
.match-search input {
    width: 100%;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: none;
    color: var(--text);
    font-size: 11px;
}

.league-search input::placeholder,
.match-search input::placeholder {
    color: #66748a;
}

.league-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 440px;
    overflow-y: auto;
}

.league-item {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #a7b2c4;
    background: transparent;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    transition: .2s;
}

.league-item:hover {
    background: var(--panel);
    color: #fff;
}

.league-item.active {
    background: rgba(82,224,192,.09);
    color: var(--accent);
    border-color: rgba(82,224,192,.15);
}

.league-symbol {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    font-size: 16px;
    flex-shrink: 0;
}

.league-symbol img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.sidebar-promo {
    margin-top: 25px;
    padding: 19px;
    background: linear-gradient(145deg, #172a39, #101827);
    border: 1px solid rgba(82,224,192,.13);
    border-radius: var(--radius);
}

.promo-icon {
    font-size: 25px;
}

.sidebar-promo h3 {
    font-size: 14px;
    margin: 13px 0 7px;
}

.sidebar-promo p,
.sidebar-promo a {
    font-size: 10px;
    line-height: 1.7;
    color: var(--muted);
}

.sidebar-promo a {
    display: inline-block;
    margin-top: 12px;
    color: var(--accent);
    font-weight: 700;
}

/* HERO */

.hero {
    min-height: 265px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 38px 40px;
    border: 1px solid rgba(108,145,255,.16);
    border-radius: 20px;
    background:
        radial-gradient(circle at 80% 50%, rgba(82,224,192,.14), transparent 32%),
        linear-gradient(115deg, #14243a, #101827 65%, #142139);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 490px;
}

.hero-label,
.section-kicker {
    font-size: 9px;
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 2px;
}

.hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: -2px;
    margin: 15px 0 12px;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    max-width: 400px;
    font-size: 11px;
    line-height: 1.8;
    color: #a4b1c5;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    margin-top: 22px;
    padding: 12px 18px;
    background: var(--accent);
    color: #07131a;
    font-size: 11px;
    font-weight: 800;
    border-radius: 8px;
    transition: .2s;
}

.hero-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(82,224,192,.18);
}

.hero-ball {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%) rotate(-15deg);
    font-size: clamp(100px, 15vw, 190px);
    opacity: .16;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,.4));
}

.hero-decoration {
    position: absolute;
    width: 280px;
    height: 280px;
    right: -90px;
    top: -100px;
    border: 1px solid rgba(82,224,192,.13);
    border-radius: 50%;
    box-shadow: 0 0 0 30px rgba(82,224,192,.025),
                0 0 0 60px rgba(82,224,192,.02);
}

/* MATCH SECTION */

.match-section {
    margin-top: 36px;
}

.section-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-top h2,
.news-heading h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    margin-top: 7px;
}

.section-subtitle {
    color: var(--muted);
    font-size: 11px;
    margin-top: 6px;
}

.match-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stat-number {
    color: var(--accent);
    font-size: 24px;
    font-weight: 800;
}

.stat-label {
    color: var(--muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1px;
}

.match-toolbar {
    margin-top: 23px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.match-tabs {
    display: flex;
    gap: 7px;
    padding: 5px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 11px;
}

.match-tab {
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 9px;
    transition: .2s;
}

.match-tab.active {
    background: var(--panel-light);
    color: #fff;
    box-shadow: inset 0 0 0 1px var(--border);
}

.match-tab.active[data-filter="live"] {
    color: var(--red);
}

.match-tab.active[data-filter="upcoming"] {
    color: var(--accent);
}

.match-tab .live-dot {
    width: 7px;
    height: 7px;
}

.upcoming-icon {
    font-size: 16px;
}

.match-search {
    width: 220px;
}

.live-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 22px;
    padding: 12px 15px;
    background: rgba(255,255,255,.025);
    border: 1px solid var(--border);
    border-radius: 9px;
    color: #aab6c7;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .8px;
}

.summary-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-pulse {
    width: 7px;
    height: 7px;
}

#liveCount {
    color: var(--accent);
}

/* MATCH CARDS */

.matches-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
    margin-top: 15px;
}

.match-card {
    background: linear-gradient(145deg, #121d2d, #0e1725);
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 16px;
    min-width: 0;
    transition: .2s;
}

.match-card:hover {
    border-color: rgba(82,224,192,.3);
    transform: translateY(-2px);
}

.match-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--border);
}

.league-info {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: #9ba9bc;
    font-size: 9px;
    font-weight: 700;
}

.league-info img {
    width: 19px;
    height: 19px;
    object-fit: contain;
}

.league-info span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-status {
    flex-shrink: 0;
    padding: 5px 8px;
    border-radius: 5px;
    background: rgba(255,82,104,.12);
    color: var(--red);
    font-size: 8px;
    font-weight: 800;
}

.match-status.upcoming {
    color: var(--accent);
    background: rgba(82,224,192,.1);
}

.match-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 7px;
    padding: 19px 0;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.team img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.team-name {
    width: 100%;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.match-score {
    text-align: center;
    min-width: 60px;
}

.score-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
}

.score-divider {
    color: #627087;
    padding: 0 3px;
}

.match-time {
    color: var(--muted);
    font-size: 9px;
    margin-top: 5px;
}

.match-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.match-date {
    color: var(--muted);
    font-size: 9px;
}

.watch-button {
    border: 0;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(82,224,192,.12);
    color: var(--accent);
    font-size: 9px;
    font-weight: 800;
    transition: .2s;
}

.watch-button:hover {
    background: var(--accent);
    color: #07131a;
}

.watch-button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.loading-state,
.empty-state {
    grid-column: 1 / -1;
    padding: 45px 15px;
    text-align: center;
    color: var(--muted);
}

.loading-state p,
.empty-state p {
    font-size: 11px;
    margin-top: 12px;
}

.loader {
    width: 27px;
    height: 27px;
    border: 3px solid #263348;
    border-top-color: var(--accent);
    border-radius: 50%;
    margin: auto;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-icon {
    font-size: 35px;
    opacity: .6;
}

.empty-state h3 {
    color: #fff;
    font-size: 15px;
    margin-top: 12px;
}

/* RIGHT SIDEBAR */

.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.side-card {
    padding: 18px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.side-card-label {
    color: var(--accent);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.spotlight-card {
    background: linear-gradient(145deg, #183b3b, #101827);
    border-color: rgba(82,224,192,.15);
}

.spotlight-icon {
    font-size: 38px;
    margin: 19px 0 10px;
}

.side-card h3 {
    font-size: 13px;
    line-height: 1.5;
}

.side-card p {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.8;
    margin-top: 8px;
}

.side-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.side-title span {
    color: var(--accent);
}

/* NEWS */

.news-section {
    margin-top: 45px;
}

.news-heading {
    margin-bottom: 15px;
}

.news-placeholder {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 13px;
}

.news-placeholder > span {
    font-size: 30px;
}

.news-placeholder h3 {
    font-size: 12px;
}

.news-placeholder p {
    color: var(--muted);
    font-size: 10px;
    margin-top: 6px;
}

/* FOOTER */

.footer {
    padding: 35px 20px 95px;
    text-align: center;
    border-top: 1px solid var(--border);
    background: #070b13;
}

.footer-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 800;
}

.footer p,
.copyright {
    color: var(--muted);
    font-size: 10px;
    margin-top: 10px;
    display: block;
}

/* BOTTOM NAV */

.bottom-nav {
    display: none;
}

/* RESPONSIVE */

@media (max-width: 1200px) {
    .page-layout {
        grid-template-columns: 200px minmax(0, 1fr);
    }

    .right-sidebar {
        display: none;
    }
}

@media (max-width: 800px) {
    .topbar {
        height: 65px;
    }

    .topbar-inner {
        padding: 0 20px;
    }

    .brand {
        font-size: 18px;
    }

    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: transparent;
        border: 0;
        padding: 7px;
    }

    .menu-toggle span {
        width: 21px;
        height: 2px;
        background: #fff;
        border-radius: 5px;
    }

    .mobile-nav {
        position: absolute;
        top: 65px;
        left: 0;
        width: 100%;
        padding: 12px 20px;
        background: #101827;
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        gap: 15px;
    }

    .mobile-nav.open {
        display: flex;
    }

    .mobile-nav a {
        font-size: 12px;
        padding: 8px 0;
        color: #c5cfdd;
    }

    .page-layout {
        display: block;
        padding: 18px 20px 40px;
    }

    .left-sidebar {
        position: static;
        margin-bottom: 20px;
    }

    .sidebar-heading {
        margin-top: 0;
    }

    .league-list {
        flex-direction: row;
        max-height: none;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .league-item {
        flex: 0 0 auto;
        width: auto;
        white-space: nowrap;
    }

    .sidebar-promo {
        display: none;
    }

    .hero {
        min-height: 240px;
        padding: 30px 25px;
    }

    .hero-ball {
        right: 0;
        font-size: 125px;
    }

    .match-section {
        margin-top: 30px;
    }

    .matches-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 99;
        justify-content: space-around;
        padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
        background: rgba(10,16,28,.96);
        border-top: 1px solid var(--border);
        backdrop-filter: blur(15px);
    }

    .bottom-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        color: var(--muted);
        font-size: 17px;
        min-width: 55px;
    }

    .bottom-link small {
        font-size: 9px;
        font-weight: 600;
    }

    .bottom-link.active {
        color: var(--accent);
    }
}

@media (max-width: 520px) {
    .page-layout {
        padding: 15px 13px 35px;
    }

    .hero {
        min-height: 225px;
        padding: 25px 20px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero p {
        max-width: 260px;
        font-size: 10px;
    }

    .hero-ball {
        right: -25px;
        font-size: 105px;
        opacity: .12;
    }

    .section-top h2 {
        font-size: 21px;
    }

    .match-toolbar {
        align-items: stretch;
    }

    .match-tabs {
        width: 100%;
        justify-content: stretch;
    }

    .match-tab {
        flex: 1;
        justify-content: center;
        padding: 11px 7px;
        font-size: 9px;
    }

    .match-search {
        width: 100%;
    }

    .matches-grid {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    .match-card {
        padding: 14px;
    }

    .team img {
        width: 38px;
        height: 38px;
    }

    .footer {
        padding-bottom: 105px;
    }
}

@media (min-width: 801px) and (max-width: 1050px) {
    .page-layout {
        padding-left: 20px;
        padding-right: 20px;
        gap: 16px;
    }

    .matches-grid {
        grid-template-columns: 1fr;
    }
}
