.fk-rank-root,
.fk-rank-root * {
    box-sizing: border-box;
}

.fk-rank-root {
    --green:#00c86f;
    --green-dark:#00a85d;
    --text:#07172d;
    --muted:#6680a5;
    --border:#dfe9f5;
    width:100%;
    color:var(--text);
    font-family:Rajdhani,Arial,sans-serif;
}

.fk-page-head {
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    gap:30px;
    padding:8px 6px 20px;
}

.fk-breadcrumb {
    margin-bottom:8px;
    color:#56739a;
    font-size:14px;
    font-weight:600;
}

.fk-breadcrumb span {
    margin:0 8px;
    color:#9aacbf;
}

.fk-page-head h1 {
    margin:0;
    color:#06111f;
    font-size:clamp(38px,4vw,58px);
    line-height:.95;
    letter-spacing:-1.5px;
    font-weight:800;
}

.fk-page-head p {
    margin:10px 0 0;
    color:#5876a4;
    font-size:18px;
    font-weight:500;
}

.fk-head-quote {
    position:relative;
    padding-right:55px;
    color:#6480ad;
    font-size:17px;
    line-height:1.3;
    font-weight:600;
    font-style:italic;
    text-align:right;
}

.fk-head-bars {
    position:absolute;
    right:0;
    top:0;
    color:#dce8f6;
    font-size:42px;
}

.fk-category-row {
    display:flex;
    gap:7px;
    align-items:center;
    margin-bottom:26px;
    overflow-x:auto;
}

.fk-category {
    flex:0 0 auto;
    height:48px;
    min-width:145px;
    padding:0 18px;
    border:1px solid var(--border);
    border-radius:7px;
    background:#fff;
    color:#23426d;
    font:inherit;
    font-size:15px;
    font-weight:700;
    cursor:pointer;
}

.fk-category.active {
    border-color:var(--green);
    background:linear-gradient(135deg,#00b960,#00d77a);
    color:#fff;
    box-shadow:0 8px 20px rgba(0,200,111,.15);
}

.fk-season {
    margin-left:auto;
    flex:0 0 135px;
    height:48px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid var(--border);
    border-radius:7px;
    background:#fff;
    color:#29466d;
    font-weight:700;
}

.fk-rank-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:20px;
}
.fk-league-card {
    min-width:0;
    overflow:hidden;
    border:1px solid var(--border);
    border-radius:9px;
    background:#fff;
    box-shadow:0 8px 25px rgba(25,72,120,.04);
}

.fk-card-head {
    min-height:88px;
    padding:18px 18px 12px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}

.fk-league-identity {
    min-width:0;
    display:flex;
    align-items:center;
    gap:13px;
}

