@import url("https://fonts.googleapis.com/css?family=Poppins:100,200,300,400,500,600,700,800,900");

* {
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -webkit-user-drag: none;  
  font-family: "Poppins", sans-serif;
  overflow: hidden;
  list-style: none;
}

body {
  background: url(images/bg.png);
  background-size: cover;
}

circle {
  pointer-events: none;
}

#loading-mask {
  font-size: 2em;
  display: flex;
  color: white;
  flex-direction: column;
  height: 100%;
  position: fixed;
  width: 100%;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  background: url("images/bg.png");
  background-size: cover;


  & p{
    background-color: transparent;
    font-weight: 500;
  }
}

/* Cursor */

#allSvg {
  cursor: url('images/grab.png') 8 8, grab;

  &:active {
    cursor: url('images/grabbing.png') 8 8, grabbing;
  }
}

/* Scrollbar */

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: none;
}   

::-webkit-scrollbar-thumb {
  background: green;
  border-radius: 8px;
}

#easter:hover {
  cursor: pointer;
}

/* Accueil */

#home-screen img {
  position: absolute;
  width: 650px;
  top: 100;
}

#home-screen {
  position: fixed;
  height: 100%;
  width: 100%;
  z-index: 999;
  color: black;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1em;
  transition: opacity .8s;

  &.hidden {
    pointer-events: none;
    opacity: 0;
  }
}

#gamemode-buttons {
  margin-top: 480px;
}

#row-1 {
  display: flex;
  justify-content: center;
  gap: 50px;
  margin-bottom: 50px;
}

#row-2 {
  display: flex;
  gap: 50px;
  justify-content: center;
  margin-bottom: 50px;
}

#row-3 {
  display: flex;
  gap: 50px;
  justify-content: center;
}

/* Map */

#map-screen {
  opacity: 0;
  pointer-events: none;
  background-color: #009dc4;

  &.visible {
    opacity: 1;
    pointer-events: all;
  }
}

/* Prompt SVG */

#prompt-open {
  transition: .3s ease;

  &:hover {
    cursor: pointer;
    scale: 1.1;
  }
}

/* Mode Devine */

#mode-1-screen, #mode-2-screen {
    position: fixed;
    height: 100%;
    width: 100%;
    z-index: 999;
    color: black;
    gap: 1em;
    opacity: 0;
    pointer-events: none;
    transition: opacity .8s;

    &.visible {
      opacity: 1;
      pointer-events: all;
    }
}

#mode-1-screen p,  #mode-2-screen p{
  font-family: din-round,sans-serif;
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 10px;
}

#mode-1-screen-content, #mode-2-screen-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

#number-of-countries {
    border: none;
    color: black;
    background-color: white;
    height: 80px;
    width: 150px;
    border-radius: 10px;
    padding: 10px;
    border: 4px solid #2E8743;
    box-shadow: #53FF38 inset 0px 0px 15px;
    transition: box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out;
    margin-bottom: 20px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
}

#number-of-countries:focus{
    outline: none;
    border-color: rgb(170, 145, 94);
    box-shadow: rgb(170, 145, 94) inset 0px 0px 15px;
}

/* Mode Quiz */

#mode-4-screen {
  position: fixed;
  height: 100%;
  width: 100%;
  z-index: 999;
  color: black;
  gap: 1em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .8s;

  &.visible {
    opacity: 1;
    pointer-events: all;
  }
}

#mode-4-screen-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 100px;
  height: 100%;
  gap: 50px;
  opacity: 0;
  pointer-events: none;

  &.visible {
    opacity: 1;
    pointer-events: all;
  }

  & p {
    font-size: 50px;
  }

  & img {
    height: 220px;
  }

}

#proposals {
  display: grid;
  grid-template-columns: 600px 600px;
  grid-template-rows: 100px 100px;
  grid-column-gap: 50px;
  grid-row-gap: 50px;
  position: fixed;
  bottom: 100px;
}

#proposal-1, #proposal-2, #proposal-3, #proposal-4 {
  text-transform: none;
}

#start-quiz-content {
  width: 550px;
  height: 200px;
  min-width: 550px;
  min-height: 200px;

  & p {
    background-color: transparent;
    font-size: 20px;
    margin-bottom: 15px;
  }
}

