:root {
    --fanat-green: #35ad5a;
    --fanat-green-dark: #25984a;
    --fanat-green-soft: #65c47e;
    --text: #252525;
    --muted: #8c8c8c;
    --line: #ececec;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    background: #fafafa;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
}

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

button,
input {
    font: inherit;
}

.container {
    width: min(1052px, calc(100% - 32px));
    margin: 0 auto;
}

.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-green {
    background: var(--white);
    border-bottom: 1px solid var(--line);
}

.header-top {
    display: grid;
    grid-template-columns: 226px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 28px;
    min-height: 88px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    color: var(--fanat-green);
}

.brand img {
    display: block;
    width: 207px;
    height: auto;
}

.search-form {
    display: flex;
}

.search-button {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.search-icon {
    position: relative;
    display: block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--fanat-green);
    border-radius: 50%;
}

.search-icon::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 2px;
    right: -6px;
    bottom: -3px;
    background: var(--fanat-green);
    transform: rotate(45deg);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 38px;
    border: 1px solid var(--fanat-green);
    border-radius: 5px;
    background: transparent;
    padding: 8px;
}

.menu-toggle span:not(.sr-only) {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--fanat-green);
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    color: var(--fanat-green);
}

.main-nav a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 16px;
    font-weight: 700;
    min-height: 88px;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--fanat-green-dark);
    border-bottom-color: var(--fanat-green-dark);
}

.main-nav a span {
    font-size: 15px;
}

.page-shell {
    min-height: 320px;
    background: #fafafa;
}

.empty-stage {
    min-height: 320px;
    padding: 16px 0 0;
}

.home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 16px;
    align-items: start;
    padding: 10px 0 28px;
}

.home-main {
    min-width: 0;
}

.home-sidebar {
    display: grid;
    gap: 10px;
}

.home-live {
    padding: 0;
}

.home-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.home-section-head span {
    color: var(--fanat-green);
    font-size: 13px;
    font-weight: 800;
}

.home-section-head h1 {
    margin: 4px 0 0;
    font-size: 30px;
    line-height: 1.1;
}

.section-link {
    color: var(--fanat-green);
    font-size: 14px;
    font-weight: 800;
}

.home-live-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.home-live-card {
    padding: 14px;
    border: 1px solid #e4e8e6;
    border-radius: 6px;
    background: var(--white);
    box-shadow: 0 6px 18px rgba(20, 35, 25, 0.04);
}

.home-live-meta,
.home-live-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
}

.home-live-meta span {
    color: var(--fanat-green-dark);
    font-weight: 800;
    text-transform: uppercase;
}

.home-live-score {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 16px 0;
    font-weight: 800;
}

.home-live-score span:last-child {
    text-align: right;
}

.home-live-score strong {
    min-width: 56px;
    padding: 7px 10px;
    border-radius: 5px;
    background: #111;
    color: var(--white);
    text-align: center;
}

.home-side-card {
    padding: 16px;
}

.home-match-stack .fixture-row:first-child {
    padding-top: 12px;
}

.side-message {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #edf0ef;
    border-radius: 5px;
    background: #fafafa;
    color: var(--muted);
    font-size: 13px;
}

.popular-list {
    display: grid;
    gap: 0;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: popular;
}

.popular-list li {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid #edf0ef;
    counter-increment: popular;
}

.popular-list li::before {
    content: counter(popular);
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 4px;
    background: var(--fanat-green);
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
}

.popular-list a {
    color: #111;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
}

.popular-news-list {
    display: grid;
    margin-top: 14px;
}

.popular-news-row {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #edf0ef;
    color: #111;
}

.popular-news-thumb {
    display: block;
    width: 82px;
    height: 58px;
    overflow: hidden;
    border-radius: 4px;
    background: linear-gradient(135deg, #d7e7dc, #f3f5f4);
}

.popular-news-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-news-row h3 {
    margin: 0 0 7px;
    font-size: 13px;
    line-height: 1.32;
}

.popular-news-row small {
    color: var(--fanat-green);
    font-size: 12px;
    font-weight: 800;
}

.live-page {
    padding: 10px 0 28px;
}

.live-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.live-head span {
    color: var(--fanat-green);
    font-size: 13px;
    font-weight: 800;
}

.live-head h1 {
    margin: 4px 0 0;
    font-size: 30px;
    line-height: 1.1;
}

.live-head strong {
    padding: 8px 12px;
    border-radius: 5px;
    background: var(--fanat-green);
    color: var(--white);
    font-size: 14px;
}

.live-message {
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid #e4e8e6;
    border-radius: 6px;
    background: var(--white);
    color: var(--muted);
}

.live-list {
    display: grid;
    gap: 10px;
}

.live-match-card {
    padding: 16px;
    border: 1px solid #e4e8e6;
    border-radius: 6px;
    background: var(--white);
    box-shadow: 0 6px 18px rgba(20, 35, 25, 0.04);
}

.live-match-meta,
.live-match-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}

