body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    padding: 100px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 700px;
    border-radius: 5px;
    height: 80vh;
}


.title-audio-wrapper {
    margin: 0 auto;
    width: 700px;
}

.main-container {
    transition: margin-top 0.5s ease, opacity 0.5s ease;
    margin-top: 50px;
    opacity: 0;
}

.main-container.visible {
    margin-top: 10px;
    opacity: 1;
}

.container {
    padding: 100px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 700px;
    border-radius: 5px;
    height: 80vh;
}

.title-audio-wrapper {
    margin: 0 auto;
    width: 700px;
}


.convert-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: #000;
    cursor: pointer;
    width: 280px;
    height: 60px;
    font-size: 20px;
    text-align: center;
    margin-top: 25px;
    text-decoration: none;
    color: #fff;
    border: none;
    border-radius: 50px;
    margin: 0 auto;
    transition: background-color 0.3s ease;
    user-select: none;
    font-family: 'Source Sans Pro', sans-serif;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.convert-btn:hover {
    background-color: #000000;
}

.convert-btn .fa-volume-up {
    color: #ffffff;
    font-size: 18px;
    margin: 8px;
    transition: transform 0.3s ease;
}

.convert-btn i {
    margin-right: 8px;
}

h1 {
    text-align: center;
    color: #3a3a3a;
    margin-bottom: 20px;
    user-select: none;
    font-family: 'Source Sans Pro', sans-serif;
}

textarea {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: none;
    font-family: 'Nunito', sans-serif;
    border-radius: 30px;
    padding-left: 20px;
    padding-top: 13px;
    margin-bottom: 15px;
    resize: none;
    user-select: none;
    background-color: #f4f4f4;
    height: 50px;
    transition: background-color 0.3s ease-in-out;
}

textarea.focused {
    border-radius: 20px;
    animation: expandTextarea 0.4s ease forwards;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
}

textarea.unfocused {
    animation: shrinkTextarea 0.4s ease forwards;
}

@keyframes expandTextarea {
    0% {
        height: 50px;
    }
    100% {
        height: 250px;
    }
}

@keyframes shrinkTextarea {
    0% {
        height: 250px;
    }
    100% {
        height: 50px;
    }
}


#text-input::placeholder {
    font-family: 'Nunito', sans-serif;
    margin-left: 10px;
    font-size: 16px;
}

#text-input:focus {
    outline: none;
    border: 1px solid #000;
}

#text-input {
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 500;
}

input[type="submit"] {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #1c1b1b;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-left: 5px;
}

input[type="submit"]:hover {
    background-color: #000000;
}

.textarea-wrapper {
    position: relative;
}

#trash-icon {
    position: absolute;
    right: 15px;
    bottom: 30px;
    font-size: 22px;
    color: #ff4545;
    cursor: pointer;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

#text-input:not(:placeholder-shown) ~ .trash-wrapper #trash-icon {
    display: block;
    opacity: 1;
}

#trash-icon:hover {
    color: #ff0000;
}

.trash-wrapper {
    right: 15px;
    bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trash-tooltip {
    position: absolute;
    visibility: hidden;
    background-color: #000000;
    color: #fff;
    text-align: center;
    padding: 5px 10px;
    border-radius: 5px;
    position: absolute;
    z-index: 1;
    bottom: 10px;
    left: 102%;
    transform: translateY(-50%);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
}

#trash-icon:hover + .trash-tooltip {
    visibility: visible;
    opacity: 1;
}

.trash-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent #000000 transparent transparent;
}


.audio-container {
    margin: 20px auto;
    text-align: center;
}

.notification {
    display: none;
    justify-content: center;
    align-items: center;
    width: fit-content;
    position: relative;
    bottom: -150px;
    margin: 15px auto;
    padding: 10px 20px;
    background-color: #4caf50;
    color: #fff;
    border-radius: 20px;
    user-select: none;
    font-family: 'Playfair Display', sans-serif;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.notification i {
    font-size: 18px;
    margin-right: 8px;
}

audio {
    margin-bottom: 100px;
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
    background: none;
}

.audio-container audio {
    border-radius: 50px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: #000;
    cursor: pointer;
    width: 280px;
    height: 60px;
    font-size: 20px;
    text-align: center;
    margin-top: 25px;
    text-decoration: none;
    color: #fff;
    border: none;
    border-radius: 50px;
    margin: 0 auto;
    transition: background-color 0.3s ease;
    user-select: none;
    font-family: 'Source Sans Pro', sans-serif;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.download-btn:hover {
    background-color: #000000;
}

.fa-solid.fa-circle-down {
    color: #ffffff;
    font-size: 20px;
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 22px;
}

.loader {
    display: flex;
    justify-content: space-between;
    width: 40px;
}

.loader div {
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    border-radius: 50%;
    animation: grow-shrink 1.5s infinite;
}

.loader div:nth-child(1) {
    animation-delay: 0s;
}

.loader div:nth-child(2) {
    animation-delay: 0.3s;
}

.loader div:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes grow-shrink {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.5);
    }
}

.error-message {
    bottom: 20px;
    justify-content: center;
    margin: -25px auto;
    width: fit-content;
    text-align: center;
    background: #ff3737;
    padding: 12px 24px;
    border-radius: 20px;
    color: #fff;
    gap: 10px;
    user-select: none;
    font-family: 'Source Sans Pro', sans-serif;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.animate {
    animation: popup 0.5s forwards;
}
  
@keyframes popup {
    0% {
      transform: translateY(0);
      opacity: 0;
    }
    50% {
      transform: translateY(-15px);
      opacity: 1;
    }
    100% {
      transform: translateY(0);
      opacity: 1;
    }
}

.fade-out {
    animation: fadeOut 0.5s forwards;
}

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

@media (max-width: 600px) {
    .main-container {
        width: 100%;
    }

    .convert-btn {
        height: 60px;
        width: 250px;
    }

    .container {
        padding: 15px;
        width: 100%;
        margin-top: -60px;
    }

    .container .title-audio-wrapper h1 {
        font-size: 1.9rem;
        font-weight: 600;
    }

    textarea {
        height: 50px;
        font-weight:lighter
    }

    .trash-tooltip {
        display: none;
    }

    #flashMessage {
        margin-inline: 25%;
    }

    .error-message {
        position: absolute;
        margin: 0 auto;
        left: 5%;
    }
}


@media (min-width: 601px) and (max-width: 768px) {
    .container {
        padding: 20px;
    }

    textarea {
        height: 50px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 700px;
    }

    textarea {
        height: 50px;
    }
}