/* Heritage Dashboard - Mythic exact layout v1 */
:root {
    --bg: #050403;
    --panel: rgba(10, 8, 5, 0.92);
    --panel2: rgba(20, 15, 9, 0.90);
    --gold: #c8943f;
    --gold2: #ffe0a0;
    --text: #f2e8d0;
    --muted: #ad9d80;
    --border: rgba(200, 148, 63, 0.42);
    --green: #68c774;
    --red: #e06a54;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: #050403;
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
}

body {
    padding-top: 78px;
}

a {
    color: var(--gold2);
    text-decoration: none;
}

.hm-topbar {
    position: fixed;
    inset: 0 0 auto 0;
    height: 78px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.91);
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 260px 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 0 52px;
    box-shadow: 0 14px 42px rgba(0,0,0,.55);
}

.hm-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--gold2);
}

.hm-brand-mark {
    width: 48px;
    height: 48px;
    border: 2px solid var(--gold);
    display: grid;
    place-items: center;
    color: var(--gold2);
    font-size: 28px;
    font-weight: 700;
    background: rgba(200,148,63,.08);
}

.hm-brand-text {
    font-size: 26px;
    line-height: .85;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold2);
}

.hm-brand-text small {
    display: block;
    font-size: 10px;
    letter-spacing: 5px;
    color: var(--muted);
    margin-top: 6px;
}

.hm-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
}

.hm-nav a {
    color: var(--text);
    padding: 29px 0 25px;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: .18s ease;
}

.hm-nav a:hover,
.hm-nav a.active {
    color: var(--gold2);
    border-bottom-color: var(--gold);
    text-shadow: 0 0 16px rgba(200,148,63,.30);
}

.hm-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hm-lang {
    display: flex;
    gap: 6px;
    margin-right: 6px;
}

.hm-lang a {
    color: var(--muted);
    font-size: 12px;
}

.hm-lang a.active {
    color: var(--gold2);
}

.hm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 118px;
    min-height: 44px;
    padding: 12px 24px;
    border: 1px solid var(--border);
    color: var(--gold2);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(0,0,0,.54);
    transition: .18s ease;
}

.hm-btn:hover {
    transform: translateY(-1px);
    border-color: var(--gold2);
    box-shadow: 0 0 24px rgba(200,148,63,.25);
}

.hm-btn.gold {
    background: linear-gradient(180deg, #be8532 0%, #6b4318 100%);
    border-color: var(--gold);
}

.hm-page {
    background:
        linear-gradient(rgba(0,0,0,.10), rgba(0,0,0,.72)),
        url("../img/heritage_dashboard_hero.png") center top / cover no-repeat;
    min-height: 650px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.hm-page::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0,0,0,.72), transparent 29%, transparent 71%, rgba(0,0,0,.72)),
        radial-gradient(circle at 50% 34%, transparent 0, rgba(0,0,0,.20) 46%, rgba(0,0,0,.70) 100%);
    pointer-events: none;
}

.hm-hero {
    position: relative;
    z-index: 2;
    min-height: 650px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 42px 20px 92px;
}

.hm-hero-inner {
    max-width: 820px;
    text-shadow: 0 6px 24px #000;
}

.hm-title {
    margin: 0;
    color: #f3f0e8;
    font-size: clamp(72px, 9vw, 128px);
    line-height: .84;
    letter-spacing: 8px;
    text-transform: uppercase;
    text-shadow:
        0 4px 0 rgba(0,0,0,.65),
        0 0 26px rgba(255,255,255,.18);
}

.hm-title small {
    display: block;
    color: var(--gold);
    font-size: clamp(27px, 4vw, 46px);
    letter-spacing: 15px;
    margin-top: 24px;
}

.hm-tagline {
    margin: 34px auto 20px;
    color: var(--gold2);
    font-size: clamp(22px, 3vw, 34px);
    letter-spacing: 7px;
    text-transform: uppercase;
}

