* {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      /* background-color: rgb(247, 237, 238); */
}

/* Prevent horizontal scrollbar caused by 100vw and similar elements */
html,
body {
      overflow-x: hidden;
}

/* Main heading */
#header {
      position: fixed;
      height: 40px;
      width: 100%;
      /* use percent to avoid 100vw causing overflow */
      color: white;
      background-color: rgb(25, 216, 250);
}

#main-head {
      background-color: rgb(25, 216, 250);
      width: 100%;
      max-width: 1200px;
      /* keeps header from stretching too wide on large screens */
      margin: 0 auto;
      font-family: Geneva, Tahoma, sans-serif;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 12px;
}

#headOne {
      color: red;
      background-color: rgb(25, 216, 250);
      font-size: 1.5rem;
      margin-left: 20px;
      text-shadow: 0px 1px 6px yellow;
      padding: 4px 8px 4px 8px;

}

#headOne:hover {
      border: 1px solid black;
}

/* Nav-bar */
#nav-bar {

      /* responsive cap instead of 50vw */
      background-color: rgb(25, 216, 250);
      justify-content: space-evenly;
      align-items: center;
      display: flex;
}

.btn {
      margin: 0 6vw 0 6vw;
      border-radius: 5px;
      background-color: rgb(233, 233, 20);
      height: 20px;
      padding: 10px;
      display: flex;
      align-items: center;
      font-size: 0.75rem;
}

.btn:hover {
      background-color: red;
      font-size: 0.8rem;
      color: white;
}

/* MainSection */

#main {
      width: 100%;
      min-height: 100vh;
      background-image: url("chill.jpg");
      background-size: cover;
      background-position: center;
      background-attachment: fixed;
      background-repeat: no-repeat;
}

#searchBar {
      padding: 80px 0px 80px 0px;
      display: flex;
      justify-content: center;
      align-items: center;
}

#logo {
      height: 50px;
      width: 50px;
      margin: 50px 0px 0px 0px;
}

#searchInputField {
      margin: 50px 0px 0px 0px;
      background-color: rgb(255, 252, 62);
      border: 2px solid black;
      height: 50px;
      padding: 5px;
      width: 50%;
      /* responsive input width */
      max-width: 600px;
      border-radius: 5px;
      font-size: 0.8rem;
      text-align: center;
}

#generate {
      margin: 50px 0px 0px 10px;
      background-color: rgb(104, 197, 104);
      color: white;
      height: 50px;
      width: 75px;
      color: black;
      border-radius: 5px;
      font-size: 0.8rem;
}

#generate:hover {
      color: white;
      font-size: 0.85rem;
      background-color: red;
}

/*  Message Section */
#message {
      display: flex;
      justify-content: center;
      height: 80px;
      align-items: center;
}

/* Displaying results dynamically */
#displaySearch {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
}

.memeCard {
      justify-content: center;
      height: auto;
      width: auto;
      margin: 1%;
      display: flex;
      flex-direction: row;
      background-size: cover;
      border: 3px solid black;
      border-radius: 13px;
}

.memeCard img {
      width: auto;
      height: 50vh;
      object-fit: cover;
      border-radius: 8px;
}

#displaySaved {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
}

.memeSaved {
      justify-content: center;
      height: auto;
      width: auto;
      margin: 1%;
      display: flex;
      flex-direction: row;
      background-size: cover;
      border: 3px solid black;
      border-radius: 13px;
}

.memeSaved img {
      width: auto;
      height: 50vh;
      object-fit: cover;
      border-radius: 8px;
}

#displayupload {
      height: 60vh;
}

#uploadsection {
      margin-top: 50px;
      display: 100vw;
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
}

#headUpload {
      width: 80vw;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 10vh;
      border: 2px solid black;
      background-color: #E2852E;
      border-radius: 8px;
}

#saveUpload {
      margin-top: 10px;
      display: flex;
      justify-content: space-between;
      height: 8vh;
      width: 80vw;
}
#uploadinput {
      border: 0.5px solid black;
      background-color:#F5C857;
      width: 30vw;
      font-size: 20px;
      border-radius: 10px;
      height: 8vh;
      padding: 10px;
}
#uploadinput:hover{
      border: 2px solid black;
}
#saveuploadedMeme {
      width: 30vw;
       font-size: 1.3rem;
       background-color: #FFEE91;
}
#saveuploadedMeme:hover{
border: 2px solid black;
 background-color: rgb(152, 255, 145);
 font-size: 1.5rem;
}

/* footer section */
#footer {
      font-weight: 700;
      font-family: Geneva, Tahoma, sans-serif;
      margin-bottom: 0;
      display: flex;
      justify-content: center;
      height: 30px;
      width: 100%;
      align-items: center;
      background-color: rgb(25, 216, 250);
}


@media (max-width:481px){
      #main-head{
            margin: 0;
            padding: 0;
      }
      #main{
            background-repeat: repeat;
      }
      #headOne{
            height: 40px;
            display: flex;
            align-items: center;
            margin:0;
            padding-left: 7px;
            font-size: 1.2rem;
      }
      #nav-bar{
            max-width: 60%;
            justify-content: space-evenly;
      }
      .btn{
            margin: 4vw;
            height: 16px; 
            font-size: 0.6rem;
            padding: 9px 4px 9px 4px;
      }
      .memeCard {
            height: auto;
            width: auto;
            margin: 10px;
            flex-direction: column;
      }
      .memeCard img {
            width: auto;
            height: 40vw;
      }
      .memeSaved img {
            width: auto;
            height: 40vw;
      }
      .memeSaved {
            flex-direction: column;
            height: auto;
            width: auto;
            margin: 20px;
      }
}
@media (max-width:321px){
       .btn{
            margin: 1vw;
            height: 16px; 
            font-size: 0.6rem;
            padding: 9px 4px 9px 4px;
      }
}