:root {
    --main-color: #FFAC46;
    --wine: #3E0710;
    --black: #000000;
    --white: #FFFFFF;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body{
    background-image: url("https://raw.githubusercontent.com/Natyushk/DEV014-dataverse-chat/main/src/assets/gris.jpeg");
    background-size: auto;
    font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; 
    color: white;
    min-height: 100vh;
    position: relative;
    margin: 0%;
    padding: 0%;
}
main {
    width: 100%;
    text-align: center;
}
header{
    margin: 0;
    padding: 0;
    height: auto;
    text-align: center;
    background-image: url("https://raw.githubusercontent.com/Natyushk/DEV014-dataverse-chat/main/src/assets/tomate%20header.jpg");
    color: var(--white);
}
h1{
    align-self: center;
    font-size: 30px;
}
#navbar{
    height:50px;
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-around;
}
#nav-links{
    padding: 8px;
    list-style: none;
}
.links{
    padding: 8px;
    border: 2px solid var(--white);
    color: var(--white);
    text-decoration: none;
    border-radius: 12px;
}
.links:hover{
    background-color: var(--white);
    color: var(--black);
}
section {
    width: 100%;
    font-size: 20px;
}
#search-section {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
button{
    width: 100px;
    border-radius: 8px;
    font-size: 18px;
    box-shadow: 5px 5px;
}

div p {
    font-size: 28px;
}
label {
    margin: 12px 0; 
}
select, input {
    border-radius: 8px;
    font-size: 20px;
    outline: none;
}
input{
    padding: 0 8px;
}
#search-input{
    margin: 12px;
}
select:focus{
    border:4px solid var(--main-color);
}
select:hover, #search-input:focus{
    box-shadow: 3px 3px var(--main-color);   
}
button:hover {
    background-color: var(--main-color);
}
ul {
    padding: 28px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}
.card-container {
    display: flex;
    flex-wrap: wrap;
}
.card { 
    width: 280px;
    margin: 12px;
    padding: 12px;
    border-radius: 8px ;
    background-image: url("https://raw.githubusercontent.com/Natyushk/DEV014-dataverse-chat/main/src/assets/tomate%20cards.jpg");
    background-size: cover;
    display: flex;
    flex-direction: column;
    align-items: center; 
    flex-grow: 1;
    color: var(--white);
}
.card .name {
    font-size: 1.2em;
}
.card .continent {
    font-size: 1em;
}
.card .fortune {
    font-size: 0.9em;
}
.card .short-description {
    font-size: 0.8em;
}

