@charset "utf-8";
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Manrope&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Icons');
@import url('style_context.css');

::selection {
  background: rgba(0, 0, 0, 0);
}

body {
  margin: auto;
  text-align: center;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 300;
  color: gray;
}

h1 {
  letter-spacing: .5em;
  font-size: 3em;
  font-weight: 700;
  color: #c79100;
  margin: 1em 0 0 .5em;
}

.title {
  font-size: 1.25em;
  margin: 0;
}

.title .sub {
  font-style: italic;
  font-size: .9em;
  font-weight: 300;
  color: gray;
}

.title .sub .strong {
  color: #c79100;
  font-size: 1.1em;
  font-weight: 400;
}

.switch {
  margin-top: 12em;
  width: 100%;
}

/******************************************************************************/
/*                                   #output                                  */
/******************************************************************************/
.output {
  width: 2em;
  height: 2em;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  color: #fff;
  margin: .5em .25em;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  border: 3px solid transparent;
  font-family: 'Manrope', sans-serif;
}

.output.c1 {
  /* background: #FDD835; */
  background: #fbc400;
  /* color: #212121; */
}

.output.c2 {
  /* background: #1976D2; */
  background: #69c8f2;
}

.output.c3 {
  /* background: #D32F2F; */
  background: #ff7272;
}

.output.c4 {
  /* background: #616161; */
  background: #aaa;
}

.output.c5 {
  /* background: #388E3C; */
  background: #b0d840;
}

.output.match,
[id^="output"] {
  border: 3px solid #ff8c00;
}

.output.match_b,
#output6 {
  border: 3px solid #616161;
}

#stats {
  text-align: center;
  width: 100%;
  /* position: absolute; */
  margin-bottom: 1em;
  top: calc(50% + 160px);
}

#stats progress {
  width: 600px;
  max-width: calc(100% - 2em);
}

#lottotable {
  padding: 1em 0 6em 0;
  margin: 0;
  font-size: 12px;
  text-align: left;
  width: 100%;
  /* position: absolute; */
  display: flex;
  flex-flow: wrap;
  top: calc(50% + 225px);
  counter-reset: li;
  overflow: hidden;
}

#lottotable li {
  display: inline-table;
  text-align: center;
  flex: auto;
  /* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25); */
  margin: .5em 0;
  margin-left: 2em;
  padding: 0;
  position: relative;
  max-width: 30em;
  transition: .25s;
}

#lottotable li::before {
  content: counter(li);
  counter-increment: li;
  position: absolute;
  top: 1em;
  right: 100%;
}

#lottotable li:nth-of-type(100n) {
  margin-bottom: 3em;
}

#lottotable .win {
  font-weight: bold;
  border-radius: .5em;
}

#lottotable .win1 {
  background: #ffeb3b;
  box-shadow: 0 2px 5px #b39700;
}

#lottotable .win1:hover {
  box-shadow: 0 5px 7px #b39700;
}

#lottotable .win2 {
  background: #ffeb3b;
  box-shadow: 0 2px 5px #b39700;
}

#lottotable .win2:hover {
  box-shadow: 0 5px 7px #b39700;
}

#lottotable .win3 {
  background: #ffeb3b;
  box-shadow: 0 2px 5px #b39700;
}

#lottotable .win3:hover {
  box-shadow: 0 5px 7px #b39700;
}

#lottotable .win4 {
  background: #e0e0e0;
  box-shadow: 0 2px 5px gray;
}

#lottotable .win4:hover {
  box-shadow: 0 5px 7px gray;
}

#lottotable .win5 {
  background: #ffd180;
  box-shadow: 0 2px 5px #905923;
}

#lottotable .win5:hover {
  box-shadow: 0 5px 7px #905923;
}

#lottotable .win:after {
  color: #7b1fa2;
  position: absolute;
  justify-content: center;
  align-items: center;
  display: inline-flex;
  width: 2em;
  height: 2em;
  top: -1em;
  right: -1em;
  border: 5px double #7b1fa2;
  border-radius: 50%;
  padding: 0.25em;
  transform: rotate(-15deg);
}

#lottotable .win1:after {
  content: "1st";
}

