/* EternalMC — Complex-inspired skin for the Eclipse Ghost theme */
:root {
    --color-core: #141519;
    --color-core-mixin: #4b4d55;
    --color-bg: #141519 !important;
    --font-heading: "Paytone One", "Work Sans", sans-serif;
    --et-bg: #141519;
    --et-bg-deep: #101115;
    --et-panel: #1d1f24;
    --et-panel-raised: #22242a;
    --et-panel-soft: #191b20;
    --et-border: #30323a;
    --et-border-soft: #25272e;
    --et-text: #f7f4ef;
    --et-muted: #b7b8bf;
    --et-red: var(--color-primary);
    --et-red-dark: color-mix(in srgb, #000 38%, var(--color-primary));
    --et-red-light: color-mix(in srgb, #fff 12%, var(--color-primary));
    --et-purple: #786cff;
    --et-blue: #43a9e8;
    --et-shadow: 0 5px 0 rgba(0, 0, 0, 0.32), 0 12px 26px rgba(0, 0, 0, 0.22);
}

html,
body {
    background: var(--et-bg) !important;
}

body {
    color: var(--et-muted);
    background-image:
        radial-gradient(circle at 50% 0%, color-mix(in srgb, transparent 90%, var(--color-primary)), transparent 34rem),
        linear-gradient(180deg, #17181d 0, var(--et-bg) 42rem, var(--et-bg-deep) 100%);
    background-attachment: fixed;
}

#app {
    isolation: isolate;
}

.app-bg {
    max-height: 52vh;
    opacity: .34;
    z-index: -1;
}

.app-bg:after {
    background: linear-gradient(180deg, rgba(20,21,25,.25), var(--et-bg) 94%);
}

.container,
.et-home-container {
    width: min(calc(100% - 40px), var(--tebex-legal-footer-max-width, 1300px));
    margin-inline: auto;
}

.et-inner-page {
    padding-top: 42px;
    padding-bottom: 70px;
}

/* Header */
.et-site-header {
    position: relative;
    z-index: 30;
    background: rgba(20, 21, 25, .98);
    border-bottom: 1px solid var(--et-border);
    box-shadow: 0 12px 34px rgba(0,0,0,.28);
}

.et-main-nav {
    min-height: 112px;
    border-bottom: 1px solid var(--et-border-soft);
    background: linear-gradient(180deg, #191a1f, #16171b);
}

.et-nav-inner {
    width: min(calc(100% - 40px), var(--tebex-legal-footer-max-width, 1300px));
    min-height: 112px;
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 430px) minmax(0, 1fr);
    align-items: center;
    gap: 28px;
}

.et-nav-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.et-nav-group-left { justify-content: flex-start; }
.et-nav-group-right { justify-content: flex-end; }

.et-nav-button {
    min-width: 78px;
    height: 48px;
    padding: 0 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #3a3c44;
    border-radius: 7px;
    background: linear-gradient(180deg, #363840, #292b31);
    color: #f8f5ef;
    font-family: var(--font-heading);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .01em;
    text-shadow: 0 2px 0 rgba(0,0,0,.3);
    box-shadow: 0 4px 0 #17181c, inset 0 1px rgba(255,255,255,.08);
    transition: transform .16s ease, filter .16s ease, background .16s ease;
}

.et-nav-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.12);
}

.et-nav-button.is-current {
    color: #fff;
    border-color: color-mix(in srgb, #fff 20%, var(--color-primary));
    background: linear-gradient(180deg, var(--et-red-light), var(--et-red));
    box-shadow: 0 4px 0 var(--et-red-dark), inset 0 1px rgba(255,255,255,.22);
}

.et-nav-button-discord {
    border-color: #8b83ff;
    background: linear-gradient(180deg, #8178ff, #6258e6);
    box-shadow: 0 4px 0 #37319e, inset 0 1px rgba(255,255,255,.22);
}

.et-header-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 104px;
}

.et-header-logo img {
    display: block;
    width: min(100%, 420px);
    height: auto;
    max-height: 102px;
    aspect-ratio: 1200 / 388;
    object-fit: contain;
    filter: drop-shadow(0 8px 7px rgba(0,0,0,.48));
}

/* Ghost custom setting: Eclipse logo width */
.et-header-logo[data-logo-width="Small"] img { width: min(100%, 300px); }
.et-header-logo[data-logo-width="Medium"] img { width: min(100%, 420px); }
.et-header-logo[data-logo-width="Large"] img { width: min(100%, 500px); }
.et-header-logo[data-logo-width="X-Large"] img { width: min(100%, 580px); }

.et-header-logo.logo-anim--float { animation: logo-float 3.5s ease-in-out infinite; }
.et-header-logo.logo-anim--pulse { animation: logo-pulse 2.5s ease-in-out infinite; }
.et-header-logo.logo-anim--glow { animation: logo-glow 2s ease-in-out infinite; }
.et-header-logo.logo-anim--shimmer { animation: logo-shimmer 3s ease-in-out infinite; }

.et-server-bar {
    height: 52px;
    background: #18191d;
}

.et-server-bar-inner {
    width: min(calc(100% - 40px), var(--tebex-legal-footer-max-width, 1300px));
    height: 100%;
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.et-server-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    width: fit-content;
    color: #efede8;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .09em;
}

.et-server-brand img {
    width: 31px;
    height: 31px;
    border-radius: 6px;
    object-fit: cover;
}

.et-server-brand .et-icon { font-size: 9px; color: #8b8d94; }

.et-server-address {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 27px;
    padding: 0 12px;
    border: 1px solid #282a30;
    border-radius: 6px;
    background: #111216;
    color: #e8e6e1;
    font-family: var(--font-heading);
    font-size: 10px;
    letter-spacing: .09em;
    text-transform: uppercase;
    cursor: pointer;
}

.et-server-address b {
    color: #6ed44d;
    font-size: 10px;
}

.et-account-links {
    justify-self: end;
    height: 100%;
    display: flex;
    align-items: stretch;
}

.et-account-links a,
.et-account-links button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 17px;
    border-left: 1px solid var(--et-border-soft);
    color: #ece9e4;
    font-family: var(--font-heading);
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: color .15s ease, background .15s ease;
}

.et-account-links a:hover,
.et-account-links button:hover {
    color: var(--et-red-light);
    background: #1d1f24;
}

.et-mobile-header { display: none; }

/* Footer */
.et-footer {
    position: relative;
    color: #202126;
    padding: 65px 0 28px;
    background: #202126;
    border-top: 1px solid #2c2e34;
}

.et-footer-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr 1.05fr;
    gap: 65px;
    padding-bottom: 48px;
}

.et-footer h3 {
    color: var(--et-text);
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 17px;
}

.et-footer p {
    color: #b6b7bc;
    font-size: 14px;
    line-height: 1.75;
}

.et-footer-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.et-footer-pills a {
    padding: 7px 15px;
    border: 1px solid #36383f;
    border-radius: 999px;
    background: #1a1b20;
    color: #d1d0cd;
    font-size: 13px;
    transition: color .15s ease, border-color .15s ease;
}
.et-footer-pills a:hover { color: #fff; border-color: var(--color-primary); }
.et-footer-support .et-button { width: 100%; margin-top: 24px; }

.et-footer-bottom {
    padding-top: 27px;
    border-top: 1px solid #303238;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.et-footer-bottom strong,
.et-footer-bottom span { display: block; }
.et-footer-bottom strong { color: #d7d5d1; font-size: 13px; margin-bottom: 7px; }
.et-footer-bottom span { color: #85878e; font-size: 12px; }

.et-footer-socials { display: flex; gap: 10px; align-items: center; }
.et-footer-socials a {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border: 1px solid #383a42;
    border-radius: 50%;
    background: #17181c;
    color: #d8d6d1;
    font-size: 14px;
}
.et-footer-socials a:hover { border-color: var(--color-primary); color: #fff; }
.et-footer-socials .et-benjdzn { width: auto; padding: 0 13px; border-radius: 999px; font-family: var(--font-heading); font-size: 10px; }

/* Existing Eclipse pages restyled to match */
.bg-content,
.bg-content-700,
.bg-content-800,
.bg-content-accent {
    background-color: var(--et-panel) !important;
}

.border-content,
.border-content-500,
.border-content-600 {
    border-color: var(--et-border) !important;
}

.rounded-xl { border-radius: 7px !important; }

.post-feed {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 26px !important;
}

.site-main.outer,
.inner.posts { width: 100%; }

.page-template .main-content,
.post-template article,
.author-template .bg-content,
.tag-template .post-card-large {
    background: var(--et-panel) !important;
    border-color: var(--et-border) !important;
}

.page-template .font-heading,
.post-template .font-heading,
.author-template .font-heading {
    font-family: var(--font-heading) !important;
}

/* Mobile menu */
.et-mobile-panel {
    padding: 0 !important;
    background: #17181d !important;
    border-right-color: #33353c !important;
}

.et-mobile-panel-head {
    min-height: 90px;
    padding: 17px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--et-border);
}

.et-mobile-panel-head img { width: 190px; max-height: 58px; object-fit: contain; }
.et-mobile-panel-head button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--et-border); border-radius: 6px; color: #fff; background: #23252b; }
.et-mobile-panel-content { padding: 18px; }
.et-mobile-menu { display: flex; flex-direction: column; gap: 10px; }
.et-mobile-menu-link {
    min-height: 52px;
    padding: 0 15px;
    display: flex !important;
    align-items: center;
    gap: 13px;
    border: 1px solid #34363e;
    border-radius: 6px;
    background: #212329;
    color: #f2efea;
    font-weight: 750;
}
.et-mobile-menu-link .et-icon { width: 21px; text-align: center; color: var(--et-red-light); }
.et-mobile-menu-link.is-current { border-color: var(--color-primary); }
.et-mobile-menu-discord { background: #5e55dc; border-color: #8178ff; }
.et-mobile-menu-discord .et-icon { color: #fff; }
.et-mobile-copy {
    width: 100%;
    margin-top: 18px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    border: 1px solid #34363e;
    border-radius: 6px;
    background: #111216;
}
.et-mobile-copy small { color: #8c8e95; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.et-mobile-copy strong { color: #fff; font-size: 14px; }

@media (max-width: 1120px) {
    .et-nav-inner { grid-template-columns: 1fr minmax(250px, 340px) 1fr; gap: 18px; }
    .et-nav-button { min-width: 66px; padding-inline: 13px; font-size: 11px; }
    .et-nav-group { gap: 9px; }
    .et-header-logo img { max-height: 88px; }
    .et-post-image { height: 190px; }
}

@media (max-width: 900px) {
    .et-main-nav,
    .et-server-bar { display: none; }

    .et-mobile-header {
        min-height: 76px;
        padding: 10px 16px;
        display: grid;
        grid-template-columns: 42px 1fr 42px;
        align-items: center;
        gap: 14px;
        background: #18191e;
        border-bottom: 1px solid var(--et-border);
    }

    .et-mobile-menu-button,
    .et-mobile-search {
        width: 42px;
        height: 42px;
        display: grid;
        place-items: center;
        border: 1px solid var(--et-border);
        border-radius: 6px;
        background: #24262c;
        color: #fff;
    }

    .et-mobile-logo { display: flex; justify-content: center; }
    .et-mobile-logo img {
        width: min(100%, 205px);
        height: auto;
        max-height: 54px;
        aspect-ratio: 1200 / 388;
        object-fit: contain;
    }

    .et-home-hero,
    .et-news-section,
    .et-staff-section { padding: 58px 0 64px; }

    .et-hero-grid,
    .et-staff-grid { grid-template-columns: 1fr; gap: 34px; }
    .et-hero-copy { text-align: center; }
    .et-hero-copy p { margin-inline: auto; }
    .et-art-frame,
    .et-staff-art { min-height: 280px; }
    .et-news-intro { grid-template-columns: 1fr; }
    .et-news-mascot { display: none; }
    .et-post-grid,
    .post-feed { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .et-footer-grid { grid-template-columns: 1fr 1fr; gap: 42px; }
    .et-footer-support { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
    .container,
    .et-home-container { width: min(calc(100% - 28px), var(--tebex-legal-footer-max-width, 1300px)); }
    .et-mobile-logo img { width: 175px; height: auto; max-height: 50px; }
    .et-home-hero,
    .et-news-section,
    .et-staff-section { padding: 45px 0 52px; }
    .et-art-frame,
    .et-staff-art { min-height: 230px; }
    .et-art-frame img,
    .et-staff-art img { width: 175px; }
    .et-hero-copy h1 { font-size: 40px; }
    .et-news-intro h2,
    .et-staff-copy h2 { font-size: 34px; }
    .et-hero-copy p,
    .et-news-intro p,
    .et-staff-copy p { font-size: 14px; line-height: 1.65; }
    .et-button { width: 100%; }
    .et-post-grid,
    .post-feed { grid-template-columns: 1fr !important; }
    .et-post-image { height: 210px; }
    .et-footer { padding-top: 52px; }
    .et-footer-grid { grid-template-columns: 1fr; gap: 35px; }
    .et-footer-bottom { align-items: flex-start; flex-direction: column; }
}


/* Shared refinements */
:root {
    --et-discord: #6f76ff;
    --et-discord-light: #8f95ff;
    --et-discord-dark: #434bb8;
    --font-body: "Work Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.et-nav-button-discord, .et-button-discord, .et-mobile-menu-discord {
    border-color: var(--et-discord-light);
    background: linear-gradient(180deg, var(--et-discord-light), var(--et-discord));
    box-shadow: 0 4px 0 var(--et-discord-dark), inset 0 1px rgba(255,255,255,.22);
}
.et-icon {
    width: 1em; height: 1em; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round; overflow: visible;
}
.et-footer-socials .icon, .et-footer-socials .et-icon { width: 18px; height: 18px; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.rule-item[open] .rule-title .et-icon, .et-help-faq-card[open] .et-help-faq-toggle .et-icon { transform: rotate(180deg); }
.rule-item .rule-title .et-icon, .et-help-faq-toggle .et-icon { transition: transform .18s ease; }
/* v1.6.0 — production polish */
.et-skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 10000;
    padding: 11px 15px;
    border: 2px solid #fff;
    border-radius: 7px;
    background: var(--et-red);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 13px;
    text-transform: uppercase;
    transform: translateY(-160%);
    transition: transform .16s ease;
}

.et-skip-link:focus { transform: translateY(0); }

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 4px;
}

.et-nav-button:focus-visible,
.et-button:focus-visible,
.et-play-primary-action:focus-visible,
.et-play-nav-button:focus-visible,
.et-help-action-button:focus-visible,
.et-help-discord-cta-button:focus-visible {
    outline-color: color-mix(in srgb, #fff 72%, var(--color-primary));
}

.et-server-address b.is-unavailable {
    color: #8e9098;
}

.et-server-address:hover,
.et-server-address:focus-visible {
    border-color: color-mix(in srgb, var(--color-primary) 35%, #282a30);
    background: #17181d;
}

.et-play-figure img {
    background: #0f1014;
}

.et-post-card a:focus-visible {
    outline-offset: -3px;
}

@media (prefers-reduced-motion: reduce) {
    html:focus-within { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    #particles-canvas { display: none !important; }
}

@media (max-width: 600px) {
    .et-play-help-float {
        padding-bottom: max(14px, env(safe-area-inset-bottom));
    }
}

/* Ghost editor wide/full cards and site font settings */
body { font-family: var(--gh-font-body, var(--font-body)); }
h1, h2, h3, h4, h5, h6 { font-family: var(--gh-font-heading, var(--font-heading)); }
.kg-width-wide {
    position: relative;
    width: min(100vw - 40px, 1200px);
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}
.kg-width-full {
    position: relative;
    width: 100vw;
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}


/* v1.6.2 — preserve intrinsic branding proportions */
.et-header-logo img,
.et-mobile-logo img,
.et-art-frame img,
.et-staff-art img,
.et-news-mascot,
.et-post-placeholder img {
    height: auto;
}

@media (max-width: 900px) {
    .et-mobile-header {
        min-height: calc(76px + env(safe-area-inset-top, 0px));
        padding-top: max(10px, env(safe-area-inset-top, 0px));
    }
}

/* v1.6.4 — mobile navigation drawer */
.et-mobile-panel.slideout-panel {
    width: min(330px, 88vw);
    height: 100vh;
    height: 100dvh;
    overflow-x: hidden;
    overscroll-behavior: contain;
    box-shadow: 18px 0 44px rgba(0, 0, 0, .42);
}

.et-mobile-panel-head {
    min-height: calc(88px + env(safe-area-inset-top, 0px));
    padding: max(16px, env(safe-area-inset-top, 0px)) 18px 16px;
}

.et-mobile-panel-logo {
    min-width: 0;
    display: flex;
    align-items: center;
}

.et-mobile-panel-head .et-mobile-panel-logo img {
    width: 190px;
    height: auto;
    max-width: calc(100% - 12px);
    max-height: 60px;
    aspect-ratio: 1200 / 388;
    object-fit: contain;
    object-position: left center;
}

.et-mobile-panel-content {
    padding: 20px 18px max(24px, env(safe-area-inset-bottom, 0px));
}

.et-mobile-menu-title {
    margin: 0 0 12px;
    color: #8f9199;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.et-mobile-copy span {
    color: #73767e;
    font-size: 11px;
}

@media (max-width: 380px) {
    .et-mobile-panel.slideout-panel { width: min(310px, 91vw); }
    .et-mobile-panel-head .et-mobile-panel-logo img { width: 165px; }
}


/* v1.6.5 — Complex-inspired mobile header and footer */
@media (max-width: 900px) {
    .et-main-nav { display: none; }

    .et-mobile-header {
        min-height: calc(104px + env(safe-area-inset-top, 0px));
        padding: max(18px, env(safe-area-inset-top, 0px)) 18px 16px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 54px;
        align-items: center;
        gap: 18px;
        background: linear-gradient(180deg, #18191e, #15161a);
        border-bottom: 1px solid var(--et-border-soft);
    }

    .et-mobile-logo {
        min-width: 0;
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }

    .et-mobile-logo img {
        width: min(72vw, 350px);
        height: auto;
        max-height: 84px;
        object-fit: contain;
        object-position: left center;
        filter: drop-shadow(0 7px 6px rgba(0,0,0,.42));
    }

    .et-mobile-menu-button {
        width: 54px;
        height: 54px;
        justify-self: end;
        display: grid;
        place-items: center;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #f5f3ef;
    }

    .et-mobile-menu-button .et-icon {
        width: 34px;
        height: 34px;
        stroke-width: 2.35;
    }

    .et-server-bar {
        display: block;
        height: 64px;
        border-bottom: 1px solid var(--et-border);
        background: #18191d;
    }

    .et-server-bar-inner {
        width: 100%;
        grid-template-columns: minmax(0, 1fr) auto;
        padding-left: 16px;
    }

    .et-server-brand {
        min-width: 0;
        gap: 10px;
        font-size: 11px;
        letter-spacing: .08em;
    }

    .et-server-brand img {
        width: 31px;
        height: 31px;
    }

    .et-server-address { display: none; }

    .et-account-links {
        justify-self: end;
        min-width: 0;
    }

    .et-account-links a,
    .et-account-links button {
        min-width: 58px;
        padding: 0 14px;
        font-size: 9px;
        border-left-color: var(--et-border);
    }

    .et-account-links button {
        width: 58px;
        padding: 0;
    }

    .et-account-links button .et-icon {
        width: 17px;
        height: 17px;
    }

    .et-footer {
        padding: 68px 0 max(34px, env(safe-area-inset-bottom, 0px));
    }

    .et-footer-grid {
        grid-template-columns: 1fr;
        gap: 38px;
        padding-bottom: 42px;
    }

    .et-footer-support { grid-column: auto; }

    .et-footer h3 {
        font-size: 24px;
        margin-bottom: 18px;
    }

    .et-footer p {
        font-size: 15px;
        line-height: 1.8;
    }

    .et-footer-pills {
        gap: 12px;
    }

    .et-footer-pills a {
        min-height: 42px;
        padding: 9px 17px;
        display: inline-flex;
        align-items: center;
        font-size: 14px;
    }

    .et-footer-support .et-button {
        min-height: 58px;
    }

    .et-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 24px;
    }

    .et-footer-bottom strong {
        max-width: 290px;
        font-size: 14px;
        line-height: 1.45;
    }

    .et-footer-bottom span {
        font-size: 13px;
        line-height: 1.55;
    }

    .et-footer-socials {
        flex-wrap: wrap;
    }

    .et-footer-socials a {
        width: 46px;
        height: 46px;
    }
}

@media (max-width: 520px) {
    .et-mobile-header {
        min-height: calc(94px + env(safe-area-inset-top, 0px));
        padding-inline: 14px;
        grid-template-columns: minmax(0, 1fr) 48px;
        gap: 12px;
    }

    .et-mobile-logo img {
        width: min(72vw, 275px);
        max-height: 72px;
    }

    .et-mobile-menu-button {
        width: 48px;
        height: 48px;
    }

    .et-mobile-menu-button .et-icon {
        width: 31px;
        height: 31px;
    }

    .et-server-bar { height: 60px; }
    .et-server-bar-inner { padding-left: 13px; }
    .et-server-brand span { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .et-account-links a { min-width: 57px; padding-inline: 10px; }
    .et-account-links button { width: 48px; min-width: 48px; }
}
