/* =========================================
   MYAUBUILD — Tema visual compartilhado
   ========================================= */

:root {
    --site-ink: #f5f2ea;
    --site-muted: #aeb9ca;
    --site-blue: #66bfff;
    --site-gold: #cbb98d;
    --site-line: rgba(210, 221, 239, .17);
    --site-panel: rgba(9, 15, 25, .86);
}

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

body.site-theme {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    background:
        linear-gradient(180deg, rgba(3, 8, 17, .45), rgba(3, 8, 17, .76)),
        var(--site-world-background, url('/assets/images/home/world-background.webp')) center / cover fixed no-repeat;
    color: var(--site-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.site-theme::before {
    content: "";
    position: fixed;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 12%, rgba(51, 112, 196, .17), transparent 35%),
        linear-gradient(90deg, rgba(1, 6, 14, .38), transparent 25%, transparent 75%, rgba(1, 6, 14, .38));
}

body.site-theme::after {
    content: "";
    position: fixed;
    z-index: 50;
    inset: 10px;
    border: 1px solid rgba(207, 217, 231, .14);
    pointer-events: none;
}

/* Cabeçalho reutilizável */

.site-shell-header,
.site-theme .p-header,
.site-theme .game-header,
.site-theme .account-header {
    position: relative;
    z-index: 10;
    width: min(var(--ui-content-max, 1420px), calc(100% - (var(--ui-content-gutter, 32px) * 2)));
    max-width: none;
    min-height: 82px;
    margin: 0 auto;
    padding: 15px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--site-line);
    background: transparent;
}

.site-shell-header > .site-logo,
.site-theme .p-header > .site-logo,
.site-theme .game-header > .site-logo,
.site-theme .account-header > .site-logo {
    margin: 0;
}

.site-shell-header > .site-logo {
    width: 300px;
    max-width: 44vw;
}

.site-shell-header__actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 9px;
}

.site-shell-button {
    min-height: 39px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border: 1px solid rgba(194, 210, 231, .17);
    border-radius: 8px;
    background: rgba(11, 20, 33, .72);
    color: #e9edf5;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    backdrop-filter: blur(12px);
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.site-shell-button:hover {
    border-color: rgba(110, 192, 255, .45);
    background: rgba(20, 37, 59, .90);
    transform: translateY(-1px);
}

.site-shell-button.is-primary {
    border-color: rgba(103, 181, 255, .38);
    background: linear-gradient(135deg, rgba(34, 112, 190, .90), rgba(42, 76, 150, .90));
}

.site-shell-button--quiet {
    color: #aeb8c7;
    background: transparent;
}

.site-shell-logout {
    margin: 0;
}

.site-shell-user {
    min-height: 45px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 10px 5px 6px;
    border: 1px solid rgba(200, 215, 235, .13);
    border-radius: 999px;
    background: rgba(7, 14, 25, .58);
    color: inherit;
    text-decoration: none;
    backdrop-filter: blur(12px);
}

.site-shell-user__avatar {
    width: 33px;
    height: 33px;
    flex: 0 0 33px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #74c4ff, #4e62cf);
    font-size: 13px;
    font-weight: 850;
}

.site-shell-user__avatar img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.site-shell-user__copy {
    display: grid;
    gap: 2px;
    line-height: 1.1;
}

.site-shell-user__copy strong {
    font-size: 12px;
}

.site-shell-user__copy small {
    color: #8f9caf;
    font-size: 9px;
}

/* Rodapé reutilizável */

.site-shell-footer {
    position: relative;
    z-index: 5;
    width: min(var(--ui-content-max, 1420px), calc(100% - (var(--ui-content-gutter, 32px) * 2)));
    min-height: 78px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 28px;
    margin: 38px auto 0;
    padding: 17px 0 20px;
    border-top: 1px solid var(--site-line);
    color: #8995a6;
    font-size: 11px;
    line-height: 1.55;
}

.site-shell-footer p {
    margin: 0;
}

.site-shell-footer__legal {
    max-width: 480px;
}

.site-shell-footer__signature {
    justify-self: end;
    text-align: right;
}

.site-shell-footer__social {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(208, 218, 232, .15);
    border-radius: 50%;
    background: rgba(8, 16, 27, .60);
    color: #929fb2;
    text-decoration: none;
    backdrop-filter: blur(9px);
}

.site-shell-footer__social svg {
    width: 23px;
    height: 23px;
    fill: currentColor;
}

/* Formulários de autenticação */

body.site-theme.site-auth {
    padding: 42px 20px;
}

.site-auth .container,
.site-auth .register-container {
    position: relative;
    z-index: 2;
    width: min(100%, 510px);
    max-width: 510px;
    margin: auto;
}

.site-auth .site-logo {
    filter: drop-shadow(0 5px 18px rgba(0, 0, 0, .48));
}

.site-auth .subtitle {
    color: #b5bfce;
    text-shadow: 0 2px 12px #000;
}

.site-auth .card {
    border: 1px solid rgba(190, 210, 234, .18);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(16, 25, 40, .94), rgba(7, 13, 23, .92));
    box-shadow: 0 28px 70px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(255, 255, 255, .035);
    backdrop-filter: blur(18px);
}

