@charset "UTF-8";
@font-face {
  font-family: "Nintendoid1";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/nintendoid/Nintendoid.ttf");
}
@font-face {
  font-family: "Cutive Mono";
  font-style: normal;
  font-weight: 400;
  src: url(https://fonts.gstatic.com/s/cutivemono/v15/m8JWjfRfY7WVjVi2E-K9H6RMTm663A.woff2)
    format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: Nintendoid1, monospace;
  color: #eee;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.125em;
  position: relative;
  background-image: url("../img/fingerprint.png");
  background-repeat: no-repeat;
  background-color: #111;
  background-attachment: fixed;
  background-size: 100%;
  background-position: center;
  -webkit-backdrop-filter: hue-rotate(168deg) contrast(5);
  backdrop-filter: hue-rotate(168deg) contrast(5);
}

#title {
  margin: 0 50px 100px 50px;
}

#title h1 {
  font-size: 100px;
}

#game {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  align-items: center;
  width: 80vw;
  margin-top: -75px;
}

#infos {
  padding: 50px 50px 20px;
  width: 70%;
  border-radius: 10px;
  position: relative;
  border: 1px solid #fff;
  box-shadow: 0 0 0 5px #111, 0 0 0 6px #fff;
  background: #111;
}

#lives {
  font-size: 32px;
}

#state {
  min-width: 275px;
  min-height: 40px;
  margin: 20px 2px 30px 2px;
  font-size: 0.7em;
}

.lives {
  display: flex;
  justify-content: flex-end;
  flex-flow: row nowrap;
  width: 100%;
}

.life {
  width: 12.5%;
  height: 100%;
  padding: 10px;
  filter: hue-rotate(168deg) contrast(5);
}

#numpad {
  border: 1px solid #fff;
  box-shadow: 0 0 0 5px #111, 0 0 0 6px #fff;
  border-radius: 10px;
  padding: 10px;
  width: 250px;
  background: #111;
  position: relative;
  height: 312px;
}

.arrows {
  display: block;
  width: 40px;
  height: 40px;
  border-top: 10px solid #ffffff;
  border-left: 10px solid #ffffff;
  transform: rotate(45deg);
  position: absolute;
  right: -70px;
  top: 0;
}

.arrows::after {
  content: "";
  display: block;
  width: 10px;
  height: 70px;
  background-color: rgb(255, 255, 255);
  transform: rotate(-45deg) translate(21px, 0px);
  left: 0;
  top: 0;
}

#less {
  transform: rotate(225deg);
  top: 90%;
}

#screen {
  height: 50px;
  background: #000000;
  margin-bottom: 10px;
  padding: 15px;
  border: white 1px solid;
  font-size: 25px;
  overflow: hidden;
  width: 100%;
  font-family: Nintendoid1, monospace;
  color: #eee;
  line-height: 1;
  letter-spacing: 0.125em;
}

#screen::-webkit-inner-spin-button {
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
}

#screen:focus {
  caret-color: rgb(255, 255, 255);
  outline: 1px solid white;
}

#buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  gap: 10px;
}

.btn {
  color: azure;
  height: 50px;
  background-color: #111;
  font-size: 20px;
  /* glowing effect */
  font-family: "Cutive Mono", monospace;
  animation: none;
  font-weight: 600;
  border-width: 2px;
  border-style: outset;
  width: 70px;
}

.btn:hover {
  border: #111;
}

.num {
  border-radius: 500px;
}

.action {
  font-weight: 300;
  font-size: 18px;
  border-radius: 15%;
}

#dialog {
  background-color: #111;
  color: white;
  border-radius: 10px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 70px;
}

#dialog label {
  display: block;
  width: 500px;
  height: auto;
  min-height: 40px;
  margin-bottom: 20px;
}

#dialog p {
  position: relative;
  width: 100%;
  height: 50px;
}

#dialog button {
  color: azure;
  height: 50px;
  background-color: #111;
  font-size: 18px;
  padding: 10px;
  /* glowing effect */
  font-family: "Cutive Mono", monospace;
  animation: none;
  font-weight: 600;
  border-width: 2px;
  border-style: outset;
  border-radius: 15%;
  display: inline-block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  outline: none;
}

#dialog button:hover {
  border: #111;
}

.wonDialog {
  border: 2px solid #30bb26;
  box-shadow: 0 0 0 5px #111, 0 0 0 7px #30bb26;
}

.lostDialog {
  border: 2px solid #a22222;
  box-shadow: 0 0 0 5px #111, 0 0 0 7px #a22222;
}


#infos:hover p,
  #title:hover,
  #numpad:hover #screen {
    animation-name: textflicker;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    animation-duration: 0.03s;
    text-shadow: 0.06rem 0 0.06rem #ea36af, -0.125rem 0 0.06rem #75fa69;
  }
