@import url('https://fonts.googleapis.com/css2?family=Anton&family=Bebas+Neue&family=Jersey+10&family=Mitr:wght@200;300;400;500;600;700&family=Noto+Sans+Thai:wght@100..900&family=Oswald:wght@200..700&family=Prompt:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
body {
    font-family: "Mitr", serif;
    font-weight: 400;
    font-style: normal;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh; /* ให้เต็มหน้าจอ */
    margin: 0;
    background: linear-gradient(-45deg, #ff9a9e, #fad0c4, #fad0c4, #ffdde1);
    background-size: 400% 400%;
    animation: gradientAnimation 6s ease infinite;
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column; /* จัดเรียงในแนวตั้ง */
    width: 100%;
    max-width: 400px; /* กำหนดขนาดให้พอดี */
}

.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%;
}

p {
    font-size: 16px;
}
.input-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}
input {
    width: 50px;
    padding: 8px;
    text-align: center;
    font-size: 18px;
    border: 1px solid #ccc;
    border-radius: 5px;
}
button {
    padding: 10px 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin: 5px;
}
button:hover {
    background-color: #0056b3;
}

.footer {
    margin-top: 20px;
    font-size: 15px;
    color: #555;
}

.footerLink {
    color: #555;
    text-decoration: none;
    font-weight: bold;
}

#result {
    margin-top: 20px;
    font-weight: bold;
    font-size: 18px;
}
ul {
    list-style-type: none;
    padding: 0;
}
li {
    background: #fff3cd;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
}

.popup {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.popup.success {
    background: green;
}

.popup.error {
    background: red;
}