.site-auth input:not([type="checkbox"]),
.site-auth select,
.site-auth textarea {
    min-height: 46px;
    border: 1px solid rgba(188, 207, 231, .16);
    border-radius: 9px;
    background: rgba(6, 12, 21, .76);
    color: #fff;
}

.site-auth input:focus,
.site-auth select:focus,
.site-auth textarea:focus {
    border-color: rgba(104, 191, 255, .68);
    outline: 3px solid rgba(63, 155, 235, .14);
}

.site-auth button[type="submit"],
.site-auth a.button {
    border: 1px solid rgba(103, 181, 255, .42);
    border-radius: 9px;
    background: linear-gradient(135deg, #2776bd, #3e52a4);
    box-shadow: 0 11px 26px rgba(23, 91, 159, .24);
}

.site-auth a {
    color: #8dccff;
}

/* Conteúdo, conta, jogos e Premium */

.site-theme .account-shell,
.site-theme .game-main,
.site-theme .p-main {
    position: relative;
    z-index: 2;
}

/* A página de farms usa o mesmo eixo visual do cabeçalho, rodapé e Builds.
   Esta regra é limitada ao tema compartilhado e mantém os shells legados fora dele. */
.site-theme .p-shell {
    width: min(var(--ui-content-max, 1420px), calc(100% - (var(--ui-content-gutter, 32px) * 2)));
}

.site-theme .card,
.site-theme .p-card,
.site-theme .game-class-card,
.site-theme .game-lineage,
.site-theme .games-directory-card {
    border-color: rgba(188, 207, 231, .16);
    background-color: rgba(12, 19, 31, .90);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
    backdrop-filter: blur(12px);
}

.site-theme .p-title,
.site-theme .game-title,
.site-theme .games-directory-title,
.site-theme .account-title {
    font-family: Georgia, "Times New Roman", serif;
    color: #f7f4ed;
    text-shadow: 0 4px 18px rgba(0, 0, 0, .50);
}

.site-theme .p-button,
.site-theme .game-button,
.site-theme .button {
    border-color: rgba(190, 210, 234, .17);
    backdrop-filter: blur(9px);
}

@media (max-width: 760px) {
    body.site-theme {
        background-attachment: scroll;
    }

    body.site-theme::after {
        inset: 5px;
    }

    .site-shell-header,
    .site-theme .p-header,
    .site-theme .game-header,
    .site-theme .account-header {
        width: min(var(--ui-content-max, 1420px), calc(100% - (var(--ui-content-gutter-mobile, 18px) * 2)));
        min-height: 70px;
        padding: 11px 0;
    }

    .site-shell-user__copy {
        display: none;
    }

    .site-shell-header > .site-logo {
        width: 244px;
        max-width: 44vw;
    }

    .site-shell-footer {
        width: min(calc(100% - (var(--ui-content-gutter-mobile, 18px) * 2)), 540px);
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 24px 0;
        text-align: center;
    }

    .site-shell-footer__legal,
    .site-shell-footer__signature {
        max-width: none;
        justify-self: center;
        text-align: center;
    }

    .site-shell-footer__social {
        grid-row: 1;
        justify-self: center;
    }

    .site-theme .p-shell {
        width: min(var(--ui-content-max, 1420px), calc(100% - (var(--ui-content-gutter-mobile, 18px) * 2)));
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-shell-button {
        transition: none;
    }
}
