:root {
    --fanat-green: #34a853;
    --fanat-green-dark: #267a3d;
    --fanat-green-soft: #eaf7ee;
    --fanat-green-hover: #d9f0df;
    --text: #202124;
    --muted: #6b7280;
    --line: #e2ebe5;
    --white: #ffffff;
    --page-bg: #f5faf6;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    color: var(--text);
    background: var(--page-bg);
    font-family: Arial, Helvetica, sans-serif;
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0 48px;
}

.main-menu {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.main-menu__item {
    position: relative;
    padding: 8px 0;
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.main-menu__item::after {
    position: absolute;
    right: 0;
    bottom: -13px;
    left: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: transparent;
    content: "";
}

.main-menu__item.is-active {
    color: var(--fanat-green-dark);
}

.main-menu__item.is-active::after {
    background: var(--fanat-green);
}

.main-menu__item.is-disabled {
    cursor: default;
    color: var(--muted);
}

.bonus-system-page {
    margin-top: 28px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 12px 30px rgb(52 168 83 / 8%);
}

.bonus-system-page h1 {
    margin-bottom: 10px;
}

.bonus-system-page p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.bonus-system-page .landscape-hint {
    display: none;
}

/* ==================================================
   BONUS SİSTEMİ CƏDVƏLİ START
   ================================================== */
.bonus-table-scroll {
    overflow: auto;
    margin-top: 22px;
    border: 1px solid var(--line);
    border-radius: 12px;
    scrollbar-width: thin;
}

.bonus-system-table {
    width: max-content;
    min-width: 2860px;
    border-collapse: separate;
    border-spacing: 0;
}

.bonus-general-table {
    min-width: 2790px;
}

.bonus-system-table th,
.bonus-system-table td {
    height: 52px;
    padding: 8px 10px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-align: center;
}

.bonus-system-table th {
    color: var(--fanat-green-dark);
    background: #f7fcf8;
    font-size: 12px;
}

.bonus-system-table tbody tr:nth-child(odd) td {
    background: var(--white);
}

.bonus-system-table tbody tr:nth-child(even) td {
    background: var(--fanat-green-soft);
}

.bonus-system-table .bonus-sticky {
    position: sticky;
    z-index: 2;
}

.bonus-system-table th.bonus-sticky {
    z-index: 3;
}

.bonus-col-number {
    left: 0;
    width: 56px;
    min-width: 56px;
}

.bonus-col-player {
    left: 56px;
    width: 220px;
    min-width: 220px;
    text-align: left !important;
    font-weight: 700;
}

.bonus-col-club {
    left: 56px;
    width: 220px;
    min-width: 220px;
    text-align: left !important;
    font-weight: 700;
}

.bonus-col-age {
    left: 276px;
    width: 70px;
    min-width: 70px;
}

.bonus-col-round {
    width: 70px;
    min-width: 70px;
}

.bonus-col-total {
    width: 80px;
    min-width: 80px;
    font-weight: 800;
}

.bonus-system-table tfoot td {
    border-bottom: 0;
    color: var(--fanat-green-dark);
    background: var(--fanat-green-hover);
    font-weight: 800;
}

.bonus-system-table tfoot td:first-child {
    text-align: right;
}
/* ==================================================
   BONUS SİSTEMİ CƏDVƏLİ FINISH
   ================================================== */

/* ==================================================
   BONUS KLUB MENYUSU START (MÜVƏQQƏTİ)
   ================================================== */
.bonus-club-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    box-shadow: 0 8px 24px rgb(52 168 83 / 8%);
}

.bonus-club-menu__item {
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--fanat-green-dark);
    background: var(--white);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.bonus-club-menu__item:hover {
    border-color: var(--fanat-green);
    background: var(--fanat-green-soft);
}

.bonus-club-menu__item.is-active {
    border-color: var(--fanat-green);
    color: var(--white);
    background: var(--fanat-green);
}
/* ==================================================
   BONUS KLUB MENYUSU FINISH (MÜVƏQQƏTİ)
   ================================================== */

/* ==================================================
   BONUS FUTBOLÇU SİYAHISI START
   ================================================== */
.bonus-results {
    margin-top: 28px;
}

.bonus-results > h1 {
    margin-bottom: 18px;
    color: var(--text);
    font-size: clamp(26px, 3vw, 36px);
}

.bonus-groups {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.bonus-group {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 12px 30px rgb(52 168 83 / 8%);
}

.bonus-group__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    color: var(--white);
    background: linear-gradient(120deg, var(--fanat-green-dark), var(--fanat-green));
}

.bonus-group__header h2 {
    margin: 0;
    font-size: 18px;
}

.bonus-group__header span {
    font-size: 12px;
    white-space: nowrap;
    opacity: .9;
}

.bonus-player-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.bonus-player-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 68px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
}

.bonus-player-list li:nth-child(even) {
    background: var(--fanat-green-soft);
}

.bonus-player-list li:last-child {
    border-bottom: 0;
}

.bonus-player-list li > div {
    display: grid;
    gap: 5px;
}

.bonus-player-list strong {
    font-size: 15px;
}

.bonus-player-list span {
    color: var(--muted);
    font-size: 12px;
}

.bonus-player-list b {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 999px;
    color: var(--fanat-green-dark);
    background: var(--fanat-green-soft);
    font-size: 12px;
}

