body {
    font-family: 'Open Sans', sans-serif; 
    background: linear-gradient(135deg, #1E213A, #161925); 
    color: #D8DEE9; 
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    scroll-behavior: smooth; 
}

.container {
    text-align: center;
    background: #24283B; 
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4); 
    width: 80%;
    max-width: 500px;
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: slideIn 0.8s ease-out; 
}

.container:hover {
    transform: translateY(0) scale(1.03); 
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4); 
}

.container:focus-within {
    outline: 2px solid #61AFEF; 
    outline-offset: 4px;
}

.container.loaded {
    opacity: 1;
    transform: translateY(0);
}

h1 {
    font-family: 'Montserrat', sans-serif; 
    color: #88C0D0; 
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); 
    font-size: calc(1.5em + 1vw); 
    animation: fadeIn 1s ease-in-out; 
}

textarea {
    box-sizing: border-box; 
    width: 100%;
    height: 80px;
    padding: 10px; 
    border-radius: 5px;
    border: none;
    background: #2B303B; 
    color: #ECEFF4; 
    resize: none;
    font-size: 1em;
    box-shadow: none; 
    transition: border 0.3s ease, background-color 0.3s ease; 
}

textarea:hover {
    background-color: #343A46; 
}

textarea:focus {
    outline: none;
    border: 3px solid #88C0D0; 
    animation: glow 0.5s ease-in-out; 
}

textarea::placeholder {
    color: #888; 
}

button {
    background-color: #88C0D0; 
    color: #FFFFFF; 
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 1em;
    transition: 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
}

button:disabled {
    background-color: #4C566A; 
    cursor: not-allowed;
    opacity: 0.6;
}

button:focus {
    outline: 2px solid #61AFEF;
    outline-offset: 2px;
}

button:hover {
    background-color: #6BA9C1; 
    transform: scale(1.05);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.4); 
    animation: pulse 0.5s ease-in-out; 
}

#outputText {
    margin-top: 20px;
    font-size: 1.2em;
    color: #D8DEE9; 
    font-weight: bold;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease, transform 0.5s ease, color 0.3s ease; 
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); 
}

.shake {
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 0px #88C0D0;
    }
    100% {
        box-shadow: 0 0 10px #88C0D0;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 15px; 
        border-radius: 8px; 
    }

    h1 {
        font-size: calc(1.1em + 1vw); 
    }

    textarea {
        font-size: 0.9em; 
        padding: 8px; 
    }
}
