*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Play', sans-serif; 
}

.glitch{
  font-size: 40px;
animation: glitch 1s linear infinite;
text-shadow:
    0 0 7px rgb(206, 213, 215),
    0 0 10px rgb(14, 38, 47),
    /* 0 0 21px #fff, */
    /* 0 0 42px rgb(11, 23, 27),
    0 0 82px rgb(11, 23, 27),
    0 0 92px rgb(11, 23, 27),
    0 0 102px rgb(11, 23, 27), */
    0 0 151px rgb(0, 149, 255);
}

@keyframes glitch{
2%,64%{
  transform: translate(2px,0) skew(0deg);
}
4%,60%{
  transform: translate(-2px,0) skew(0deg);
}
62%{
  transform: translate(0,0) skew(5deg); 
}
}

div:before,
div:after{
content: attr(title);
position: absolute;
left: 0;
}

div:before{
animation: glitchTop 1s linear infinite;
clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
-webkit-clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

@keyframes glitchTop{
2%,64%{
  transform: translate(2px,-2px);
}
4%,60%{
  transform: translate(-2px,2px);
}
62%{
  transform: translate(13px,-1px) skew(-13deg); 
}
}

div:after{
animation: glitchBotom 1.5s linear infinite;
clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
-webkit-clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
}

@keyframes glitchBotom{
2%,64%{
  transform: translate(-2px,0);
}
4%,60%{
  transform: translate(-2px,0);
}
62%{
  transform: translate(-22px,5px) skew(21deg); 
}
}

/*  Main search page */
#header{
  font-size: 2rem;
  color: #fff;
  position: absolute;
  top: 1rem;
  text-align: center;
  margin: 0 auto;
}
#header h1{
  letter-spacing: 0.8rem;
}
#header p{
  margin-top: 2rem;
  letter-spacing: 0.2rem; 
}
#search-hub{
  background-image: url(/marvel.jpg);
  -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}
#search-box{
  font-size: 2rem;
  color: white;
  font-weight: 600;
  margin-bottom: 2rem;
}
#search{
  font-size: 1.3rem;
  padding: 1rem 0.8rem;
  border-radius: 1rem 0rem 0rem 1rem;
  outline: none;
  border: none;
  border-color: #9ecaed;
    box-shadow: 0 0 10px #9ecaed;
    width: 280px;
    height: 30px;
    border-radius: 15%;
}
#search:focus{
  background: rgb(233, 233, 233);
}
#btn{
  font-size: 1.3rem;
  padding: 0.4rem 1rem;
  border-radius: 0rem 1rem 1rem 0rem;
  outline: none;
  border: none;
  background: rgba(40, 40, 40, 0.915);
  color: white;
  cursor: pointer;
  
}
#btn:active{
  animation-name: button-ani;
  animation-duration: 4s;
  transform: scale(0.9);
}
#btn:hover{
  animation-name: button-ani;
  animation-duration: 4s;
}
@keyframes button-ani {
  from {background-color: rgba(32, 86, 156, 0.915);}
  to {background-color: rgba(5, 109, 228, 0.915);}
}


/* Search results */
#results-hub{
  display: none;
  background: black
  
}
#movie-name{
  background: transparent
  color: white;
  font-size: larger;
  padding: 1rem 1rem;
  margin: 0;
  position: fixed;
  width: 100%;
  z-index: 1;
  display: flex;
  font-family: sans-serif;
}
#search-title{
  font-weight: 300;
  letter-spacing: 0.1rem;
}
#back-icon{
  color: #fff;
  margin-right: 3rem;
  background: none;
  outline: solid white;
  border: none;
  padding: 0 0.7rem;
  border-radius: 0.5rem;
  cursor: pointer;
}
#back-icon:active{
  transform: scale(0.9);
}
#results-hub #results{
  position: relative;
  top: 5rem;
  margin: 0 7rem;
  font-family: sans-serif;
}
#results div{
  width: 15rem;
  position: relative;
  display: inline-block;
  margin: 1rem;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
#results-hub img{
  width: 15rem;
  height: 20rem;
  margin: 0;
  padding: 0;
  border-radius: 0;
  
}
#results-hub p{
  background: rgb(37, 93, 183);
  color: #fff;
  font-weight: 300;
  margin-top: -0.4rem;
  padding: 0.4rem 0.5rem;
  text-align: center;
  font-size: 1.4rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}


/* unsuccessful search panel */
#unsuccess-panel{
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: black;
  
  display: none;
  justify-content: center;
  align-items: center;
  font-family: sans-serif;
}
#message-box{
  width: 20rem;
  padding: 2rem;
  font-size: 1.5rem;
  background: white;
  border-radius: 10%;
  text-align: center;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
#back{
  font-size: 1.3rem;
  padding: 0.2rem 1rem;
  border-radius: 0;
  outline: none;
  border: none;
  background: rgb(38, 105, 193);
  color: white;
  margin-top: 3rem;
  cursor: pointer;
}
#back:active{
  transform: scale(0.9);
}


/* Film panels */
#film-info-panel{
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(128,128,128,0.71);
  display: none;
  justify-content: center;
  align-items: center;
}
#panel{
  width: 50rem;
  height: 50rem;
  position: relative;
  background: white;
  font-family: sans-serif;
}
#panel-body{
  overflow: scroll;
  width: 49rem;
  height: 49rem;
  position: relative;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  margin: auto 0;

}
#panel-name{
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  color: rgb(0, 0, 0);
  padding: 2rem;
  overflow: scroll;
  white-space: nowrap;
  }
#panel-img{
  max-width: 18rem;
  max-height: 30rem;
  margin-bottom: 3rem;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
#panel-title,#panel-rating,#panel-language,#panel-description,#panel-date{
  margin: 0.5rem 2rem;
  align-self: flex-start;
 }
 #panel-description{
  margin-bottom: 2rem;
 }
#ilm-info-btn{
  font-size: 1.3rem;
  padding: 1rem 1rem;
  outline: none;
  border: none;
  background: rgba(40, 40, 40);
  color: white;
  cursor: pointer;
}
#ilm-info-btn:active{
  transform: scale(0.9);
}


/* responsive view for phones and tabs */

@media screen and (max-width: 800px){
  #film-info-panel{
      justify-content: center;
      align-items: center;
      height: 100vh;
  }
  #panel{
      width: 21rem;
      height: 30rem;
  }
  #panel-body{
      width: 21rem;
      height: 26rem;
      padding: 0 1rem;
      font-size: 0.8rem;
      position: relative;
  }
  #panel-img{

      max-width: 18rem;
      max-height: 13rem;
  }
  #panel-name{
      font-size: 1rem;
  }
  #message-box{
      width: 15rem;
      font-size: 1.2rem;
  }
  #search-title{
      font-size: 1.2rem;
  }
  #back-icon{
      padding: 0 0.4rem;
  }
  #search-box{
      font-size: 1.1rem;
  }
  #search{
      font-size: 1rem;
      width: 12rem;
  }
  #btn{
      display: block;
      margin: auto;
      margin-top: 1rem;
  }
  #results-hub #results{
      display: flex;
      flex-direction: column;
      justify-content: center;
      margin: auto;
  }
  #results div{
      margin:  1rem auto;
  }
}
