:root {
    --primary: #d4af37;
    --primary-soft: #f4d56a;
    --primary-dark: #8b6418;
    --primary-rgb: 212, 175, 55;
    --bg-dark: #07070a;
    --bg-panel: rgba(7, 7, 10, 0.66);
    --bg-panel-strong: rgba(5, 5, 8, 0.82);
    --text-light: #f8f6ec;
    --text-muted: #b6b0a2;
    --border-gold: rgba(var(--primary-rgb), 0.24);
    --border-soft: rgba(255,255,255,0.07);
    --sidebar-width: 270px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    min-height: 100vh;
    overflow-x: hidden;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--text-light);
    background: #050507 url('../img/bg_zone1.jpg') center top / cover fixed no-repeat;
}
body::before,
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
}
body::before {
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255,255,255,0.016) 1px, transparent 1px);
    background-size: 86px 86px;
    -webkit-mask-image: radial-gradient(circle at center, rgba(0,0,0,.62), transparent 76%);
    mask-image: radial-gradient(circle at center, rgba(0,0,0,.62), transparent 76%);
    opacity: .24;
}
body::after {
    z-index: 2;
    box-shadow: inset 0 0 90px rgba(0,0,0,.62), inset 0 0 220px rgba(0,0,0,.52);
}

.bg-wrapper {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -2;
    background-color: #050505;
}

.bg-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.bg-wrapper::before {
    content: '';
    position: absolute;
    inset: -20%;
    background: conic-gradient(from 180deg at 50% 50%, transparent 0deg, rgba(var(--primary-rgb),.11) 22deg, transparent 45deg, transparent 180deg, rgba(var(--primary-rgb),.07) 205deg, transparent 238deg, transparent 360deg);
    animation: divineRotate 32s linear infinite;
    opacity: .32;
    mix-blend-mode: screen;
}
.overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(0,0,0,.52), rgba(0,0,0,.14) 46%, rgba(0,0,0,.48)),
        linear-gradient(180deg, rgba(0,0,0,.36), rgba(6,6,9,.16) 40%, rgba(0,0,0,.64));
}
.lightning-layer { position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: .30; overflow: hidden; }
.lightning-layer::before,
.lightning-layer::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 55vh;
    top: -10vh;
    background: linear-gradient(180deg, transparent, rgba(255,245,192,.75), transparent);
    filter: blur(1px) drop-shadow(0 0 18px rgba(244,213,106,.55));
    opacity: 0;
    animation: lightningFlash 8s infinite;
}
.lightning-layer::before { left: 13%; transform: rotate(22deg); animation-delay: 1.8s; }
.lightning-layer::after { right: 17%; transform: rotate(-18deg); animation-delay: 5.7s; }

.site-shell { position: relative; z-index: 3; min-height: 100vh; padding-bottom: 30px; }
.hero-banner {
    position: relative;
    padding: 28px 20px 22px;
    text-align: center;
    border-bottom: 1px solid rgba(var(--primary-rgb), .20);
    background: rgba(5, 5, 8, 0.15);
    box-shadow: 0 16px 40px rgba(0,0,0,.18);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.bg-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(3, 4, 8, 0.20),
            rgba(3, 4, 8, 0.55)
        );
    pointer-events: none;
}

