/* Basic Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

@font-face {
    font-family: HS Font;
    src: url('font/OPTIBelwe-Medium.otf');
}

body {
    margin: 0;
    background-color: black;
    /* background-image: url(img/pagebg.jpg); */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    font-family: "HS Font", sans-serif;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Ensure the body takes full viewport height */
    min-width: 100vw;  /* Ensure the body takes full viewport width */
    box-sizing: border-box;
}

/* Container to center content */
#main-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* Scale wrapper adjustments for bottom alignment */
#scale-wrapper {
    transform: scale(0.58);
    transform-origin: bottom center; /* Scale from bottom center */
    width: 166.67%;
    height: 166.67%;
    position: absolute;
    min-width: 640px;
    min-height: 1110px;
    bottom: 10px; /*  distance from the bottom */
}

#level-display {
    position: absolute;
    top: 0;
    left: 0;
    padding: 10px;
    font-size: 25px;
    font-weight: bold;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
}

#principal {
    position: relative;
    height: 1110px;
    width: 640px;
    margin: auto;
    padding: 5px;
    text-align: center;
    background-size: cover;
    background-color: rgba(255, 255, 255, 0.6);
    background-position: center;
    background-repeat: no-repeat;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

#grid-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    align-content: center;
    gap: 0%;
}

#container0, #container1, #container2, #container3, #container4, #container5, #container6, #container7,
#container8, #container9, #container10, #container11, #container12, #container13, #container14, #container15,
#container16, #container17, #container18, #container19, #container20, #container21, #container22, #container23,
#container24, #container25, #container26, #container27, #container28, #container29, #container30, #container31 {
    border-radius: 35px;
    width: 155px;
    height: 135px;
    float: left;
    margin: 0;
    cursor: pointer;
    perspective: 600px;
    transition: 0.5s;
    overflow: hidden;
}

#carta0, #carta1, #carta2, #carta3, #carta4, #carta5, #carta6, #carta7,
#carta8, #carta9, #carta10, #carta11, #carta12, #carta13, #carta14, #carta15,
#carta16, #carta17, #carta18, #carta19, #carta20, #carta21, #carta22, #carta23,
#carta24, #carta25, #carta26, #carta27, #carta28, #carta29, #carta30, #carta31 {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    transition: transform 1s;
}

figure {
    margin: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    backface-visibility: hidden;
    border: 5px solid white;
    box-sizing: border-box;
}

#frente {
    background-image: url(img/bg.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #fff;
    border-radius: 35px;
    transition: background-image 0.4s;
    width: 97%;
    height: 97%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#frente:hover {
    background-image: url(img/bghover.png);
}

#costa0, #costa1, #costa2, #costa3, #costa4, #costa5, #costa6, #costa7,
#costa8, #costa9, #costa10, #costa11, #costa12, #costa13, #costa14, #costa15,
#costa16, #costa17, #costa18, #costa19, #costa20, #costa21, #costa22, #costa23,
#costa24, #costa25, #costa26, #costa27, #costa28, #costa29, #costa30, #costa31 {
    background-image: url(img/1.jpg);
    background-size: cover;
    background-position: center;
    background-color: #fff;
    border-radius: 35px;
    border: 2px solid black;
    transform: rotateY(180deg);
}

#span-points {
    position: relative;
    width: 500px;
    margin: 0 auto;
    font-size: 25px;
    bottom: 2px;
    text-align: center; /* Center text within the element */
    padding-left: 20px; /* Adjust this value for space before text */
}


#botao {
    display: block;
    margin: 10px auto;
    padding: 10px 20px;
    font-size: 20px;
    border: 2px solid #333;
    background-color: #f4f4f4;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    box-shadow: 4px 4px 6px rgba(0, 0, 0, 0.2), -4px -4px 6px rgba(255, 255, 255, 0.5);
}

#botao:hover {
    background-color: #ddd;
    transform: scale(1.05);
    box-shadow: 4px 4px 6px rgba(0, 0, 0, 0.2), -4px -4px 6px rgba(255, 255, 255, 0.5);
}
#informacoes {
    position: relative;
    text-align: center;
    width: 640px;
    height: auto;
    margin: auto;
    background-color: rgba(255, 255, 255, 0.6);
    border-bottom-right-radius: 20px;
    border-bottom-left-radius: 20px;
}

.blurred {
    filter: blur(8px);
    pointer-events: none;
}

.unlocked-image {
    cursor: pointer;
    width: 100px;
    text-align: center;
    height: 75px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #ddd;
    transition: transform 0.3s;
    padding-bottom: 0px;
    margin-bottom: 10px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}

.close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.unlocked-image:hover:not(.blurred) {
    transform: scale(1.05);
}

#unlocked-images h2 {
    font-size: 24px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 10px;
}

#unlocked-images-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.unlocked-image {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #ddd;
}

/* Loader styles */
#loader {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent background */
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensure it's on top of all content */
    font-size: 24px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    visibility: visible; /* Initially visible */
    opacity: 1;
    transition: opacity 0.5s ease, visibility 0.5s ease; /* Smooth fade-out effect */
}

#loader.hidden {
    visibility: hidden;
    opacity: 0;
}

@keyframes animloader {
    0% {
        transform: scale(0.9);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

#loader::after {
    content: 'Loading...';
    animation: animloader 1s linear infinite;
}
/* Add these to your existing CSS file */

/* Modal for displaying unlocked images */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    position: relative;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #aaa;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-button:hover,
.close-button:focus {
    color: #fff;
}

.unlocked-image {
    cursor: pointer;
    width: 100px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #ddd;
    transition: transform 0.3s;
    margin: 5px;
}

.unlocked-image:hover {
    transform: scale(1.1);
}

/* Modal for displaying the full image */
#image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}

.close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
}

/* Style for the See Unlocked Images button */
#show-images-button {
    display: inline-block;
    margin: 0px 10px 40px 10px;
    padding: 10px 20px;
    font-size: 20px;
    border: 2px solid #333;
    background: linear-gradient(145deg, #e0e0e0, #f4f4f4);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
    box-shadow: 4px 4px 6px rgba(0, 0, 0, 0.2), -4px -4px 6px rgba(255, 255, 255, 0.5);
}

#show-images-button:hover {
    background: linear-gradient(145deg, #f4f4f4, #ddd);
    transform: scale(1.05);
    box-shadow: 6px 6px 8px rgba(0, 0, 0, 0.3), -6px -6px 8px rgba(255, 255, 255, 0.7);
}

#show-images-button:active {
    background: linear-gradient(145deg, #ddd, #f4f4f4);
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.3), inset -2px -2px 5px rgba(255, 255, 255, 0.7);
}
