/* Configurações gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    overflow: hidden;
    background: #050000;
    color: #ffffff;
    font-family: Georgia, "Times New Roman", serif;
}

/* Página completa do RPG Marvel */
.tela-marvel {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    isolation: isolate;
    background: #050000;
}

/* O GIF já foi editado para executar uma vez e parar. */
.background-marvel {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.58) contrast(1.15) saturate(1.15);
    transform: scale(1.01);
}

/* Camada escura para destacar as opções. */
.sombra-do-fundo {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 25% 52%, transparent 0 12%, rgba(0, 0, 0, 0.16) 38%, transparent 55%),
        radial-gradient(circle at 75% 52%, transparent 0 12%, rgba(0, 0, 0, 0.16) 38%, transparent 55%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.34), transparent 35%, rgba(0, 0, 0, 0.45)),
        radial-gradient(circle at center, transparent 10%, rgba(0, 0, 0, 0.48) 100%);
    pointer-events: none;
}

/* Título disponível para leitores de tela. */
.titulo-acessivel {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Área dos dois acessos */
.opcoes-de-acesso {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.botao-acesso {
    position: absolute;
    top: 54%;
    display: flex;
    width: clamp(190px, 19vw, 350px);
    flex-direction: column;
    align-items: center;
    gap: clamp(12px, 1.4vw, 22px);
    transform: translate(-50%, -50%);
    color: #ffffff;
    text-decoration: none;
    pointer-events: auto;
}

.botao-mestre {
    left: 25%;
}

.botao-jogadores {
    left: 75%;
}

/* Moldura das imagens */
.moldura-da-imagem {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.78);
    border-radius: 10px;
    background: rgba(10, 0, 0, 0.76);
    box-shadow:
        0 0 15px rgba(220, 0, 0, 0.48),
        inset 0 0 25px rgba(255, 255, 255, 0.06),
        0 18px 40px rgba(0, 0, 0, 0.72);
    transition:
        transform 350ms ease,
        border-color 350ms ease,
        box-shadow 350ms ease;
}

.moldura-da-imagem::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border: 5px solid rgba(170, 0, 0, 0.35);
    box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.68);
    pointer-events: none;
    transition: 350ms ease;
}

.moldura-da-imagem::after {
    content: "";
    position: absolute;
    inset: -65%;
    z-index: 3;
    background: linear-gradient(
        115deg,
        transparent 42%,
        rgba(255, 255, 255, 0.52) 49%,
        transparent 56%
    );
    opacity: 0;
    transform: translateX(-45%);
    pointer-events: none;
}

.imagem-acesso {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.78) contrast(1.08) saturate(0.9);
    transition:
        transform 500ms ease,
        filter 350ms ease;
}

.botao-mestre .imagem-acesso {
    object-position: center;
}

.botao-jogadores .imagem-acesso {
    object-position: 50% center;
}

.nome-do-acesso {
    color: rgba(255, 255, 255, 0.94);
    font-size: clamp(1.1rem, 1.6vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.09em;
    text-align: center;
    text-transform: uppercase;
    text-shadow:
        0 0 8px rgba(255, 255, 255, 0.35),
        0 0 18px rgba(210, 0, 0, 0.6),
        2px 3px 5px rgba(0, 0, 0, 0.95);
    transition:
        color 350ms ease,
        text-shadow 350ms ease,
        transform 350ms ease;
}

/* Efeitos ao passar o mouse */
.botao-acesso:hover .moldura-da-imagem,
.botao-acesso:focus-visible .moldura-da-imagem {
    transform: translateY(-8px);
    border-color: #ffffff;
    box-shadow:
        0 0 16px rgba(255, 255, 255, 0.75),
        0 0 42px rgba(225, 0, 0, 0.82),
        inset 0 0 28px rgba(255, 0, 0, 0.12),
        0 22px 45px rgba(0, 0, 0, 0.8);
}

.botao-acesso:hover .moldura-da-imagem::before,
.botao-acesso:focus-visible .moldura-da-imagem::before {
    border-color: rgba(255, 30, 30, 0.68);
}

.botao-acesso:hover .moldura-da-imagem::after,
.botao-acesso:focus-visible .moldura-da-imagem::after {
    opacity: 1;
    animation: reflexo-marvel 850ms ease forwards;
}

.botao-acesso:hover .imagem-acesso,
.botao-acesso:focus-visible .imagem-acesso {
    transform: scale(1.07);
    filter: brightness(1.02) contrast(1.12) saturate(1.12);
}

.botao-acesso:hover .nome-do-acesso,
.botao-acesso:focus-visible .nome-do-acesso {
    color: #ffffff;
    transform: translateY(-3px);
    text-shadow:
        0 0 9px #ffffff,
        0 0 24px rgba(255, 0, 0, 0.92),
        0 0 45px rgba(170, 0, 0, 0.6);
}

.botao-acesso:focus-visible {
    outline: none;
}

@keyframes reflexo-marvel {
    from {
        transform: translateX(-45%) rotate(8deg);
    }

    to {
        transform: translateX(45%) rotate(8deg);
    }
}

/* Botão para retornar à seleção dos RPGs */
.botao-voltar {
    position: absolute;
    bottom: clamp(18px, 3vh, 34px);
    left: clamp(18px, 3vw, 46px);
    z-index: 4;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 5px;
    background: rgba(35, 0, 0, 0.65);
    color: rgba(255, 255, 255, 0.82);
    font: 700 0.9rem Arial, sans-serif;
    letter-spacing: 0.09em;
    text-decoration: none;
    text-transform: uppercase;
    backdrop-filter: blur(5px);
    transition: 250ms ease;
}

.botao-voltar:hover,
.botao-voltar:focus-visible {
    border-color: #ffffff;
    background: rgba(110, 0, 0, 0.78);
    color: #ffffff;
    box-shadow:
        0 0 12px rgba(255, 255, 255, 0.4),
        0 0 25px rgba(220, 0, 0, 0.5);
    outline: none;
}

/* Ajuste para celulares */
@media (max-width: 760px) {
    body {
        overflow-y: auto;
    }

    .tela-marvel {
        min-height: 100svh;
    }

    .background-marvel {
        position: fixed;
    }

    .opcoes-de-acesso {
        display: flex;
        padding: 80px 20px 90px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 34px;
    }

    .botao-acesso {
        position: relative;
        top: auto;
        left: auto;
        width: clamp(145px, 46vw, 205px);
        gap: 10px;
        transform: none;
    }

    .nome-do-acesso {
        font-size: clamp(0.86rem, 3.8vw, 1.15rem);
        letter-spacing: 0.05em;
    }

    .botao-voltar {
        position: fixed;
        padding: 8px 12px;
        font-size: 0.76rem;
    }
}

/* Reduz animações caso essa opção esteja ativada no dispositivo. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
