* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    height: 100vh;
    background-color: #f0f0f0;
    color: #333;
    display: flex;
    justify-content: center;
    -webkit-text-size-adjust: 100%;
}

main {
    font-size: clamp(8px, 2vw, 16px);
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    margin-top: 64px;
    text-shadow: 2px 2px 16px rgb(0, 0, 0);
}

footer {
    margin-top: 32px;
}

nav {
    margin-bottom: 64px;
    display: flex;
    gap: 32px;
    justify-content: center;
}

a {
    color: white;
    text-decoration: none;
}

@font-face {
    font-family: gakuBold;
    src: url(../fonts/IBMPlexSansJP-Bold.ttf) format("truetype");
}

@font-face {
    font-family: gaku;
    src: url(../fonts/IBMPlexSansJP-Medium.ttf) format("truetype");
}

.suggestion {
    width: 224px;
    height: 32px;
    background-color: white;
    display: flex;
    align-items: center;
    padding-left: 8px;
    color: #333;
    text-shadow: none;
    font-size: clamp(8px, 5vw, 16px);
    font-family: Arial, Helvetica, sans-serif;
}

.hint {
    white-space: pre-line;
    width: clamp(32px, 15vw, 64px);
    height: clamp(32px, 15vw, 64px);
    border: solid clamp(1px, 1vw, 3px) white;
    border-radius: 6px;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.15);
    background-color: rgb(53, 218, 53);
    background-position: center;
    background-size: cover;
    background-blend-mode: overlay; 
    font-family: "gakuBold", Helvetica;
    font-size: clamp(4px, 3vw, 14px);
    display: flex;
    justify-content: center;
    align-items: center;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.609);
    line-height: clamp(4px, 4vw, 16px);;
    position: relative;
}

.history {
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 8px;
}

@keyframes bounceInertia {
  0%   { transform: translateY(0);
        opacity: 0;}
  40%  { transform: translateY(-20px); 
        opacity: 1;}
  70%  { transform: translateY(10px); }
  90%  { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

.hint.animate {
  animation: bounceInertia 0.5s ease;
}

#bg {
    position: fixed;
    height: calc(100vh + 20px);
    width: calc(100vw + 20px);
    top: -10px;
    left: -10px;
    background: no-repeat center top;
    background-size: cover;
    filter: brightness(50%) blur(4px);
    z-index: -1;
}

#inputArea {
    white-space: pre-line;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: clamp(16px, 4vw, 32px);
    color: white;
    font-family: "gakuBold", Helvetica;
}

#jp {
    margin-top: 64px;
    margin-bottom: 64px;
    text-align: center;
    font-family: "gakuBold", Helvetica;
    font-size: clamp(16px, 5vw, 64px);
    text-shadow: 2px 2px 16px rgb(0, 0, 0);
    word-break: keep-all;
    overflow-wrap: normal;
    color: white;
}

#en {
    text-shadow: 2px 2px 8px rgb(0, 0, 0);
    color: white;
    text-align: center;
    margin-bottom: 64px;
    font-family: "gaku", Helvetica;
    font-size: clamp(16px, 5vw, 24px);
}

#input {
    width: 224px;
    height: 32px;
    padding-left: 4px;
    font-size: 16px;
}

#submit {
    margin-top: 24px;
    width: 64px;
    height: 32px;
    font-size: clamp(8px, 5vw, 14px);
    font-family: "gaku", Helvetica;
    color: rgb(142, 90, 224);
    vertical-align: middle;
    cursor: pointer;
    appearance: none;
    background-color: rgb(255, 255, 255);
    border: rgb(146, 111, 202) solid 2px;
    border-radius: 6px;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.126);
}

#list {
    position: absolute;
    top: 32px;
    z-index: 1;
}

#error {
    text-align: center;
    position: absolute;
    padding-top: 2px;
    font-size: 12px;
}

#historyGroup {
    margin-top: 32px;
    display: flex;
    flex-direction: column-reverse;
    justify-content: center;
    align-items: center;
    gap: 16px

}