@media all and (min-width: 430px) {
  
  #dialog button,
  .btn {
    animation: flicker steps(100) 1s 1s infinite;
    text-shadow: 0 0 10px azure, 0 0 20px aqua, 0 0 40px dodgerblue,
      0 0 80px blue;
    will-change: filter, color;
    filter: saturate(60%);
  }
}
@media all and (max-width: 1120px) {
  #title h1 {
    font-size: 73px;
  }
  #title h2 {
    font-size: 25px;
  }
  #infos {
    width: 60%;
    padding: 35px 35px 20px;
  }
  #state {
    margin: 20px 2px 10px 2px;
  }
  .lives {
    flex-wrap: wrap;
  }
  .life {
    width: 25%;
    padding: 15px;
  }
  .arrows {
    width: 40px;
    height: 40px;
    border-top-width: 7px;
    border-left-width: 7px;
    right: -65px;
  }
  .arrows::after {
    width: 7px;
    height: 60px;
    transform: rotate(-45deg) translate(19px, 5px);
  }
}
@media all and (max-width: 850px) {
  #title h1 {
    font-size: 50px;
  }
  #title h2 {
    font-size: 15px;
  }
  #infos {
    width: 50%;
    padding: 30px 30px 20px;
  }
  #countdown {
    font-size: 10px;
  }
  #lives {
    font-size: 20px;
  }
  #state {
    min-width: 10px;
    min-height: 26px;
  }
  .life {
    width: 25%;
    padding: 5px;
  }
  #game {
    margin-top: -60px;
  }
  .arrows {
    width: 30px;
    height: 30px;
    border-top-width: 5px;
    border-left-width: 5px;
    right: -55px;
  }
  .arrows::after {
    width: 5px;
    height: 50px;
    transform: rotate(-45deg) translate(16px, 5px);
  }
}
@media all and (max-width: 690px) {
  body {
    height: 100%;
  }
  #title {
    margin: 30px;
  }
  #title h1 {
    font-size: 45px;
  }
  #title h2 {
    font-size: 12px;
  }
  #game {
    flex-flow: column-reverse;
    align-items: center;
    width: 100%;
    padding: 30px;
  }
  #infos {
    width: 100%;
    margin-top: 20px;
    padding: 20px;
  }
  #infos p {
    font-size: 10px;
  }
  #game {
    margin-top: -30px;
  }
  .life {
    padding: 10px;
    width: 12.5%;
  }
  .lives {
    flex-wrap: nowrap;
  }
  .arrows {
    width: 40px;
    height: 40px;
    border-top: 10px solid #ffffff;
    border-left: 10px solid #ffffff;
    right: -70px;
  }
  .arrows::after {
    width: 10px;
    height: 70px;
    transform: rotate(-45deg) translate(21px, 0px);
  }
  #less {
    top: 85%;
  }
  #dialog {
    padding: 20px;
  }
  #dialog label {
    font-size: 12px;
    width: 475px;
  }
}
@media all and (max-width: 540px) {
  #title h1 {
    font-size: 35px;
  }
  #title h2 {
    font-size: 10px;
  }
  #game {
    padding: 20px;
  }
  #infos {
    padding: 30px 30px 10px;
  }
  .lives {
    flex-wrap: wrap;
  }
  .life {
    width: 25%;
    padding: 10px 20px;
  }
  #dialog {
    padding: 20px;
  }
  #dialog label {
    font-size: 10px;
    width: 360px;
  }
}
@media all and (max-width: 430px) {
  html {
    height: 100%;
  }
  #title h1 {
    font-size: 22px;
    text-align: center;
    margin: 5px 0;
  }
  #title h2 {
    font-size: 8px;
  }
  #game {
    padding: 10px;
    margin-top: -15px;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
  }
  #infos {
    display: none;
  }
  #dialog {
    padding: 20px;
  }
  #dialog label {
    font-size: 10px;
    width: 185px;
  }
  .arrows {
    width: 20px;
    height: 20px;
    border-top-width: 3px;
    border-left-width: 3px;
    top: 25px;
    right: 25px;
  }
  #less {
    top: 25px;
  }
  .arrows::after {
    width: 3px;
    height: 30px;
    transform: rotate(-45deg) translate(10px, 1px);
  }
}
@media all and (max-width: 320px) {
  #title h1 {
    font-size: 16px;
  }
  #title h2 {
    font-size: 8px;
    padding: 2px;
  }
  #title {
    margin: 10px;
  }
  #numpad {
    padding: 5px;
    margin-bottom: 10px;
    width: 180px;
    height: 200px;
    box-shadow: none;
  }
  #screen {
    height: 30px;
    font-size: 15px;
    padding: 5px;
    width: 80%;
    margin: 1px 15% 5px 5%;
  }
  .btn {
    height: 30px;
    font-size: 12px;
    border-width: 1px;
    width: 50px;
  }
  .action {
    font-size: 12px;
  }
  #game {
    margin: 0;
  }
  #numpad {
    margin: 0;
  }
  .arrows {
    width: 10px;
    height: 10px;
    border-top-width: 3px;
    border-left-width: 3px;
    top: 14px;
    right: 11px;
  }
  #less {
    top: 18px;
  }
  .arrows::after {
    width: 3px;
    height: 15px;
    transform: rotate(-45deg) translate(4px, 1px);
  }
  #dialog {
    padding: 20px;
  }
  #dialog label {
    font-size: 8px;
    width: 122px;
  }
}
@media all and (max-width: 320px) and ((max-height: 320px) or (max-width: 182px)) {
  #title {
    display: none;
  }
}
@keyframes textflicker {
  from {
    text-shadow: 1px 0 0 #ea36af, -2px 0 0 #75fa69;
  }
  to {
    text-shadow: 2px 0.5px 2px #ea36af, -1px -0.5px 2px #75fa69;
  }
}
@keyframes flicker {
  50% {
    color: white;
    filter: saturate(200%) hue-rotate(20deg);
  }
}
