* {
    user-select: none !important;
}

body {
    width: 100%;
    height: 100vh;
    overflow-y: hidden;
    padding: 0;
    margin: 0;
}

.container {
    position: relative;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* importante para o blur não vazar */
}

.moeda {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    padding: 5px;
    /* fundo alternativo */
    background-size: cover;
    border: 2px solid #5a3d12;
    box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.5);
}


/* Camada do fundo desfocado */

.container {
    position: relative;
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}


/* Fundo desfocado */

.container::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../img/fundo2.png");
    background-size: cover;
    background-position: center;
    filter: blur(5px);
    transform: scale(1.1);
    z-index: -2;
}

#btn-rolar.desabilitado {
    opacity: 0.5;
    filter: grayscale(100%);
    cursor: not-allowed;
}


/* Filtro amadeirado */

.container::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(46, 14, 14, 0.335);
    /* coloque sua textura */
    background-size: cover;
    background-position: center;
    opacity: 0.35;
    /* deixa mais suave */
    mix-blend-mode: overlay;
    /* efeito madeira */
    z-index: -1;
}


/* Área do dado */

#dado-area {
    width: 150px;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* Imagem do dado */

#dado {
    width: 150px;
    height: 150px;
    filter: drop-shadow(0px 8px 10px #000);
    transition: 0.2s ease-out;
}


/* ANIMAÇÃO DE GIRO */


/* scale quando o dado é jogado */

.jogado {
    animation: jogarCima 0.25s ease-out;
}

@keyframes jogarCima {
    0% {
        transform: scale(1) translateY(0);
    }
    50% {
        transform: scale(1.3) translateY(-20px);
    }
    100% {
        transform: scale(1) translateY(0);
    }
}


/* BOTÃO MEDIEVAL */

#btn-rolar {
    margin-top: 25px;
    padding: 12px 25px;
    font-size: 22px;
    border-radius: 8px;
    background: linear-gradient(180deg, #8b5a2b, #5c3816);
    border: 2px solid #3a240f;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 0 18px #000;
    transition: .2s;
    font-family: "Cinzel", serif;
}

#btn-rolar:hover {
    transform: scale(1.07);
    background: linear-gradient(180deg, #a36b35, #6a4319);
}

#moedas-area {
    margin-top: 50px;
    display: flex;
    gap: 20px;
}

.moeda {
    width: 120px;
    height: 120px;
    opacity: 0;
    transition: .3s ease;
}

.moeda {
    width: 120px;
    height: 120px;
    opacity: 0.3;
    /* começa apagada */
    cursor: pointer;
    transition: .3s ease;
}

.moeda.revelada {
    opacity: 1;
    cursor: default;
}

.moeda-jogada {
    animation: moedaVoar 0.25s ease-out;
}

@keyframes moedaVoar {
    0% {
        transform: scale(1) translateY(0);
    }
    50% {
        transform: scale(1.3) translateY(-20px);
    }
    100% {
        transform: scale(1) translateY(0);
    }
}

#influencia-info {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 10px 18px;
    background: rgba(0, 0, 0, 0.55);
    color: #ffd86b;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Cinzel', serif;
    /* medieval */
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 6px;
    text-shadow: 0 0 6px #000;
    box-shadow: 0 0 10px #000 inset;
    backdrop-filter: blur(5px);
    z-index: 999;
}


/* BOTÃO MENU */

#menu-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffd86b;
    padding: 10px 16px;
    border: 1px solid #d7b45f;
    border-radius: 5px;
    font-family: 'Cinzel', serif;
    font-size: 18px;
    cursor: pointer;
    z-index: 1000;
    text-shadow: 0 0 6px #000;
    transition: 0.2s;
}

#menu-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}


/* FUNDO ESCURECIDO */

#menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    /* escondido primeiro */
    justify-content: center;
    align-items: center;
    z-index: 999;
}


/* CAIXA DO MENU */

