/* =========================================
   MYAUBUILD — Seleção de jogos
   ========================================= */

:root {
    --home-ink: #f5f2ea;
    --home-muted: #aeb9ca;
    --home-gold: #cbb98d;
    --home-gold-soft: rgba(203, 185, 141, .42);
    --home-blue: #66bfff;
    --home-panel: rgba(7, 13, 24, .78);
    --home-line: rgba(210, 221, 239, .18);
}

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

html {
    min-height: 100%;
    background: #07101f;
}

body.home-page {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    overflow-x: hidden;
    background:
        linear-gradient(180deg, rgba(3, 8, 17, .36) 0%, rgba(3, 8, 17, .10) 38%, rgba(3, 8, 17, .82) 100%),
        var(--site-world-background, url('/assets/images/home/world-background.webp')) center / cover fixed no-repeat;
    color: var(--home-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.home-page::before {
    content: "";
    position: fixed;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 13%, rgba(42, 101, 180, .17), transparent 34%),
        linear-gradient(90deg, rgba(1, 6, 14, .42), transparent 24%, transparent 76%, rgba(1, 6, 14, .42));
}

body.home-page::after {
    content: "";
    position: fixed;
    z-index: 20;
    inset: 10px;
    border: 1px solid rgba(206, 215, 225, .18);
    border-radius: 2px;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, .18);
    pointer-events: none;
}

/* Header */

.home-page .header {
    position: relative;
    z-index: 5;
    width: min(calc(100% - 64px), 1480px);
    max-width: none;
    min-height: 82px;
    height: auto;
    margin: 0 auto;
    padding: 15px 0;
    border-bottom: 1px solid var(--home-line);
}

.home-page .header::before,
.home-page .header::after {
    content: "";
    position: absolute;
    bottom: -3px;
    width: 5px;
    height: 5px;
    border: 1px solid var(--home-gold-soft);
    background: #101a29;
    transform: rotate(45deg);
}

.home-page .header::before {
    left: 0;
}

.home-page .header::after {
    right: 0;
}

.home-page .header > .site-logo {
    position: static;
    width: 300px;
    max-width: 44vw;
    margin: 0;
    transform: none;
}

.home-landing-page .header > .site-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.home-page .site-logo__link {
    filter: drop-shadow(0 5px 14px rgba(0, 0, 0, .46));
}

.home-page .header-actions {
    margin-left: auto;
}

.home-page .button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 15px;
    border: 1px solid rgba(194, 210, 231, .17);
    border-radius: 8px;
    color: #e9edf5;
    background: rgba(12, 20, 33, .72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
    backdrop-filter: blur(12px);
    transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease;
}

.home-page .button:hover {
    border-color: rgba(130, 190, 255, .42);
    background: rgba(20, 34, 54, .90);
    color: #fff;
    transform: translateY(-1px);
}

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

.home-page .logout-button {
    min-height: 36px;
    padding: 7px 10px;
    color: #aeb8c7;
    background: transparent;
}

.home-page .user-area {
    padding: 5px 7px 5px 6px;
    border: 1px solid rgba(200, 215, 235, .12);
    border-radius: 999px;
    background: rgba(7, 14, 25, .56);
    backdrop-filter: blur(14px);
}

.home-page .avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    background: linear-gradient(145deg, #74c4ff, #4e62cf);
    box-shadow: 0 0 18px rgba(92, 169, 255, .27);
}

.home-page .home-user-link {
    color: inherit;
    text-decoration: none;
}

.home-page .home-user-link:hover .username {
    color: #8dccff;
}

.home-page .username {
    transition: color .2s ease;
}

.home-page .role {
    color: #8f9caf;
}

/* Conteúdo principal */

.game-selector {
    position: relative;
    z-index: 2;
    width: min(calc(100% - 48px), 1040px);
    margin: 0 auto;
    padding: 44px 0 52px;
}

.game-selector__intro {
    max-width: 720px;
    margin: 0 auto 28px;
    text-align: center;
}