#lottotable .win2:after {
  content: "2nd";
}

#lottotable .win3:after {
  content: "3rd";
}

#lottotable .win4:after {
  content: "4th";
}

#lottotable .win5:after {
  content: "5th";
}

/******************************************************************************/
/*                                   #winner                                  */
/******************************************************************************/
#winner {
  position: sticky;
  width: 100%;
  margin: auto;
  text-align: center;
  top: -1px;
  margin-top: calc(50vh - 350px);
  background: #fff;
  height: 92px;
  /* top: calc(50vh - 250px); */
  /* left: calc(50% - 300px); */
  transition: font-size .25s, transform .25s;
  z-index: 10;
}

#winner h2 {
  margin: 1em auto 0;
  font-size: 2em;
  font-weight: 300;
}

#winner h2 .lotto_round,
#winner span[class^='info_'] {
  font-weight: normal;
  color: #c79100;
}

#winner p {
  margin-top: 0;
  color: gray;
  font-weight: 300;
}

#winner .info {
  margin-top: 1em;
}

#winner .output {
  font-weight: 700;
  font-size: 2em;
  text-shadow: 0px 2px 5px gray;
}

#winner:not(.pinned) .output {
  border-width: 0px;
}

#winner .win_container_no {
  background: #fafafa;
  border-radius: 2em;
  padding: 8px 16px;
}

#winner.pinned {
  font-size: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .25);
  border-radius: 3px;
}

#winner.pinned h2 {
  transform: scale(0.75);
  margin: 0;
}

#winner.pinned p {
  height: 0;
  margin: 0;
  opacity: 0;
}

#winner.pinned .win_container {
  transform: scale(0.5);
  transform-origin: top;
  width: 200%;
  margin-left: -50%;
}

#winner.pinned .output {
  border-width: 6px;
}

/******************************************************************************/
/*                                   #inpuut                                  */
/******************************************************************************/
#inputnum {
  border: none;
  border-bottom: 2px solid #c79100;
  color: #c79100;
  font-weight: normal;
  font-size: 1.2em;
  text-align: center;
  transition: .125s;
}

#inputnum:active, #inputnum:focus {
  background: #FDD835;
  outline: none;
}

.shadow {
  box-shadow: 0 2px 5px rgba(0, 0, 0, .25);
  border-radius: 3px;
  background: #fff;
}

.shadow-right {
  box-shadow: 2px 0 6px 0 rgba(60, 64, 67, .15);
}

.shadow-bottom {
  box-shadow: 0 2px 6px 0 rgba(60, 64, 67, .15);
}

.shadow-top-inset {
  box-shadow: inset 0 7px 6px -5px rgba(60, 64, 67, .15);
}

.shadow-bottom-inset {
  box-shadow: inset 0 -7px 6px -5px rgba(60, 64, 67, .15);
}

.shadow-top-inset.shadow-bottom-inset {
  box-shadow: inset 0 7px 6px -5px rgba(60, 64, 67, .15), inset 0 -7px 6px -5px rgba(60, 64, 67, .15);
}

.translation {
  /* color: rgba(0, 0, 0, .38); */
  opacity: .65;
  font-size: .75em;
  font-style: italic;
  font-family: 'Noto Sans KR', sans-serif;
}

.key {
  text-shadow: 0 -1px #e0e0e0;
  box-shadow: 0 6px #e0e0e0;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  margin: -.5em .25em .25em;
  padding: .25em .75em;
  background: white;
  /* color: #212121; */
  /* font-size: .75em; */
  vertical-align: top;
  display: inline-block;
  cursor: pointer;
  font-family: 'Noto Sans KR', sans-serif;
}

.key:active,
.key.on {
  transition: .25s;
  box-shadow: 0 0px #e0e0e0;
  margin: 0 .25em -.25em;
}

/* -------------------------------------------------------------------------- */
/*                                   #stats                                  */
/* -------------------------------------------------------------------------- */
#stats table {
  border-collapse: collapse;
  border-spacing: 0;
  margin: auto;
  font-size: 1em;
}

#stats table th, #stats table tr:nth-of-type(6) {
  font-weight: normal;
  background: #f0f0f0;
}