#menu-box {
    background: #1a1410;
    color: #e9d6a0;
    border: 2px solid #bfa15d;
    padding: 25px;
    width: 80%;
    max-width: 450px;
    font-family: 'Cinzel', serif;
    border-radius: 10px;
    box-shadow: 0 0 15px #000;
    animation: aparecer 0.3s ease;
}

#menu-box h2 {
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 0 0 6px #000;
}

#menu-box p {
    line-height: 1.6;
    font-size: 16px;
}


/* BOTÃO FECHAR */

#fechar-menu {
    width: 100%;
    margin-top: 20px;
    padding: 10px;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    border-radius: 6px;
    background: #a97b42;
    border: none;
    color: #fff4d0;
    cursor: pointer;
    transition: 0.2s;
}

#fechar-menu:hover {
    background: #c18f50;
}


/* ANIMAÇÃO */

@keyframes aparecer {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* ================================
   MENU PERGAMINHO MEDIEVAL
================================= */

#menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(3px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}


/* CAIXA DO PERGAMINHO */

#menu-box {
    width: 80%;
    max-width: 500px;
    padding: 35px 25px;
    color: #3a2715;
    font-family: 'Cinzel', serif;
    /* TEXTURA DO PERGAMINHO */
    background: url("../img/pergaminho.jpg");
    background-size: cover;
    background-position: center;
    /* EFEITO DE PERGAMINHO ANTIGO */
    border: 4px solid #c8a86b;
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.8), inset 0 0 30px rgba(0, 0, 0, 0.35);
    /* EFEITO DE APARECER */
    animation: aparecer 0.3s ease;
}


/* TÍTULO */

#menu-box h2 {
    text-align: center;
    color: #4a2e13;
    font-weight: 800;
    font-size: 26px;
    margin-bottom: 15px;
    text-shadow: 0 0 6px #f0d6a0;
}


/* TEXTO */

#menu-box p {
    font-size: 17px;
    line-height: 1.65;
    color: #3b2612;
    font-weight: 600;
}


/* BOTÃO FECHAR */

#fechar-menu {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #a97b42;
    color: #fff;
    font-size: 18px;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4);
    transition: 0.2s;
}

#fechar-menu:hover {
    background: #c79353;
}


/* ANIMAÇÃO */

@keyframes aparecer {
    from {
        opacity: 0;
        transform: scale(0.9) rotate(-1deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}


/* ================================
   MENU PERGAMINHO MEDIEVAL
================================= */

#menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(3px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}


/* CAIXA DO PERGAMINHO */

#menu-box {
    width: 80%;
    max-width: 500px;
    padding: 35px 25px;
    color: #3a2715;
    font-family: 'Cinzel', serif;
    /* TEXTURA DO PERGAMINHO */
    background: url("../img/pergaminho.webp");
    background-size: cover;
    background-position: center;
    /* EFEITO DE PERGAMINHO ANTIGO */
    border: 4px solid #c8a86b;
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.8), inset 0 0 30px rgba(0, 0, 0, 0.35);
    /* EFEITO DE APARECER */
    animation: aparecer 0.3s ease;
}

#menu-box {
    max-height: 85vh;
    /* impede passar do limite da tela */
    overflow-y: auto;
    /* scroll interno */
    scrollbar-width: thin;
    /* Firefox */
}


/* TÍTULO */

#menu-box h2 {
    color: #2a1508;
    text-shadow: 0 0 8px rgba(255, 240, 200, 0.7);
}


/* TEXTO */

#menu-box p {
    font-size: 18px;
    line-height: 1.7;
    font-weight: 600;
    color: #2b1a0e;
    /* mais escuro */
    text-shadow: 0px 0px 2px rgba(255, 255, 255, 0.3);
    /* destaca */
}


/* BOTÃO FECHAR */

#fechar-menu {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #a97b42;
    color: #fff;
    font-size: 18px;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4);
    transition: 0.2s;
}

#fechar-menu:hover {
    background: #c79353;
}


/* ANIMAÇÃO */

