:root {
    --bg: #070908;
    --panel: #151917;
    --panel-strong: #1d221d;
    --surface: #0d1411;
    --surface-warm: #17130f;
    --surface-cool: #0b1418;
    --text: #fff8e9;
    --muted: #bac5bc;
    --accent: #42df8d;
    --accent-dark: #279664;
    --accent-cool: #62b6ff;
    --accent-warm: #f2ae54;
    --border: rgba(255, 248, 233, 0.12);
    --border-strong: rgba(255, 248, 233, 0.22);
    --shadow: 0 20px 64px rgba(0, 0, 0, 0.46);
    --header-bg: rgba(7, 9, 8, 0.92);
    --section-green: linear-gradient(180deg, #0f1b15 0%, #07100d 100%);
    --section-cool: linear-gradient(180deg, #0c171a 0%, #080c0e 100%);
    --section-warm: linear-gradient(180deg, #17140e 0%, #090908 100%);
    --hero-shade: rgba(7, 9, 8, 0.68);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
}

body:not(.map-app-body) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main,
.site-footer {
    position: relative;
    z-index: 1;
}

body:not(.map-app-body) main {
    flex: 1 0 auto;
}

.scene-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: var(--bg);
}

.scene-backdrop::after {
    display: none;
}

.scene-backdrop-layer {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 120ms linear;
}

body:not(.map-app-body) main > section:nth-of-type(even):not(.home-section) {
    background:
        linear-gradient(180deg, rgba(7, 9, 8, 0.9), rgba(7, 9, 8, 0.78)),
        rgba(7, 9, 8, 0.78) !important;
    border-top: 1px solid rgba(255, 248, 233, 0.12);
    border-bottom: 1px solid rgba(255, 248, 233, 0.12);
    backdrop-filter: blur(3px);
    box-shadow:
        inset 0 1px 0 rgba(255, 248, 233, 0.04),
        inset 0 -1px 0 rgba(255, 248, 233, 0.03);
}

body:not(.map-app-body) main > section {
    position: relative;
    isolation: isolate;
}

body:not(.map-app-body) main > section:not(:nth-of-type(even)):not(.home-section)::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 22% 34%, rgba(7, 9, 8, 0.42), transparent 44%),
        linear-gradient(90deg, rgba(7, 9, 8, 0.34), rgba(7, 9, 8, 0.12) 46%, transparent 76%),
        linear-gradient(180deg, rgba(7, 9, 8, 0.08), transparent 28%, rgba(7, 9, 8, 0.08));
}

body:not(.map-app-body) main > section:not(:nth-of-type(even)):not(.home-section) h1,
body:not(.map-app-body) main > section:not(:nth-of-type(even)):not(.home-section) h2,
body:not(.map-app-body) main > section:not(:nth-of-type(even)):not(.home-section) h3,
body:not(.map-app-body) main > section:not(:nth-of-type(even)):not(.home-section) p,
body:not(.map-app-body) main > section:not(:nth-of-type(even)):not(.home-section) li,
body:not(.map-app-body) main > section:not(:nth-of-type(even)):not(.home-section) a,
body:not(.map-app-body) main > section:not(:nth-of-type(even)):not(.home-section) span,
body:not(.map-app-body) main > section:not(:nth-of-type(even)):not(.home-section) strong {
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.66), 0 1px 3px rgba(0, 0, 0, 0.72);
}

body:not(.map-app-body) main > section:not(:nth-of-type(even)):not(.home-section) p:not(.eyebrow) {
    color: rgba(255, 248, 233, 0.9);
}

body:not(.map-app-body) main > section:not(:nth-of-type(even)):not(.home-section) .eyebrow {
    color: #35ff95;
}

body:not(.map-app-body) main > section :is(
    .home-card,
    .about-card,
    .review-submit-card,
    .review-card,
    .reviews-empty,
    .server-panel,
    .server-callout,
    .guide-panel,
    .guide-search,
    .guide-empty-state,
    .guide-modal-panel,
    .support-alert,
    .store-topbar,
    .store-policy-strip,
    .store-card,
    .store-card-note,
    .stats-alert,
    .stats-server-switcher,
    .stats-panel,
    .profile-bar,
    .stat-card,
    .legal-card
) {
    text-shadow: none;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    min-height: 74px;
    padding: 0 6vw;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px);
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.site-logo-mark {
    display: block;
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 0 16px rgba(56, 212, 135, 0.18));
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 750;
}

.site-nav a {
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus {
    color: var(--text);
    background: rgba(242, 174, 84, 0.08);
    border-color: var(--border);
    transform: translateY(-1px);
}

.site-nav .nav-logout {
    color: #c9ffdf;
    background: rgba(56, 212, 135, 0.09);
    border-color: rgba(56, 212, 135, 0.28);
}

.discord-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(88, 101, 242, 0.14);
    border: 1px solid rgba(88, 101, 242, 0.36);
    border-radius: 50%;
    transition: opacity 160ms ease, transform 160ms ease;
}

.discord-link:hover,
.discord-link:focus {
    opacity: 0.82;
    transform: translateY(-1px);
}

.discord-link img {
    display: block;
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.site-footer {
    flex-shrink: 0;
    padding: 22px 6vw 14px;
    color: var(--muted);
    background:
        linear-gradient(180deg, rgba(7, 9, 8, 0.82), rgba(7, 9, 8, 0.6)),
        linear-gradient(135deg, rgba(242, 174, 84, 0.08), rgba(66, 223, 141, 0.06));
    border-top: 1px solid var(--border);
    backdrop-filter: blur(10px);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.62);
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(140px, 0.42fr) minmax(170px, 0.5fr);
    gap: 28px;
    max-width: 1180px;
    margin: 0 auto;
}

.footer-brand p {
    max-width: 440px;
    margin: 8px 0 0;
    font-size: 0.92rem;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.footer-logo img {
    display: block;
    width: 30px;
    height: 30px;
    object-fit: contain;
    filter: drop-shadow(0 0 14px rgba(56, 212, 135, 0.16));
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.footer-links h2 {
    margin: 0 0 2px;
    color: var(--text);
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.footer-links a {
    color: var(--muted);
    font-size: 0.92rem;
    transition: color 160ms ease;
}

.footer-links a:hover,
.footer-links a:focus {
    color: var(--text);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1180px;
    margin: 16px auto 0;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 0.86rem;
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom a {
    color: var(--muted);
    transition: color 160ms ease;
}

.footer-bottom a:hover,
.footer-bottom a:focus {
    color: var(--text);
}

@media (max-width: 640px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 16px 6vw;
    }

    .site-nav {
        flex-wrap: wrap;
        gap: 8px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}
