html {
  height: 100%;
}

body {
  margin: 0;
  height: 100%;
  font-family: "Microsoft JhengHei", sans-serif; 
}

img {
  image-rendering: pixelated;
}

* {
  box-sizing: border-box;
}

/* background image */
.container {
  height: 100%;
}

#bgimage {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* dropdown menu */
.menu {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 1em;
}

ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: inline-block;
}

li {
  float: left;
  font-weight: bold;
}

li a, .dropbtn {
  display: inline-block;
  padding: 14px 26px;
  text-align: center;
  text-decoration: none;
  color: white;
}

.dropcontent {
  display: none;
  position: absolute;
  min-width: 100px;
  z-index: 1;
}

.dropdown:hover .dropcontent {
  display: block;
}

li.dropdown {
  display: inline-block;
}

.dropcontent a {
  color: white;
  padding: 12px 25px;
  text-decoration: none;
  display: block;
  text-align: center;
}

li a:hover {
  border-bottom: 1px solid white;
}

.dropcontent a:hover {
  border-bottom: 1px solid white;
}

/* website icon */
#icon {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

#imgicon {
  width: 70px;
  height: 45px;
}

#icon a {
  text-decoration: none;
}

/* menuicon */
.menuicon {
  margin: 12px;
  cursor: pointer;
  display: none;
  position: absolute;
  top: 0;
  right: 0;
}

.menuicon div {
  width: 32px;
  height: 3px;
  background-color: white;
  margin: 6px 0;
}

@media screen and (max-width: 700px) {
  .menu li {display: none;}
  .menuicon {
    display: block;
  }
  .headercontent {
    overflow: auto;
    white-space: nowrap;
  }
}

/* overlay */
.overlay {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: rgb(0,0,0);
  background-color: rgba(0,0,0, 0.85);
  overflow-x: hidden;
  overflow-y: auto;
  transition: 0.5s;
}

.overlay-content {
  position: relative;
  top: 20%;
  width: 100%;
  text-align: center;
  margin-top: 30px;
}

#imgicon {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.overlay a {
  padding: 8px;
  text-decoration: none;
  font-size: 2em;
  color: #818181;
  display: block;
  transition: 0.3s;
}

.overlay a:hover, .overlay a:focus {
  color: #f1f1f1;
}

#overlaysub, #overlaysub_2, #overlaysub_3 {
  display: none;
}

#overlaysub a, #overlaysub_2 a, #overlaysub_3 a {
  font-size: 1.25em;
}

.overlay .closebtn {
  position: absolute;
  top: 20px;
  right: 45px;
  font-size: 60px;
}

/* search engine bar */
#search {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#search p {
  font-size: 1em;
  color: white;
  text-align: center;
}

#search a {
  color: white;
  text-decoration: none;
}

#search a:hover {
  text-decoration: underline;
}

/* header menu */
.headerbtn {
  position: absolute;
  left: 0;
  bottom: 50%;
  width: 100%;
  cursor: pointer;
}

.headerdropdown {
  text-align: center;
  border: 2px solid white;
  border-radius: 10px;
  font-size: 2em;
  width: 250px;
  margin: auto;
  padding: 5px;
  color: white;
}

.headerbtn a {
  text-decoration: none;
  color: white;
}

.headercontent {
  position: absolute;
  left: 0;
  width: 100%;
  display: none;
}

.headercontent a {
  display: inline-block;
  font-size: 0.5em;
  padding: 15px;
}

.headerdropdown:hover {
  background-color: white;
  color: black;
}

.headerdropdown:hover .headercontent {
  display: block;
}

.headercontent a:hover {
  border-bottom: 1px solid white;
}