:root {
  --htmlColor: #223547;
  --cssColor: #472222;
  --javascriptColor: #224736;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "NexonLv1Gothic";
  color: var(--htmlColor);
}

*,
*:before,
*:after {
  box-sizing: border-box;
}

a {
  color: var(--htmlColor);
  text-decoration: none;
}

li {
  list-style: none;
}

/* header */
#header {
  display: flex;
  justify-content: space-between;
}

#header nav {
  margin: 10px;
}

#header nav li {
  position: relative;
  display: inline;
}

#header nav li a {
  width: 30px;
  height: 30px;
  border: 1px solid var(--htmlColor);
  border-radius: 50%;
  display: inline-block;
  text-align: center;
  line-height: 30px;
  font-family: "NexonLv1Gothic";
}

#header nav li.active a {
  background-color: var(--htmlColor);
  color: #fff;
}

#header nav li .sub {
  position: absolute;
  left: 0;
  top: 35px;
  width: 400px;
}

#header nav li .sub li a {
  width: auto;
  background-color: transparent;
  color: var(--htmlColor);
  border: 0;
  text-align: left;
  line-height: 1.2;
}

#header nav li .sub li.active a {
  text-decoration: underline;
}

/* main */
#main {
  margin: 50px 10px;
}

.search__wrap {
  max-width: 1400px;
  margin: 0 auto;
  border: 3px solid var(--htmlColor);
  border-radius: 20px;
  background-color: #f1f3f6;
  padding: 30px;
  text-align: center;
}

.search__wrap>span {
  font-size: 20px;
  margin-bottom: 20px;
  display: inline-block;
}

.search__wrap>h1 a {
  font-family: "Tmon";
  color: var(--htmlColor);
  font-size: 5vw;
  margin-bottom: 10px;
}

.search__wrap .desc {
  line-height: 1.4;
  padding: 20px 0;
}

.search__wrap .time {
  width: 140px;
  height: 140px;
  line-height: 140px;
  text-align: center;
  border-radius: 50%;
  margin: 0 auto;
  background: var(--htmlColor);
}

.search__wrap .time span {
  color: #fff;
  font-size: 34px;
  font-weight: 100;
}

.search__box {
  margin-bottom: 20px;
  position: relative;
}

.search__box label {
  position: absolute;
  clip: rect(0 0 0 0);
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
}

.search__box input {
  border: 2px solid var(--htmlColor);
  padding: 15px 40px;
  width: 30%;
  border-radius: 50px;
  font-size: 20px;
  margin-top: 20px;
}

.search__box .start {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  background: #223547;
  width: 30%;
  border-radius: 50px;
  font-size: 20px;
  border: 2px solid var(--htmlColor);
  padding: 15px 40px;
  color: #fff;
  cursor: pointer;
}

.search__list li {
  text-align: left;
  line-height: 1.7;
}

.search__list li.show {
  display: block;
}

.search__list li.hide {
  display: none;
}

.search__list span {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--htmlColor);
  border-radius: 50px;
  margin: 5px;
  transition: all 0.3s;
  cursor: pointer;
}

.search__list span:hover {
  background-color: var(--htmlColor);
  color: #fff;
}

.search__list em {
  float: right;
  font-style: normal;
}

.search__list .line {
  margin: 50px 0;
}

.search__list .line li {
  background: #e3eaf5;
  padding: 10px 30px;
  margin-bottom: 5px;
  border-radius: 50px;
}

.search__list .line li:hover {
  background: #d3e2fa;
  cursor: pointer;
}

.search__info {
  text-align: right;
  margin-bottom: 30px;
  padding-bottom: 10px;
  border-bottom: 2px dashed var(--htmlColor);
}

.search__info .type {
  text-align: center;
  margin-bottom: 10px;
}

.search__info .keyword {
  text-align: center;
  margin-bottom: 10px;
}

.search__info .keyword span {
  border: 2px solid var(--htmlColor);
  border-radius: 50px;
  padding: 10px;
  display: inline-block;
  margin-bottom: 4px;
}

.search__info .keyword span:hover {
  background-color: var(--htmlColor);
  color: #fff;
  cursor: pointer;
}

.search__info.center {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-bottom: 40px;
}