#stats table th, #stats table td {
  border: 1px solid silver;
  padding: 1em 2em;
}

#stats table tr:nth-of-type(2) td {
  padding: 0.3em 2em;
}

#stats table th:nth-of-type(3) {
  min-width: 4em;
}

#stats table th:nth-of-type(4) {
  min-width: 8em;
}

/* ------------------------------------------------------------------- */
/* *****                         footer                          ***** */
/* ------------------------------------------------------------------- */
footer {
  width: 100%;
  position: fixed;
  bottom: 0;
  background: #fff;
}

/* ------------------------------------------------------------------- */
/* ***** sub funtion ***** */
/* ------------------------------------------------------------------- */
.shadow-right {
  box-shadow: 2px 0 6px 0 rgba(60, 64, 67, .15);
}

.shadow-top {
  box-shadow: 0 -2px 6px 0 rgba(60, 64, 67, .15);
}

.shadow-bottom {
  box-shadow: 0 2px 6px 0 rgba(60, 64, 67, .15);
}

.shadow-top-inset {
  box-shadow: inset 0 7px 6px -5px rgba(60, 64, 67, .15);
}

.shadow-bottom-inset {
  box-shadow: inset 0 -7px 6px -5px rgba(60, 64, 67, .15);
}

.shadow-top-inset.shadow-bottom-inset {
  box-shadow: inset 0 7px 6px -5px rgba(60, 64, 67, .15), inset 0 -7px 6px -5px rgba(60, 64, 67, .15);
}

.right {
  text-align: right;
}

.tint {
  color: #c79100;
}

.hide {
  opacity: 0;
  transition: .25s;
  display: none;
  animation: fade 1s;
}

.show {
  opacity: 1;
  transition: .25s;
  animation: fade 1s;
}

/* ------------------------------------------------------------------- */
/* *****                         mobile                          ***** */
/* ------------------------------------------------------------------- */
@media handheld, only screen and (max-device-width:480px), only screen and (max-device-width:320px), screen and (max-width:800px) {
  body {
    font-size: 12px;
  }

  #stats table th:nth-of-type(5),
  #stats table td:nth-of-type(5) {
    display: none;
  }

  #stats table tr:nth-of-type(2) td {
    padding: 1em 2em;
  }

  #winner {}

  #winner.pinned {}

  #lottotable {
    font-size: 6px;
    padding-bottom: 7em;
  }

  #lottotable .output {
    border-radius: 0;
    margin: 0;
    box-shadow: none;
  }

  #lottotable li {
    margin: 0;
    display: contents;
  }

  #lottotable .win .output {
    background: #212121;
  }

  .output.match,
  [id^="output"] {
    border: 3px solid #212121;
  }

  .output.match_b,
  #output6 {
    border: 3px solid #616161;
  }

  #lottotable .win:after {
    content: none;
  }
}

@media handheld, only screen and (max-width:600px) {
  #winner .win_container {
    transform: scale(.75);
    transform-origin: top;
    width: 200%;
    margin-left: -50%;
  }

  #winner .info {
    margin-top: -1em;
  }
}

@media handheld, only screen and (max-width:480px) {

  #stats table th:nth-of-type(4),
  #stats table td:nth-of-type(4) {
    display: none;
  }

  #winner .win_container {
    transform: scale(.6);
  }

  #winner .info {
    margin-top: -2em;
  }
}

/******************************************************************************/
/*                                     #ad                                    */
/******************************************************************************/
.ad {
  width: 100%;
  /* background: gold; */
  margin: 0em 0 2.5em;
  text-align: center;
}

/* ------------------------------------------------------------------- */
/* ***** splash ***** */
/* ------------------------------------------------------------------- */
div#splash {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  background: #fff;
  text-align: center;
  z-index: -1;
  opacity: 0;
  display: flex;
  align-items: center;
}

div#splash.on {
  z-index: 10;
  opacity: 1;
}

div#splash span {
  margin: auto;
  transform: scale(.5);
}

div#splash img {
  margin: 0;
}

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

  100% {
    opacity: 1;
  }
}