@keyframes aparecer {
    from {
        opacity: 0;
        transform: scale(0.9) rotate(-1deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.player {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    /* ajuste como quiser */
    height: auto;
    z-index: 999;
    /* opcional: brilho medieval */
    filter: drop-shadow(0 0 6px black);
}


/* SCROLL MEDIEVAL DO PERGAMINHO */

#menu-box::-webkit-scrollbar {
    width: 10px;
    background: transparent;
    /* deixa sem bloco atrás */
}

#menu-box::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c8a86b, #8b693e);
    border-radius: 10px;
    border: 2px solid #5a4325;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.6);
}

#menu-box::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #dfbf7d, #a78048);
}

#menu-box::-webkit-scrollbar-track {
    background: rgba(90, 67, 37, 0.25);
    border-radius: 10px;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.4);
}

#menu-box {
    scrollbar-width: thin;
    scrollbar-color: #a57a42 rgba(50, 35, 18, 0.3);
}

.player {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'Cinzel', sans-serif;
    margin-right: 10px;
    width: 400px;
}

.player img {
    border-radius: 100%;
    height: 50px;
    margin-right: 5px;
}

.player h6 {
    margin-right: 5px;
}

.player a {
    color: white;
}


/* OVERLAY */

#login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}


/* CAIXA DO PERGAMINHO */

#login-box {
    width: 90%;
    max-width: 450px;
    padding: 35px 30px;
    background: url("../img/pergaminho.jpg");
    background-size: cover;
    background-position: center;
    border: 5px solid #c9a875;
    border-radius: 14px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.9), inset 0 0 35px rgba(0, 0, 0, 0.45);
    text-align: center;
    font-family: "Cinzel", serif;
    animation: aparecer 0.35s ease;
}


/* TÍTULO */

#login-box h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #2b1807;
    text-shadow: 0 0 6px rgba(255, 240, 200, 0.7);
    font-weight: 800;
}


/* SUBTEXTO */

#login-box p {
    font-size: 17px;
    color: #ffff;
    font-weight: 600;
    margin-bottom: 20px;
}


/* BOTÃO DAS OPÇÕES */

.login-option {
    width: 100%;
    padding: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.25);
    cursor: pointer;
    font-family: "Cinzel", serif;
    font-size: 18px;
    margin-top: 12px;
    transition: 0.2s;
}

#oponente-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
    display: none;
}

#oponente-box {
    background-size: cover;
    border: 3px solid #4b2b0b;
    padding: 20px;
    width: 90%;
    max-width: 480px;
    border-radius: 12px;
    color: #3a2108;
    font-family: "Cinzel", serif;
    text-align: center;
}

#oponente-cartas {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.card-oponente {
    width: 130px;
    cursor: pointer;
    transition: .25s;
    user-select: none;
    border-radius: 6px;
}

.card-oponente:hover {
    transform: scale(1.08);
    filter: brightness(1.2);
}

#fechar-oponente {
    margin-top: 10px;
}


/* ÍCONES */

.login-option img {
    width: 26px;
    height: 26px;
}


/* ======= MODAL MEDIEVAL ======= */

#modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 5000;
}

#modal-box {
    width: 90%;
    max-width: 420px;
    padding: 25px 20px;
    background: url("../img/pergaminho.webp");
    background-size: cover;
    background-position: center;
    border: 4px solid #c9a875;
    border-radius: 14px;
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.7), inset 0 0 25px rgba(0, 0, 0, 0.45);
    text-align: center;
    font-family: "Cinzel", serif;
    animation: modalAparecer .25s ease;
}

#modal-box h2 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 10px;
    color: #2b1807;
    text-shadow: 0 0 6px #f0d6a0;
}

#modal-box p {
    font-size: 18px;
    color: #3a2108;
    font-weight: 600;
    margin-bottom: 20px;
}

#modal-btn {
    padding: 12px;
    width: 100%;
    background: #a97b42;
    color: #fff4d0;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: .2s;
}