#error-content {
  gap: 20px;
  background-color: rgb(182, 8, 8);
  border: 20px solid white;

  width: 600px;
  height: 500px;
  min-width: 600px;
  min-width: 500px;

  & p {
    font-size: 30px;
    font-weight: 500;
    color: white;
  }

  & img {
    height: 220px;
    box-shadow: inset;
  }
}

#results-content {
  width: 500px;
  height: 480px;
  min-width: 500px;
  min-height: 480px;
  gap: 30px;
}

#quiz-title {
  font-size: 35px;
  font-weight: 700;
}

#error-close {
  display: none;
}

#container-quiz {
  display: flex;
  gap: 50px;
}

#image-share-quiz {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#results-p {
  display: flex;
  gap: 20px;
}

#buttons-quiz {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Timer */

#timer {
  position: absolute;
  right: 50;
  top: 50;
}

.base-timer {
  position: relative;
  width: 250px;
  height: 250px;
}

.base-timer__svg {
  transform: scaleX(-1);
}

.base-timer__circle {
  fill: none;
  stroke: none;
}

.base-timer__path-elapsed {
  stroke-width: 7px;
  stroke: grey;
}

.base-timer__path-remaining {
  stroke-width: 7px;
  stroke-linecap: round;
  transform: rotate(90deg);
  transform-origin: center;
  transition: 1s linear all;
  fill-rule: nonzero;
  stroke: currentColor;
}

.base-timer__path-remaining.green {
  color: rgb(65, 184, 131);
}

.base-timer__path-remaining.orange {
  color: orange;
}

.base-timer__path-remaining.red {
  color: red;
}

.base-timer__label {
  position: absolute;
  width: 250px;
  height: 250px;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

/* Boutons */

.button-embuscade {
  appearance: button;
  background-color: rgb(170, 145, 94);
  border: solid transparent;
  border-radius: 16px;
  border-width: 0 0 4px;
  box-sizing: border-box;
  color: black;
  cursor: pointer;
  display: inline-block;
  font-family: din-round,sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .8px;
  line-height: 20px;
  margin: 0;
  outline: none;
  overflow: visible;
  padding: 23px 23px;
  text-align: center;
  text-transform: uppercase;
  touch-action: manipulation;
  transform: translateZ(0);
  transition: filter .2s;
  vertical-align: middle;
  white-space: nowrap;
}

.button-embuscade:after {
  background-clip: padding-box;
  background-color: rgb(235, 209, 155);
  border: solid transparent;
  border-radius: 16px;
  border-width: 0 0 4px;
  bottom: -4px;
  content: "";
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: -1;
}

button:hover {
  cursor: pointer;
}

.button-embuscade:main,
.button-embuscade:focus {
  user-select: auto;
}

.button-embuscade:hover:not(:disabled) {
  filter: brightness(1.1);
  -webkit-filter: brightness(1.1);
}

.button-embuscade:disabled {
  cursor: auto;
}

.button-embuscade:active {
  border-width: 4px 0 0;
  background: none;
}

/* Pas de #back-to-game-mode-menu-from-3-button car ça lance direct la map */
#back-to-menu-button-1, #back-to-menu-button-2, #back-to-menu-button-3, #back-to-home-screen-from-1-button, #back-to-home-screen-from-2-button, #back-to-home-screen-from-4-button { 
  top: 20px;
  left: 20px;
  position: absolute;
  width: 80px;
  pointer-events: none;
  opacity: 0;

  &.visible {
    pointer-events: all;
    opacity: 1;
  }
}

#back-to-menu-button-1 img, #back-to-menu-button-2 img, #back-to-menu-button-3 img, #back-to-home-screen-from-1-button img, #back-to-home-screen-from-2-button img, #back-to-home-screen-from-4-button img, #home img, #replay img, #replay-quiz img, #home-quiz img  {
  max-width: 80%;
  max-height: 80%;
  background-color: transparent;
}

/* Input des pays */

#country-input{
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    bottom: 170px;
    width: 35%;
    gap: 20px;
    left: 33%;
    background-color: transparent;
    pointer-events: all;
    opacity: 1;

    &.hidden {
      opacity: 0;
      pointer-events: none;
    }
}

