* {
  outline: none;
  -webkit-tap-highlight-color: transparent;
  margin: 0;
  padding: 0;
}

html {
  width: 100%;
  height: 100%;
  touch-action: none;
}

body {
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

canvas {
  width: 100%;
  height: 100%;
  position: fixed;
  z-index: -999;
}

#container {
  visibility: hidden;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr 10fr 1fr;
  color: #000000;
  opacity: 0;
  font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-weight: 500;
  -webkit-transition: opacity 2s ease-out;
  transition: opacity 2s ease-out;
}

#loader {
  visibility: visible;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2.5rem;
  height: 2.5rem;
  opacity: 1;
  border-radius: 50%;
  border-top: 0.3rem solid rgba(0, 0, 0, 0.16);
  border-right: 0.3rem solid rgba(0, 0, 0, 0.16);
  border-bottom: 0.3rem solid rgba(0, 0, 0, 0.16);
  border-left: 0.3rem solid rgba(0, 0, 0, 0.87);
  -webkit-transform: translateZ(0);
  -ms-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-animation: rotate 1.2s infinite linear;
  animation: rotate 1.2s infinite linear;
  -webkit-transition: opacity 0.2s ease-out;
  transition: opacity 0.2s ease-out;
}

@-webkit-keyframes rotate {
  0% {
    -webkit-transform: translate(-50%, -50%) rotate(0deg);
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    -webkit-transform: translate(-50%, -50%) rotate(360deg);
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes rotate {
  0% {
    -webkit-transform: translate(-50%, -50%) rotate(0deg);
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    -webkit-transform: translate(-50%, -50%) rotate(360deg);
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

header {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

#logo {
  margin-left: 1.5rem;
  opacity: 0.87;
}

#logo:hover {
  cursor: pointer;
}

#logo img {
  display: block;
  width: 12.5rem;
  height: 2rem;
}

#menu {
  display: flex;
  flex-direction: row;
}

#menu #about {
  position: absolute;
  height: 0rem;
  width: 18rem;
  padding-left: 1.7rem;
  padding-right: 1.7rem;
  background-color: #212121;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: default;
  z-index: 999;
  -webkit-transition: height 0.2s ease-in-out;
  transition: height 0.2s ease-in-out;
}

#menu #about h3 {
  margin-top: 1.7rem;
  margin-bottom: 1.2rem;
  font-size: 1.25rem;
  font-weight: 700;
  opacity: 0.87;
}

#menu #about p {
  line-height: 1.45;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
  opacity: 0.87;
}

#menu #about a {
  -webkit-transition: opacity 0.2s ease-out;
  transition: opacity 0.2s ease-out;
}

#menu #about a:hover {
  opacity: 0.87;
}

#about-container:hover #about {
  height: 29rem;
}

#menu #links {
  position: absolute;
  height: 0rem;
  padding-left: 1.7rem;
  padding-right: 4rem;
  background-color: #212121;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: default;
  z-index: 999;
  -webkit-transition: height 0.2s ease-in-out;
  transition: height 0.2s ease-in-out;
}

#share-container:hover #links {
  height: 13rem;
}

#menu #links a {
  display: flex;
  flex-direction: row;
  align-items: center;
  text-decoration: none;
  margin-bottom: 1rem;
  font-size: 1rem;
  -webkit-transition: opacity 0.2s ease-out;
  transition: opacity 0.2s ease-out;
}

#menu #links a:first-child {
  margin-top: 1.7rem;
}

#menu #links a,
a:link,
a:visited,
a:active,
#menu #about a,
a:link,
a:visited,
a:active {
  color: #ffffff;
  opacity: 0.6;
}

#menu #links a:hover {
  opacity: 0.87;
}

#menu #links a img {
  margin-right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
}

#menu #share-btn,
#about-btn,
#full-screen-btn {
  margin-right: 1.5rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  font-size: 1rem;
  letter-spacing: 0.1rem;
  opacity: 0.87;
  -webkit-transition: opacity 0.2s ease-out;
  transition: opacity 0.2s ease-out;
}

#menu #share-btn:hover,
#about-btn:hover,
#full-screen-btn:hover {
  cursor: pointer;
  opacity: 0.54;
}

#menu img {
  padding-right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
}

#rect {
  visibility: hidden;
  position: absolute;
  transform-origin: center;
  -webkit-transition: background-color 0.1s linear, top 0.5s ease-in-out,
    left 0.5s ease-in-out, width 0.5s ease-in-out, height 0.5s ease-in-out;
  transition: background-color 0.1s linear, top 0.5s ease-in-out,
    left 0.5s ease-in-out, width 0.5s ease-in-out, height 0.5s ease-in-out;
}

#rect:hover {
  cursor: pointer;
}

section {
  width: 100%;
}

#content-elem {
  display: none;
  position: relative;
  width: 100%;
  height: 100%;
}

