* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: Arial;
    background-color: #fbf7f4;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#home {
    position: fixed;
    top: 25px;
    left: 25px;
    height: 75px;
    width: 75px;
    border-radius: 100%;
    border: 3px solid #3A3A3A;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    opacity: 0.5;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
#home:hover {
    transition: 0.3s ease;
    transform: scale(1.05);
    opacity: 1;
}
#home svg {
    width: 28px;
    height: 28px;
}
.container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: start;
    position: relative;
    gap: 2%;
    padding: 10px;
}
.sub-container{
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.div-container{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 500px;
    background-color: white;
    border-radius: 20px;
    padding: 20px;
    z-index: 0;
}
.title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #262f40;
}
.buttons-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}
.button {
    background-color: #30abe8;
    padding: 10px;
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    font-size: 20px;
}
.button:hover {
    background-color: #0088cb;
    transition: background-color 0.5s;
}
#result-container {
    width: 400px;
    height: 400px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 5px;
    gap: 7px;
}
#result-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../img/puzle.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.45;
    z-index: -1;
}
#pieces-container {
    width: 430px;
    height: 430px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}
.piece {
    width: 133px;
    height: 133px;
    cursor: grab;

    background-image: url("../img/puzle.png");
    background-size: 300% 300%;
    background-repeat: no-repeat;
}
.square-container{
    width: 125px;
    height: 125px;
    border: 3px dotted gray;
    display: flex;
    justify-content: center;
    align-items: center;
}

.square-container .piece {
    flex-shrink: 0;
}
#win-gif {
    display: none;
    position: fixed;
    inset: 0;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

#win-gif img {
    display: block;
    max-width: 500px;
}

.return-button {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

.return-button a img{
    width: 80px;
}
/* Tablet */
@media (max-width: 1020px) {
    body {
        height: auto;
        min-height: 100vh;
        align-items: start;
        justify-content: center;
        padding: 20px 12px;
    }
    .container {
        align-items: center;
        gap: 16px;
        width: 100%;
        padding: 0;
    }
    .sub-container {
        width: 100%;
    }
    .div-container {
        height: 400px;
        padding: 16px;
        border-radius: 16px;
    }
    .title {
        font-size: 1.35rem;
        margin-bottom: 8px;
    }
    #result-container {
        width: 320px;
        height: 320px;
        padding: 4px;
        gap: 6px;
    }
    #pieces-container {
        width: 344px;
        height: 344px;
        gap: 4px;
    }
    .square-container {
        width: 100px;
        height: 100px;
    }
    .piece {
        width: 106px;
        height: 106px;
    }
    .button {
        font-size: 15px;
    }
    #win-gif img {
        width: 400px;
    }

}

/* Movil */
@media (max-width: 768px) {
    body {
        padding: 14px 8px;
    }
    .container {
        flex-direction: column;
        gap: 12px;
    }
    .div-container {
        padding: 12px;
        height: 300px;
        border-radius: 12px;
    }
    .title {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }
    #result-container {
        width: 258px;
        height: 258px;
        padding: 3px;
        gap: 4px;
    }
    #pieces-container {
        width: 278px;
        height: 278px;
        gap: 3px;
    }
    .square-container {
        width: 80px;
        height: 80px;
        border-width: 2px;
    }
    .piece {
        width: 85px;
        height: 85px;
    }
}
