@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/Inter-VariableFont_opsz\,wght.ttf") format("truetype");
}

@font-face {
	font-family: "PirataOne";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/PirataOne-Regular.ttf") format("truetype");
}

*, html, body {
    margin: 0;
    padding: 0;
    font-family: "Inter", sans-serif;
    color: #000;
    box-sizing: border-box;
}

body {
    overflow: auto;
}

body.noscroll {
    overflow: hidden;
}

.title {
    font-size: 35px;
    color: #efeffa;
    text-align: center;
    line-height: 100px;
    height: 100px;
    display: none;
}

.subtitle {
    font-size: 40px;
    color: #efeffa;
    text-align: center;
    font-family: PirataOne;
}

.subtitle.hide {
    display: none;
}

.fondo-img {
    width: 100dvw;
    height: 100dvh;
    position: absolute;
    z-index: -99999;
}

.popup {
    position: fixed;
    width: 100dvw;
    height: 100dvh;
    background: #00000033;
    display: none;
    justify-content: center;
    align-items: center;
    top: 0;
    left: 0;
}

.popup.show {
    display: flex;
}

.popup__container {
    display: none;
}

.popup__container.show {
    display: flex;
}

.popup__box {
    width: 400px;
    height: 200px;
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.popup__title {
    font-size: 20px;
    margin: 0 auto 20px auto;
    text-align: center;
}

.popup__button {
    border: none;
    display: block;
    outline: none;
    border-radius: 15px;
    background: #3b55eb;
    color: #fff;
    font-size: 18px;
    margin: 20px auto 0 auto;
    padding: 10px 20px;
    cursor: pointer;
}

.input {
    outline: none;
    border: none;
    border-radius: 20px;
    font-size: 18px;
    padding: 10px;
    background: #eee;
    margin: 0 auto;
    display: block;
}

.loader {
    position: fixed;
    top: 0;
    left: 0;
    background: #071520;
    width: 100dvw;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease;
    flex-direction: column;
}

.loader.invisible {
    opacity: 0;
}

.loader.hide {
    display: none;
}

.loader__container {
    width: 100%;
    height: calc(100% - 100px);
    margin-bottom: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity .4s ease;
    padding: 240px 0 0 0;
}

.loader__container.invisible {
    opacity: 0;
}

.loader__container.hide {
    display: none;
}

.loader__box {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    perspective: 800px;
}

.loader__inner {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.loader__inner:nth-of-type(1) {
    left: 0;
    top: 0;
    animation: rotate-one 1s linear infinite;
    border-bottom: 5px solid #efeffa;
}

.loader__inner:nth-of-type(2) {
    right: 0;
    top: 0;
    animation: rotate-two 1s linear infinite;
    border-right: 5px solid #efeffa;
}

.loader__inner:nth-of-type(3) {
    right: 0;
    bottom: 0;
    animation: rotate-three 1s linear infinite;
    border-left: 5px solid #efeffa;
}

@keyframes rotate-one {
    0% {
        transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg);
    }
    
    100% {
        transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg);
    }
}

@keyframes rotate-two {
    0% {
        transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg);
    }
    
    100% {
        transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg);
    }
}

@keyframes rotate-three {
    0% {
        transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg);
    }
    
    100% {
        transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg);
    }
}

.interfaz-juego {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

#indicador {
    color: white;
    font-family: sans-serif;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
}

#btnLanzar {
    pointer-events: auto; /* Activa los clics exclusivamente para el botón */
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: background 0.2s, transform 0.1s;
}

#btnLanzar:hover {
    background: #c0392b;
}

#btnLanzar:active {
    transform: scale(0.95); /* Efecto visual de hundirse al pulsar */
}

/* Deshabilitado cuando el dado esté en el aire */
#btnLanzar:disabled {
    background: #7f8c8d;
    cursor: not-allowed;
    transform: none;
}

.input {
    border: none;
    outline: none;
    border-radius: 10px;
    background: #efeffa;
    width: 100%;
}

.button {
    pointer-events: auto;
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    display: block;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: background 0.2s, transform 0.1s;
}

.button.hide {
    display: none;
}

.button.invisible {
    opacity: 0;
    cursor: default;
}

.dado {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    min-width: 240px;
}

.dado__caras {
    display: flex;
    justify-content: center;
    align-items: center;
}

.dado__cara {
    width: 100px;
    height: 100px;
    display: none;
}

.dado__cara.spacer {
    opacity: 0;
}

.dado__cara.show {
    display: block;
}

.users {
    position: fixed;
    top: 50px;
    right: 20px;
    width: 120px;
    height: auto;
    padding: 10px;
    z-index: 99999;
    background: #132737;
    border-radius: 10px;
    display: none;
}