.live-match-meta span {
    color: var(--fanat-green-dark);
    font-weight: 800;
    text-transform: uppercase;
}

.live-score-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 18px 0;
}

.live-team {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-weight: 800;
}

.live-team--right {
    justify-content: flex-end;
    text-align: right;
}

.live-score {
    min-width: 70px;
    padding: 8px 12px;
    border-radius: 5px;
    background: #111;
    color: var(--white);
    text-align: center;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 4px;
    background: #edf0ef;
    color: #4d5652;
    font-weight: 800;
}

.status-pill--live {
    background: #e62632;
    color: var(--white);
}

.status-pill--finished {
    background: #111;
    color: var(--white);
}

.standings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 16px;
    align-items: start;
}

.standings-main {
    min-width: 0;
}

.world-cup-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    min-height: 106px;
    margin-bottom: 14px;
    padding: 16px 24px;
    border-radius: 5px;
    overflow: hidden;
    background:
        radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.68), transparent 8%),
        radial-gradient(circle at 76% 30%, rgba(255, 255, 255, 0.32), transparent 15%),
        linear-gradient(135deg, #032c12 0%, #07752f 52%, #023a18 100%);
    color: var(--white);
    box-shadow: 0 10px 26px rgba(6, 77, 32, 0.16);
    text-transform: uppercase;
}

.cup-badge {
    display: grid;
    width: 64px;
    height: 78px;
    place-items: center;
    border-radius: 12px;
    background: var(--white);
    color: #1e8f45;
    padding: 8px;
}

.cup-badge img {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.world-cup-hero h1 {
    margin: 0;
    font-size: 32px;
    line-height: 1.08;
    letter-spacing: 0;
}

.world-cup-hero p {
    margin: 8px 0 0;
    font-size: 18px;
    text-transform: none;
}

.hero-year {
    font-size: 34px;
    line-height: 1;
}

.groups-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.group-card,
.side-card {
    border: 1px solid #e4e8e6;
    border-radius: 6px;
    background: var(--white);
    box-shadow: 0 6px 18px rgba(20, 35, 25, 0.04);
}

.group-card {
    padding: 16px 18px 10px;
}

.group-card h2,
.plain-title {
    margin: 0;
    color: var(--fanat-green-dark);
    font-size: 18px;
    line-height: 1.2;
    text-transform: uppercase;
}

.group-card--message p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.table-scroll {
    overflow-x: auto;
}

.group-table {
    width: 100%;
    min-width: 450px;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 13px;
}

.group-table th,
.group-table td {
    padding: 10px 6px;
    border-bottom: 1px solid #edf0ef;
    text-align: center;
}

.group-table th {
    color: #29312d;
    font-size: 12px;
    font-weight: 500;
}

.group-table th:nth-child(2),
.group-table td:nth-child(2) {
    text-align: left;
}

.team-cell {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 150px;
}

.flag {
    font-size: 20px;
    line-height: 1;
}

.flag-img {
    display: block;
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.rank-badge {
    display: inline-grid;
    min-width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 4px;
    background: #f1f3f2;
    color: #121212;
    font-weight: 800;
}

.rank-badge.is-qualified {
    background: var(--fanat-green);
    color: var(--white);
}

.card-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 13px;
    color: var(--fanat-green-dark);
    font-size: 14px;
    font-weight: 800;
}

.card-link span {
    font-size: 28px;
    line-height: 1;
}

.info-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 0;
    padding: 12px;
    border-radius: 6px;
    background: #eef6ff;
    color: #5b6670;
    font-size: 13px;
}

.info-note span {
    display: inline-grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 50%;
    background: #8bbceb;
    color: var(--white);
    font-weight: 800;
}

