:root {
  --main-color: #ffd659;
  --second-color: #faedc7;
}

html {
  scrollbar-color: var(--main-color) var(--second-color);
  min-height: 100%;
  min-width: 100%;
  text-align: center;
  font-family: "DynaPuff", system-ui;
  color: var(--main-color);
  background-color: var(--second-color);
}

body {
  margin: 0;
}

h1 {
  font-size: 45px;
  margin-top: 40px;
  -webkit-text-stroke: 1.5px black;
  text-shadow: 1px 1px 5px white;
}

.flex-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 75vh;
  position: relative;
}

#category {
  margin-top: 40px;
  width: 490px;
  height: 698px;
  padding: 10px;
  border-radius: 15px;
  align-content: center;
  color: #ffffff8a;
  font-size: 40px;
  font-weight: 500;
  text-shadow: 1px 1px 5px var(--second-color);
  -webkit-text-stroke: 1.5px black;
  background-color: transparent;
  background-image: url("./assets/images/categories/african.webp");
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2),
    -4px 0 10px rgba(255, 255, 255, 0.5) inset;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  animation: all 0.6s ease-in-out;
  cursor: grab;
  user-select: none;
}

#category.fade {
  animation: fadeBg 0.5s ease-in-out;
}

#category.shake {
  animation: diagonalShake 2s alternate;
}

#category.winner-shake {
  animation: diagonalShake 2s infinite alternate !important;
}

#category.swipe-yes {
  box-shadow: 0 0 20px #008500;
}

#category.swipe-no {
  box-shadow: 0 0 20px #830000;
}

#yes-label,
#no-label {
  position: absolute;
  font-size: 50px;
  font-weight: bold;
  color: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  cursor: pointer;
  z-index: 10;
}

#yes-label {
  right: 50px;
  color: #0dd40d;
  -webkit-text-stroke: 1.5px black;
}
#no-label {
  left: 50px;
  color: #ce0d0d;
  -webkit-text-stroke: 1.5px black;
}

@keyframes fadeBg {
  from {
    opacity: 0;
    filter: blur(2px);
  }
  to {
    opacity: 1;
  }
}

.bon-appetit-text {
  display: block;
  font-size: 32px;
  color: gold;
  margin-top: 30px;
}

.winner-text {
  display: block;
  font-size: 50px;
  animation: pulse 0.5s infinite alternate;
}

@keyframes pulse {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

@keyframes diagonalShake {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  10% {
    transform: translate(5px, -5px) rotate(3deg);
  }
  20% {
    transform: translate(-5px, 5px) rotate(-3deg);
  }
  30% {
    transform: translate(5px, -5px) rotate(2deg);
  }
  40% {
    transform: translate(-5px, 5px) rotate(-2deg);
  }
  50% {
    transform: translate(3px, -3px) rotate(1deg);
  }
  60% {
    transform: translate(-3px, 3px) rotate(-1deg);
  }
  70% {
    transform: translate(2px, -2px) rotate(1deg);
  }
  80% {
    transform: translate(-2px, 2px) rotate(-1deg);
  }
  90% {
    transform: translate(1px, -1px) rotate(0.5deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

#tutorial-popup {
  position: fixed;
  top: 19%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  display: flex;
  align-items: center;
  height: 13%;
  background: rgba(0, 0, 0, 0.3);
  color: white;
  font-size: 22px;
  font-weight: 500;
  padding: 0px 20px;
  border-radius: 15px;
  text-align: justify;
  line-height: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 10;
}

#tutorial-popup.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

#tutorial-popup strong {
  -webkit-text-stroke: 1.5px black;
  font-size: 24px;
}

footer {
  text-align: center;
  position: absolute;
  bottom: 15px;
  width: 100%;
  font-size: 16px;
  color: black;
}

body:not(.ready) #tutorial-popup,
body:not(.ready) #yes-label,
body:not(.ready) #no-label {
  transition: none !important;
}

@media (max-width: 768px) {
  h1 {
    margin-top: 30px;
  }

  .flex-container {
    overflow: hidden;
  }

  #category {
    max-width: 294px;
    max-height: 419px;
    margin-top: -60px;
    font-size: 24px;
    -webkit-text-stroke: 1px black;
  }

  #yes-label,
  #no-label {
    font-size: 40px;
    margin-top: -160px;
  }

  #tutorial-popup {
    top: 20%;
    width: 50%;
    font-size: 16px;
  }
  #tutorial-popup strong {
    font-size: 22px;
  }

  footer {
    font-size: 14px;
  }
}