#input {
    border: none;
    color: black;
    background-color: white;
    height: 40px;
    width: 330px;
    border-radius: 10px;
    padding: 10px;
    border: 4px solid #2E8743;
    box-shadow: #53FF38 inset 0px 0px 15px;
    transition: box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out;
    margin-right: 20px;
    margin-left: 20px;
}

#input:focus {
  outline: none;
}

/* Liste des suggestions */

#ui-id-1 {
  max-height: 100px;
  max-width: 330px;
  overflow-y: auto;
}

.ui-menu {
  border-radius: 10px;
  margin-left: 50px;
}

.ui-widget-content {
  background: rgb(235, 209, 155) !important;
  border: none !important;
}

.ui-menu-item {
  background-color: rgb(235, 209, 155);
  max-width: 330px;
}

.ui-autocomplete {
  .ui-state-focus {
      border: none !important;
      background: #e9e9e9 !important;
      color: black !important;
  }
}

/* Wrong country */

.wrong {
  border-color: #FF3D3D !important;
  box-shadow: #FF3D3D inset 0px 0px 15px !important;
  animation: shake 0.5s ease-in-out;
}

#countries-found {
  position: absolute;
  bottom: 130px;
  right: 22%;
  background-color: transparent;
  font-size: 20px;
  font-weight: 500;
}

/* Overlays (Fin de partie, informations d'un pays en mode Découverte, Help) */

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  transition: transform 0.3s ease;
}

.content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgb(235, 209, 155);
  border-radius: 30px;
  width: 40%;
  height: 60%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s ease;
  border: 2px solid black;
}

#help-content {
  width: 1050px;
  height: 650px;
  min-width: 1050px;
  min-height: 650px;

  &img {
    padding: 40px;
    background-color: rgb(235, 209, 155);
  }
}

#prompt-content {
  width: 1050px;
  height: 600px;
  min-width: 1050px;
  min-height: 600px;
}

#win-gif {
  width: 40%;
  border-radius: 10%;
}

#win-buttons {
  background-color: transparent;
  display: flex;
  flex-direction: column;
  gap: 50px;
  margin-left: 50px;
  padding: 50px;
}

#win-content2 {
  background-color: rgb(235, 209, 155);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s ease;
  margin-top: 10px;
  margin-bottom: 30px;
}

#win-content {
  width: 600px;
  height: 550px;
  min-width: 600px;
  min-height: 550px;
}

#win-text {
  font-size: 50px;
  font-weight: 500;
  background-color: transparent;
}

#replay, #home, #replay-quiz, #home-quiz {
  width: 120px;
  height: 120px;

  &::after {
    border-radius: 13px;
  }
}

/* Mode Découverte */

#country-name {
  background: transparent;
  font-size: 40px;
  font-weight: 600;
  margin-bottom: 50px;
}

#country-capital {
  background: transparent;
  font-size: 30px;
  font-weight: 400;
  margin-top: 50px;
}

#country-flag img {
  width: 250px;
  background-color: rgb(235, 209, 155);
}

#discover-content {
  width: 850px;
  height: 450px;
}

#discover-close, #help-close, #prompt-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: red;
  color: white;
  border: none;
  font-weight: 550;
  transition: transform 0.3s ease;

  &:hover {
    transform: scale(1.2);
  }
}

#continents-countries {
  position: absolute;
  bottom: 40px;
  left: 50px;
  background-color: transparent;
  font-size: 22px;
  font-weight: 500;
  opacity: 0;

  & p {
    background-color: transparent;
  }

  &.visible {
    opacity: 1;
  }
}

/* Animations */

.fade-in {
  opacity: 0;
  animation: fadeIn 1s ease forwards;
}

.fade-out {
  animation: fadeOut 1s ease forwards;
}

.fade-in-quiz {
  opacity: 0;
  animation: fadeIn .1s forwards;
}

.fade-out-quiz {
  animation: fadeOut .1s forwards;
}

@keyframes fadeIn {
  from {
      opacity: 0;
  }
  to {
      opacity: 1;
  } 
}

@keyframes fadeOut {
  from {
      opacity: 1;
  }
  to {
      opacity: 0;
  } 
}

@keyframes shake {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(1.5em);
  }
  40% {
    transform: translate(-1.5em);
  }
  60% {
    transform: translate(1.5em);
  }
  80% {
    transform: translate(-1.5em);
  }
  100% {
    transform: translate(0);
  }
}