#play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 15rem);
  padding: 0.4rem 0.75rem;
  background: none;
  border: 0.125rem solid #000000;
  border-radius: 0.125rem;
  color: #000000;
  opacity: 0.87;
  font-size: 1rem;
  font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-weight: 500;
  z-index: 999;
  -webkit-transition: background-color 0.2s ease-out, color 0.2s ease-out;
  transition: background-color 0.2s ease-out, color 0.2s ease-out;
}

#play:hover {
  cursor: pointer;
  background-color: #000000;
  color: #f5f5f5;
}

#back-btn {
  position: absolute;
  top: 50%;
  left: 1.5rem;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: start;
  opacity: 0.87;
  font-size: 1.25rem;
  letter-spacing: 0.15rem;
  -webkit-transition: opacity 0.2s ease-out;
  transition: opacity 0.2s ease-out;
}

#back-btn:hover {
  cursor: pointer;
  opacity: 0.54;
}

#back-btn #sub-text {
  padding-top: 0.1rem;
  opacity: 0.43; /* 0.87을 이미 준 상황에서 0.38로 떨구려면 0.43만큼 곱해야 함. */
  font-size: 1rem;
  letter-spacing: 0;
}

#back-btn #mobile-text {
  display: none;
}

#info {
  position: absolute;
  /* display: flex;
  flex-direction: column;
  justify-content: space-between; */
}

/* 이렇게 할 지, 아니면 위에서 space-between을 줄 지 나중에 물어보고 결정할 것 
아니면 미디어 쿼리로 width 몇 이상은 intro를 올려준다던지 해서 반응형으로 만들 것.*/
#intro {
  width: 170%;
  margin-bottom: 2rem;
}

#intro h1 {
  margin-bottom: 2rem;
  font-size: 1.75rem;
  font-weight: 700;
  opacity: 0.87;
}

#intro #intro-sub {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 500;
  opacity: 0.38;
}

#intro ul {
  list-style: none;
  font-size: 1rem;
  line-height: 1.8rem;
  opacity: 0.87;
}

#keywords h2 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 500;
  opacity: 0.87;
}

#keywords #chips-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

#keywords #chips-container .chip {
  font-size: 1rem;
  padding: 0.3rem 0.75rem;
  margin-top: 0.5rem;
  margin-right: 0.5rem;
  border: 0.0625rem solid rgba(0, 0, 0, 0.38);
  border-radius: 1.25rem;
}

.control-btns {
  position: absolute;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.87;
  font-size: 1rem;
}

.control-btns img {
  width: 1.5rem;
  height: 1.5rem;
}

.control-btns img:hover {
  cursor: pointer;
}

.control-btns img,
span {
  margin: 0.5rem 0;
}

footer {
  width: 100%;
  position: relative;
}

footer #recommend {
  display: none;
  position: absolute;
  top: 5%;
  width: 100%;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.87;
}

footer #copyrights {
  display: block;
  position: absolute;
  top: 50%;
  width: 100%;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.87;
}

/* Media query */

/* Mobile portrait */
@media only screen and (max-width: 479.98px) and (orientation: portrait) {
  #logo {
    margin-left: 1rem;
  }

  #logo img {
    width: 6.25rem;
    height: 1rem;
  }

  #menu #about,
  #links {
    right: 1rem;
  }

  #menu #about {
    width: 14rem;
  }

  #about-container:hover #about {
    height: 34rem;
  }

  #menu img {
    padding-right: 0rem;
  }

  #menu span {
    display: none;
  }

  #menu #full-screen-btn {
    margin-right: 1rem;
  }

  #play {
    transform: translate(-50%, 8.75rem);
  }

  #back-btn {
    left: 1rem;
  }

  #back-btn #main-text,
  #sub-text {
    display: none;
  }

  #back-btn #mobile-text {
    display: block;
  }

  #intro {
    margin-bottom: 0;
  }

  #intro h1 {
    margin-bottom: 0;
    font-size: 1.25rem;
    font-weight: 500;
  }

  #intro h3,
  ul {
    display: none;
  }

  #keywords {
    display: none;
  }

  .control-btns {
    right: 1rem;
  }

  .control-btns span {
    display: none;
  }

  .control-btns img {
    margin: 1rem 0;
  }

  footer #recommend {
    display: block;
  }
}

/* Mobile landscape */
@media only screen and (max-width: 925.98px) and (orientation: landscape) {
  #container {
    grid-template-rows: 1fr 5fr 1fr;
  }

  #logo {
    margin-left: 1rem;
  }

  #logo img {
    width: 9.375rem;
    height: 1.5rem;
  }

  #menu #about,
  #links {
    right: 1rem;
  }

  #menu #about {
    width: 18rem;
  }

  #about-container:hover #about {
    height: 29rem;
  }

  #menu img {
    padding-right: 0rem;
  }

  #menu span {
    display: none;
  }

  #menu #full-screen-btn {
    margin-right: 1rem;
  }

  #play {
    transform: translate(-50%, 6.25rem);
  }

  #back-btn {
    left: 1rem;
  }

  #back-btn #main-text,
  #sub-text {
    display: none;
  }

  #back-btn #mobile-text {
    display: block;
  }

  #intro {
    margin-bottom: 0;
  }

  #intro h1 {
    margin-bottom: 0;
    font-size: 1.25rem;
    font-weight: 500;
  }

  #intro h3,
  ul {
    display: none;
  }

  #keywords {
    display: none;
  }

  .control-btns {
    right: 1rem;
  }

  .control-btns span {
    display: none;
  }

  .control-btns img {
    margin: 1rem 0;
  }

  footer #recommend {
    display: none;
  }
}

