* {
    box-sizing: border-box;
}

body {
    background-color: burlywood;
}

.center {
    background-color: pink;
    padding: 10px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.square {
    background-color: lightblue;
    width: 150px;
    height: 150px;
    border: 1px solid;
    margin: 10px;
    padding: 10px;
    text-align: center;
}

.relative {
    background-color: lightcoral;
    position: relative;
    top: 30px;
    left: 30px;
    z-index: 3;
}

.fixed {
    background-color: lightgreen;
    position: fixed;
    margin: 0;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    z-index: 9;
}

.container {
    background-color: cadetblue;
    width: 300px;
    height: 300px;
    position: relative;
    z-index: 1;
}

.absolute {
    background-color: darkseagreen;
    position: absolute;
    top:0;
    right:-100px;
    padding: 10px;
    border: 1px solid;
    width:100px;
}

.sticky {
    background-color:coral;
    position: sticky;
    top: 0;
    z-index: 2;
}

.smiley {
    background-color: lightgreen;
    position: fixed;
    margin: 0;

    width: 200px;
    height: 200px;
    border: 1px solid;
    border-radius: 100%;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    z-index:9;
}

.eye {
    background-color:darkkhaki;
    border: 1px solid;
    width: 50px;
    height: 50px;
    border-radius:0 0 100% 100%;
    position: absolute;
    top: 50px;
}

.left{
    left: 30px;
}

.right {
    right:30px;
}

.mouth {
    background-color: beige;
    border: 1px solid;
    width:100px;
    height: 40px;
    position: absolute;
    bottom: 30px;
    left: 50px;
    border-radius: 100%;

}

.hat {
    background-color: darkolivegreen;
    border: 1px solid;
    height: 50px;
    width: 200px;
    position: absolute;
    top: -25px;
    border-radius:100% 100% 0 0;



}