#modal-btn:hover {
    background: #c79353;
}


/* ANIMAÇÃO */

@keyframes modalAparecer {
    from {
        opacity: 0;
        transform: scale(.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* GOOGLE */

.login-option.google {
    background: #ffffffee;
    color: #222;
}

.login-option.google:hover {
    background: #fff9d7;
    border-color: #d6c27a;
}


/* FACEBOOK */

.login-option.facebook {
    background: #1877f2;
    color: white;
}

.login-option.facebook:hover {
    background: #2b87ff;
}


/* PHONE */

.login-option.phone {
    background: #a7814b;
    color: #fff4d0;
}

.login-option.phone:hover {
    background: #c09758;
    border-color: #e3c88f;
}


/* BOTÃO FECHAR */

#fechar-login {
    width: 100%;
    margin-top: 22px;
    padding: 12px;
    background: #a97b42;
    color: #fff4d0;
    border-radius: 8px;
    border: none;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    transition: 0.2s;
}

#fechar-login:hover {
    background: #c79353;
}


/* ANIMAÇÃO */

@keyframes aparecer {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#btn-login {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background: #a77b45;
    color: #fff4d0;
    border: 2px solid #caa56b;
    border-radius: 10px;
    font-family: "Cinzel", serif;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.8);
    transition: 0.2s;
    z-index: 999;
}

#btn-login:hover,
#bnt-oponente:hover {
    background: #c08f52;
}

#btn-oponente {
    position: fixed;
    bottom: 80px;
    right: 20px;
    padding: 12px 18px;
    font-family: "Cinzel", serif;
    font-size: 18px;
    background: #8b693e;
    color: #fff4d0;
    border: 3px solid #d6b278;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.7), inset 0 0 6px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: 0.25s;
    z-index: 999;
    user-select: none;
}

#bnt-login,
#btn-oponente {
    width: auto;
    min-width: 150px;
}

#fechar-oponente {
    margin-top: 15px;
    width: 100%;
    padding: 12px;
    background: #a07a46;
    color: #fff4d0;
    font-family: "Cinzel", serif;
    font-size: 18px;
    border: 3px solid #d5b98a;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.25s;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.6), inset 0 0 6px rgba(0, 0, 0, 0.3);
}

#fechar-oponente:hover {
    background: #c4985d;
    border-color: #f1d7a1;
    color: #fffdf3;
    transform: scale(1.03);
    box-shadow: 0 0 15px rgba(255, 230, 180, 0.5), inset 0 0 6px rgba(0, 0, 0, 0.4);
}

#fechar-oponente:active {
    transform: scale(0.95);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
}

#oponente-selecionado {
    position: fixed;
    top: 80px;
    right: 100px;
    height: 230px;
    z-index: 999;
    pointer-events: none;
    /* não atrapalha os cliques */
}

#oponente-selecionado img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 8px #000);
    border-radius: 6px;
}


/* AURAS POR CLASSE */

.aura-plebeu {
    filter: drop-shadow(0 0 8px rgba(180, 170, 100, 0.6));
}

.aura-burguesia {
    filter: drop-shadow(0 0 12px rgba(80, 220, 120, 0.7));
}

.aura-nobreza {
    filter: drop-shadow(0 0 14px rgba(80, 120, 255, 0.9));
}

.aura-clero {
    filter: drop-shadow(0 0 16px rgba(255, 255, 200, 0.9)) drop-shadow(0 0 28px rgba(255, 255, 180, 0.7));
}

.aura-rei {
    filter: drop-shadow(0 0 20px rgba(255, 80, 80, 1)) drop-shadow(0 0 30px rgba(255, 200, 50, 0.9));
}


/* PULSO MÁGICO */

@keyframes pulsar {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.045);
    }
    100% {
        transform: scale(1);
    }
}


/* PARTÍCULAS AO REDOR DA CARTA */

#aura-particulas {
    position: fixed;
    pointer-events: none;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 900;
}