.hero-banner::after {
    content: '';
    position: absolute;
    left: 50%; bottom: -1px;
    width: min(560px, 75vw); height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb),.92), transparent);
    box-shadow: 0 0 22px rgba(var(--primary-rgb),.50);
}
.server-logo {
    display: block;
    width: min(240px, 55vw);
    height: auto;
    margin: 0 auto 8px;
    filter: drop-shadow(0 0 18px rgba(var(--primary-rgb),.56)) drop-shadow(0 12px 16px rgba(0,0,0,.65));
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: 7px;
    color: var(--primary-soft);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 0 16px rgba(var(--primary-rgb),.25);
}
.hero-eyebrow::before, .hero-eyebrow::after { content: ''; width: 40px; height: 1px; background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb),.85)); }
.hero-eyebrow::after { background: linear-gradient(90deg, rgba(var(--primary-rgb),.85), transparent); }
.hero-banner h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.55rem, 3.2vw, 2.7rem);
    font-weight: 900;
    letter-spacing: 2px;
    color: #fff8df;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(255,255,255,.18), 0 0 30px rgba(var(--primary-rgb),.24), 0 16px 30px rgba(0,0,0,.72);
}
.hero-banner p { max-width: 700px; margin: 7px auto 0; color: #d2cab5; font-size: .9rem; }

.page-wrapper {
    display: flex;
    max-width: 1320px;
    margin: 24px auto 0;
    padding: 0 16px;
    gap: 22px;
    align-items: flex-start;
}
.sticky-sidebar,
.content-section {
    position: relative;
    border: 1px solid var(--border-gold);
    background: linear-gradient(180deg, rgba(255,255,255,.042), rgba(255,255,255,.009)), var(--bg-panel);
    box-shadow: 0 18px 48px rgba(0,0,0,.46), inset 0 0 34px rgba(var(--primary-rgb),.026);
    backdrop-filter: blur(5px);
}
.sticky-sidebar::before,
.content-section::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(var(--primary-rgb),.55), transparent 19%, transparent 80%, rgba(var(--primary-rgb),.40)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    pointer-events: none;
}
.sticky-sidebar {
    width: var(--sidebar-width);
    position: sticky;
    top: 18px;
    flex: 0 0 var(--sidebar-width);
    border-radius: 18px;
    padding: 17px;
    overflow: hidden;
}
.sticky-sidebar::after {
    content: '';
    position: absolute;
    width: 260px; height: 260px;
    left: -145px; top: -145px;
    background: radial-gradient(circle, rgba(var(--primary-rgb),.18), transparent 65%);
    pointer-events: none;
}
.sticky-sidebar h3 {
    position: relative;
    z-index: 1;
    font-family: 'Cinzel', serif;
    color: #fff6d5;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding-bottom: 11px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(var(--primary-rgb),.18);
    text-shadow: 0 0 14px rgba(var(--primary-rgb),.24);
}
.sticky-sidebar ul { position: relative; z-index: 1; list-style: none; }
.sticky-sidebar li { margin-bottom: 4px; }
.sticky-sidebar a {
    display: block;
    padding: 8px 11px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #bdb5a3;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 600;
    transition: .24s ease;
}
.sticky-sidebar a:hover,
.sticky-sidebar a.active {
    color: #fff8df;
    padding-left: 14px;
    border-color: rgba(var(--primary-rgb),.32);
    background: linear-gradient(90deg, rgba(var(--primary-rgb),.18), rgba(var(--primary-rgb),.035));
    box-shadow: inset 3px 0 0 var(--primary), 0 0 18px rgba(var(--primary-rgb),.08);
}

.main-content {
    flex: 1;
    min-width: 0;
}

.content-section {
    display: none;
    border-radius: 20px;
    padding: clamp(20px, 2.4vw, 30px);
    overflow: hidden;
}

.content-section.active {
    display: block;
}