/* Tablet portrait */
@media only screen and (min-width: 480px) and (max-width: 1024px) and (orientation: portrait) {
  #container {
    grid-template-rows: 1fr 10fr 1fr;
  }

  #logo {
    margin-left: 1.5rem;
  }

  #logo img {
    width: 12.5rem;
    height: 2rem;
  }

  #menu #about,
  #links {
    right: initial;
  }

  #menu #about {
    width: 18rem;
  }

  #about-container:hover #about {
    height: 29rem;
  }

  #menu img {
    padding-right: 0.5rem;
  }

  #menu span {
    display: block;
  }

  #menu #full-screen-btn {
    margin-right: 1.5rem;
  }

  #play {
    transform: translate(-50%, 15rem);
  }

  #back-btn {
    left: 1.5rem;
  }

  #back-btn #main-text,
  #sub-text {
    display: block;
  }

  #back-btn #mobile-text {
    display: none;
  }

  #intro {
    width: 120%;
    margin-bottom: 2rem;
  }

  #intro h1 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
  }

  #intro h3 {
    display: block;
    font-size: 1rem;
  }

  .control-btns {
    right: 1.5rem;
  }

  .control-btns span {
    display: block;
  }

  .control-btns img {
    margin: 0.5rem 0;
  }

  footer #recommend {
    display: none;
  }
}

/* Tablet landscape */
@media only screen and (min-width: 926px) and (max-width: 1199.98px) and (orientation: landscape) {
  #container {
    grid-template-rows: 1fr 10fr 1fr;
  }

  #logo {
    margin-left: 1.5rem;
  }

  #logo img {
    width: 12.5rem;
    height: 2rem;
  }

  #menu #about,
  #links {
    right: initial;
  }

  #menu #about {
    width: 18rem;
  }

  #about-container:hover #about {
    height: 29rem;
  }

  #menu img {
    padding-right: 0.5rem;
  }

  #menu span {
    display: block;
  }

  #menu #full-screen-btn {
    margin-right: 1.5rem;
  }

  #play {
    transform: translate(-50%, 15rem);
  }

  #back-btn {
    left: 1.5rem;
  }

  #back-btn #main-text,
  #sub-text {
    display: block;
  }

  #back-btn #mobile-text {
    display: none;
  }

  #intro {
    width: 170%;
    margin-bottom: 2rem;
  }

  #intro h1 {
    margin-bottom: 2rem;
    font-size: 1.75rem;
    font-weight: 700;
  }

  #intro h3 {
    display: block;
    font-size: 1.25rem;
  }

  #intro ul {
    display: block;
  }

  .control-btns {
    right: 1.5rem;
  }

  .control-btns span {
    display: block;
  }

  .control-btns img {
    margin: 0.5rem 0;
  }

  footer #recommend {
    display: none;
  }
}

/* Laptop */
@media only screen and (min-width: 1200px) and (max-width: 1919.98px) {
  #container {
    grid-template-rows: 1fr 10fr 1fr;
  }

  #logo {
    margin-left: 1.5rem;
  }

  #logo img {
    width: 12.5rem;
    height: 2rem;
  }

  #menu #about,
  #links {
    right: initial;
  }

  #menu #about {
    width: 18rem;
  }

  #about-container:hover #about {
    height: 29rem;
  }

  #menu img {
    padding-right: 0.5rem;
  }

  #menu span {
    display: block;
  }

  #menu #full-screen-btn {
    margin-right: 1.5rem;
  }

  #play {
    transform: translate(-50%, 15rem);
  }

  #back-btn {
    left: 1.5rem;
  }

  #back-btn #main-text,
  #sub-text {
    display: block;
  }

  #back-btn #mobile-text {
    display: none;
  }

  #intro {
    width: 170%;
    margin-bottom: 2rem;
  }

  #intro h1 {
    margin-bottom: 2rem;
    font-size: 1.75rem;
    font-weight: 700;
  }

  #intro h3 {
    display: block;
    font-size: 1.25rem;
  }

  #intro ul {
    display: block;
  }

  .control-btns {
    right: 1.5rem;
  }

  .control-btns span {
    display: block;
  }

  .control-btns img {
    margin: 0.5rem 0;
  }

  footer #recommend {
    display: none;
  }
}

/* Desktop FHD */
@media only screen and (min-width: 1920px) and (max-width: 2559.98px) {
  #keywords {
    display: block;
  }
}

/* Desktop QHD (and larger) */
@media only screen and (min-width: 2560px) {
  html {
    font-size: 20px;
  }
}