.game-selector__eyebrow {
    margin: 0 0 12px;
    color: var(--home-gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .24em;
    text-transform: uppercase;
    text-shadow: 0 2px 12px #000;
}

.game-selector__intro h1 {
    margin: 10px 0 0;
    color: #f7f4ed;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(30px, 4.2vw, 47px);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: .055em;
    text-transform: uppercase;
    text-shadow: 0 4px 22px rgba(0, 0, 0, .72);
}

.game-selector__copy {
    max-width: 620px;
    margin: 14px auto 0;
    color: #bac4d3;
    font-size: 14px;
    line-height: 1.65;
    text-shadow: 0 2px 10px #000;
}

.game-selector__ornament {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
    max-width: 460px;
    margin: 0 auto;
}

.game-selector__ornament span {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--home-gold-soft));
}

.game-selector__ornament span:last-child {
    background: linear-gradient(90deg, var(--home-gold-soft), transparent);
}

.game-selector__ornament i {
    width: 9px;
    height: 9px;
    border: 1px solid var(--home-gold);
    transform: rotate(45deg);
    box-shadow: 0 0 12px rgba(204, 183, 127, .22);
}

/* Cards */

.game-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 350px));
    justify-content: center;
    gap: clamp(20px, 3vw, 38px);
}

.game-choice-card {
    position: relative;
    isolation: isolate;
    min-width: 0;
    min-height: 490px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
    border: 1px solid rgba(202, 215, 232, .24);
    border-radius: 22px;
    background: #080d15;
    box-shadow: 0 22px 54px rgba(0, 0, 0, .48), inset 0 0 0 1px rgba(255, 255, 255, .025);
    color: #fff;
    text-decoration: none;
}

.game-choice-card::after {
    content: "";
    position: absolute;
    z-index: 3;
    inset: 8px;
    border: 1px solid rgba(218, 224, 233, .10);
    border-radius: 15px;
    pointer-events: none;
}

.game-choice-card__art,
.game-choice-card__shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.game-choice-card__art {
    z-index: -2;
    display: block;
    object-fit: cover;
    transition: transform .45s ease, filter .35s ease, opacity .35s ease;
}

.game-choice-card--available .game-choice-card__art {
    object-position: 50% 48%;
}

.game-choice-card--coming .game-choice-card__art {
    object-position: 50% 43%;
    filter: grayscale(.40) saturate(.66) brightness(.73);
}

.game-choice-card__shade {
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(4, 8, 14, .16) 0%, rgba(4, 8, 14, .08) 34%, rgba(4, 8, 14, .92) 78%, #070b12 100%),
        linear-gradient(90deg, rgba(3, 7, 13, .14), transparent 50%, rgba(3, 7, 13, .14));
}

.game-choice-card__top,
.game-choice-card__content {
    position: relative;
    z-index: 4;
}

.game-choice-card__top {
    display: flex;
    justify-content: flex-end;
}

.game-choice-card__status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(127, 204, 255, .30);
    border-radius: 999px;
    background: rgba(5, 20, 36, .70);
    color: #a9dcff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.game-choice-card--coming .game-choice-card__status {
    border-color: rgba(206, 190, 153, .23);
    color: #bbb09b;
    background: rgba(10, 10, 11, .68);
}

.game-choice-card__content {
    padding: 0 6px 4px;
    text-align: center;
}

.game-choice-card__category {
    color: #9ecff4;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.game-choice-card--coming .game-choice-card__category {
    color: #ada38f;
}

.game-choice-card__content h2 {
    margin: 8px 0 7px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 29px;
    font-weight: 500;
    letter-spacing: .045em;
    text-transform: uppercase;
    text-shadow: 0 3px 15px #000;
}

.game-choice-card__content p {
    min-height: 40px;
    margin: 0 auto 16px;
    color: #b9c3d2;
    font-size: 13px;
    line-height: 1.5;
}

.game-choice-card__action {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    border: 1px solid rgba(105, 192, 255, .54);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(31, 111, 187, .91), rgba(45, 70, 142, .92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .13), 0 8px 22px rgba(14, 80, 150, .22);
    color: #f7fbff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.game-choice-card__action b {
    font-family: Arial, sans-serif;
    font-size: 20px;
}

