.contenedor-dados {
    position: absolute;
    width: 100%;
    height: 100vh;
}

.dado {
    position: absolute;
    width: 50px;
    height: 50px;
    animation: balanceo 3s ease-in-out infinite;
}

.dado-1 {
    top: 60px;
    right: 20px;
}

.dado-2 {
    top: 130px;
    right: 20px;
}

.dado-3 {
    top: 200px;
    right: 20px;
}

.dado-4 {
    bottom: 200px;
    left: 20px;
}

.dado-5 {
    bottom: 130px;
    left: 20px;
}

.dado-6 {
    bottom: 60px;
    left: 20px;
}

#game_code_input:focus {
    color: white;
    background-color: #333;
    outline: none;
}

.grade-button {
    width: 50px;
    height: 50px;
    margin: 5px;
    border-radius: 50%;
    background-color: #f0f0f0;
    font-size: 16px;
    border: 2px solid #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.grade-button.selected {
    background-color: var(--mathgame_lilaClaro);
    color: white;
}

.grade-button:hover {
    background-color: var(--mathgame_lilaClaro);
    color: white;
}

.mosaic-container {
    display: grid;
    position: absolute;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(4, 1fr);
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -5;
    /*opacity: 0.9;*/
    pointer-events: none;
}

.dark_overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: -4;
}

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

.image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.button_start:focus {
    background-color: white;
    color: var(--mathgame_lilaClaro);
    border: 2px solid var(--mathgame_lilaClaro);
    box-shadow: none !important;
}

.popup-overlay {
    z-index: 10000 !important;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
    background: white;
    padding: 5vmin;
    border-radius: 25px;
    font-size: 3vmin;
    text-align: center;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.popup-overlay img {
    width: 60%;
    max-width: 180px;
    margin-bottom: 1.5rem;
}

button#closePopup {
    margin-top: 1.5rem;
    border: none;
    padding: 15px;
    border-radius: 15px;
    background-color: red;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
}

button#closePopup:hover {
    background-color: darkred;
}

.button_jugar_metamatic a {
    color: white;
    font-family: Helvetica, sans-serif;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    background-color: #5517a4;
    position: relative;
    padding: 20px 40px;
    text-shadow: 0px 1px 0px #000;
    box-shadow: inset 0 1px 0 #bfa9db, 0 10px 0 #2c075b;
    border-radius: 5px;
}

.btn_section_verde a {
    background-color: #00818a !important;
    box-shadow: inset 0 1px 0 #59A9AE, 0 10px 0 #01575e !important;
}

.btn_section_rojo a {
    background-color: #ce252e !important;
    box-shadow: inset 0 1px 0 #ce6a6f, 0 10px 0 #7d090f !important;
}

.btn_section_gris a {
    background-color: #546f76 !important;
    box-shadow: inset 0 1px 0 #9da2a4, 0 10px 0 #323b3e !important;
}

.btn_section_verde_claro a {
    background-color: #64bd3a !important;
    box-shadow: inset 0 1px 0 #c3f2ac, 0 10px 0 #1f5107 !important;
}

.btn_section_verde_azul a {
    background-color: #224484 !important;
    box-shadow: inset 0 1px 0 #6983b3, 0 10px 0 #0a2048 !important;
}

.button_jugar_metamatic {
    position: relative;
    display: inline-block;
    margin: 20px;
}

.button_jugar_metamatic:active {
    top: 10px;
    /*background-color: #5517a4;*/

    /*-webkit-box-shadow: inset 0 1px 0 #bfa9db, inset 0 -3px 0 #2c075b;*/
    /*-moz-box-shadow: inset 0 1px 0 #bfa9db, inset 0 -3pxpx 0 #2c075b;*/
    /*box-shadow: inset 0 1px 0 #bfa9db, inset 0 -3px 0 #2c075b;*/
}


@keyframes vibrateEffect {
    0% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-6px);
    }
    50% {
        transform: translateX(6px);
    }
    75% {
        transform: translateX(-6px);
    }
    100% {
        transform: translateX(0);
    }
}


@keyframes floatEffect {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

.is-floating-animated1 {
    transition: transform 0.3s ease-in-out;
}

/*.is-floating-animated1:hover {*/
/*    animation: floatEffect 3s ease-in-out infinite;*/
/*}*/

.is-floating-animated1 {
    animation: vibrateEffect 3s ease-in-out infinite;
}

.card_student_content {
    transition: .3s ease;
}

.card_student_content:hover {
    transform: scale(0.9);
}


@keyframes balanceo {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(45deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(10px) rotate(-45deg);
    }

}

.fade-in-title {
    animation: fadeIn 2s ease-in forwards;
    opacity: 0;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}


.content-slide {
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 1.5s ease-out forwards;
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-slide:nth-child(1) {
    animation-delay: 0.5s;
}

.content-slide:nth-child(2) {
    animation-delay: 1s;
}

.content-slide:hover img {
    transform: scale(1.1);
    transition: transform 0.3s ease-in-out;
}

.content-slide:hover {
    transform: scale(1.05);
}

.content-slide:hover img {
    animation: vibrateEffect 3s ease-in-out infinite;
}

@keyframes vibrateEffect {
    0% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    50% {
        transform: translateX(5px);
    }
    75% {
        transform: translateX(-5px);
    }
    100% {
        transform: translateX(0);
    }
}

@media (max-width: 1182px) {
    .content-slide {
        padding: 20px 10px !important;
    }
}


@media (max-width: 1100px) {
    .info_block {
        padding: 2vh !important;
    }
}



@media (max-width: 767px) {
    .info_block {
        padding: 2vh !important;
        margin: 2vh !important;
        display: flex !important;
        justify-content: center !important;
    }

    div:has(#btn_how_to_play), div:has(#btn_create_game) {
        margin-bottom: 0 !important;
    }

    div:has(#btn_join_game) {
        margin-bottom: 0 !important;
    }

    .button_start {
        font-size: 18px;
        padding: 5px !important;
        width: 100%;
    }

    .button_creategame {
        width: 30vw;
        padding: 15px !important;
    }

}

@media (max-width: 575px) {
    div:has(#btn_how_to_play), div:has(#btn_create_game) {
        margin-bottom: 10px !important;
    }
}

@media (max-height: 500px) {
    .info_block {
        font-size: 4vh;
        padding: 10px;
    }

    .button_start {
        font-size: 4vh;
    }

}

@media (max-height: 450px) {
    .box_span_jugarahora {
        height: 100% !important;
        margin: 0 0.5vmin !important;
    }

}

@media (max-width: 420px) {
    .btn_jugar {
        font-size: 23px !important;
        padding: 20px 0 !important;
        margin: 0 !important;
    }
}