body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    overflow: hidden;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(45deg, #FF6F61, #FFD700, #7CFC00, #00CED1, #9370DB, #FF6F61);
    background-size: 400% 400%;
    animation: gradientAnimation 15s linear infinite;
}

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

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

#input-container {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

label {
    font-size: 1.2em;
    color: #eee;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

#number-input {
    padding: 12px 20px;
    font-size: 1em;
    border: none;
    border-radius: 25px;
    background-color: rgba(255, 255, 255, 0.8);
    color: #333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 150px;
    text-align: center;
    outline: none;
}

#number-input:focus,
#number-input:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

#number-input::placeholder {
    color: #aaa;
}

#problem-display {
    display: none;
    font-size: 1.8em;
    padding: 20px;
    border-radius: 15px;
    background-color: rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    max-width: 80%;
    margin-bottom: 20px;
}

.katex-display {
    overflow-x: auto;
    overflow-y: hidden;
}

::-webkit-scrollbar {
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@media only screen and (max-width: 600px) {
    h1 {
        font-size: 3em;
    }

    #input-container {
        flex-direction: column;
        gap: 10px;
    }

    label {
        font-size: 1.1em;
    }

    #number-input {
        width: 80%;
        max-width: 250px;
    }

    #problem-display {
        font-size: 1.5em;
        max-width: 95%;
    }
}