.game-choice-card__action--disabled {
    border-color: rgba(204, 192, 164, .18);
    background: rgba(26, 27, 30, .84);
    box-shadow: none;
    color: #817c72;
}

.game-choice-card--available {
    border-color: rgba(96, 185, 255, .72);
    box-shadow:
        0 0 0 1px rgba(96, 185, 255, .18),
        0 0 34px rgba(38, 140, 230, .22),
        0 24px 58px rgba(0, 0, 0, .50);
    transition: transform .26s ease, border-color .26s ease, box-shadow .26s ease;
}

.game-choice-card--available:hover {
    border-color: #8bd1ff;
    box-shadow:
        0 0 0 1px rgba(116, 203, 255, .27),
        0 0 48px rgba(35, 152, 245, .32),
        0 28px 64px rgba(0, 0, 0, .55);
    transform: translateY(-6px);
}

.game-choice-card--available:hover .game-choice-card__art {
    transform: scale(1.035);
}

.game-choice-card--coming {
    cursor: not-allowed;
    opacity: .90;
}

/* Rodapé */

.home-footer {
    position: relative;
    z-index: 5;
    width: min(calc(100% - 64px), 1480px);
    min-height: 82px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 28px;
    margin: 0 auto;
    padding: 17px 0 20px;
    border-top: 1px solid var(--home-line);
    color: #8995a6;
    font-size: 11px;
    line-height: 1.55;
}

.home-footer::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 50%;
    width: 7px;
    height: 7px;
    border: 1px solid var(--home-gold-soft);
    background: #0b1421;
    transform: translateX(-50%) rotate(45deg);
}

.home-footer p {
    margin: 0;
}

.home-footer__legal {
    max-width: 470px;
}

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

.home-footer__signature strong {
    color: #c9d1de;
}

.home-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, .58);
    color: #929fb2;
    backdrop-filter: blur(9px);
}

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

/* Acessibilidade e responsividade */

.home-page a:focus-visible,
.home-page button:focus-visible {
    outline: 3px solid rgba(126, 201, 255, .88);
    outline-offset: 4px;
}

@media (max-height: 820px) and (min-width: 721px) {
    .game-selector {
        padding-top: 26px;
        padding-bottom: 32px;
    }

    .game-selector__intro {
        margin-bottom: 20px;
    }

    .game-choice-card {
        min-height: 405px;
    }

    .game-choice-card__content h2 {
        font-size: 25px;
    }
}

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

    body.home-page::after {
        inset: 5px;
    }

    .home-page .header {
        width: min(calc(100% - 34px), 1480px);
        min-height: 72px;
        padding: 12px 0;
    }

    .home-page .header > .site-logo {
        position: static;
        width: 244px;
        max-width: 44vw;
        margin: 0;
        transform: none;
    }

    .home-page .header-actions {
        gap: 7px;
    }

    .home-page .user-info {
        display: none;
    }

    .home-page .user-area {
        gap: 6px;
    }

    .game-selector {
        width: min(calc(100% - 34px), 440px);
        padding: 34px 0 42px;
    }

    .game-selector__copy {
        font-size: 13px;
    }

    .game-choice-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .game-choice-card {
        min-height: 520px;
    }

    .home-footer {
        width: min(calc(100% - 40px), 540px);
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 25px 0 28px;
        text-align: center;
    }

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

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

@media (max-width: 430px) {
    .home-page .header > .site-logo {
        width: 224px;
        max-width: 44vw;
    }

    .home-page .header-actions .button {
        min-height: 36px;
        padding: 7px 10px;
        font-size: 12px;
    }

    .game-selector__intro h1 {
        font-size: 29px;
        letter-spacing: .035em;
    }

    .game-choice-card {
        min-height: 480px;
        padding: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .game-choice-card,
    .game-choice-card__art,
    .home-page .button {
        transition: none;
    }
}
