@import url("https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&family=Luckiest+Guy&display=swap");

@font-face {
    font-family: "FontMario";
    src: url("./font/font-mario.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --fonte-base: "Baloo 2", "Trebuchet MS", Verdana, sans-serif;
    --fonte-titulo: "FontMario", "Luckiest Guy", "Baloo 2", sans-serif;
    --fonte-numero: "FontMario", "Baloo 2", sans-serif;

    --cor-fundo-escura: #041424;
    --cor-texto-claro: #ffffff;
    --cor-texto-suave: #eff8ea;

    --cor-titulo: #ffbb0f;
    --cor-titulo-borda: #2a1f03;

    --cor-resultado-borda: #ff8482;
    --cor-resultado-fundo-1: #fb4146;
    --cor-resultado-fundo-2: #c9131a;
    --cor-resultado-fundo-3: #b40d14;
    --cor-resultado-base: #8e090f;

    --cor-centro-meio-borda: rgba(210, 236, 255, 0.72);
    --cor-centro-meio-fundo-1: rgba(232, 245, 255, 0.86);
    --cor-centro-meio-fundo-2: rgba(185, 219, 245, 0.78);

    --borda-contorno: 14px;
}

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

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    margin: 0;
    background: var(--cor-fundo-escura);
    color: var(--cor-texto-claro);
    font-family: var(--fonte-base);
}

.container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100dvh;
    height: 100dvh;
    overflow: hidden;
    background:
        radial-gradient(
            900px 460px at 50% 30%,
            rgba(230, 248, 255, 0.4) 0%,
            rgba(230, 248, 255, 0.12) 38%,
            rgba(230, 248, 255, 0) 66%
        ),
        radial-gradient(
            1900px 900px at 50% 65%,
            #1a96f2 0%,
            #117ad5 52%,
            #0d66bf 100%
        );
}

.container::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(
            80% 80% at 50% 18%,
            rgba(255, 255, 255, 0.16) 0%,
            rgba(255, 255, 255, 0) 74%
        ),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.06));
}

.cabecalho,
.centro-meio {
    position: relative;
    z-index: 2;
    width: 100%;
}

.cabecalho {
    text-align: center;
    padding: clamp(6px, 1.2vh, 12px) 16px 4px;
}

.botao-criador {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border: 2px solid #ffd84d;
    border-radius: 999px;
    background: linear-gradient(180deg, #1d4f95, #1251be);
    color: #fff;
    font-family: var(--fonte-base);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow:
        0 6px 0 #0d2d5f,
        0 12px 20px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition:
        transform 150ms ease,
        box-shadow 150ms ease,
        background 150ms ease;
}

.botao-criador:hover {
    transform: translateY(-1px);
    box-shadow:
        0 8px 0 #0d2d5f,
        0 16px 24px rgba(0, 0, 0, 0.22);
}

.botao-criador__icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.botao-criador__texto {
    font-size: 0.95rem;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 11, 30, 0.72);
    backdrop-filter: blur(6px);
    display: grid;
    place-items: center;
    padding: 24px;
    z-index: 50;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-criador {
    width: min(420px, 100%);
    border-radius: 24px;
    border: 2px solid #ffca37;
    background: linear-gradient(
        180deg,
        rgba(17, 33, 69, 0.98),
        rgba(11, 23, 52, 0.98)
    );
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.modal-criador__cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(255, 210, 75, 0.08), transparent);
}

.modal-criador__rotulo {
    font-family: var(--fonte-titulo);
    color: #fcedb3;
    font-size: 1.05rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.modal-criador__fechar {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    transition:
        background 150ms ease,
        transform 150ms ease;
}

.modal-criador__fechar:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.modal-criador__conteudo {
    display: grid;
    gap: 12px;
    padding: 18px 18px 24px;
}

.modal-criador__conteudo a {
     text-decoration: none;
}

.modal-criador__item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    place-items: start;
    align-items: center;
    width: 100%;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.06),
        rgba(255, 255, 255, 0.02)
    );
    color: #fff;
    cursor: pointer;
    transition:
        transform 280ms ease,
        background 150ms ease;
}

.modal-criador__item:hover {
    transform: scale(1.05);
}

.modal-criador__item-texto {
    color: #c8d0e3;
    font-family: sans-serif;
    letter-spacing: 0.1em;
    display: flex;
    align-items: start;
    font-weight: 100;
    flex-direction: column;
    gap: 6px;
   
}