.hm-rate {
    color: #fff4d2;
    font-size: 23px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hm-desc {
    margin: 9px auto 32px;
    max-width: 620px;
    color: #fff;
    font-size: 15px;
    line-height: 1.65;
    text-transform: uppercase;
}

.hm-hero-actions {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}

.hm-feature-strip {
    position: relative;
    z-index: 5;
    max-width: 1210px;
    margin: -62px auto 34px;
    padding: 0 22px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.hm-feature {
    min-height: 132px;
    background: rgba(8, 7, 5, 0.93);
    border: 1px solid var(--border);
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 18px;
    align-items: center;
    padding: 26px;
    box-shadow: 0 22px 60px rgba(0,0,0,.42);
}

.hm-icon {
    width: 60px;
    height: 60px;
    border: 1px solid var(--border);
    background: rgba(200,148,63,.08);
    display: grid;
    place-items: center;
    color: var(--gold2);
    font-size: 30px;
}

.hm-feature h3,
.hm-card h3 {
    margin: 0 0 8px;
    color: var(--gold2);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-size: 18px;
}

.hm-feature p,
.hm-card p,
.hm-card li {
    margin: 0;
    color: var(--text);
    line-height: 1.5;
}

.hm-main {
    max-width: 1210px;
    margin: 0 auto;
    padding: 0 22px 44px;
}

.hm-grid {
    display: grid;
    gap: 18px;
}

.hm-grid-3 {
    grid-template-columns: 1.05fr 1.05fr 1fr;
}

.hm-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.hm-card {
    background: linear-gradient(180deg, rgba(17,13,8,.96), rgba(6,5,4,.94));
    border: 1px solid var(--border);
    padding: 26px;
    box-shadow: 0 22px 70px rgba(0,0,0,.48);
}

.hm-card ul {
    padding-left: 19px;
    margin: 14px 0 28px;
}

.hm-card li {
    margin: 11px 0;
}

.hm-card li::marker {
    color: var(--gold);
}

.hm-news-item {
    color: var(--text);
    text-decoration: none;
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 15px;
    margin: 15px 0;
}

.hm-news-img,
.hm-card-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border: 1px solid var(--border);
}

.hm-news-img {
    height: 72px;
}

.hm-news-title {
    color: var(--gold2);
    font-weight: 700;
}

.hm-news-date {
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
}

.hm-table {
    width: 100%;
    border-collapse: collapse;
}

.hm-table th,
.hm-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(200,148,63,.16);
    text-align: left;
}

.hm-table th {
    color: var(--gold2);
    text-transform: uppercase;
    font-size: 12px;
}

.hm-status-row {
    display: flex;
    justify-content: space-between;
    padding: 13px 0;
    border-bottom: 1px solid rgba(200,148,63,.16);
}

.hm-online { color: #9ff0a6; }
.hm-offline { color: #ffafa0; }

.hm-server-card {
    text-align: center;
}

.hm-server-card .hm-card-img {
    margin-bottom: 16px;
}

.hm-footer {
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,.72);
    max-width: 1210px;
    margin: 0 auto;
    padding: 42px 22px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
}

.hm-footer-logo {
    color: var(--gold2);
    font-size: 36px;
    line-height: .82;
    letter-spacing: 4px;
}

.hm-footer-logo small {
    font-size: 12px;
    letter-spacing: 5px;
}

.hm-footer a {
    display: block;
    color: var(--text);
    margin: 8px 0;
}

.hm-login-panel {
    margin-top: 28px;
    display: none;
}

.hm-login-panel.open {
    display: block;
}

.hm-login-form {
    max-width: 460px;
    margin: 0 auto;
    background: rgba(8,7,5,.92);
    border: 1px solid var(--border);
    padding: 24px;
    text-align: left;
}

.hm-login-form label {
    display: block;
    color: var(--gold2);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    margin: 12px 0 6px;
}

.hm-login-form input {
    width: 100%;
    background: rgba(0,0,0,.56);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 13px 15px;
}

.hm-error {
    background: rgba(96, 22, 14, .88);
    border: 1px solid rgba(214,91,74,.68);
    color: #ffe1dc;
    padding: 12px 14px;
    margin-bottom: 12px;
}

@media (max-width: 1100px) {
    body {
        padding-top: 0;
    }

    .hm-topbar {
        position: relative;
        height: auto;
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .hm-nav {
        justify-content: flex-start;
        overflow-x: auto;
        gap: 18px;
    }

    .hm-nav a {
        padding: 10px 0;
    }

    .hm-actions {
        justify-content: flex-start;
    }

    .hm-feature-strip,
    .hm-grid-3,
    .hm-grid-4,
    .hm-footer {
        grid-template-columns: 1fr;
    }

    .hm-feature-strip {
        margin: 0 auto 28px;
    }

    .hm-title {
        font-size: 62px;
    }

    .hm-page,
    .hm-hero {
        min-height: 560px;
    }
}


/* Dashboard latest news polish */
.hm-news-list {
    display: grid;
    gap: 14px;
    margin-top: 12px;
}

.hm-news-item {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 14px;
    align-items: start;
    padding: 10px;
    border: 1px solid rgba(200, 148, 63, 0.22);
    background: linear-gradient(180deg, rgba(20, 14, 7, 0.74), rgba(4, 4, 3, 0.52));
    color: var(--text);
    text-decoration: none;
    transition: .18s ease;
}

.hm-news-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 224, 160, 0.55);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
}