.standings-sidebar {
    display: grid;
    gap: 10px;
}

.side-card {
    padding: 16px;
}

.side-title {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 12px;
    border-bottom: 1px solid #edf0ef;
}

.side-title h2,
.plain-title {
    margin: 0;
    color: #111;
    font-size: 16px;
}

.side-title p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.calendar-icon {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid #111;
    border-radius: 3px;
}

.calendar-icon::before {
    content: "";
    position: absolute;
    left: -2px;
    right: -2px;
    top: 6px;
    height: 2px;
    background: #111;
}

.match-stack {
    display: grid;
}

.fixture-row {
    padding: 14px 0;
    border-bottom: 1px solid #edf0ef;
    text-align: center;
}

.fixture-group {
    display: block;
    margin-bottom: 8px;
    color: #6c7370;
    font-size: 12px;
    text-transform: uppercase;
}

.fixture-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.fixture-teams > span:first-child {
    text-align: right;
}

.fixture-teams > span:last-child {
    text-align: left;
}

.fixture-teams > strong {
    font-size: 16px;
}

.fixture-row time {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.news-list {
    display: grid;
    margin-top: 14px;
}

.news-row {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #edf0ef;
    color: #111;
}

.news-row h3 {
    margin: 0 0 7px;
    font-size: 13px;
    line-height: 1.32;
}

.news-row time {
    color: var(--fanat-green);
    font-size: 12px;
}

.news-thumb {
    display: block;
    width: 82px;
    height: 58px;
    border-radius: 4px;
    background: linear-gradient(135deg, #d7e7dc, #f3f5f4);
    overflow: hidden;
}

.news-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-thumb--one {
    background: linear-gradient(135deg, #d9e7ef, #1f7042);
}

.news-thumb--two {
    background: linear-gradient(135deg, #243a7b, #d71f32);
}

.news-thumb--three {
    background: linear-gradient(135deg, #f0d33e, #1c9d4f);
}

.site-footer {
    margin-top: 12px;
}

.footer-top {
    background: var(--white);
    border-top: 1px solid var(--fanat-green);
    border-bottom: 1px solid var(--fanat-green);
    padding: 24px 0;
}

.footer-top-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.footer-brand img {
    display: block;
    width: 180px;
    height: auto;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 22px;
    color: var(--fanat-green);
    font-size: 14px;
    font-weight: 700;
}

@media (max-width: 1080px) {
    .header-top {
        grid-template-columns: 226px minmax(0, 1fr) auto auto;
        gap: 18px;
    }

    .main-nav {
        gap: 18px;
    }

    .main-nav a {
        font-size: 14px;
    }

    .standings-layout {
        grid-template-columns: 1fr;
    }

    .home-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
    }
}

@media (max-width: 820px) {
    .container {
        width: min(100% - 24px, 1052px);
    }

    .header-top {
        grid-template-columns: 1fr auto auto;
        min-height: 72px;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        grid-column: 1 / -1;
        justify-content: stretch;
        gap: 0;
        border-top: 1px solid var(--line);
    }

    .main-nav.is-open {
        display: grid;
        padding: 8px 0;
    }

    .main-nav a {
        min-height: 0;
        padding: 10px 0;
        border-bottom: 0;
    }

    .world-cup-hero {
        grid-template-columns: auto 1fr;
    }

    .hero-year {
        display: none;
    }

    .groups-grid {
        grid-template-columns: 1fr;
    }

    .footer-top-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-nav {
        justify-content: flex-start;
    }

}

@media (max-width: 760px) {
    .home-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .brand img {
        width: 172px;
    }

    .empty-stage {
        padding-top: 10px;
    }

    .world-cup-hero {
        gap: 14px;
        padding: 14px;
    }

    .world-cup-hero h1 {
        font-size: 24px;
    }

    .world-cup-hero p {
        font-size: 15px;
    }

    .cup-badge {
        width: 50px;
        height: 62px;
        padding: 6px;
    }

    .group-card,
    .side-card {
        padding: 14px;
    }

    .live-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-live-grid {
        grid-template-columns: 1fr;
    }

    .live-score-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .live-score {
        justify-self: start;
    }

    .live-team--right {
        justify-content: flex-start;
        text-align: left;
    }

    .live-match-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}