.modal-criador__item-icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    color: #ffffff;
}

.modal-criador__item-texto strong {
   
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.modal-criador__item--github {
    background-color: #050b12;
    border: 3px solid #324961;
}

.modal-criador__item--linkedin {
    background-color: #002873;
  border: 3px solid #0062c4;
}

.modal-criador__item--instagram {
    background: linear-gradient(
        297deg,
      rgb(158, 0, 176),
      rgb(207, 21, 24)
    );
    border: 3px solid #e34fa1;
}

.titulo {
    margin: 0;
    font-family: var(--fonte-titulo);
    font-size: clamp(30px, 5vh, 86px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.05em;
    text-indent: 0.05em;
    text-transform: uppercase;
    color: var(--cor-titulo);
    text-shadow:
        0 1px 0 #7f5f08,
        0 2px 0 #6f5307,
        0 3px 0 #5e4606,
        0 4px 0 #4c3905,
        0 5px 0 #3b2d04,
        0 6px 0 #2a1f03,
        3px 8px 0 #1a1202,
        0 14px 18px rgba(0, 0, 0, 0.55);
    -webkit-text-stroke: 1px var(--cor-titulo-borda);
}

.subtitulo {
    margin: 0;
    font-family: var(--fonte-base);
    font-size: clamp(30px, 4.2vh, 54px);
    font-weight: 400;
    color: var(--cor-texto-suave);
    text-shadow: 0 3px 0 rgba(0, 0, 0, 0.24);
}

.centro-meio {
    max-width: 620px;
    margin: 0;
    padding: 4px 16px clamp(8px, 1.4vh, 16px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(8px, 1.4vh, 14px);
}

.aura-mario {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
}

.aura-mario::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: clamp(170px, 26vh, 300px);
    height: clamp(170px, 26vh, 300px);
    transform: translate(-50%, -50%) scale(0.94);
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 206, 71, 0.62) 0%,
        rgba(255, 196, 51, 0.38) 36%,
        rgba(255, 190, 40, 0.1) 58%,
        rgba(255, 190, 40, 0) 74%
    );
    filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

.imagem-mario {
    position: relative;
    z-index: 1;
    width: clamp(150px, 24vh, 290px);
    height: auto;
    filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.24));
    user-select: none;
    -webkit-user-drag: none;
    transition: filter 180ms ease;
}

.container.esta-rodando .aura-mario::before {
    opacity: 1;
    animation: brilho-dourado 780ms ease-in-out infinite;
}

@keyframes brilho-dourado {
    0% {
        transform: translate(-50%, -50%) scale(0.94);
        opacity: 0.46;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.08);
        opacity: 0.98;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.94);
        opacity: 0.46;
    }
}

