html {
    text-rendering: optimizeLegibility;
}

* {
    box-sizing: border-box;
    list-style: none;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1b1e24;
}

::-webkit-scrollbar-thumb {
    background: #f9d83c;
    border-radius: 5px;
}

a {
    text-decoration: none;
    color: white;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background: radial-gradient(ellipse at 50% -20%, rgba(100, 153, 201, 0.3), rgba(255, 255, 255, 0)) #070d12;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    background-color: #3573a59a;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: white;
    padding: 1% 2%;
}


.nav-bar-img {
    display: flex;
    margin: auto;
    margin-left: 15px;
    width: 80px;
    height: 80px;
}

.nav-bar-img img {
    display: flex;
    margin-left: 15px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid #f9d83c;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.nav-bar-img h1 {
    margin: auto;
    padding-left: 2rem;
}

.nav-bar-links ul {
    padding: 0;
    display: flex;
}

.nav-bar-links li a {
    color: #fff;
    text-decoration: none;
    font-size: 2rem;
    margin-right: 50px;
    transition: color 0.3s ease;
    position: relative;
}

.nav-bar-links li a:hover {
    color: #f9d83c;
}

.nav-bar-links li a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #fff;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-bar-links li a:hover::after {
    transform: scaleX(1);
}

.nav-bar-toggle {
    position: absolute;
    cursor: pointer;
    top: 1.25rem;
    right: 1.25rem;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
}

.nav-bar-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 10px;
}


.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #3573a59a;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    right: -50%;
}

.dropdown-content a {
    width: 100%;
    /* Abarca todo el ancho del contenedor */
    display: block;
    /* Hace que cada enlace sea un bloque */
    padding: 10px;
    /* Añade un poco de relleno */
    box-sizing: border-box;
    /* Incluye el relleno y el borde en el ancho y alto del elemento */
}

.dropdown-content a:hover {
    background-color: #1f5c91;
}

.dropdown:hover .dropdown-content {
    display: block;
}

@media (max-width: 600px) {
    .nav-bar-toggle {
        display: flex;
    }

    .nav-bar-links {
        display: none;
        width: 100%;

    }

    .nav-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-bar-links ul {
        width: 100%;
        flex-direction: column;
    }

    .nav-bar-links li {
        text-align: center;
    }

    .nav-bar-links li a {
        padding: 0rem 1rem;
    }

    .nav-bar-links.active {
        display: flex;
    }

    .dropdown-content {

        right: 0;
    }

}

h1 {
    font-size: 2rem;
    margin: 0;
    letter-spacing: 2px;
    color: #f9d83c;
    transition: color 0.3s ease;
    text-align: center;

}

.container {
    padding: 20px;
}

h2 {

    align-items: center;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-size: 3.5rem;
    margin-bottom: 50px;
}

form {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    /* Center items horizontally */
    align-items: center;
    /* Center items vertically */
    position: fixed;
    bottom: 12px;
    width: 100vw;
    border-radius: 10px;
    padding: 10px;
    /* Add some padding to give space around the items */
}

label {

    font-weight: bold;
    color: #ccc;
}

input[type="text"] {
    width: 50%;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: none;
    border-radius: 5px;
}


textarea {
    width: 50%;
    padding: 9px;
    color: whitesmoke;

    border: none;
    border-radius: 5px;
    font-size: 18px;
    background-color: #222222;

}

textarea::-webkit-scrollbar {
    display: none;
}

textarea:focus {
    outline: none;
}

#response {
    max-width: 80%;
    height: calc(100% - 250px);
    margin-left: 10%;
    overflow-y: scroll;
}

#response::-webkit-scrollbar {
    width: 10px;
    border-radius: 50%;
}

.user-message {
    background-color: rgba(71, 71, 71, 0.3);
    padding: 10px;
    margin-bottom: 10px;
    margin-left: 60%;
    max-width: 60%;
    border-radius: 10px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: whitesmoke;
    word-wrap: break-word;
}

.ai-message,
.ai-message-err {
    background-color: rgba(71, 71, 71, 0.3);
    padding: 10px;
    margin-bottom: 10px;
    margin-right: 40%;
    max-width: 60%;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    color: whitesmoke;
    word-wrap: break-word;
}

.ai-message-err {
    background-color: rgba(83, 0, 0, 0.3);
}

p {
    margin: 0;
    padding: 0;
    font-size: 1.5rem;
}

button {
    font-size: 18px;
    color: #e1e1e1;
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
    position: relative;
    border: none;
    background: none;
    text-transform: uppercase;
    transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
    transition-duration: 400ms;
    transition-property: color;
}

button:focus,
button:hover {
    color: #fff;
}

button:focus:after,
button:hover:after {
    width: 100%;
    left: 0%;
}

button:after {
    content: "";
    pointer-events: none;
    bottom: -2px;
    left: 50%;
    position: absolute;
    width: 0%;
    height: 2px;
    background-color: #fff;
    transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
    transition-duration: 400ms;
    transition-property: width, left;
}


@media screen and (max-width: 1000px) {
    #response {
        max-width: 100%;
        margin-left: 0;
        height: calc(100% - 280px);
    }

    textarea {
        width: 80%;
    }

    form {
        bottom: 0;
    }

    .ai-message {
        max-width: 80%;
        min-width: 80%;
    }
}

footer {
    background: #241b2200;
    padding: 60px 0;
}

@media (max-width: 650px) {

    /* Estilos para dispositivos móviles */
    h1 {
        font-size: 1rem;
        /* Mantenemos el mismo tamaño */
    }

    .logo {
        width: 40px;
        height: 40px;
        margin-left: 0px;
        margin-right: 78px;


    }

    .inicio-link {
        font-size: 1rem;
        margin-left: 50px;
    }

}