.particula {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 200, 0.9);
    animation: subir 2s linear infinite;
}

@keyframes subir {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-80px) scale(0.4);
        opacity: 0;
    }
}

#oponente-selecionado {
    position: fixed;
    top: 100px;
    right: 150px;
    height: 250px;
    z-index: 999;
}

.oponente-mini {
    display: none;
}


/* PLACAR — fixo no topo mas não atrapalha o scroll */

#placar-box {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.55);
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    font-family: "Cinzel", serif;
    font-size: 18px;
    font-weight: 600;
    color: #f6f2dd;
    z-index: 9999;
    /* sempre acima do jogo */
}


/* CONTÊINER CENTRAL */

.central {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 15px;
}


/* BOX DO PLACAR E MOEDAS */

#placar-box {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(0, 0, 0, 0.55);
    padding: 12px 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    font-family: "Cinzel", serif;
    color: #f6f2dd;
    font-size: 18px;
    font-weight: 600;
}


/* TEXTO DO PLACAR */

#placar-texto {
    user-select: none;
}


/* MOEDAS */

#coin-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

#coin-quantidade {
    font-size: 20px;
    font-weight: 700;
    color: #ffe38a;
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.6);
}


/* impede o texto de selecionar */

#placar-texto {
    user-select: none;
}


/* SLOT VAZIO */

#slot-vazio-oponente {
    width: 100%;
    height: 100%;
    border: 2px dashed #d4c29d;
    border-radius: 8px;
    background: rgba(255, 244, 210, 0.2);
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    font-family: "Cinzel", serif;
    font-size: 14px;
    color: #f5e6b3;
    transition: .2s;
}

#slot-vazio-oponente:hover {
    background: rgba(255, 244, 210, 0.35);
    transform: scale(1.03);
}


/* IMAGEM DA CARTA */

#img-oponente-selecionado {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
    /* só aparece quando for selecionada */
    border-radius: 6px;
}

#coin-box {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 15px;
}

#coin-icon {
    height: 30px;
}

#coin-quantidade {
    font-size: 20px;
    font-weight: 700;
    color: #ffd86b;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.7);
    font-family: "Cinzel", serif;
}


/* Texto do turno */

#turno-info {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 18px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffe9a6;
    font-family: "Cinzel", serif;
    font-size: 18px;
    border-radius: 10px;
    text-shadow: 0 0 8px #000;
    backdrop-filter: blur(6px);
    display: none;
    z-index: 99999;
}


/* Brilho na carta do bot */

.carta-brilhando {
    animation: pulsarBot 1s infinite ease-in-out;
    filter: drop-shadow(0 0 25px gold);
}

@keyframes pulsarBot {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 15px gold);
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 30px gold);
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 15px gold);
    }
}

#fim-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    backdrop-filter: blur(5px);
}

#fim-box {
    background: url("../img/pergaminho.webp");
    background-size: cover;
    background-position: center;
    padding: 30px 25px;
    width: 90%;
    max-width: 420px;
    border-radius: 12px;
    border: 4px solid #c9a875;
    text-align: center;
    font-family: "Cinzel", serif;
    color: #3b210d;
    box-shadow: 0 0 25px black, inset 0 0 25px rgba(0, 0, 0, .4);
    animation: aparecer .35s ease;
}

#fim-novo-jogo {
    margin-top: 20px;
    padding: 12px;
    width: 100%;
    background: #a97b42;
    color: #fff4d0;
    border-radius: 8px;
    font-size: 20px;
    font-family: "Cinzel", serif;
    cursor: pointer;
    transition: .2s;
}

#fim-novo-jogo:hover {
    background: #c18f53;
}


/* =======================
   EFEITO DE RESET MEDIEVAL
======================= */

#reset-efeito {
    position: fixed;
    inset: 0;
    pointer-events: none;
    display: none;
    z-index: 999999;
}

.reset-flash {
    animation: flashDourado .6s ease;
    background: radial-gradient(circle, rgba(255, 220, 120, 0.9), rgba(0, 0, 0, 0));
}

