:root {
    --bg: #07060a;
    --panel: rgba(13, 15, 24, 0.86);
    --panel-strong: rgba(20, 16, 30, 0.94);
    --line: #6d49b7;
    --gold: #d8a85d;
    --purple: #8a4dff;
    --blue: #66c7ff;
    --text: #f3eefc;
    --muted: #b9b2c8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: var(--site-font, "Segoe UI", Arial, sans-serif);
    background:
        radial-gradient(circle at 25% 0%, rgba(138, 77, 255, 0.28), transparent 32%),
        radial-gradient(circle at 85% 10%, rgba(216, 168, 93, 0.18), transparent 34%),
        linear-gradient(180deg, var(--bg) 0%, #07060a 72%);
}

body.site-theme-light {
    background:
        radial-gradient(circle at 25% 0%, rgba(138, 77, 255, 0.14), transparent 32%),
        radial-gradient(circle at 85% 10%, rgba(216, 168, 93, 0.12), transparent 34%),
        linear-gradient(180deg, #faf8ff 0%, var(--bg) 72%);
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    min-height: 82px;
    padding: 16px 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid rgba(216, 168, 93, 0.42);
    background: color-mix(in srgb, var(--panel) 84%, transparent);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.38);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid var(--gold);
    background: linear-gradient(145deg, var(--purple), var(--panel));
    color: #fff;
    font-family: Georgia, serif;
    font-weight: 800;
    box-shadow: 0 0 18px rgba(138, 77, 255, 0.42);
}

.brand strong {
    display: block;
    font-family: Georgia, serif;
    font-size: 25px;
}

.brand small {
    display: block;
    margin-top: 2px;
    color: var(--blue);
    font-size: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.main-nav a {
    padding: 10px 14px;
    border: 1px solid transparent;
    color: var(--muted);
    font-weight: 700;
}

.main-nav a:hover,
.main-nav a.active {
    color: #fff;
    border-color: rgba(216, 168, 93, 0.72);
    background: linear-gradient(180deg, color-mix(in srgb, var(--purple) 30%, transparent), var(--panel));
}

body.site-menu-top-pills .main-nav a {
    border-color: rgba(216, 168, 93, 0.28);
    background: rgba(255, 255, 255, 0.035);
}

body.site-menu-underlined .main-nav a {
    padding-inline: 6px;
    border-width: 0 0 2px;
    background: transparent;
}

body.site-menu-underlined .main-nav a:hover,
body.site-menu-underlined .main-nav a.active {
    border-color: var(--gold);
    background: transparent;
}

.page {
    width: min(1180px, calc(100% - 40px));
    margin: 34px auto 70px;
}

.page h1 {
    margin: 0 0 12px;
    font-family: Georgia, serif;
    font-size: 42px;
    text-shadow: 0 0 14px rgba(102, 199, 255, 0.55);
}

.page p {
    color: var(--muted);
    font-size: 17px;
}

.section-kicker {
    margin: 0 0 10px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.hero-panel,
.content-panel {
    margin-bottom: 24px;
    padding: 32px;
    border: 1px solid rgba(216, 168, 93, 0.32);
    background: linear-gradient(145deg, color-mix(in srgb, var(--panel) 92%, transparent), color-mix(in srgb, var(--bg) 90%, transparent));
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.hero-panel {
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        linear-gradient(90deg, rgba(8, 8, 14, 0.9), rgba(8, 8, 14, 0.45)),
        radial-gradient(circle at 75% 35%, color-mix(in srgb, var(--purple) 38%, transparent), transparent 34%),
        linear-gradient(145deg, var(--panel), var(--bg));
}

.hero-panel h1 {
    max-width: 780px;
    margin-bottom: 14px;
    font-size: 56px;
}

.hero-panel p,
.content-panel > p {
    max-width: 780px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.primary-link,
.secondary-link {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    border: 1px solid rgba(216, 168, 93, 0.75);
    font-weight: 800;
}

.primary-link {
    color: #fff;
    background: linear-gradient(180deg, var(--purple), color-mix(in srgb, var(--purple) 45%, #000));
}

.secondary-link {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 0;
    font-family: Georgia, serif;
    font-size: 30px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.news-card {
    display: grid;
    gap: 9px;
    min-height: 150px;
    padding: 18px;
    border: 1px solid rgba(109, 73, 183, 0.55);
    background: color-mix(in srgb, var(--bg) 72%, transparent);
}

.news-card:hover {
    border-color: rgba(216, 168, 93, 0.78);
    transform: translateY(-1px);
}

.news-card span {
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
}

.news-card strong {
    font-family: Georgia, serif;
    font-size: 21px;
}

.news-card small {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.site-footer {
    padding: 24px;
    text-align: center;
    color: var(--muted);
    border-top: 1px solid rgba(216, 168, 93, 0.25);
    background: color-mix(in srgb, var(--panel) 72%, transparent);
}

body.site-border-hidden .site-header,
body.site-border-hidden .brand-mark,
body.site-border-hidden .main-nav a,
body.site-border-hidden .hero-panel,
body.site-border-hidden .content-panel,
body.site-border-hidden .primary-link,
body.site-border-hidden .secondary-link,
body.site-border-hidden .news-card,
body.site-border-hidden .site-footer {
    border-color: transparent;
}

body.site-shadow-disabled .site-header,
body.site-shadow-disabled .hero-panel,
body.site-shadow-disabled .content-panel {
    box-shadow: none;
}

@media (max-width: 820px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .main-nav {
        justify-content: flex-start;
    }

    .page h1 {
        font-size: 32px;
    }

    .hero-panel,
    .content-panel {
        padding: 22px;
    }

    .hero-panel h1 {
        font-size: 36px;
    }

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

/* =========================================================
   Mythoria2 Public Ranking V1
   ========================================================= */

.ranking-page-v1 {
    width: 100%;
}

.ranking-hero,
.ranking-card {
    border: 1px solid rgba(110,130,160,.18);
    background: rgba(255,255,255,.92);
    border-radius: 16px;
}

.ranking-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 26px;
    margin-bottom: 18px;
}

.ranking-kicker {
    display: block;
    margin-bottom: 6px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .18em;
    opacity: .55;
}

.ranking-hero h1 {
    margin: 0 0 6px;
    font-size: 25px;
}

.ranking-hero p {
    margin: 0;
    opacity: .62;
    font-size: 12px;
}

.ranking-total {
    min-width: 85px;
    padding: 11px 15px;
    text-align: center;
    border: 1px solid rgba(110,130,160,.18);
    border-radius: 12px;
}

.ranking-total span {
    display: block;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .14em;
    opacity: .55;
}

.ranking-total strong {
    display: block;
    margin-top: 3px;
    font-size: 20px;
}

.ranking-card {
    padding: 12px 16px;
}

.ranking-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.ranking-table th {
    padding: 9px 10px;
    text-align: left;
    font-size: 8px;
    letter-spacing: .05em;
    opacity: .55;
    white-space: nowrap;
}

.ranking-table td {
    padding: 8px 10px;
    border-top: 1px solid rgba(100,120,150,.12);
    vertical-align: middle;
    white-space: nowrap;
}

.ranking-character {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ranking-character-icon {
    display: inline-flex;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    overflow: hidden;
    border-radius: 7px;
    border: 1px solid rgba(100,120,150,.16);
}

.ranking-character-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-empire {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ranking-empire img {
    width: 20px;
    height: 13px;
    object-fit: cover;
    border-radius: 2px;
}

.ranking-position,
.ranking-level,
.ranking-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    font-weight: 800;
}

.ranking-position {
    min-width: 32px;
    padding: 4px 6px;
}

.ranking-position.is-top {
    background: rgba(190,144,49,.10);
    border: 1px solid rgba(190,144,49,.22);
    color: #9d721b;
}

.ranking-level {
    padding: 4px 7px;
    border: 1px solid rgba(190,144,49,.25);
    background: rgba(190,144,49,.07);
}

.ranking-status {
    gap: 5px;
    padding: 4px 7px;
    font-size: 9px;
    border: 1px solid transparent;
}

.ranking-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.ranking-status.is-online {
    color: #16a765;
    background: rgba(22,167,101,.08);
    border-color: rgba(22,167,101,.18);
}

.ranking-status.is-online i {
    box-shadow: 0 0 6px currentColor;
}

.ranking-status.is-offline {
    color: #7c8798;
    background: rgba(82,96,116,.06);
    border-color: rgba(82,96,116,.12);
}

.ranking-status.is-unknown {
    color: #a87917;
}

.ranking-warning,
.ranking-empty {
    padding: 14px;
    font-size: 11px;
}

.ranking-warning {
    margin-bottom: 15px;
    border: 1px solid rgba(190,144,49,.25);
    background: rgba(255,242,208,.60);
    border-radius: 10px;
}

.ranking-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    font-size: 11px;
}

.ranking-pagination a {
    padding: 7px 10px;
    border-radius: 7px;
    text-decoration: none;
}


/* =========================================================
   MYTHORIA2 RANKING V2
   ========================================================= */

.ranking-page-v2 {
    width: 100%;
    max-width: 1080px;
    margin: 32px auto 60px;
    padding: 0 18px;
    box-sizing: border-box;
}

.ranking-v2-panel {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border: 1px solid #7d5523;
    border-radius: 8px;
    background:
        radial-gradient(
            circle at 50% 0,
            rgba(122,65,20,.17),
            transparent 38%
        ),
        linear-gradient(
            180deg,
            #19130f 0%,
            #100d0b 100%
        );
    box-shadow:
        0 18px 50px rgba(0,0,0,.45),
        inset 0 0 0 2px rgba(218,165,78,.05);
}

.ranking-v2-panel::before {
    content: "";
    position: absolute;
    inset: 6px;
    pointer-events: none;
    border: 1px solid rgba(222,169,79,.13);
}

.ranking-v2-title {
    position: relative;
    text-align: center;
    padding: 12px 10px 20px;
}

.ranking-v2-title > span {
    color: #b89452;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .34em;
}

.ranking-v2-title h1 {
    margin: 6px 0 4px;
    color: #f0d19a;
    font-family: Georgia, serif;
    font-size: 30px;
    text-shadow:
        0 2px 2px #000,
        0 0 14px rgba(182,116,32,.25);
}

.ranking-v2-title p {
    margin: 0;
    color: #8f8171;
    font-size: 11px;
}


/* Tabs */

.ranking-v2-tabs {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 22px;
}

.ranking-v2-tab {
    min-width: 150px;
    padding: 9px 18px;
    text-align: center;
    border: 1px solid #5d4428;
    border-radius: 5px;
    background:
        linear-gradient(
            180deg,
            #2b2117,
            #17110d
        );
    color: #9b8870;
    font-size: 11px;
    font-weight: 800;
}

.ranking-v2-tab.is-active {
    border-color: #b47b29;
    color: #f3d39a;
    background:
        linear-gradient(
            180deg,
            #6b1d17,
            #3a0d0b
        );
    box-shadow:
        inset 0 0 12px rgba(255,156,45,.10),
        0 0 0 1px rgba(0,0,0,.6);
}


/* Section title */

.ranking-v2-section-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 7px 0 17px;
}

.ranking-v2-section-title > span {
    flex: 1;
    height: 1px;
    background:
        linear-gradient(
            90deg,
            transparent,
            #8f622c
        );
}

.ranking-v2-section-title > span:last-child {
    background:
        linear-gradient(
            90deg,
            #8f622c,
            transparent
        );
}

.ranking-v2-section-title strong {
    color: #cf9d54;
    font-family: Georgia, serif;
    font-size: 13px;
    letter-spacing: .08em;
}

.ranking-v2-section-title small {
    margin-left: 5px;
    color: #6f6254;
    font-size: 8px;
}


/* Kings */

.ranking-v2-kings {
    position: relative;
    margin-bottom: 24px;
    padding: 16px 18px 22px;
    border: 1px solid rgba(147,99,41,.30);
    background:
        linear-gradient(
            180deg,
            rgba(63,44,26,.25),
            rgba(18,14,11,.65)
        );
}

.ranking-v2-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 16px;
    min-height: 210px;
}

.ranking-v2-king {
    position: relative;
    width: 155px;
    min-height: 150px;
    padding: 34px 12px 14px;
    box-sizing: border-box;
    text-align: center;
    border: 1px solid #5f4323;
    border-radius: 7px;
    background:
        linear-gradient(
            180deg,
            #281b12,
            #120d0a
        );
    box-shadow: 0 10px 22px rgba(0,0,0,.25);
}

.ranking-v2-king.is-rank-1 {
    min-height: 190px;
    padding-top: 42px;
    border-color: #d6a536;
    background:
        linear-gradient(
            180deg,
            #302315,
            #130e09
        );
    transform: translateY(-14px);
    box-shadow:
        0 0 0 1px rgba(255,205,80,.10),
        0 12px 30px rgba(0,0,0,.38);
}

.ranking-v2-king.is-rank-2 {
    border-color: #8b8176;
}

.ranking-v2-king.is-rank-3 {
    border-color: #945326;
}

.ranking-v2-medal {
    position: absolute;
    top: -9px;
    left: 50%;
    width: 22px;
    height: 22px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #d1a13b;
    color: #2a1807;
    font-size: 10px;
    font-weight: 900;
    box-shadow: 0 2px 8px #000;
}

.ranking-v2-king.is-rank-2 .ranking-v2-medal {
    background: #b4b2ae;
}

.ranking-v2-king.is-rank-3 .ranking-v2-medal {
    background: #a8663a;
}

.ranking-v2-crown {
    color: #d7a52d;
    font-size: 27px;
    line-height: 1;
    margin-bottom: 7px;
    text-shadow: 0 0 10px rgba(231,175,42,.25);
}

.ranking-v2-king-avatar {
    width: 52px;
    height: 52px;
    margin: 0 auto 9px;
    overflow: hidden;
    border: 2px solid #bf863b;
    border-radius: 50%;
    background: #0c0a08;
}

.ranking-v2-king-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-v2-king-name {
    display: block;
    overflow: hidden;
    color: #f0d6a3;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-v2-king-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: #907e66;
    font-size: 9px;
}

.ranking-v2-king-meta img {
    width: 20px;
    height: 13px;
    border-radius: 1px;
    object-fit: cover;
}

.ranking-v2-online-dot {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 7px;
    border: 1px solid rgba(40,195,117,.25);
    border-radius: 10px;
    background: rgba(24,167,98,.08);
    color: #35cf80;
    font-size: 8px;
    font-weight: 800;
}


/* Table */

.ranking-v2-list {
    position: relative;
    padding: 16px 16px 10px;
    border: 1px solid rgba(147,99,41,.30);
    background:
        linear-gradient(
            180deg,
            rgba(47,34,22,.25),
            rgba(13,10,8,.65)
        );
}

.ranking-v2-table-wrap {
    overflow-x: auto;
}

.ranking-v2-table {
    width: 100%;
    border-collapse: collapse;
    color: #b8aa99;
    font-size: 10px;
}

.ranking-v2-table th {
    padding: 9px 8px;
    text-align: left;
    border-top: 1px solid #664922;
    border-bottom: 1px solid #664922;
    background:
        linear-gradient(
            180deg,
            rgba(111,75,32,.22),
            rgba(50,33,18,.16)
        );
    color: #d2aa70;
    font-size: 8px;
    letter-spacing: .06em;
    white-space: nowrap;
}

.ranking-v2-table td {
    padding: 7px 8px;
    border-bottom: 1px solid rgba(111,80,44,.18);
    vertical-align: middle;
    white-space: nowrap;
}

.ranking-v2-table tbody tr {
    transition:
        background .15s ease,
        transform .15s ease;
}

.ranking-v2-table tbody tr:hover {
    background: rgba(143,92,28,.09);
}

.ranking-v2-table tbody tr.is-top-player {
    background: rgba(153,102,30,.055);
}

.ranking-v2-rank {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border: 1px solid #473521;
    border-radius: 50%;
    color: #b79972;
    font-weight: 900;
}

.ranking-v2-character {
    display: flex;
    align-items: center;
    gap: 7px;
}

.ranking-v2-character strong {
    color: #e2c99d;
    font-size: 10px;
}

.ranking-v2-avatar {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    overflow: hidden;
    border: 1px solid #6b4a26;
    border-radius: 50%;
}

.ranking-v2-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-v2-empire {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ranking-v2-empire img {
    width: 20px;
    height: 13px;
    object-fit: cover;
}

.ranking-v2-level {
    display: inline-block;
    padding: 3px 6px;
    border: 1px solid rgba(184,131,49,.35);
    border-radius: 5px;
    background: rgba(161,103,26,.08);
    color: #e4be78;
    font-size: 9px;
}

.ranking-v2-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 7px;
    border-radius: 10px;
    font-size: 8px;
    font-weight: 800;
}

.ranking-v2-status i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.ranking-v2-status.is-online {
    border: 1px solid rgba(42,192,114,.22);
    background: rgba(20,166,93,.08);
    color: #39d183;
}

.ranking-v2-status.is-online i {
    box-shadow: 0 0 6px currentColor;
}

.ranking-v2-status.is-offline {
    border: 1px solid rgba(130,120,105,.15);
    background: rgba(120,110,100,.05);
    color: #756d65;
}

.ranking-v2-status.is-unknown {
    color: #8e784e;
}


/* Footer / states */

.ranking-v2-warning,
.ranking-v2-empty {
    padding: 18px;
    text-align: center;
    color: #a98c62;
    font-size: 10px;
}

.ranking-v2-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
    color: #8a7761;
    font-size: 9px;
}

.ranking-v2-pagination a {
    padding: 6px 10px;
    border: 1px solid #60421e;
    border-radius: 5px;
    color: #d0a25e;
    text-decoration: none;
    background: #1e160f;
}


/* Responsive */

@media (max-width: 760px) {

    .ranking-page-v2 {
        padding: 0 10px;
    }

    .ranking-v2-panel {
        padding: 12px;
    }

    .ranking-v2-podium {
        gap: 7px;
    }

    .ranking-v2-king {
        width: 31%;
        padding-left: 6px;
        padding-right: 6px;
    }

    .ranking-v2-tabs {
        gap: 5px;
    }

    .ranking-v2-tab {
        min-width: 0;
        flex: 1;
    }

}