.search__desc {
  padding: 20px 40px 20px 60px;
  margin-bottom: 50px;
  border-radius: 50px;
  display: inline-block;
  background-color: var(--htmlColor);
  color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='11' cy='11' r='8' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M16.5 16.958L21.5 21.958' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
  background-repeat: no-repeat;
  background-position: 22px 17px;
}

.search__click {
  margin-top: 10px;
  margin-bottom: 30px;
}

.search__click li {
  display: inline;
}

.search__click li a {
  display: inline-block;
  border: 1px solid var(--htmlColor);
  border-radius: 50px;
  padding: 10px 20px;
  margin: 5px 0;
}

.search__click li a:hover {
  background-color: var(--htmlColor);
  color: #fff;
}

.search__result {
  position: fixed;
  right: 3vw;
  top: 3vw;
  width: 40vw;
  height: 40vw;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
  border-radius: 50%;
  border: 6px solid #22ff00;
}

.search__result.show {
  display: flex;
  animation: rubberBand 1s 0.6s ease-in;
}

.search__result .result {
  font-size: 1.4vw;
  margin-top: 30px;
  line-height: 1.5;
}

.search__result .restart {
  background: #22ff00;
  color: #fff;
  border: 0;
  font-size: 20px;
  padding: 10px;
  margin-top: 10px;
  border-radius: 50px;
}

.search__audio {
  cursor: pointer;
  margin-bottom: 10px;
}

.search__audio .stop {
  display: none;
}

@keyframes rubberBand {
  from {
    transform: scale3d(1, 1, 1);
  }

  30% {
    transform: scale3d(1.25, 0.75, 1);
  }

  40% {
    transform: scale3d(0.75, 1.25, 1);
  }

  50% {
    transform: scale3d(1.15, 0.85, 1);
  }

  65% {
    transform: scale3d(0.95, 1.05, 1);
  }

  75% {
    transform: scale3d(1.05, 0.95, 1);
  }

  to {
    transform: scale3d(1, 1, 1);
  }
}

@media (max-width: 600px) {
  .search__wrap {
    padding: 20px;
  }

  .search__wrap>span {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .search__wrap>h1 {
    font-size: 44px;
  }

  .search__box input {
    font-size: 16px;
    padding: 12px 30px;
  }
}

/* footer */
#footer {
  text-align: center;
}

#footer a {
  color: #000;
  font-family: "NexonLv1Gothic";
  padding-bottom: 50px;
}

#footer a:hover {
  text-decoration: underline;
}

.search__answers {
  border-bottom: 2px dashed var(--htmlColor);
  padding-bottom: 40px;
  display: none;
}

.search__answers span {
  display: inline-block;
  background: var(--htmlColor);
  padding: 10px 20px;
  color: #fff;
  border-radius: 30px;
  margin: 3px;
}

.search__missAnswers {
  border-bottom: 2px dashed var(--htmlColor);
  padding: 40px 0;
  display: none;
}

.search__missAnswers span {
  display: inline-block;
  border: 1px solid var(--htmlColor);
  color: var(--htmlColor);
  padding: 10px 20px;
  border-radius: 30px;
}

/* modal__wrap */
.modal__wrap {}

.modal__cont {
  width: 100%;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.3);
  position: fixed;
  left: 0;
  top: 0;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0);
}

.modal__btn {
  color: #000;
  border: 1px solid rgb(177, 12, 12);
  border-radius: 50px;
  display: inline-block;
  padding: 10px 20px;
  position: absolute;
  right: 0px;
  top: 20px;
  cursor: pointer;
  transition: all 0.3s;
}

.modal__btn:hover {
  background-color: rgb(0, 255, 42);
  color: #3b3d63;
}

.modal__box {
  width: 70%;
  height: 70vh;
  margin: 0 auto;
  background-color: #fff;
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 10px 20px -5px hsl(180deg 2% 10%);
  transform: scale(0);
}