@keyframes flashDourado {
    0% {
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}


/* Fumaça medieval */

.reset-fumaca {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: url('https://i.imgur.com/4NJlJrI.png');
    /* FUMAÇA REAL */
    background-size: cover;
    opacity: 0;
    animation: fumacaSubir 1.5s ease-out forwards;
}

@keyframes fumacaSubir {
    0% {
        opacity: 0;
        filter: blur(8px);
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        filter: blur(4px);
        transform: scale(1.1);
    }
    100% {
        opacity: 0;
        filter: blur(8px);
        transform: scale(1.3);
    }
}


/* ===== MODAL DE APOSTA ===== */

#aposta-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

#aposta-box {
    width: 90%;
    max-width: 380px;
    padding: 25px;
    background: url("../img/pergaminho.webp");
    background-size: cover;
    border: 4px solid #c9a875;
    border-radius: 12px;
    box-shadow: 0 0 25px #000, inset 0 0 25px rgba(0, 0, 0, 0.4);
    text-align: center;
    font-family: "Cinzel", serif;
    animation: aparecer 0.3s ease;
}

#aposta-box h2 {
    margin-bottom: 18px;
    color: #2b1807;
    font-size: 26px;
    text-shadow: 0 0 6px #f0d6a0;
}

#valor-aposta {
    width: 100%;
    padding: 12px;
    font-size: 20px;
    border-radius: 8px;
    border: 2px solid #a27b45;
    margin-bottom: 18px;
    outline: none;
    text-align: center;
    font-family: "Cinzel", serif;
}

#confirmar-aposta,
#fechar-aposta {
    width: 100%;
    padding: 12px;
    font-size: 18px;
    border-radius: 8px;
    border: none;
    margin-top: 10px;
    cursor: pointer;
    font-family: "Cinzel", serif;
    transition: .2s;
}

#confirmar-aposta {
    background: #8b693e;
    color: #fff4d0;
    border: 2px solid #d6b278;
}

#confirmar-aposta:hover {
    background: #c18f53;
}

#fechar-aposta {
    background: #6e4d30;
    color: #fff1cb;
}

#fechar-aposta:hover {
    background: #8a623f;
}

#coin-box {
    cursor: pointer;
    width: 80px;
}

#coin-box:hover {
    background-color: rgba(128, 128, 128, 0.133);
    border-radius: 20px;
}

#confirmar-aposta,
#fechar-aposta {
    position: relative;
    z-index: 999999999;
}

#aposta-overlay * {
    pointer-events: all !important;
}

#btn-logout {
    background: #7a1f1f;
    border: 2px solid #c44;
    color: #ffd;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

#btn-logout:hover {
    background: #a62828;
}

#btn-logout {
    display: block !important;
    position: absolute !important;
    z-index: 999999 !important;
    background: #7a1f1f;
    border: 2px solid #c44;
    color: #ffd;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    bottom: 10px;
    left: 20px;
}


/* BOX DE JOGADORES */

#box-jogadores {
    position: fixed;
    left: 20px;
    /* fica na esquerda */
    top: 50%;
    /* centraliza verticalmente */
    transform: translateY(-50%);
    width: 260px;
    max-height: 70vh;
    padding: 18px;
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(6px);
    border: 2px solid rgba(255, 215, 0, 0.4);
    /* dourado */
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.15);
    color: #f7d47f;
    font-family: "Cinzel", serif;
    overflow-y: auto;
    z-index: 50;
}

#box-jogadores h3 {
    margin-bottom: 12px;
    font-size: 20px;
    text-align: center;
    color: #ffe9a6;
}


/* ITEM DO JOGADOR */

.jogador-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: 0.2s;
    cursor: pointer;
}

.jogador-item:hover {
    background: rgba(255, 215, 0, 0.15);
    transform: scale(1.02);
}

.jogador-foto {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #d9b44a;
}