.hm-news-img {
    width: 96px;
    height: 72px;
    object-fit: cover;
    border: 1px solid rgba(200, 148, 63, 0.42);
    background: rgba(0,0,0,.35);
}

.hm-news-body {
    min-width: 0;
}

.hm-news-title {
    color: var(--gold2);
    font-weight: 700;
    font-size: 15px;
    line-height: 1.22;
    letter-spacing: .3px;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-transform: none;
}

.hm-news-item p {
    margin: 0 0 7px;
    color: rgba(242, 232, 208, .86);
    font-size: 13px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.hm-news-date {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .4px;
}

.hm-news-empty {
    padding: 16px;
    border: 1px solid rgba(200, 148, 63, 0.22);
    background: rgba(0,0,0,.28);
    color: var(--muted);
    margin: 12px 0;
}

.hm-news-all {
    margin-top: 16px;
    width: 100%;
}

@media (max-width: 600px) {
    .hm-news-item {
        grid-template-columns: 82px 1fr;
    }

    .hm-news-img {
        width: 82px;
        height: 64px;
    }
}


/* Dashboard ranking carousel */
.hm-ranking-card {
    min-height: 580px;
}

.hm-ranking-carousel {
    margin-top: 10px;
}

.hm-ranking-page {
    display: none;
}

.hm-ranking-page.active {
    display: block;
}

.hm-ranking-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0 12px;
    border-bottom: 1px solid rgba(200,148,63,.20);
    margin-bottom: 8px;
}

.hm-ranking-head span {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
}

.hm-ranking-head strong {
    color: var(--gold2);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    text-align: right;
}

.hm-ranking-table {
    font-size: 13px;
}

.hm-ranking-table th,
.hm-ranking-table td {
    padding: 9px 8px;
}

.hm-ranking-table th:nth-child(1),
.hm-ranking-table td:nth-child(1) {
    width: 34px;
    text-align: center;
}

.hm-ranking-table th:nth-child(3),
.hm-ranking-table td:nth-child(3) {
    width: 82px;
    text-align: right;
}

.hm-ranking-name {
    color: var(--text);
    font-weight: 700;
    line-height: 1.15;
}

.hm-ranking-sub {
    color: var(--muted);
    font-size: 11px;
    margin-top: 2px;
    line-height: 1.15;
}

.hm-ranking-muted,
.hm-ranking-empty {
    color: var(--muted);
    padding: 16px;
    border: 1px solid rgba(200,148,63,.18);
    background: rgba(0,0,0,.24);
}

.hm-ranking-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 14px 0 4px;
    flex-wrap: wrap;
}