.modal__box .title {
  padding-inline: 1rem;
  background-color: #000007;
  display: flex;
  align-items: center;
  color: #fff;
  height: 50px;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.modal__box .title .dot {
  width: 15px;
  height: 15px;
  background-color: #fbff00;
  display: inline-block;
  border-radius: 50%;
  position: relative;
  margin-left: 2rem;
}

.modal__box .title .dot::before {
  content: "";
  position: absolute;
  left: 25px;
  top: 0;
  width: 15px;
  height: 15px;
  background-color: #22ff00;
  border-radius: 50%;
}

.modal__box .title .dot::after {
  content: "";
  position: absolute;
  right: 25px;
  top: 0;
  width: 15px;
  height: 15px;
  background-color: rgb(255, 0, 0);
  border-radius: 50%;
}

.modal__box .title .plus {
  background: #282936;
  padding: 0.5rem 0.5rem 0.3rem 0.5rem;
  border-radius: 0.5rem;
  color: #7a7d9d;
}

.modal__box .title .tabs {
  display: flex;
  margin-left: 50px;
}

.modal__box .title .tabs>div {
  color: #7a7d9d;
  background-color: #1f224a;
  padding: 0.35rem 0.8rem 0.25rem 0.8rem;
  margin-right: 0.5rem;
  display: flex;
  align-items: center;
  border-radius: 0.4rem;
  text-transform: uppercase;
  cursor: grab;
}

.modal__box .title .tabs>div.active {
  background-color: #fff;
}

.modal__box .title .tabs>div em {
  font-style: normal;
}

.modal__box .title .tabs>div .favicon {
  margin-right: 0.4rem;
  margin-top: 0.2rem;
}

.modal__box .title .tabs>div .close {
  margin-left: 4rem;
}

.title .plus {
  border: 1px solid #000;
  padding: 0.4rem;
  border-radius: 10px;
  background-color: #1f224a;
  color: #fff;
}

.modal__box .cont {
  background-color: #282936;
  height: 100%;
  box-sizing: border-box;
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
  overflow-y: auto;
}

.modal__box .cont>div {
  display: none;
}

.modal__box .cont>div.active {
  display: block;
  height: 100%;
}

.modal__close {
  position: absolute;
  right: 100px;
  top: 40px;
  background-color: #1f224a;
  padding: 1rem 1rem 0.8rem 1rem;
  border-radius: 5px;
  box-shadow: 0 3px 5px -5px hsl(180deg 2% 10%);
  cursor: pointer;
  transition: all 0.3s;
  opacity: 0;
}

.modal__close:hover {
  background-color: #13142d7d;
}

.modal__close svg {
  color: #fff;
}

/* 모달 애니메이션 */
.modal__cont.show {
  /*전체 배경*/
  animation: foldOut 1s ease forwards;
}

.modal__cont.show .modal__box {
  /*스크립트 배경*/
  animation: zoomOut 0.5s 1s ease forwards;
  /*초를 두개써서딜레이를 줄 수 있다*/
}

.modal__cont.show .modal__close {
  /* 닫기버튼*/
  animation: closeOut 0.6s 1.5s ease forwards;
}

.modal__cont.show.hide {
  animation: foldIn 0.3s 0.3s ease backwards;
}

.modal__cont.show.hide .modal__box {
  animation: zoomIn 0.5s 1s ease backwards;
}

.modal__cont.show.hide .modal__close {
  /* 닫기버튼*/
  animation: closeIn 0.3s 0.6s ease backwards;
  opacity: 1;
}

@keyframes foldOut {
  0% {
    transform: scaleX(0) scaleY(0.001);
  }

  50% {
    transform: scaleX(1) scaleY(0.001);
  }

  100% {
    transform: scaleX(1) scaleY(1);
  }
}

@keyframes closeOut {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes foldIn {
  0% {
    transform: scaleX(1) scaleY(1);
  }

  50% {
    transform: scaleX(1) scaleY(0.001);
  }

  100% {
    transform: scaleX(0) scaleY(0.001);
  }
}

@keyframes zoomOut {
  0% {
    transform: scale(0);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes zoomIn {
  100% {
    transform: scale(1);
  }

  0% {
    transform: scale(0);
  }
}

@media (max-width: 1100px) {
  #header {
    width: 100%;
  }

  .modal__box {
    width: 96%;
  }

  .modal__box .title {
    overflow: hidden;
  }

  .modal__box .title .dot {
    display: none;
  }

  .modal__box .title .tabs {
    margin-left: 0;
  }

  .modal__box .title .tabs>div .close {
    display: none;
  }
}

@media (max-width: 600px) {
  #header {
    text-align: center;
  }

  #header h1 {
    line-height: 1.4;
  }

  .modal__box {
    width: 96%;
  }
}

/* footer */
#footer {
  text-align: center;
}

#footer a {
  color: #000;
  font-family: "NexonLv1Gothic";
  padding-bottom: 50px;
}

#footer a:hover {
  text-decoration: underline;
}