*{
    margin: 0;
    padding: 0;
}
.main{
    padding: 4rem 0;
    width: 90vw;
    margin: 0 auto;
    max-width: 1000px;
}
body{
    background:#f5f6fa;
}
.container{
    text-align: center;
}
img{
    width :150px;
    margin: 1rem;
}

h2{
    margin-bottom: 2rem;
    font-weight:bold;
}

form{
    background: white;
    padding: 2rem;
    box-shadow: 0 0px 10px rgba(0,0,100, 0.3);
    border-radius: 5px;
    margin: 1rem auto;
    display: grid;
    grid-template-columns: auto 100px ;
    max-width: 1000px;
}
form:hover{
    box-shadow: 0 0px 10px rgba(0,0,100, 0.4);
}

.input, .searchBtn {
    padding:  .4rem .7rem;
    background: #f5f6fa;
    border: 1px solid rgb(201, 192, 192);
}

.input{
    border-right: none;
    border-bottom-left-radius: 5px;
    border-top-left-radius: 5px;
}

.searchBtn{
    border-left: none;
    border-bottom-right-radius: 5px;
    border-top-right-radius: 5px;
    background: #645cff;
    color: white;
}
.searchBtn:hover{
    color: black;
    cursor: pointer;
}

@keyframes spinner {
    to {
      transform: rotate(360deg);
    }
  }
  .loader {
    width: 2rem;
    height: 2rem;
    border: 5px solid white;
    border-radius: 50%;
    border-top-color:#645cff ;
    animation: spinner 0.6s linear infinite;
    margin: 10px;
  }
  .loader {
    margin: 0 auto;
    margin-top: 2rem;
  }
.result{
    padding: 2rem 0;
    text-align: center;
}

.error{
    text-align: center;
    text-transform: capitalize;
    color: rgb(133, 2, 2);
}

.articles{
    display: grid;
    gap: 2rem;
}
.card {
    background:  #f5f6fa;
    border-radius: 5px;
    box-shadow:  0 0px 10px rgba(0,0,100, 0.4);
    padding-bottom: 1.5rem;
    text-align: center;
  }
  .card img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.75rem;
  }
  
  .card h3 {
    margin-bottom: 1.5rem;
    color: gray;
  }
  .btn {
    padding: 0.35rem 0.75rem;
    letter-spacing: 1.6px;
    font-size: 0.75rem;
    color: white;
    background: #645cff;
    border-radius: 10px;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
  }
  
@media screen and (min-width: 768px) {
  .articles {
    grid-template-columns: 1fr 1fr;
  }
  .form {
    max-width: 600px;
  }
}
@media screen and (min-width: 992px) {
  .articles {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
@media screen and (max-width: 400px) {
    form{
        grid-template-columns: auto ;
    }
    .input{
        border-radius: 5px;
        margin-bottom: .5rem;
    }
    
    .searchBtn{
        border-radius: 5px;
        background: #645cff;
        color: white;
    }
  }

 