.hm-ranking-dots span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    border: 1px solid rgba(200,148,63,.55);
    background: rgba(0,0,0,.5);
    cursor: pointer;
}

.hm-ranking-dots span.active {
    background: var(--gold2);
    box-shadow: 0 0 12px rgba(255,224,160,.55);
}

.hm-ranking-full {
    width: 100%;
    margin-top: 14px;
}

/* Compact dashboard inside the shared Nightfall frame */
body.nf-unified .hm-page,
body.nf-unified .hm-hero {
    min-height: 0 !important;
}

body.nf-unified .hm-page {
    border: 1px solid rgba(168, 141, 78, .26);
    background-position: center 18%;
}

body.nf-unified .hm-hero {
    padding: 38px 24px 34px !important;
}

body.nf-unified .hm-hero-inner {
    width: min(100%, 720px);
    max-width: 720px;
}

body.nf-unified h1.hm-title {
    margin: 0 !important;
    font-size: clamp(38px, 6vw, 64px) !important;
    line-height: .92 !important;
    letter-spacing: .08em !important;
}

body.nf-unified h1.hm-title small {
    margin-top: 12px !important;
    font-size: clamp(16px, 2.4vw, 25px) !important;
    line-height: 1.08 !important;
    letter-spacing: .28em !important;
}

body.nf-unified .hm-tagline {
    margin: 22px auto 12px !important;
    font-size: clamp(15px, 2vw, 21px) !important;
    line-height: 1.25 !important;
    letter-spacing: .18em !important;
}

body.nf-unified .hm-rate {
    font-size: 15px !important;
    letter-spacing: .08em !important;
}

body.nf-unified .hm-desc {
    max-width: 580px;
    margin: 8px auto 20px !important;
    font-size: 11px !important;
    line-height: 1.55 !important;
}

body.nf-unified .hm-hero-actions {
    gap: 10px !important;
}

body.nf-unified .hm-hero-actions .hm-btn {
    min-width: 0 !important;
    min-height: 34px !important;
    padding: 8px 16px !important;
    font-size: 10px !important;
}

body.nf-unified .hm-feature-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin: 14px 0 18px !important;
}

body.nf-unified .hm-feature {
    min-width: 0 !important;
    min-height: 112px !important;
    grid-template-columns: 46px minmax(0, 1fr) !important;
    gap: 12px !important;
    padding: 16px !important;
}

body.nf-unified .hm-icon {
    width: 44px !important;
    height: 44px !important;
    font-size: 21px !important;
}

body.nf-unified .hm-feature h3,
body.nf-unified .hm-card h3 {
    font-size: 14px !important;
    line-height: 1.25 !important;
}

body.nf-unified .hm-feature p,
body.nf-unified .hm-card p,
body.nf-unified .hm-card li {
    font-size: 11px !important;
    overflow-wrap: anywhere;
}

body.nf-unified .hm-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.nf-unified .hm-grid-3 > :last-child {
    grid-column: 1 / -1;
}

body.nf-unified .hm-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.nf-unified .hm-card {
    min-width: 0 !important;
    padding: 18px !important;
}

body.nf-unified .hm-ranking-card {
    min-height: 0 !important;
}

body.nf-unified .hm-table,
body.nf-unified .hm-ranking-table {
    table-layout: fixed;
}

body.nf-unified .hm-table th,
body.nf-unified .hm-table td,
body.nf-unified .hm-ranking-table th,
body.nf-unified .hm-ranking-table td {
    overflow-wrap: anywhere;
}

body.nf-unified .hm-footer {
    grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)) !important;
    gap: 22px !important;
    padding: 28px 18px !important;
}

@media (max-width: 920px) {
    body.nf-unified .hm-feature-strip,
    body.nf-unified .hm-grid-3,
    body.nf-unified .hm-grid-4,
    body.nf-unified .hm-footer {
        grid-template-columns: 1fr !important;
    }

    body.nf-unified .hm-grid-3 > :last-child {
        grid-column: auto;
    }
}