.users.show {
    display: block;
}

.users__online {
    font-size: 12px;
    color: #fff;
    margin-bottom: 10px;
    text-align: center;
    display: block;
}

.users__item {
    list-style: none;
    color: #f91c1c;
    font-size: 10px;
    width: 130px;
    font-weight: 200;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.users__item.ready {
    color: #1ed21e;
}

.code-text {
    position: absolute;
    bottom: -25px;
    color: #fff;
    font-size: 14px;
    left: 0;
    width: 100%;
    text-align: center;
}

.play__container {
    width: 300px;
    height: calc(100% - 100px);
    /*background: #0e1c27;*/
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 100px;
    padding: 240px 0 0 0;
}

.play__container.show {
    display: flex; /* flex */ 
}

.play__group {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.choose-class {
    display: none;
    flex-direction: column;
    width: 100dvw;
    height: 100%;
    overflow: hidden auto;
    padding: 240px 0 20px 0;
    scroll-behavior: smooth;
    justify-content: flex-start;
    align-items: center;
    background: #00000055;
}

.choose-class.show {
    display: flex;
}

.classes {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 15px 10px 10px 10px;
    max-width: 960px;
    flex-wrap: wrap;
}

.users-max {
    font-size: 14px;
    color: #fff;
    display: block;
    text-align: center;
    margin: 0 auto 10px auto;
    line-height: 17px;
    height: 17px;
}

.characters {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 10px 10px 20px 10px;
    max-width: 960px;
    flex-wrap: wrap;
}

.characters.show {
    display: flex;
}

.card {
    width: 225px;
    height: auto;
    padding: 10px;
    background: #132737;
    border-radius: 15px;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-10px);
}

.card.selected {
    background: #083f6b;
    transform: translateY(-10px);
}

.card.hide {
    display: none;
}

.card__img {
    width: 100%;
    height: auto;
}

.card__name {
    font-size: 16px;
    color: #fff;
    text-align: center;
    height: 40px;
    line-height: 20px;
}

.info-class {
    display: none;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 960px;
    opacity: 0;
}

.info-class.show {
    display: flex;
}

.info-class.visible {
    opacity: 1;
}

.info-character {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    width: 350px;
    background: #132737;
    border-radius: 15px;
    padding: 10px;
    min-height: 200px;
}

.info-character__title {
    color: #fff;
    font-size: 18px;
    width: 100%;
    text-align: center;
    margin-bottom: 15px;
}

.info-character__items {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

.info-character__images {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
}

.info-character__img {
    width: 70px;
    height: auto;
}

.info-character__weapon {
    width: 30px;
    height: auto;
}

.info-character__story {
    color: #fff;
    font-size: 14px;
    width: 250px;
}

.stats {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    width: 200px;
    background: #132737;
    border-radius: 15px;
    padding: 10px;
    min-height: 200px;
}

.stats__title {
    color: #fff;
    font-size: 18px;
    width: 100%;
    text-align: center;
    margin-bottom: 15px;
}

.stats__item {
    color: #fff;
    font-size: 14px;
    margin-bottom: 5px;
}

.half {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.half__left {
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    width: 100%;
}

.half__right {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    width: 100%;
}

.skills {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    gap: 10px;
    width: 350px;
    background: #132737;
    border-radius: 15px;
    padding: 10px;
    min-height: 200px;
}

.skills__title {
    color: #fff;
    font-size: 18px;
    width: 100%;
    text-align: center;
    margin-bottom: 5px;
}

.skills__items {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 10px;
}

.skill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.skill__img {
    width: 40px;
    height: auto;
}

.skill__description {
    width: 100%;
    height: auto;
    color: #fff;
    font-size: 10px;
}

.player-intro__box {
    position: absolute;
    top: 0;
    left: 0;
    width: 100dvw;
    height: 100dvh;
    z-index: 999999999999999;
    display: none;
    opacity: 0;
    transition: opacity 1s ease;
    background: #000;
}

.player-intro__box.show {
    display: block;
}

.player-intro__box.visible {
    opacity: 1;
}

.player-intro {
    min-width: 100dvw;
    width: 100%;
    min-height: 100dvh;
    height: auto;
}

.player-intro__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100dvw;
    height: 100dvh;
}

#readyButton {
    width: 300px;
    margin: 40px auto 20px auto;
}

#startButton {
    position: absolute;
    bottom: -75px;
    left: 0;
}

.audio-container {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -9999999999;
}

.chataudio {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 99999999;
}

.chataudio__buttons {
    width: 220px;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