.bonus-group__empty {
    margin: 0;
    padding: 22px 18px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.bonus-empty {
    margin: 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--muted);
    background: var(--white);
}
/* ==================================================
   BONUS FUTBOLÇU SİYAHISI FINISH
   ================================================== */

.league-selector {
    margin-bottom: 30px;
}

.league-selector h2 {
    margin: 0 0 14px;
    color: var(--text);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
}

.league-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 190px));
    gap: 10px;
}

.league-tab {
    display: grid;
    min-height: 48px;
    padding: 11px 22px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--fanat-green-dark);
    background: var(--white);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.league-tab:hover {
    border-color: var(--fanat-green);
    background: var(--fanat-green-soft);
}

.league-tab.is-active {
    border-color: var(--fanat-green);
    color: var(--white);
    background: var(--fanat-green);
    box-shadow: 0 8px 20px rgb(52 168 83 / 20%);
}

.league-tab.is-disabled {
    cursor: default;
    opacity: .55;
}

.league-tab.is-disabled:hover {
    border-color: var(--line);
    background: var(--white);
}

.standings-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--white);
    box-shadow: 0 16px 45px rgb(52 168 83 / 10%);
}

.card-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 32px;
    color: var(--white);
    background: linear-gradient(120deg, var(--fanat-green-dark), var(--fanat-green));
}

.eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .85;
}

h1 {
    margin: 0;
    font-size: clamp(27px, 4vw, 42px);
    line-height: 1.1;
}

.season {
    display: grid;
    gap: 4px;
    text-align: right;
}

.season span {
    font-size: 14px;
    opacity: .9;
}

.season strong {
    font-size: 20px;
}

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

table {
    width: 100%;
    min-width: 790px;
    border-collapse: collapse;
}

th,
td {
    height: 58px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    text-align: center;
    white-space: nowrap;
}

th {
    height: 52px;
    color: var(--fanat-green-dark);
    background: #f7fcf8;
    font-size: 13px;
    letter-spacing: .04em;
}

tbody tr {
    transition: background-color .15s ease;
}

tbody tr:nth-child(even) {
    background: var(--fanat-green-soft);
}

tbody tr:hover {
    background: var(--fanat-green-hover);
}

tbody tr:last-child td {
    border-bottom: 0;
}

.position {
    width: 54px;
    color: var(--fanat-green-dark);
    font-weight: 700;
}

.club-column {
    width: 34%;
    text-align: left;
}

.club {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    font-weight: 700;
}

.club img {
    flex: 0 0 36px;
    object-fit: contain;
}

.points {
    color: var(--text);
    font-weight: 800;
}

.card-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 20px;
    padding: 16px 32px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: #f8fbf9;
    font-size: 12px;
}

.error {
    display: grid;
    gap: 8px;
    margin: 30px;
    padding: 20px;
    border: 1px solid #f2c6c6;
    border-radius: 12px;
    color: #8e2222;
    background: #fff3f3;
}

/* ==================================================
   MPL TURNIR START
   ================================================== */
.standings-card--mpl .card-header {
    background: linear-gradient(120deg, var(--fanat-green-dark), var(--fanat-green));
}
/* ==================================================
   MPL TURNIR FINISH
   ================================================== */

/* ==================================================
   I LIQA TURNIR START
   ================================================== */
.standings-card--1 .card-header {
    background: linear-gradient(120deg, var(--fanat-green-dark), var(--fanat-green));
}
/* ==================================================
   I LIQA TURNIR FINISH
   ================================================== */

/* ==================================================
   II LIQA TURNIR START
   ================================================== */
.standings-card--2 .card-header {
    background: linear-gradient(120deg, var(--fanat-green-dark), var(--fanat-green));
}
/* ==================================================
   II LIQA TURNIR FINISH
   ================================================== */

@media (max-width: 700px) {
    .page {
        width: 100%;
        padding: 24px 0 0;
    }

    .main-menu {
        gap: 24px;
        margin: 0 16px 24px;
    }

    .main-menu__item {
        font-size: 15px;
    }

    .bonus-club-menu {
        flex-wrap: nowrap;
        margin: 0 16px;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .bonus-club-menu__item {
        flex: 0 0 auto;
    }

    .bonus-results {
        margin: 24px 16px 0;
    }

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

    .league-selector {
        margin: 0 16px 24px;
    }

    .league-selector h2 {
        margin-bottom: 12px;
        font-size: 28px;
    }

    .league-tabs {
        grid-template-columns: repeat(3, 1fr);
        gap: 7px;
    }

    .league-tab {
        min-height: 44px;
        padding: 9px 6px;
        font-size: 14px;
    }

    .standings-card {
        border-inline: 0;
        border-bottom: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .card-header {
        align-items: start;
        padding: 22px 18px;
    }

    .season span {
        display: none;
    }

    .season strong {
        font-size: 15px;
    }

    th,
    td {
        padding-inline: 9px;
    }

    .card-footer {
        padding: 14px 18px;
    }
}

@media (max-width: 700px) and (orientation: portrait) {
    .bonus-system-page .landscape-hint {
        display: block;
        margin-bottom: 12px;
        padding: 10px 12px;
        border: 1px solid var(--fanat-green);
        border-radius: 9px;
        color: var(--fanat-green-dark);
        background: var(--fanat-green-soft);
        font-weight: 700;
        text-align: center;
    }
}