.fk-league-logo {
    flex:0 0 52px;
    width:52px;
    height:52px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:13px;
    background:linear-gradient(145deg,#eef5ff,#f8fbff);
    color:#143b78;
    font-size:17px;
    font-weight:900;
}

.fk-league-identity > div:last-child {
    min-width:0;
}

.fk-league-identity h2 {
    margin:0 0 3px;
    overflow:hidden;
    color:#081426;
    font-size:20px;
    line-height:1.05;
    font-weight:800;
    white-space:nowrap;
    text-overflow:ellipsis;
}

.fk-league-identity p {
    margin:0;
    color:#7890af;
    font-size:14px;
    font-weight:600;
}

.fk-view-all {
    flex:0 0 auto;
    color:var(--green-dark);
    font-size:14px;
    font-weight:700;
    text-decoration:none;
}

.fk-card-tabs {
    display:grid;
    grid-template-columns:1.25fr .8fr 1fr .65fr;
    padding:0 12px;
}

.fk-card-tabs button {
    height:41px;
    border:0;
    border-bottom:2px solid transparent;
    background:#f5f9fd;
    color:#4f6e98;
    font:inherit;
    font-size:12px;
    font-weight:700;
}

.fk-card-tabs button.active {
    border-bottom-color:var(--green);
    background:#eafff3;
    color:#00a75c;
}

.fk-card-tabs button:disabled {
    opacity:1;
}

.fk-mini-table {
    padding:7px 12px 13px;
    overflow:hidden;
}

.fk-table-head,
.fk-table-row {
    display:grid;
    grid-template-columns:
        30px minmax(90px,1fr)
        27px 27px 27px 27px 34px 38px;
    align-items:center;
    column-gap:1px;
}

.fk-table-head {
    min-height:32px;
    color:#6480a7;
    font-size:11px;
    font-weight:800;
}

.fk-table-head span:not(:nth-child(2)),
.fk-table-row > span:not(.fk-team),
.fk-table-row > strong {
    text-align:center;
}

.fk-table-row {
    min-height:47px;
    border-top:1px solid #edf2f8;
    color:#193555;
    font-size:13px;
    font-weight:600;
}

.fk-pos {
    width:24px;
    height:24px;
    margin:auto;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:#12b784;
    color:#fff;
    font-weight:800;
}

.fk-team {
    min-width:0;
    display:flex;
    align-items:center;
    gap:8px;
}

.fk-team img,
.fk-team i {
    flex:0 0 25px;
    width:25px;
    height:25px;
    object-fit:contain;
}

.fk-team b {
    min-width:0;
    overflow:hidden;
    color:#142f50;
    font-size:13px;
    font-weight:700;
    white-space:nowrap;
    text-overflow:ellipsis;
}

.fk-table-row > strong {
    color:#07172d;
    font-weight:900;
}

.fk-card-loading {
    min-height:340px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:30px;
    color:#7790ae;
    font-weight:700;
}

.fk-league-card[hidden] {
    display:none !important;
}
.fk-featured {
    margin-top:24px;
}

.fk-featured h2 {
    margin:0 0 12px;
    color:#07172d;
    font-size:20px;
    font-weight:800;
}

.fk-featured-row {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
}

.fk-featured-card {
    min-width:0;
    min-height:86px;
    padding:13px;
    display:flex;
    align-items:center;
    gap:12px;
    border:1px solid var(--border);
    border-radius:8px;
    background:#fff;
    text-decoration:none;
}

.fk-featured-logo {
    flex:0 0 43px;
    width:43px;
    height:43px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:10px;
    background:#f1f6fc;
    color:#153d76;
    font-size:13px;
    font-weight:900;
}

.fk-featured-card div:last-child {
    min-width:0;
}

.fk-featured-card strong,
.fk-featured-card small,
.fk-featured-card span {
    display:block;
}

.fk-featured-card strong {
    overflow:hidden;
    color:#102844;
    font-size:14px;
    white-space:nowrap;
    text-overflow:ellipsis;
}

.fk-featured-card small {
    margin:2px 0;
    color:#7890ae;
    font-size:11px;
}

.fk-featured-card span {
    color:var(--green-dark);
    font-size:12px;
    font-weight:700;
}

.fk-bottom-banner {
    min-height:100px;
    margin-top:25px;
    padding:22px 32px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:30px;
    border-radius:8px;
    background:
        radial-gradient(
            circle at 65% 20%,
            rgba(114,35,255,.35),
            transparent 32%
        ),
        linear-gradient(105deg,#03141d,#07121d 55%,#031017);
    color:#fff;
    text-decoration:none;
}

.fk-bottom-banner strong,
.fk-bottom-banner span {
    display:block;
}

.fk-bottom-banner strong {
    margin-bottom:4px;
    font-size:23px;
    font-weight:800;
}

.fk-bottom-banner em {
    color:#00e27e;
    font-style:normal;
}

.fk-bottom-banner span {
    color:#d2dce8;
    font-size:14px;
}

.fk-bottom-banner b {
    min-width:200px;
    padding:14px 25px;
    border-radius:5px;
    background:#00d672;
    color:#fff;
    text-align:center;
    font-size:16px;
}

@media (max-width:1100px) {
    .fk-rank-grid {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media (max-width:760px) {
    .fk-page-head {
        align-items:flex-start;
    }

    .fk-head-quote {
        display:none;
    }

    .fk-page-head h1 {
        font-size:40px;
    }

    .fk-page-head p {
        font-size:15px;
    }

    .fk-category-row {
        margin-bottom:18px;
        padding-bottom:5px;
    }

    .fk-category {
        min-width:auto;
        height:43px;
        padding:0 15px;
    }

    .fk-season {
        display:none;
    }

    .fk-rank-grid {
        grid-template-columns:1fr;
        gap:14px;
    }

    .fk-card-head {
        padding-left:13px;
        padding-right:13px;
    }

    .fk-league-logo {
        flex-basis:44px;
        width:44px;
        height:44px;
    }

    .fk-league-identity h2 {
        font-size:18px;
    }

    .fk-card-tabs {
        padding:0 7px;
    }

    .fk-card-tabs button {
        font-size:11px;
    }

    .fk-mini-table {
        padding-left:7px;
        padding-right:7px;
        overflow-x:auto;
    }

    .fk-table-head,
    .fk-table-row {
        min-width:510px;
    }

    .fk-featured-row {
        display:flex;
        overflow-x:auto;
    }

    .fk-featured-card {
        flex:0 0 210px;
    }

    .fk-bottom-banner {
        padding:20px;
        align-items:flex-start;
        flex-direction:column;
    }

    .fk-bottom-banner strong {
        font-size:20px;
    }

    .fk-bottom-banner b {
        width:100%;
        min-width:0;
    }
}

/* FOOTBALL RANKINGS DESKTOP WIDTH - FINAL */
.fk-rank-root {
    width: 100%;
    max-width: 1210px;
    margin-left: auto;
    margin-right: auto;
}

/* FOOTBALL RANKINGS 1440 WIDTH - FINAL */
.fk-rank-root {
    width: 100%;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
}

/* REAL COMPETITION LOGOS - FINAL */

.fk-league-logo {
    background: transparent;
    overflow: hidden;
}

.fk-league-logo img {
    display: block;
    width: 46px;
    height: 46px;
    max-width: 100%;
    object-fit: contain;
}

.fk-featured-logo {
    background: transparent;
    overflow: hidden;
}

.fk-featured-logo img {
    display: block;
    width: 40px;
    height: 40px;
    max-width: 100%;
    object-fit: contain;
}

/* Old card controls are intentionally disabled */
.fk-card-tabs,
.fk-season {
    display: none !important;
}

.fk-card-head {
    padding-bottom: 15px;
}

.fk-mini-table {
    padding-top: 0;
}

.fk-table-head {
    border-top: 1px solid #edf2f8;
}

/* =========================================================
   MOBILE STANDINGS - COMPACT + POINTS VISIBLE
   ========================================================= */

@media (max-width: 760px) {

    /*
     * Remove old desktop-table horizontal width.
     * Mobile shows:
     * # | Team | J | SG | PTS
     */
    .fk-mini-table {
        width: 100%;
        overflow: visible;
        padding-left: 10px;
        padding-right: 10px;
    }

    .fk-table-head,
    .fk-table-row {
        width: 100%;
        min-width: 0;

        grid-template-columns:
            32px
            minmax(0, 1fr)
            28px
            36px
            38px;

        column-gap: 3px;
    }

    /*
     * Original columns:
     * 1 # 
     * 2 Time
     * 3 J
     * 4 V
     * 5 E
     * 6 D
     * 7 SG
     * 8 PTS
     *
     * Hide V / E / D on mobile.
     */
    .fk-table-head > :nth-child(4),
    .fk-table-head > :nth-child(5),
    .fk-table-head > :nth-child(6),
    .fk-table-row > :nth-child(4),
    .fk-table-row > :nth-child(5),
    .fk-table-row > :nth-child(6) {
        display: none;
    }

    .fk-table-head {
        min-height: 34px;
        font-size: 10px;
    }

    .fk-table-row {
        min-height: 48px;
        font-size: 12px;
    }

    .fk-team {
        min-width: 0;
        gap: 7px;
        overflow: hidden;
    }

    .fk-team img,
    .fk-team i {
        flex: 0 0 25px;
        width: 25px;
        height: 25px;
    }

    .fk-team b {
        display: block;
        min-width: 0;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;

        font-size: 12px;
    }

    .fk-pos {
        width: 23px;
        height: 23px;
        font-size: 11px;
    }

    /* J */
    .fk-table-head > :nth-child(3),
    .fk-table-row > :nth-child(3) {
        text-align: center;
    }

    /* SG */
    .fk-table-head > :nth-child(7),
    .fk-table-row > :nth-child(7) {
        text-align: center;
    }

    /* PTS — strongest value */
    .fk-table-head > :nth-child(8),
    .fk-table-row > :nth-child(8) {
        text-align: right;
    }

    .fk-table-row > :nth-child(8) {
        color: #07172d;
        font-weight: 900;
    }
}

/* =========================================================
   MOBILE STANDINGS COLUMNS ALIGNMENT - FINAL
   ========================================================= */

@media (max-width: 760px) {

    .fk-table-head,
    .fk-table-row {
        width: 100%;
        min-width: 0;

        grid-template-columns:
            30px
            minmax(0, 1fr)
            32px
            38px
            38px;

        column-gap: 5px;
        padding-left: 0;
        padding-right: 6px;
    }

    /* Hide V / E / D */
    .fk-table-head > :nth-child(4),
    .fk-table-head > :nth-child(5),
    .fk-table-head > :nth-child(6),
    .fk-table-row > :nth-child(4),
    .fk-table-row > :nth-child(5),
    .fk-table-row > :nth-child(6) {
        display: none;
    }

    /* J */
    .fk-table-head > :nth-child(3),
    .fk-table-row > :nth-child(3),

    /* SG */
    .fk-table-head > :nth-child(7),
    .fk-table-row > :nth-child(7),

    /* PTS */
    .fk-table-head > :nth-child(8),
    .fk-table-row > :nth-child(8) {
        text-align: center !important;
        justify-self: stretch;
    }

    .fk-table-row > :nth-child(8) {
        font-weight: 900;
    }

    .fk-team {
        padding-right: 4px;
    }
}
