@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Press+Start+2P&display=swap");

:root {
    --bg: #0a0712;
    --panel: #181020;
    --text: #f7f4ff;
    --muted: rgba(247, 244, 255, 0.76);
    --line: rgba(255, 146, 120, 0.22);
    --accent: #ff9278;
    --violet: #c342ff;
    --font-pixel: "Press Start 2P", "Courier New", monospace;
    --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; overflow-x: hidden; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background: var(--bg); color: var(--text); font-family: var(--font-body); }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; }
button { cursor: pointer; }

.site-header {
    position: relative;
    z-index: 20;
    width: calc(100% - 2px);
    min-height: 108px;
    margin: 12px auto 0;
    padding: 13px 26px 13px 22px;
    display: grid;
    grid-template-columns: max-content 1fr max-content;
    align-items: center;
    gap: 26px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    background: radial-gradient(circle at 52% 0, rgba(255, 146, 120, 0.2), transparent 23%), #08060f;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
}

.site-header__brand {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border: 4px solid rgba(255, 146, 120, 0.9);
    background:
        radial-gradient(circle at 50% 36%, rgba(195, 66, 255, 0.24), transparent 54%),
        linear-gradient(180deg, rgba(255, 146, 120, 0.13), rgba(26, 10, 40, 0.78));
    box-shadow:
        inset 0 0 0 2px rgba(255, 255, 255, 0.06),
        0 0 18px rgba(255, 146, 120, 0.28),
        0 0 30px rgba(195, 66, 255, 0.12);
}

.site-header__brand img { width: 58px; height: 58px; filter: drop-shadow(0 0 16px rgba(255, 146, 120, 0.34)); }
.site-header__menu { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) max-content; align-items: center; gap: 26px; }
.site-header__toggle { display: none; }
.site-header__nav { display: flex; align-items: center; gap: 32px; }
.site-header__nav-link { width: 56px; height: 56px; display: grid; place-items: center; }
.site-header__nav-link img { width: 52px; height: 52px; filter: drop-shadow(0 0 11px rgba(255, 146, 120, 0.45)); transition: transform 160ms ease, filter 160ms ease; }
.site-header__nav-link span { display: none; }
.site-header__nav-link:hover img { transform: translateY(-2px); filter: drop-shadow(0 0 18px rgba(255, 146, 120, 0.75)); }

