@import url('https://fonts.googleapis.com/css2?family=Do+Hyeon&family=Gaegu:wght@700&family=Inter:wght@500&display=swap');

body {
    overflow-x: hidden;
}
.container {
    width: 100%;
    height: auto;
    margin: 0;
}
.main-img {
    display: flex;
    margin: 120px auto;
    width: 400px;
    height: 600px;
    /* justify-content: center;
    align-items: center;
    margin: 0 auto;
    padding: 200px; */
}
.paper-wrap {
    position: relative;
    margin-top: 160px;
    margin-bottom: 200px;
}
.paper {
    display: flex;
    width: 770px;
    height: 600px;
    margin: 0 auto;
}
.paper-text {
    font-size: 1.2rem;
    font-family: 'Gaegu', cursive;
    position: absolute;
    top: 30%;
    left: 44%;
    text-align: center;

    animation: shake 0.5s infinite;

}

/* 손글씨 효과 */
@keyframes shake {
    0% {
      transform: translate(1px, -2px) rotate(-1deg);
    }
    10% {
      transform: translate(-1px, 2px) rotate(-1deg);
    }
    20% {
      transform: translate(1px, 2px) rotate(0deg);
    }
    30% {
      transform: translate(3px, 2px) rotate(0deg);
    }
    40% {
      transform: translate(1px, -1px) rotate(1deg);
    }
    50% {
      transform: translate(-1px, -2px) rotate(-1deg);
    }
    60% {
      transform: translate(-3px, 1px) rotate(0deg);
    }
    70% {
      transform: translate(3px, 1px) rotate(-1deg);
    }
    80% {
      transform: translate(-1px, -1px) rotate(1deg);
    }
    90% {
      transform: translate(-3px, 0px) rotate(1deg);
    }
    100% {
      transform: translate(1px, 1px) rotate(0deg);
    }
}
.pencil {
    position: absolute;
    top: 1300px;
    left: 800px;
    width: 500px;
}
h2 {
    margin: 100px 0 100px 0;
    text-align: center;
}
.main-comment {
    text-align: center;
}
.main-title {
    margin-top: 20px;
    text-align: center;
    overflow: hidden;
    animation: 2s anim-popoutin ease infinite;
}
@keyframes anim-popoutin {
    0% {
      color: black;
      transform: scale(0);
      opacity: 0;
      text-shadow: 0 0 0 rgba(0, 0, 0, 0);
    }
    25% {
      color: #516459;
      transform: scale(2);
      opacity: 1;
      text-shadow: 3px 10px 5px rgba(0, 0, 0, 0.5);
    }
    50% {
      color: black;
      transform: scale(1);
      opacity: 1;
      text-shadow: 1px 0 0 rgba(0, 0, 0, 0);
    }
    100% {
      /* animate nothing to add pause at the end of animation */
      transform: scale(1);
      opacity: 1;
      text-shadow: 1px 0 0 rgba(0, 0, 0, 0);
    }
}
.fromtop {
  animation: 2s anim-fromtop linear infinite;
}
@keyframes anim-fromtop {
  0% { opacity: 0; transform: translateY(-100%);}
  25% { opacity: 1; transform: translateY(0%);}
  50% {
  }
  100% {
  }
}

@media screen and (min-width: 768px) and(max-width: 1024px) {
    .main-img {
        width: 300px;
        height: 500px;
    }
    .paper {
        width: 500px;
        height: 400px;
    }
    .pencil {
        position: absolute;
        top: 1290px;
        left: 800px;
        width: 500px;
    }
}
@media screen and (max-width: 768px) {
    .main-img {
        width: 300px;
        height: 430px;
    }
    .paper {
        width: 500px;
        height: 400px;
    }

    .paper-text {
        font-size: 1.2rem;
        font-family: 'Gaegu', cursive;
        position: absolute;
        top: 30%;
        left: 38%;
        text-align: center;
        animation: shake 0.5s infinite;
    }

    .pencil {
        position: absolute;
        width: 425px;
        height: 354px;
        top: 1000px;
        left: 449px;
    }
}

@media screen and (max-width: 486px) {
    .main-img {
        width: 300px;
        height: 430px;
    }
    .paper {
        width: 500px;
        height: 400px;
        margin-left: -48px;
    }

    .paper-text {
        font-size: 1.2rem;
        font-family: 'Gaegu', cursive;
        position: absolute;
        top: 30%;
        left: 30%;
        text-align: center;
        animation: shake 0.5s infinite;
    }

    .pencil {
        position: absolute;
        width: 225px;
        height: 224px;
        top: 1000px;
        left: 228px;
    }
}