.jogador-nome {
    font-size: 15px;
    color: #f0e4c4;
    font-family: "Cinzel", serif;
}


/* MOBILE some o box */

@media (max-width: 820px) {
    #box-jogadores {
        display: none;
    }
}


/* PAINEL DE JOGADORES */

#jogadores-box {
    width: 250px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 10px;
    padding: 15px;
    color: white;
    font-family: Cinzel, serif;
    /* POSICIONAMENTO */
    position: absolute;
    left: 20px;
    top: calc(50%);
    /* Ajusta para ficar abaixo da barra de influência */
    transform: translateY(-50%);
}

#jogadores-box h2 {
    text-align: center;
    color: gold;
    font-size: 18px;
    margin-bottom: 10px;
}

.jogador-item {
    display: flex;
    align-items: center;
    margin-top: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.jogador-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.jogador-item img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    margin-right: 10px;
}

.jogador-nome {
    font-size: 15px;
    color: white;
}

.jogador-regiao {
    font-size: 11px;
    color: #bbb;
}

.btn-desafiar {
    background: linear-gradient(135deg, #b8860b, #ffd700);
    border: 2px solid #e5c067;
    color: #1a1a1a;
    padding: 6px 12px;
    font-size: 14px;
    font-family: "Cinzel", serif;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.25s ease-in-out;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}

.btn-desafiar:hover {
    background: linear-gradient(135deg, #ffd700, #fff3b0);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.9);
}

.btn-desafiar:active {
    transform: scale(0.95);
    background: linear-gradient(135deg, #cfa500, #ffcc34);
    box-shadow: 0 0 4px rgba(255, 215, 0, 0.5);
}


/* MOBILE: painel vai embaixo e centralizado */

@media (max-width: 768px) {
    #jogadores-box {
        position: relative;
        left: 0;
        top: 0;
        transform: none;
        margin: 20px auto;
        width: 90%;
        max-width: 360px;
    }
}


/* ATIVAR SCROLL E LIMITAR ALTURA */

#jogadores-lista {
    max-height: 350px;
    /* ajuste como quiser */
    overflow-y: auto;
    padding-right: 5px;
}


/* SCROLLBAR ESTILIZADA */

#jogadores-lista::-webkit-scrollbar {
    width: 6px;
}

#jogadores-lista::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

#jogadores-lista::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #b8860b, #ffd700);
    border-radius: 10px;
}

#jogadores-lista::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #d7a928, #ffe54c);
}

.status-bolinha {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    flex-shrink: 0;
}

.status-on {
    background: #00ff55;
    box-shadow: 0 0 6px #00ff55;
}

.status-off {
    background: #ff4444;
    box-shadow: 0 0 4px #ff4444;
}

#convite-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#convite-box {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid gold;
    border-radius: 12px;
    padding: 25px;
    width: 300px;
    text-align: center;
    font-family: "Cinzel", serif;
    color: white;
    box-shadow: 0 0 20px gold;
    animation: aparecer 0.3s ease;
}

@keyframes aparecer {
    from {
        transform: scale(0.6);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.convite-btn {
    padding: 10px 15px;
    margin: 10px 5px;
    border: none;
    font-family: Cinzel, serif;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
}

.convite-btn.aceitar {
    background: gold;
    color: #1a1a1a;
}

.convite-btn.recusar {
    background: darkred;
    color: #fff;
}


/* Botão padrão (online) */

.btn-desafiar {
    background: linear-gradient(135deg, #b8860b, #ffd700);
    border: 2px solid #e5c067;
    color: #1a1a1a;
    padding: 6px 12px;
    font-size: 14px;
    font-family: "Cinzel", serif;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.25s ease-in-out;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}

.btn-desafiar:hover:not(.offline) {
    background: linear-gradient(135deg, #ffd700, #fff3b0);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.9);
}


/* Botão quando OFFLINE */

.btn-desafiar.offline {
    background: #3b3b3b !important;
    border: 2px solid #1c1c1c !important;
    color: #999 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    opacity: 0.7;
}