body {
  background: #e7c68d;
  font-family:'Courier New', Courier, monospace;
  color: #444;
  overflow-y: scroll;
  display: flex;
  position: relative;
}
@keyframes idle {
    from {background-position-x: 0px;}
    to {background-position-x: -1280px;}
}
@keyframes sleep {
    from {background-position-x: 0px;}
    to {background-position-x: -640px;}
}

@keyframes tail{
    0%, 70% {
        background-position: 0px 0px;
    }
    100% {
        background-position: -960px 0px;
    }
}
@keyframes zfly {
    0% {
        scale: 10%;
        translate: 0px 0px;
        rotate: 20deg;
    }
    10% {
        rotate: -20deg;
    }
    20% {
        rotate: 20deg;
    }
    30% {
        translate: 100px -70px;
        rotate: 20deg;
    }
    40%{
        scale: 90%;
        rotate: -20deg;
    }
    50% {
        scale: 100%;
        opacity: 1;
        rotate:20deg;
    }
    60% {
        scale: 90%;
        translate: 0px -140px;
        rotate: -20deg;
    }
    70% {
        rotate: 20deg;
    }
    80% {
        rotate: -20deg;
    }
    90% {
        rotate: 20deg;
    }
    100% {
        translate: 100px -210px;
        rotate: -20deg;
        scale: 0%;
    }
}
@keyframes balanc {
    0%{rotate:20deg;}
    100%{rotate: -20deg;}
}

.tamagotti {
    background: #ffffff;
    display: inline-flex;
    flex-direction: column;
    position: relative;
    border:1px solid #ffffff;
    justify-content: center;
    align-items: center;
    min-height: 320px;
    height: auto;
    min-width: 320px;
    width: 320px;
    margin:auto;
    padding-top: 5%;
    padding-bottom: 5%;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 24px;
    touch-action: none;
    user-select: none;
    transform-origin: top;
    overflow: visible;
}
.chat{
    background: #ffffff;
    border: 1px solid #ffffff;
    overflow-y: auto;
    height: 620px;
    width: 320px;
    margin-top: 60px;
    margin-left: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chatmsg {
    overflow-y: auto;
    scrollbar-width: none;
    flex: 1;
    top: 0%;
    left: 0%;
    overflow-wrap: break-word;
    word-break: break-all;
    overflow-x: hidden;
    flex-shrink: 0;
    font-family:system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: 400;
}
.chatmsg p{
    margin: 2px 2px;
    font-size: 16px;
}
.chat input{
    top: 100%;
    border: none;
    width: 100%;
    border-top: 1px solid #444;
    box-shadow: none;
}
.chat button{
    font-size: 1.5em;
    color: #444;
    height: 100%;
    aspect-ratio: 1/1;
    pointer-events: all;
    cursor: pointer;
    border: none;
    border-top: 1px solid #444;
    flex-shrink: 0;
}
.chat input:focus{
    outline: none;
}
@media (max-width:860px) {
    body {
        display: block;
    }
}
.tail{
    background-repeat: no-repeat;
    position: absolute;
    background-size: 960px 320px;
    background-image: url("../media/tail.png");
    width: 320px;
    height: 320px;
    animation: tail 1.1s steps(3) infinite alternate;
    image-rendering: pixelated;
    z-index: 1;
}

.inudoge {
    display: block;
    background-repeat: no-repeat;
    transform-origin: top;
    position: absolute;
    background-image: url("../media/inudoge.png");
    z-index: 2;
    width: 320px;
    height: 320px;
    background-position-y: 0px;
    background-size: 1280px 960px;
    animation: idle 1.1s steps(4) infinite;
    image-rendering: pixelated;
    margin: auto;
}
.doge{
    position:relative;
    min-height: 320px;
    min-width: 320px;
    transform-origin: top;
    margin: auto;
}
.inudoge.eat{
    background-position-y: -320px;
    animation: idle 1.1s steps(4) infinite;
}
.inudoge.sleep{
    background-position-y: -640px;
    animation: sleep 1.5s steps(2) infinite;

}


.btn {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    height: auto;
    padding-bottom: 5%;
    align-items: center;
    justify-content: center;
}
.btn button{
    width: 25%;
    aspect-ratio: 1/1;
    font-size:1.3em;
    font-family: "LXGW WenKai TC",cursive;
}
.box {
    display: flex;
    height: 20px;
    min-height: 10px;
    margin: 3%;
    border: 1px dashed#444;
    background-color: #44444463;
    padding:5%;
    overflow-y: auto;
}
.z {
    background-size:100% 100%;
    display: block;
    left: 230px;
    top: 180px;
    width: 90px;
    height: 90px;
    position: absolute;
    opacity: 0;
    animation: zfly 3s forwards ease-in-out;
    transition: rotate 3s linear;
    animation-delay: 1s;
    background-image: url("../media/z.png");
}
.gamemenu{
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    flex-direction: column;
    position: absolute;
    background-color: rgba(0, 0, 0, 0.3);
    width: 320px;
    height: 320px;
    z-index: 3;
    align-items: center;
    border-radius: 20px;
}
.gamemenu button{
    gap: 2%;
    padding: 0%;
    border-radius: 2px;
    border: none;
}
.hidden{
    display: none !important;
}
.gamemenu button{
    width: 40%;
    height: 20%;
    margin-left: 50%;
    font-size: 1.5em;
    transform: translateX(-50%);
}