:root {
  --padding-header: 24px;
  --padding-window: 7px;
  --background: rgb(74, 144, 226);
  --window-width: 100vw;
  --color-win: #0f0;
  --color-lose: #f00;
  --color-text: white;
  --time-animation: 0.5s;
}
* {
  box-sizing: border-box;
}

html {
  font-family: helvetica, arial, sans-serif;
  color: var(--color-text);
}

.wrapper {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.points {
  position: absolute;
  display: flex;
  justify-content: space-between;
  font-size: 24px;
  right: var(--padding-header);
  top:  var(--padding-header);
}

.points__counter {
  transition: color 0.3s ease;
  font-weight: bold;
}

.window {
  border: 1px solid rgb(204, 204, 204);
  box-shadow: rgba(0, 0, 0, 0.2) 2px 2px 3px;
  color: var(--color-text);
  position: fixed;
  bottom: 0;
}

.window__wrapper {
  width: var(--window-width);
  position: relative;
}

.covered {
  filter: blur(4px);
}

.modal {
  width: var(--window-width);
  background-color: rgb(0, 0, 0, 0.85);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  padding: calc(var(--padding-header) + var(--padding-window));
  overflow-x: hidden;
  overflow-y: auto;
  visibility: visible;
  opacity: 1;
  transition: opacity var(--time-animation) ease;
}

.modal.hidden {
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s var(--time-animation), opacity var(--time-animation) ease;
}

.intro .glow {
  font-weight: bold;
  text-shadow: 0 0 5px var(--color-text);
}

.intro__title {
  margin: 0;
  font-size: 1.8rem;
}

.intro__header {
  margin: 0;
  font-size: 1.3rem;
}

.intro__subtitle {
  font-weight: normal;
}

.unlock_screen__image {
  height: 128px;
  width: 128px;
  margin: 30px auto;
}

.unlock_container {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.window__header {
  position: relative;
  display: flex;
  justify-content: space-between;
  background-color: var(--background);
  margin: var(--padding-window);
  margin-bottom: 0;
  padding: var(--padding-header);
}

.header__info {
  display: flex;
  flex-direction: column;
}

.info__select {
  font-size: 12px;
}

.info__object {
  font-size: 28px;
}

.info_verify {
  font-size: 14px;
}

.window__body {
  height: var(--window-width);
  padding: var(--padding-window);
  overflow: hidden;
}

.tiles_container {
  height: 100%;
  width: 100%;
  display: grid;
}

.tiles_container--3 {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  grid-gap: 4px 4px;
}

.tiles_container--4 {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  grid-gap: 2px 2px;
}

.tile {
  position: relative;
  cursor: pointer;
}

.tile:focus {
  outline: solid orange;
}

.tile:active {
  outline: none;
}

.tile * {
  transition: 0.1s ease;
}

.tile--selected * {
  transform: scale(.8);
}

.tile--selected::after {
  content: "";
  background-image: url('images/checkmark.svg');
  background-repeat: no-repeat;
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.tile__image {
  height: 100%;
  width: 100%;
  background-size: cover;
}

.window__footer {
  border-top: 1px solid #dfdfdf;
  margin-top: 1px;
  display: flex;
  justify-content: space-between;
  padding: var(--padding-window);
}

.button {
  background: none;
  box-shadow: none;
  border: 0;
  cursor: pointer;
  color: var(--color-text);
  height: 42px;
  padding: 0;
  font-family: inherit;
}

.button--action {
  width: 48px;
  opacity: .55;
}

.button--action:disabled {
  opacity: .3;
  cursor: initial;
}

.button--close {
  color: var(--color-text);
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 1000;
  opacity: 1;
  fill: var(--color-text);
  line-height: 1;
  width: 90px;
  height: 90px;
  border-radius: 100% 0 0 0;
}

.button--action:hover:enabled, .button--action:focus:enabled {
  opacity: .8;
  outline: none;
}

.button--action svg {
  width: 28px;
  height: auto;
}

.button--submit {
  text-transform: uppercase;
  background-color: var(--background);
  min-width: 100px;
  padding: 0 10px;
  font-weight: bold;
  font-size: 14px;
  border-radius: 2px;
  transition: all var(--time-animation) ease;
}

.button--submit:focus {
  outline: 0;
  box-shadow: 0 0 0 3px #185abc;
}

.button.fade-in {
  transition: visibility 0s var(--time-animation), opacity var(--time-animation) ease;
}

.button.fade-in.hidden {
  transition: opacity var(--time-animation) ease;
}

.win {
  color: var(--color-win);
}

.win.glow {
  text-shadow: 0 0 5px var(--color-win);
}

.lose {
  color: var(--color-lose);
}

.lose.glow {
  text-shadow: 0 0 5px var(--color-lose);
}

.hidden {
  visibility: hidden;
}

.undisplayed {
  display: none;
}

@media (min-width: 400px) {
  :root {
    --window-width: 400px;
  }

  .window {
    position: relative;
  }

  .modal {
    position: absolute;
  }
}