li p:nth-child(2){
    font-size: 32px;
}
li p:nth-child(4), p:nth-child(5) {
    margin-top: 12px;
}
img {
    width: 250px;
    height: 250px;
    margin: 24px;
    border-radius: 100%;
}
footer{
    width: 100%;
    height: 50px;
    background-color: var(--white);
    position: fixed; /* Cambiar a posición fija */
    bottom: 0;
    background-image: url(https://raw.githubusercontent.com/Natyushk/DEV014-dataverse-chat/main/src/assets/vino%20footer.jpg);
}
footer p {
    padding: 12px;
}
.chat-footer{
    position: relative; /* Cambiar a posición fija */
}
.error{
    padding: 50px; 
}
.error img{
    border-radius: 0%;
}

/* Estilos de vista Rich person*/
.cardChat, .card-chat-group{
    width: 90%;
    padding: 24px 12px;
    border: 3px solid var(--white);
    border-radius: 20px;
    margin: 24px auto;
    background-image: url("https://raw.githubusercontent.com/Natyushk/DEV014-dataverse-chat/main/src/assets/tomate%20cards.jpg");
    background-size: cover;
}
.card__info{
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
}
.card__info img{
    width: 100px;
    height: 100px;
    margin: 24px 4px;
}
.card__info-dat{
    width: 200px;
    margin: 12px;
    padding: 8px;
    background-color: var(--main-color);
    opacity: 0.7;
    border-radius: 8px;
    color: var(--wine);
}
#card__info-fortune, #card__info-continent{
    margin: 8px 0;
    font-size: 20px;
}
.card__chat{
    width: 98%;
    margin: 0 auto;
    padding: 8px 0;
    background-color: var(--main-color);
    opacity: 0.6;
    border-radius: 8px;
}
.card__chat-title{
    width: 100%;
    color: var(--wine);
}
.card__chat-conversation {
    width: 90%;
    height: 400px;
    padding: 0;
    margin: 12px auto;
    border: 5px solid var(--white);
    display: grid;
    grid-template-rows: repeat(7, 1fr);
    grid-template-columns: repeat(5, 1fr);
    background-color: var(--white);
    opacity: 1.0;
    overflow-y: scroll;
}
.card__chat-conversation p{
    font-size: 12px; 
    color: #3E0710;
}
.user-message, .response-message{
    display: flex;
}
.user-message .nameChat{
    display:none ;
}
.pContainer{
    width:fit-content;
    height: fit-content;
    margin: 8px 0;
    border-radius: 12px;
    background-color: #FCEFEF;
    padding: 12px;
    text-align: start;
}
.user-message{
    grid-column: 2/6; 
    text-align: right;
    flex-direction: row-reverse;
}
.response-message{
    grid-column: 1/5;
    
}
.card__chat-span{
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card__chat-span input{
    width: 80%;
    height: 40px;
    margin: 0 8px;
    border-style: none;
}
.card__chat-span img{
    width: 35px;
    height: 35px;
    margin: 0px
}
.card__chat-span input:focus{
    box-shadow: 4px 4px var(--wine);
}

#form-ApiKey{
    width: 90%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 2px solid var(--main-color);
    margin: 24px auto;
    border-radius: 24px;
    align-items: center;
}   
#form-ApiKey input{
    width: 100%;
    margin: 24px 0;
    font-size: 32px;
}
.card__info-group{
    width: 100%;
    display: flex;
    flex-direction: row;
    overflow-x: scroll;
}
.img-group-chat{
    width: 70px;
    height: 70px;
    margin: 12px;
}
.div-person{
    margin-bottom: 8px;
}
.name-description{
    width: auto;
}
#name-group{
    display: none;
}
#first-name-group{
    font-size: 16px;
}
.nameChat{
    text-decoration:underline;
}
@media (min-width: 1000px) {
    header{
        height: 150px;
        padding-top: 40px;
    }
    header h1{
        font-size: 60px;
    }
    #search-section{
        flex-direction: row;
        justify-content: center;
    }
    select, #search-input, label{
        font-size: 28px;
        margin-left: 24px;
    }
    button {
        width: 150px;
        font-size: 28px;
    }
    .card { 
        width: 320px;
    }
    #navbar{
        padding-right: 24px;
        justify-content: end;
    }
    .links{
       margin-left: 24px;
    }
    .card-chat-group{
        display: flex;
    }
    .card__info img{
        width: 200px;
        height: 200px;
        margin: 24px;
    }
    .card__info-dat{
        width: 80%;
        padding: 40px;
        margin-bottom: 32px ;
    } 
    .card__info-dat p{
        font-size: 40px;
    }
    #card__info-fortune, #card__info-continent{
        font-size: 32px;
    }
    .card__chat-conversation{
        width: 95%;
        height: 600px;
        padding: 24px;
    }
    .card__chat-conversation p{
        font-size: 24px;
    }
    .card__chat-span input{
        width: 92%;
        height: 50px;
        margin: 0 8px;
        border-radius: 12px;
    }
    input{
        padding: 0 24px;
    }
    .error img{
        width: 40%;
        height: auto;
    }
    .card__info-group{
        width: 50%;
        height: 600px;
        flex-direction: column;
        overflow-y: scroll;
        overflow-x: hidden;
    }
    .div-person{
        width: 100%;
        margin: 0;
        display: flex;
    }
    .name-description{
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    #name-group{
        display: block;
        font-size: 24px;
    }
    #first-name-group{
        display: none;
    }
}