.cartao-resultado {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: min(220px, 84vw);
    padding: 10px 14px 12px;
    border: 3px solid var(--cor-resultado-borda);
    border-radius: 20px;
    background: linear-gradient(
        180deg,
        var(--cor-resultado-fundo-1) 0%,
        var(--cor-resultado-fundo-2) 65%,
        var(--cor-resultado-fundo-3) 100%
    );
    box-shadow:
        inset 0 3px 10px rgba(255, 255, 255, 0.22),
        0 5px 0 var(--cor-resultado-base),
        0 14px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.cartao-resultado.esta-pop {
    animation: pop 300ms ease-out;
}

@keyframes pop {
    0% {
        transform: translateY(0) scale(1);
    }
    60% {
        transform: translateY(-2px) scale(1.03);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

.cartao-resultado__rotulo {
    margin: 0;
    font-size: clamp(14px, 1.8vh, 20px);
    font-weight: 800;
    line-height: 1;
    color: #ffeaea;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.32);
}

.cartao-resultado__valor {
    min-height: 1em;
    font-family: var(--fonte-numero);
    font-size: clamp(48px, 7.2vh, 84px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.02em;
    color: #ffffff;
    text-shadow:
        0 3px 0 rgba(0, 0, 0, 0.3),
        0 8px 12px rgba(0, 0, 0, 0.2);
}

.cartao-resultado__valor.esta-rolando {
    filter: blur(0.2px);
}

.caixa-controles {
    width: min(460px, 92vw);
    padding: 14px;
    border: 2px solid var(--cor-centro-meio-borda);
    border-radius: 18px;
    background: linear-gradient(
        180deg,
        var(--cor-centro-meio-fundo-1),
        var(--cor-centro-meio-fundo-2)
    );
    box-shadow:
        inset 0 1px 8px rgba(255, 255, 255, 0.45),
        0 12px 24px rgba(0, 0, 0, 0.18);
}

.intervalo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 1.6vw, 18px);
}

.campo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.campo__rotulo {
    margin: 0;
    font-size: clamp(20px, 3vh, 36px);
    font-weight: 800;
    line-height: 1;
    color: #445569;
}

.campo__entrada {
    width: clamp(84px, 11vw, 120px);
    height: clamp(40px, 5.2vh, 52px);
    padding: 0 8px;
    border: 2px solid #a8b9ca;
    border-radius: 10px;
    background: linear-gradient(180deg, #f8fbff 0%, #deebf8 100%);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.8);
    color: #2b3542;
    font-size: clamp(24px, 3vh, 34px);
    font-weight: 800;
    text-align: center;
}

.campo__entrada:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.9);
    outline-offset: 1px;
}

.campo__entrada::-webkit-outer-spin-button,
.campo__entrada::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.acoes {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
}

.acoes .botao--comecar {
    grid-column: 1 / -1;
}

.modo-sorteio {
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "titulo titulo"
        "seletor ajuda";
    gap: 8px 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(20, 54, 86, 0.25);
    background: linear-gradient(
        180deg,
        rgba(236, 244, 252, 0.86),
        rgba(206, 223, 240, 0.74)
    );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 8px 16px rgba(0, 0, 0, 0.08);
}

.modo-sorteio__titulo {
    cursor: default;
    grid-area: titulo;
    justify-self: center;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.16em;
    color: rgba(25, 54, 78, 0.9);
}

.seletor-modo-switch {
    grid-area: seletor;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.seletor-modo-switch__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.seletor-modo-switch__label {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    width: 140px;
    height: 42px;
}

.seletor-modo-switch__fundo {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    border: 2px solid #a8b9ca;
    background: linear-gradient(180deg, #f5f8fb, #dde7f1);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.6);
    transition: all 300ms ease;
    z-index: 1;
}

.seletor-modo-switch__bolinha {
    position: absolute;
    left: 4px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffffff, #f0f4f8);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: left 300ms cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.seletor-modo-switch__input:not(:checked)
    + .seletor-modo-switch__label
    .seletor-modo-switch__fundo {
    background: linear-gradient(180deg, #ff0000 0%, #d10000 100%);
    border-color: #8a1216;
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        0 2px 6px rgba(227, 42, 48, 0.3);
}

.seletor-modo-switch__input:checked
    + .seletor-modo-switch__label
    .seletor-modo-switch__fundo {
    background: linear-gradient(180deg, #2bb64a, #1fa038);
    border-color: #0f6f2b;
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        0 2px 6px rgba(43, 182, 74, 0.3);
}

.seletor-modo-switch__input:checked
    + .seletor-modo-switch__label
    .seletor-modo-switch__bolinha {
    left: calc(100% - 36px);
    background: linear-gradient(180deg, #ffffff, #f5f5f5);
}

.seletor-modo-switch__texto {
    position: absolute;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
    z-index: 1;
    pointer-events: none;
    transition: color 300ms ease;
}

.seletor-modo-switch__texto--esquerda {
    left: 12px;
    color: rgba(255, 255, 255, 0.5);
    display: none;
}

.seletor-modo-switch__texto--direita {
    right: 12px;
    color: rgba(255, 255, 255, 0.7);
    display: block;
}

.seletor-modo-switch__input:checked
    + .seletor-modo-switch__label
    .seletor-modo-switch__texto--esquerda {
    display: block;
}

.seletor-modo-switch__input:checked
    + .seletor-modo-switch__label
    .seletor-modo-switch__texto--direita {
    display: none;
}

.modo-sorteio__ajuda {
    grid-area: ajuda;
    margin: 0;
    align-self: center;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.15;
    color: rgba(14, 39, 62, 0.9);
    text-align: left;
}

.botao {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: clamp(8px, 1.1vh, 12px) 12px;
    border: 2px solid rgba(8, 41, 18, 0.4);
    border-radius: var(--borda-contorno);
    cursor: pointer;
    user-select: none;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.03em;
    box-shadow:
        0 4px 0 var(--cor-sombra-botao, rgba(0, 0, 0, 0.25)),
        0 8px 14px rgba(0, 0, 0, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition:
        transform 120ms ease,
        box-shadow 120ms ease,
        filter 120ms ease,
        opacity 120ms ease;
}

.botao:hover:not(:disabled) {
    filter: brightness(1.03) saturate(1.05);
}

.botao:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow:
        0 2px 0 var(--cor-sombra-botao, rgba(0, 0, 0, 0.25)),
        0 4px 8px rgba(0, 0, 0, 0.13),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.botao:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.9);
    outline-offset: 3px;
}

.botao:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    filter: saturate(0.75);
}

.botao__icone {
    width: clamp(28px, 3.7vh, 34px);
    height: clamp(24px, 3.2vh, 28px);
    display: grid;
    place-items: center;
    border: 2px solid rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.botao__texto {
    font-size: clamp(20px, 2.6vh, 34px);
    line-height: 1;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.24);
}

.botao--comecar {
    --cor-sombra-botao: #0f7a32;
    color: #e9ffeb;
    background: linear-gradient(180deg, #29d44d 0%, #119838 65%, #0d8230 100%);
}

.botao--parar {
    --cor-sombra-botao: #4d6f8c;
    border-color: rgba(64, 94, 124, 0.35);
    color: #2b5f9b;
    background: linear-gradient(180deg, #dbeaf6 0%, #c5dbec 100%);
}

.botao--resetar {
    --cor-sombra-botao: #baa15d;
    border-color: rgba(170, 140, 63, 0.42);
    color: #9f7d27;
    background: linear-gradient(180deg, #f3ecd6 0%, #efe0af 100%);
}

.dica {
    display: none;
}

.dica[data-tipo="erro"] {
    color: #ffe7e7;
}

.decoracoes {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.nuvem {
    position: absolute;
    width: 140px;
    height: 54px;
    border: 4px solid #153a64;
    border-radius: 999px;
    background: linear-gradient(180deg, #eaf6ff 0%, #c8e2f6 100%);
    box-shadow:
        0 4px 0 rgba(14, 57, 102, 0.72),
        0 8px 12px rgba(0, 0, 0, 0.14);
}

.nuvem::before,
.nuvem::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: inherit;
    border: inherit;
}

.nuvem::before {
    top: -20px;
    left: 18px;
    width: 56px;
    height: 38px;
}

.nuvem::after {
    top: -14px;
    right: 16px;
    width: 52px;
    height: 34px;
}

.nuvem--superior-esquerda {
    top: 16px;
    left: 26px;
    transform: scale(0.78);
}

.nuvem--superior-direita {
    top: 88px;
    right: 26px;
    transform: scale(0.78);
}

.nuvem--inferior-esquerda {
    bottom: 48px;
    left: 42px;
    transform: scale(0.72);
}

.decoracao {
    position: absolute;
    opacity: 0.38;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.2));
}

.decoracao--moeda {
    top: 140px;
    left: 32%;
    width: 52px;
    height: 52px;
    border: 3px solid #bf831e;
    border-radius: 50%;
    background:
        radial-gradient(
            circle at 35% 30%,
            rgba(255, 255, 255, 0.34),
            transparent 58%
        ),
        linear-gradient(180deg, #f8de7a 0%, #e0a22f 100%);
}

.decoracao--cogumelo {
    top: 182px;
    right: 27%;
    width: 58px;
    height: 58px;
    border: 3px solid #3f5797;
    border-radius: 28px 28px 24px 24px;
    background:
        radial-gradient(circle at 30% 30%, #d8e6ff 0 10px, transparent 11px),
        radial-gradient(circle at 70% 40%, #d8e6ff 0 8px, transparent 9px),
        linear-gradient(180deg, #7a93d8 0%, #506fbe 100%);
}

.decoracao--estrela {
    top: 430px;
    right: 23%;
    width: 70px;
    height: 70px;
    clip-path: polygon(
        50% 0,
        62% 35%,
        100% 35%,
        68% 57%,
        79% 100%,
        50% 74%,
        21% 100%,
        32% 57%,
        0 35%,
        38% 35%
    );
    border: 2px solid rgba(109, 119, 59, 0.8);
    background: linear-gradient(180deg, #efef91 0%, #c7d071 100%);
}

@media (prefers-reduced-motion: reduce) {
    .container.esta-rodando .aura-mario::before {
        animation: none;
        opacity: 0.72;
    }

    .botao,
    .imagem-mario {
        transition: none;
    }
}

.nao-selecionavel {
    -webkit-user-select: none; /* Safari, Chrome, Opera, Edge */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Padrão moderno (Chrome, Firefox, Edge, Opera) */
}
