@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');
* {
    font-family: "DM Sans", sans-serif;
    font-optical-sizing: auto;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    color: #333;
    overflow-y: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.heading-title {
    font-size: 18px;
    font-weight: 600;
}

.author {
    margin-top: -10px;
    font-size: 15px;
    font-weight: 400;
    color: #777;
}

.chat-container {
    width: 100%;
    height: 75vh;
    background-color: #ffffff;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
    position: relative;
}

.cards-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.card {
    background-color: #fff;
    border-radius: 25px;
    padding: 20px 40px;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: left;
    text-align: left;
    border: 0.25px solid #EAE8E8;
}

.card:hover {
    background-color: #F9F9F9;
}

.card i {
    font-size: 24px;
    margin-bottom: 5px;
}

.input-container {
    display: flex;
    background-color: #ffffff;
    width: 100%;
    padding: 10px;
    border-radius: 30px;
    bottom: 20px;
    left: 20px;
    right: 20px;
    justify-content: center;
    align-items: center;
}

#user-input {
    flex: 1;
    border: 1px solid #ddd;
    padding: 15px;
    font-size: 16px;
    border-radius: 50px;
    resize: none;
    height: 26px;
    background-color: #f9f9f9;
}

#user-input::placeholder {
    display: flex;
    justify-content: center;
    color: #000000;
    font-size: 13px;
    line-height: 22px;
}

#user-input:active,
#user-input:focus {
    outline: none !important;
    border-color: #bcbcbc;
}

#send-button {
    background-color: #18004b;
    color: #fff;
    border: none;
    padding: 12px;
    cursor: pointer;
    border-radius: 50%;
    margin-left: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    margin-right: 50px;
}

.send-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: solid #18004b;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    margin: 10px 0;
    padding: 10px 10px 10px 8px;
    border-radius: 25px;
    word-wrap: break-word;
}

.message.user {
    background-color: #57b7fe;
    color: white;
    align-self: flex-end;
    border: none;
    border-radius: 30px 30px 3px 30px;
    padding: 5px 15px;
    font-size: 13px;
    font-weight: 400;
}

.message.user {
    margin-left: 10px;
}

.message.bot {
    background-color: #f1f1f1;
    color: black;
    align-self: flex-start;
    border: none;
    border-radius: 30px 30px 30px 3px;
    padding: 5px 18px;
    font-size: 14px;
    font-weight: 400;
    text-align: justify;
}

/* Media queries for mobile devices */
@media (max-width: 768px) {
    .cards-container {
        flex-wrap: wrap;
    }

    .card {
        flex: 1 1 45%;
        max-width: 45%;
    }

    .chat-container {
        padding: 10px;
    }

    #user-input {
        font-size: 14px;
        padding: 10px;
    }

    #send-button {
        width: 40px;
        height: 40px;
        padding: 10px;
    }

    .message.user {
        font-size: 12px;
        padding: 5px 10px;
    }

    .message.bot {
        font-size: 12px;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .card:nth-child(n+5) {
        display: wrap;
        /* flex-direction: row; */
        /* flex-wrap: wrap; */
        /* justify-content: space-between; */
        
    }
    .card{
        font-size: 13px;
        /* text-align: justify; */
        padding: 15px 10px 20px 20px ;
        /* margin-top: 50px; */
    }
    .cards-container {
        /* display: grid;
        grid-template-columns: 1fr 1fr; */
        /* gap: px; */
        /* text-align: justify; */
        /* font-size: 1px; */
        margin-top: 100px;
    }
    .card i {
        display: none;
        /* margin-right: 1px; */
    }
    
}
/* Hide the fourth card on mobile */
@media (max-width: 480px) {
    .card:nth-child(4) {
        display: none;
    }
    
    .cards-container {
        flex-wrap: wrap;
        justify-content: space-around;
    }
    
    .card {
        flex-basis: calc(33.33% - 20px);
        margin-bottom: 20px;
    }
}

/* Hide header class */
.header.hidden {
    display: none;
}
@media (max-width: 768px) {
    .heading-title {
        font-size: 16px; /* Adjust this value as needed */
    }

    .author {
        font-size: 13px; /* Adjust this value as needed */
    }
}

@media (max-width: 480px) {
    .heading-title {
        font-size: 15px; /* Even smaller for very small screens */
    }

    .author {
        font-size: 10px; /* Even smaller for very small screens */
    }
}
  /* New waiting animation styles */
.dots-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
  }
  
  .dot {
    height: 5px;
    width: 5px;
    margin-right: 10px;
    border-radius: 10px;
    background-color: #b3d4fc;
    animation: pulse 1.5s infinite ease-in-out;
  }
  
  .dot:last-child {
    margin-right: 0;
  }
  
  .dot:nth-child(1) {
    animation-delay: -0.3s;
  }
  
  .dot:nth-child(2) {
    animation-delay: -0.1s;
  }
  
  .dot:nth-child(3) {
    animation-delay: 0.1s;
  }
  
  @keyframes pulse {
    0% {
      transform: scale(0.8);
      background-color: #b3d4fc;
      box-shadow: 0 0 0 0 rgba(178, 212, 252, 0.7);
    }
    50% {
      transform: scale(1.2);
      background-color: #6793fb;
      box-shadow: 0 0 0 10px rgba(178, 212, 252, 0);
    }
    100% {
      transform: scale(0.8);
      background-color: #b3d4fc;
      box-shadow: 0 0 0 0 rgba(178, 212, 252, 0.7);
    }
  }
  @media (max-width: 768px) {
    /* Existing styles... */

    .header {
        margin-bottom: 10px; /* Reduce margin for tablets and smaller devices */
    }

    .cards-container {
        margin-top: 10px; /* Reduce top margin for cards */
    }
}

@media (max-width: 480px) {
    /* Existing styles... */

    .header {
        margin-bottom: 5px; /* Further reduce margin for mobile phones */
    }

    .cards-container {
        margin-top: 5px; /* Further reduce top margin for cards on mobile */
    }

    /* Remove or adjust this if it's causing extra space */
    .cards-container {
        margin-top: 0; /* Remove the 100px top margin we added earlier */
    }

    /* If needed, add some padding to the top of the chat-container instead */
    .chat-container {
        padding-top: 10px;
    }
}