@media (max-width: 560px) {
    body.nf-unified .hm-hero {
        padding: 28px 14px !important;
    }

    body.nf-unified h1.hm-title {
        font-size: 34px !important;
    }

    body.nf-unified h1.hm-title small {
        font-size: 14px !important;
        letter-spacing: .18em !important;
    }

    body.nf-unified .hm-feature {
        grid-template-columns: 38px minmax(0, 1fr) !important;
        padding: 13px !important;
    }

    body.nf-unified .hm-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 18px !important;
    }
}
/* Homepage community invitations */
.hm-social-invites {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 14px auto 0;
}
.hm-social-invite {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 190px;
    padding: 10px 14px;
    border: 1px solid rgba(196, 155, 68, .55);
    color: #e8dfc8;
    text-decoration: none;
    background: linear-gradient(180deg, rgba(42, 43, 38, .96), rgba(20, 21, 18, .96));
    box-shadow: inset 0 1px rgba(255, 255, 255, .06), 0 5px 18px rgba(0, 0, 0, .28);
    transition: transform .2s ease, border-color .2s ease, color .2s ease;
}
.hm-social-invite:hover {
    transform: translateY(-1px);
    border-color: #d5ad54;
    color: #fff4d1;
}
.hm-social-invite svg {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    fill: currentColor;
}
.hm-social-invite span {
    display: flex;
    flex-direction: column;
    text-align: left;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.hm-social-invite small {
    margin-top: 2px;
    color: rgba(232, 223, 200, .62);
    font: 400 9px/1.2 Arial, Helvetica, sans-serif;
    letter-spacing: .4px;
    text-transform: none;
}
.hm-social-invite.discord { color: #b8bdff; }
.hm-social-invite.telegram { color: #80d4f4; }
body.nf-unified .hm-social-invites { margin-top: 12px; }
@media (max-width: 520px) {
    .hm-social-invite {
        width: 100%;
        min-width: 0;
    }
}
.hm-menu-icon-image {
    display: block;
    width: 22px;
    height: 22px;
    object-fit: contain;
}
/* Large illustrated Play Now card */
.hm-play-card {
    display: inline-flex;
    align-items: center;
    width: min(100%, 430px);
    min-height: 98px;
    padding: 10px 20px 10px 10px;
    gap: 18px;
    color: #ead8a0;
    text-decoration: none;
    border: 1px solid rgba(196, 155, 68, .72);
    background: linear-gradient(180deg, rgba(45, 45, 39, .98), rgba(18, 19, 16, .98));
    box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 7px 22px rgba(0, 0, 0, .35);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.hm-play-card:hover,
.hm-play-card:focus-visible {
    color: #ffe6a0;
    border-color: #d6aa4c;
    box-shadow: inset 0 1px rgba(255, 255, 255, .12), 0 9px 26px rgba(0, 0, 0, .45), 0 0 12px rgba(196, 155, 68, .14);
    transform: translateY(-1px);
}

.hm-play-card img {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    display: block;
    object-fit: cover;
    border: 1px solid rgba(196, 155, 68, .58);
    box-shadow: 0 0 12px rgba(0, 0, 0, .45);
}

.hm-play-card > span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    text-align: left;
    font: 700 17px/1.2 Georgia, "Times New Roman", serif;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.hm-play-card small {
    margin-top: 7px;
    color: #aaa28d;
    font: 400 10px/1.35 Arial, Helvetica, sans-serif;
    letter-spacing: .25px;
    text-transform: none;
}

body.nf-unified .hm-hero-actions .hm-play-card {
    width: min(100%, 430px);
    min-height: 98px;
    padding: 10px 20px 10px 10px;
}

@media (max-width: 520px) {
    .hm-play-card,
    body.nf-unified .hm-hero-actions .hm-play-card {
        width: 100%;
        min-height: 84px;
        padding: 8px 12px 8px 8px;
        gap: 12px;
    }

    .hm-play-card img {
        width: 66px;
        height: 66px;
        flex-basis: 66px;
    }

    .hm-play-card > span {
        font-size: 14px;
        letter-spacing: 1.2px;
    }
}