.site-header__player { justify-self: end; display: inline-flex; align-items: center; gap: 22px; }
.site-header__player span:first-child { min-height: 44px; padding: 12px 10px; display: inline-flex; align-items: center; border-radius: 4px; background: linear-gradient(180deg, rgba(255, 146, 120, 0.18), rgba(255, 146, 120, 0.1)); color: var(--accent); font-weight: 500; box-shadow: 0 0 24px rgba(255, 146, 120, 0.1); }
.site-header__avatar { width: 76px; height: 76px; border: 1px solid var(--accent); border-radius: 50%; background: radial-gradient(circle at 50% 35%, #ffe2d8 0 18%, #7849aa 19% 42%, #1b1730 43%); box-shadow: 0 0 26px rgba(255, 146, 120, 0.18); }

.backend-shell { width: min(860px, calc(100% - 32px)); margin: 0 auto; padding: 48px 0; }
.backend-card { padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }

@media (max-width: 680px) {
    .site-header { width: calc(100% - 16px); min-height: 76px; padding: 9px 12px; gap: 12px; }
    .site-header__brand { width: 54px; height: 54px; border-width: 4px; }
    .site-header__brand img { width: 40px; height: 40px; }
    .site-header__nav { gap: 12px; justify-content: center; }
    .site-header__nav-link { width: 38px; height: 38px; }
    .site-header__nav-link img { width: 34px; height: 34px; }
    .site-header__player span:first-child { display: none; }
    .site-header__avatar { width: 48px; height: 48px; }
}
@media (max-width: 680px) {
    .site-header__player { display: none; }
    .site-header { grid-template-columns: max-content 1fr; }
    .site-header__nav { justify-self: end; }
}

@media (max-width: 680px) {
    .site-header__nav { gap: 8px; }
    .site-header__nav-link { width: 34px; height: 34px; }
    .site-header__nav-link img { width: 30px; height: 30px; }
}

.site-header {
    position: sticky;
    top: 0;
    margin-top: 0;
}

.site-footer {
    position: relative;
    z-index: 8;
    margin-top: clamp(70px, 8vw, 130px);
    background: #190c31;
    color: #fff;
    overflow: hidden;
}

.site-footer__edge {
    position: relative;
    height: 94px;
    background: #191919;
}

.site-footer__edge::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 68px;
    background: #190c31;
    clip-path: polygon(
        0 38%, 3% 38%, 3% 66%, 6% 66%, 6% 94%, 9% 94%, 9% 66%,
        32% 66%, 32% 38%, 38% 38%, 38% 66%, 41% 66%, 41% 10%,
        46% 10%, 46% 66%, 49% 66%, 49% 6%, 52% 6%, 52% 36%,
        58% 36%, 58% 9%, 61% 9%, 61% 36%, 64% 36%, 64% 0,
        67% 0, 67% 9%, 70% 9%, 70% 66%, 73% 66%, 73% 38%,
        76% 38%, 76% 9%, 79% 9%, 79% 38%, 93% 38%, 93% 66%,
        100% 66%, 100% 100%, 0 100%
    );
}

.site-footer__inner {
    width: min(1190px, calc(100% - 56px));
    min-height: 410px;
    margin: 0 auto;
    padding: 116px 0 74px;
    display: grid;
    grid-template-columns: 170px repeat(5, minmax(120px, 1fr));
    align-items: start;
    gap: clamp(26px, 3.3vw, 56px);
}

.site-footer__logo {
    width: 118px;
    height: 118px;
    display: grid;
    place-items: center;
    border: 6px solid rgba(255, 146, 120, 0.9);
    background:
        radial-gradient(circle at 50% 34%, rgba(195, 66, 255, 0.24), transparent 58%),
        linear-gradient(180deg, rgba(255, 146, 120, 0.12), rgba(24, 8, 42, 0.82));
    color: var(--accent);
    box-shadow:
        inset 0 0 0 3px rgba(255, 255, 255, 0.05),
        0 0 24px rgba(255, 146, 120, 0.22),
        0 0 40px rgba(195, 66, 255, 0.12);
}

.site-footer__logo img {
    width: 88px;
    height: 88px;
    filter: drop-shadow(0 0 18px rgba(255, 146, 120, 0.38));
}

.site-footer__group {
    display: grid;
    justify-items: center;
    gap: 14px;
    text-align: center;
}

.site-footer__group h2 {
    margin: 0 0 2px;
    color: #fff;
    font-size: clamp(1.42rem, 1.65vw, 1.98rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
}

.site-footer__group a {
    color: #9cff77;
    font-size: clamp(1.06rem, 1.25vw, 1.48rem);
    font-weight: 500;
    line-height: 1.1;
    transition: color 150ms ease, transform 150ms ease, text-shadow 150ms ease;
}

.site-footer__group a:hover {
    color: #c9ffb8;
    transform: translateY(-2px);
    text-shadow: 0 0 14px rgba(156, 255, 119, 0.35);
}

@media (max-width: 980px) {
    .site-footer__inner {
        grid-template-columns: 1fr 1fr 1fr;
        padding-top: 80px;
    }

    .site-footer__logo {
        justify-self: center;
    }
}

@media (max-width: 620px) {
    .site-footer__edge {
        height: 66px;
    }

    .site-footer__inner {
        width: min(100% - 32px, 460px);
        grid-template-columns: 1fr 1fr;
        gap: 30px 20px;
        padding: 58px 0 52px;
    }

    .site-footer__logo {
        grid-column: 1 / -1;
        width: 96px;
        height: 96px;
        border-width: 5px;
    }

    .site-footer__logo img {
        width: 72px;
        height: 72px;
    }
}

.site-footer { margin-top: clamp(34px, 4vw, 72px); }

@media (min-width: 981px) {
    .site-footer__inner {
        grid-template-columns: 140px repeat(5, max-content);
        justify-content: space-between;
    }
}

.site-header {
    background:
        radial-gradient(circle at 52% 0, rgba(255, 146, 120, 0.23), transparent 24%),
        linear-gradient(180deg, rgba(10, 6, 17, 0.88), rgba(8, 5, 13, 0.72));
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 18px 58px rgba(0, 0, 0, 0.42), 0 0 42px rgba(255, 146, 120, 0.08);
}

.site-footer {
    z-index: 4;
    margin-top: clamp(-118px, -6.4vw, -76px);
    background:
        radial-gradient(circle at 14% 4%, rgba(195, 66, 255, 0.14), transparent 24%),
        #190c31;
}

.site-footer__edge {
    height: 124px;
    background:
        linear-gradient(180deg, rgba(12, 6, 20, 0), #191919 30%),
        #191919;
}

.site-footer__edge::after {
    height: 82px;
}

@media (min-width: 981px) {
    .site-footer__inner {
        min-height: 430px;
        padding-top: 104px;
    }
}

@media (max-width: 680px) {
    .site-footer {
        margin-top: -56px;
    }
}

/* Footer repair: blend the pixel edge into the hero instead of a separate gray bar. */
.site-footer {
    z-index: 3;
    margin-top: -122px;
    background:
        radial-gradient(circle at 18% 0, rgba(195, 66, 255, 0.18), transparent 22rem),
        linear-gradient(180deg, #190c31 0%, #180b2f 100%);
}

.site-footer__edge {
    height: 148px;
    background:
        linear-gradient(180deg, rgba(25, 12, 49, 0), rgba(15, 8, 27, 0.18) 26%, #0d0a12 70%);
}

.site-footer__edge::after {
    height: 84px;
    background: #190c31;
}

@media (min-width: 981px) {
    .site-footer__inner {
        width: min(1190px, calc(100% - 72px));
        min-height: 390px;
        padding: 92px 0 68px;
    }
}

@media (max-width: 680px) {
    .site-footer {
        margin-top: -44px;
    }

    .site-footer__edge {
        height: 78px;
    }
}

/* Header responsive pass. */
.site-header {
    grid-template-columns: max-content minmax(0, 1fr);
}

@media (max-width: 760px) {
    .site-header {
        width: calc(100% - 16px);
        min-height: 72px;
        padding: 8px 10px;
        grid-template-columns: max-content max-content;
        justify-content: space-between;
        gap: 12px;
    }

    .site-header__brand {
        width: 54px;
        height: 54px;
    }

    .site-header__brand img {
        width: 40px;
        height: 40px;
    }

    .site-header__toggle {
        width: 50px;
        height: 50px;
        display: inline-grid;
        place-items: center;
        padding: 11px;
        border: 1px solid rgba(255, 146, 120, 0.32);
        border-radius: 6px;
        background:
            radial-gradient(circle at 50% 0, rgba(255, 146, 120, 0.2), transparent 72%),
            rgba(16, 8, 26, 0.96);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 24px rgba(255, 146, 120, 0.1);
    }

    .site-header__toggle span {
        width: 25px;
        height: 3px;
        display: block;
        border-radius: 999px;
        background: var(--accent);
        box-shadow: 0 0 12px rgba(255, 146, 120, 0.36);
        transition: transform 170ms ease, opacity 170ms ease;
    }

    .site-header.is-menu-open .site-header__toggle span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .site-header.is-menu-open .site-header__toggle span:nth-child(2) {
        opacity: 0;
    }

    .site-header.is-menu-open .site-header__toggle span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .site-header__menu {
        position: absolute;
        left: 0;
        right: 0;
        top: calc(100% + 8px);
        display: none;
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
        border: 1px solid rgba(255, 146, 120, 0.18);
        border-radius: 8px;
        background:
            radial-gradient(circle at 20% 0, rgba(255, 146, 120, 0.18), transparent 16rem),
            linear-gradient(180deg, rgba(15, 8, 26, 0.98), rgba(8, 5, 14, 0.98));
        box-shadow: 0 24px 54px rgba(0, 0, 0, 0.52), 0 0 42px rgba(195, 66, 255, 0.12);
        pointer-events: none;
        transform: translateY(-8px);
        visibility: hidden;
        transition: transform 170ms ease;
    }

    .site-header.is-menu-open .site-header__menu {
        display: grid;
        pointer-events: auto;
        transform: translateY(0);
        visibility: visible;
    }

    .site-header__nav {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        justify-self: stretch;
    }

    .site-header__nav-link {
        width: 100%;
        min-width: 0;
        height: auto;
        min-height: 68px;
        padding: 10px 6px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.035);
    }

    .site-header__nav-link img {
        width: 30px;
        height: 30px;
    }

    .site-header__nav-link span {
        display: block;
        color: rgba(255, 244, 239, 0.88);
        font-size: 0.78rem;
        font-weight: 800;
        line-height: 1;
    }

    .site-header .site-header__player {
        width: 100%;
        min-width: 0;
        display: flex;
        justify-content: space-between;
        gap: 14px;
        padding: 10px 12px;
        border: 1px solid rgba(255, 146, 120, 0.16);
        border-radius: 6px;
        background: rgba(255, 146, 120, 0.06);
    }

    .site-header .site-header__player span:first-child {
        min-width: 0;
        max-width: 100%;
        display: inline-flex;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .site-header__avatar {
        width: 46px;
        height: 46px;
        flex: 0 0 auto;
    }
}

@media (max-width: 420px) {
    .site-header__nav {
        grid-template-columns: 1fr;
    }

    .site-header__nav-link {
        min-height: 54px;
        flex-direction: row;
    }
}
