body {
  background-color: #002147;
  color: #99a6b5;
  font-family: "Courier New", monospace;
}

html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #002147;
  color: #e6e9ed;
  padding: 0 20px;
  height: 70px;
  width: 82%;
  margin: auto;
}

#button{
  position: absolute;
  left: 20px;  
  background: none;
  border: none;
  color: #e6e9ed;
  font-size: 16px;
  cursor: pointer;
}
  #button img{
    width: 10%;
    height: auto;
    display: block;
  }
#headwords{
  margin: 0;
  font-size: 2.5rem;
  text-align: center;
  width: 100%;
  pointer-events: none;
  user-select: none; 
}

.row{
  margin: 0 auto;
}
  .row img{
    width: 100%;
  }

#contents{
  flex: 1;
  overflow: auto;
  width: 82%;
  margin: auto;
}

#mediagrid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  overflow-y: scroll;
  background-color: #e6e9ed;
  
}
  .media{
    border: 5px solid #1a3759;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    justify-content: center;
    align-items: center;
  }
  
  .media img{
    width: 100%;
    object-fit: cover;
    height: auto;
    display: block;
  }

  .media p {
    position: absolute;
    left: 0;
    width: 100%;
    padding: 6px 8px;
    margin: 0;
    color: #e6e9ed;
    background-color: rgba(0, 33, 71, 0.8);
    font-size: 0.85em;
    visibility: hidden;
    opacity: 0;
    text-align: center;
  }
  .media:hover p{
    opacity: 1;
    visibility: visible;
  }
  .media .toptext{
    top: 0;
  }
  .media .bottomtext{
    bottom: 0;
  }


