/* Used only to measure the next panel while keeping it invisible. */
.content-section.is-measuring {
    display: block !important;
    position: absolute !important;
    left: 0;
    right: 0;
    visibility: hidden !important;
    pointer-events: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .content-section {
        scroll-behavior: auto;
    }
}
.content-section::after {
    content: '';
    position: absolute;
    width: 390px; height: 390px;
    right: -210px; top: -220px;
    background: radial-gradient(circle, rgba(var(--primary-rgb),.12), transparent 64%);
    pointer-events: none;
}
.content-section > * { position: relative; z-index: 1; }
.content-section h2 {
    font-family: 'Cinzel', serif;
    color: #fff8df;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 800;
    letter-spacing: .6px;
    margin-bottom: 14px;
    padding-bottom: 11px;
    border-bottom: 1px solid rgba(var(--primary-rgb),.20);
    text-shadow: 0 0 18px rgba(var(--primary-rgb),.18);
}
.content-section h3 {
    font-family: 'Cinzel', serif;
    color: var(--primary-soft);
    font-size: 1.08rem;
    margin: 22px 0 10px;
    letter-spacing: .4px;
}
.content-section p { margin-bottom: 15px; color: var(--text-muted); font-size: .88rem; }
.content-section strong { color: #fff9e7; }

.table-container {
    overflow-x: auto;
    margin: 15px 0;
    border: 1px solid rgba(var(--primary-rgb),.18);
    border-radius: 13px;
    background: rgba(0,0,0,.22);
    box-shadow: inset 0 0 20px rgba(var(--primary-rgb),.018);
}
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .83rem; }
th {
    padding: 12px 14px;
    color: var(--primary-soft);
    background: linear-gradient(180deg, rgba(var(--primary-rgb),.12), rgba(var(--primary-rgb),.035));
    border-bottom: 1px solid rgba(var(--primary-rgb),.25);
    font-family: 'Cinzel', serif;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .65px;
    text-transform: uppercase;
}
td { padding: 10px 14px; color: #e9e3d4; border-bottom: 1px solid rgba(255,255,255,.055); vertical-align: middle; }
tbody tr { transition: background .2s ease; }
tbody tr:hover { background: rgba(var(--primary-rgb),.045); }
tr:last-child td { border-bottom: none; }
.highlight-blue, .highlight-gold { color: var(--primary-soft); font-weight: 700; text-shadow: 0 0 12px rgba(var(--primary-rgb),.18); }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px,1fr)); gap: 14px; margin: 15px 0; }
.grid-card {
    position: relative;
    padding: 16px;
    border: 1px solid rgba(var(--primary-rgb),.16);
    border-radius: 13px;
    background: linear-gradient(180deg, rgba(255,255,255,.032), rgba(255,255,255,.008)), rgba(0,0,0,.20);
    transition: .25s ease;
}
.grid-card:hover { transform: translateY(-3px); border-color: rgba(var(--primary-rgb),.42); box-shadow: 0 14px 26px rgba(0,0,0,.28), 0 0 18px rgba(var(--primary-rgb),.07); }
.grid-card h4 { font-family: 'Cinzel', serif; color: var(--primary-soft); font-size: .94rem; margin-bottom: 7px; }
.grid-card p { margin: 0; font-size: .82rem; }

