/* Global layout styles (header, base, tables) */

:root {
    color-scheme: dark;
}

html {
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
}

html::-webkit-scrollbar {
    display: none;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    background: radial-gradient(circle at top, #081320, #020509 60%);
    color: #e4f2ff;
    min-height: 100%;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body::-webkit-scrollbar {
    display: none;
}

/* ---------------------------------------------
   GLOBAL FONT THEME
   --------------------------------------------- */

/* All normal text */
body,
p,
span,
li,
td,
th,
.section-lead,
.intro-text,
.realm-status-text,
.roadmap-list {
    font-family: 'Forum', serif;
    font-size: 1rem;
}

/* All headers, nav links, buttons, hero title */
h1, h2, h3, h4, h5, h6,
.nav-center a,
.nav-btn,
.hero-title,
.section-title,
.intro-title,
span.logo,
.feature-title,
.btn,
.nav-logo a {
    font-family: 'Cinzel', serif !important;
    letter-spacing: 0.04em;
}


/* Simple global link styling */
a {
    color: #c9a34f;
    text-decoration: none;
}
a:hover {
    color: #f0c86a;
}

/* Muted helper */
.muted {
    color: #7e8ca8;
    font-size: 0.85rem;
}

/* Tables (keep your current behavior) */
table {
    border-collapse: collapse;
    width: 100%;
    max-width: 800px;
}
th, td {
    border-bottom: 1px solid #25324c;
    padding: .5rem .75rem;
    text-align: left;
}
th {
    font-weight: 600;
}

/* SITE HEADER / NAVBAR */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;

    width: 100%;
    box-sizing: border-box;
    margin: 0;
    border-radius: 0 0 12px 12px;
    background:
      linear-gradient(135deg, rgba(12, 28, 52, 0.95), rgba(5, 13, 26, 0.98));
    border-bottom: 1px solid rgba(90, 140, 220, 0.6);
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.8);
    padding: 0.4rem 0.8rem;
}


.site-header-inner {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Logo */

.nav-logo {
    flex: 0 0 auto;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-logo a {
    color: #ffffff;
}
.nav-logo a span {
    color: #7fb4ff;
}

/* Toggle button (mobile only) */

.nav-toggle {
    display: none;
    margin-left: auto;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0.4rem;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: #e4f2ff;
    position: relative;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.nav-toggle-bar::before,
.nav-toggle-bar::after {
    content: "";
    position: absolute;
    left: 0;
}
.nav-toggle-bar::before {
    top: -6px;
}
.nav-toggle-bar::after {
    top: 6px;
}

/* When nav is open, animate the icon into an X */
.nav-toggle.is-open .nav-toggle-bar {
    transform: rotate(45deg);
}
.nav-toggle.is-open .nav-toggle-bar::before {
    opacity: 0;
}
.nav-toggle.is-open .nav-toggle-bar::after {
    transform: rotate(-90deg);
    top: 0;
}

/* NAV STRUCTURE (symmetrical centering) */
.main-nav {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Symmetric spacers */
.nav-left-spacer,
.nav-right-spacer {
    flex: 1 1 0;
}

/* Center links always centered between spacers */
.nav-center {
    flex: 0 0 auto;
    list-style: none;
    display: flex;
    gap: 1.2rem;
    margin: 0;
    padding: 0;
}

.nav-center a {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #cbe1ff;
}

.nav-center a:hover {
    color: #ffffff;
}

/* Auth aligned right */
.nav-auth {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: auto;
    font-size: 0.9rem;
}

.nav-username {
    color: #9fb4dd;
    margin-right: 0.25rem;
}

/* MOBILE VERSION */
@media (max-width: 768px) {
    .site-header-inner {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0.7rem;
        margin-top: 0.4rem;
        width: 100%;
        display: none;
    }
    .main-nav.main-nav--open {
        display: flex;
    }

    .nav-left-spacer,
    .nav-right-spacer {
        display: none;
    }
    .nav-center {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        border-top: 1px solid rgba(70, 110, 170, 0.6);
        padding-top: 0.5rem;
    }

    .nav-auth {
        justify-content: flex-start;
        border-top: 1px solid rgba(70, 110, 170, 0.6);
        padding-top: 0.5rem;
    }
}


/* Auth section (right side) */

.nav-auth {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
}

.nav-username {
    color: #9fb4dd;
    margin-right: 0.25rem;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid transparent;
    background: transparent;
    color: #e4f2ff;
}
.nav-btn--primary {
    background: linear-gradient(135deg, #2f71ff, #81b5ff);
    border-color: #9fc4ff;
    color: #020612;
}
.nav-btn--primary:hover {
    background: linear-gradient(135deg, #3d7cff, #a9cfff);
}
.nav-btn--secondary {
    border-color: rgba(151, 182, 230, 0.7);
    background: rgba(10, 22, 38, 0.9);
}
.nav-btn--secondary:hover {
    background: rgba(16, 32, 54, 0.95);
}

/* FOOTER */

.site-footer {
    background: #040812;
    border-top: 1px solid rgba(70, 110, 170, 0.7);
    margin-top: 0;
    padding: 1.5rem 1rem 2rem;
    width: 100vw;              /* Force full viewport width */
    margin-left: calc(-50vw + 50%);  /* Escape any parent max-width centering */
    display: flex;
    justify-content: center;   /* center inner content horizontally */
}

.site-footer-inner {
    max-width: 960px;
    width: 100%;
    text-align: center;
}

.footer-main {
    font-family: 'Forum', serif;
    font-size: 0.9rem;
    color: #b9c7e6;
    margin: 0 0 0.3rem;
}

.footer-meta {
    font-family: 'Forum', serif;
    font-size: 0.8rem;
    color: #7f8db0;
    margin: 0;
}

.footer-meta code {
    background: rgba(10, 18, 32, 0.9);
    border-radius: 4px;
    padding: 0 0.25rem;
    font-size: 0.78rem;
}

.footer-highlight {
    color: #c3ddff;
    font-weight: 600;
}

@media (max-width: 768px) {
    .site-footer {
        width: 100%;
        margin-left: 0;
        border-radius: 0;
    }
}