.command-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(275px,1fr)); gap: 11px; margin: 15px 0; }
.command-card {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 13px;
    border: 1px solid rgba(var(--primary-rgb),.14);
    border-radius: 11px;
    background: rgba(0,0,0,.20);
}
.command-card code { color: var(--primary-soft); background: rgba(var(--primary-rgb),.08); border: 1px solid rgba(var(--primary-rgb),.17); padding: 3px 8px; border-radius: 6px; font-weight: 800; white-space: nowrap; }
.command-card span { color: var(--text-muted); font-size: .8rem; }
.info-callout {
    margin: 15px 0;
    padding: 13px 15px;
    border: 1px solid rgba(var(--primary-rgb),.18);
    border-left: 3px solid var(--primary);
    border-radius: 0 11px 11px 0;
    background: linear-gradient(90deg, rgba(var(--primary-rgb),.09), rgba(var(--primary-rgb),.018));
}
.info-callout h5 { color: #fff8df; font-family: 'Cinzel', serif; font-size: .88rem; margin-bottom: 4px; }
.info-callout p { margin: 0; font-size: .82rem; }

@media (max-width: 1024px) {
    .page-wrapper { flex-direction: column; }
    .sticky-sidebar { width: 100%; position: static; flex-basis: auto; }
    .sticky-sidebar ul { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 4px; }
    .sticky-sidebar li { margin: 0; }
}
@media (max-width: 620px) {
    .hero-banner { padding: 22px 14px 18px; }
    .hero-eyebrow { letter-spacing: 1.8px; font-size: .61rem; }
    .hero-eyebrow::before, .hero-eyebrow::after { width: 24px; }
    .page-wrapper { padding: 0 10px; margin-top: 14px; gap: 14px; }
    .sticky-sidebar { border-radius: 14px; padding: 12px; }
    .sticky-sidebar ul { grid-template-columns: 1fr 1fr; }
    .sticky-sidebar a { font-size: .74rem; padding: 7px 8px; }
    .content-section { border-radius: 15px; padding: 17px 13px; }
    table { font-size: .76rem; }
    th, td { padding: 9px 10px; }
    .feature-grid, .command-grid { grid-template-columns: 1fr; }
}

.site-footer {
    position: relative;
    width: 100%;
    margin-top: 45px;
    padding: 38px 20px 24px;
    overflow: hidden;
    text-align: center;
    border-top: 1px solid rgba(197, 160, 89, 0.28);
    background:
        linear-gradient(
            180deg,
            rgba(5, 5, 8, 0.35),
            rgba(5, 5, 8, 0.94)
        );
    box-shadow:
        0 -12px 40px rgba(0, 0, 0, 0.35),
        inset 0 1px rgba(255, 255, 255, 0.02);
}

.footer-glow {
    position: absolute;
    top: -60px;
    left: 50%;
    width: 420px;
    height: 120px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: rgba(197, 160, 89, 0.12);
    filter: blur(45px);
    pointer-events: none;
}

.footer-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-brand {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 22px;
    text-decoration: none;
}

.footer-logo {
    font-family: 'Cinzel', serif;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #e5c17b;
    text-shadow:
        0 0 8px rgba(229, 193, 123, 0.28),
        0 0 20px rgba(197, 160, 89, 0.12);
}

.footer-tagline {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.78rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;
    margin-bottom: 23px;
}

.footer-links a {
    position: relative;
    padding-bottom: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-decoration: none;
    text-transform: uppercase;
    transition:
        color 0.2s ease,
        text-shadow 0.2s ease;
}

.footer-links a::after {
    content: "";
    position: absolute;
    right: 50%;
    bottom: 0;
    left: 50%;
    height: 1px;
    background: #c5a059;
    transition:
        right 0.2s ease,
        left 0.2s ease;
}

.footer-links a:hover {
    color: #e5c17b;
    text-shadow: 0 0 8px rgba(229, 193, 123, 0.3);
}

.footer-links a:hover::after {
    right: 0;
    left: 0;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.75rem;
}

.footer-separator {
    color: rgba(197, 160, 89, 0.65);
}

@media (max-width: 600px) {
    .site-footer {
        margin-top: 30px;
        padding: 32px 16px 22px;
    }

    .footer-logo {
        font-size: 1.35rem;
        letter-spacing: 2px;
    }

    .footer-tagline {
        font-size: 0.7rem;
    }

    .footer-links {
        gap: 10px 16px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 3px;
    }

    .footer-separator {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; } }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes zeusEpicMotion { 0% { transform: scale(1) translate(0,0); } 50% { transform: scale(1.06) translate(1%,-1%); } 100% { transform: scale(1.025) translate(-1%,1%); } }
@keyframes divineRotate { to { transform: rotate(360deg); } }
@keyframes lightningFlash { 0%,88%,100% { opacity:0; } 89% { opacity:.15; } 90% { opacity:.9; } 91% { opacity:.08; } 92% { opacity:.62; } 93% { opacity:0; } }

/* Dynamic EXP rate help button + floating panel */
.dynamic-rate-value {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.dynamic-rate-help {
    width: 21px;
    height: 21px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 21px;
    padding: 0;
    border: 1px solid rgba(var(--primary-rgb), .52);
    border-radius: 50%;
    color: var(--primary-soft);
    background: rgba(var(--primary-rgb), .075);
    box-shadow:
        0 0 0 1px rgba(255,255,255,.018) inset,
        0 0 13px rgba(var(--primary-rgb), .07);
    font-family: 'Montserrat', sans-serif;
    font-size: .72rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    transition:
        transform .2s ease,
        color .2s ease,
        background .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.dynamic-rate-help:hover,
.dynamic-rate-help:focus-visible,
.dynamic-rate-help[aria-expanded="true"] {
    color: #fff8df;
    border-color: rgba(var(--primary-rgb), .88);
    background: rgba(var(--primary-rgb), .18);
    box-shadow:
        0 0 15px rgba(var(--primary-rgb), .18),
        0 0 0 1px rgba(255,255,255,.025) inset;
    transform: scale(1.08);
    outline: none;
}

.dynamic-rate-popover {
    position: fixed;
    z-index: 10000;
    width: min(285px, calc(100vw - 24px));
    padding: 15px;
    border: 1px solid rgba(var(--primary-rgb), .38);
    border-radius: 13px;
    color: var(--text-light);
    background:
        radial-gradient(circle at 90% 0%, rgba(var(--primary-rgb), .12), transparent 34%),
        linear-gradient(180deg, rgba(18, 15, 10, .985), rgba(7, 7, 9, .99));
    box-shadow:
        0 22px 55px rgba(0,0,0,.70),
        0 0 25px rgba(var(--primary-rgb), .08),
        inset 0 0 22px rgba(var(--primary-rgb), .025);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(7px) scale(.98);
    transition:
        opacity .2s ease,
        visibility .2s ease,
        transform .2s ease;
}

.dynamic-rate-popover.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.dynamic-rate-popover::before {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    top: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(var(--primary-rgb), .85),
        #fff0aa,
        rgba(var(--primary-rgb), .85),
        transparent
    );
    box-shadow: 0 0 12px rgba(var(--primary-rgb), .24);
}

.dynamic-rate-popover-title {
    margin-bottom: 3px;
    color: #fff8df;
    font-family: 'Cinzel', serif;
    font-size: .92rem;
    font-weight: 800;
    letter-spacing: .45px;
}

.dynamic-rate-popover-subtitle {
    margin-bottom: 11px;
    color: var(--text-muted);
    font-size: .72rem;
    line-height: 1.45;
}

.dynamic-rate-levels {
    border: 1px solid rgba(var(--primary-rgb), .13);
    border-radius: 9px;
    overflow: hidden;
    background: rgba(0,0,0,.18);
}

.dynamic-rate-level {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(255,255,255,.05);
    font-size: .76rem;
}

.dynamic-rate-level:last-child {
    border-bottom: 0;
}

.dynamic-rate-level span {
    color: #d9d2c2;
}

.dynamic-rate-level strong {
    color: var(--primary-soft);
    font-family: 'Cinzel', serif;
    font-size: .78rem;
    text-shadow: 0 0 10px rgba(var(--primary-rgb), .15);
}

.dynamic-rate-popover-note {
    margin-top: 10px;
    color: rgba(255,255,255,.46);
    font-size: .67rem;
    line-height: 1.45;
}

@media (max-width: 620px) {
    .dynamic-rate-help {
        width: 20px;
        height: 20px;
        flex-basis: 20px;
        font-size: .68rem;
    }

    .dynamic-rate-popover {
        width: min(275px, calc(100vw - 20px));
    }
}


/* Pause decorative effects while the Wiki tab is in the background. */
body.page-not-visible .bg-wrapper::before,
body.page-not-visible .lightning-layer::before,
body.page-not-visible .lightning-layer::after {
    animation-play-state: paused !important;
}
