:root {
  --size: 15px;
}

* {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
}
html {
  background-color: #000;
}

body {
  background-color: #fff;
  width: 100vw; /* Sets body width to fill the viewport */
  min-height: 100vh; /* Fallback */
  min-height: calc(
    100vh - env(safe-area-inset-bottom)
  ); /* Sets body height to fill the viewport */
  display: none;
}

#game {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  overflow-y: auto;
  position: relative;
  padding-bottom: 50px;
  min-height: 100vh;
}

#container {
  display: flex;
  flex-wrap: wrap;
  position: relative;
  gap: 4px;
  width: calc(90% - 55px);
  max-width: 450px;
  max-height: 650px;
  height: 350px;
  background-color: #ddd;
  margin-top: 50px;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.2);
}

.cell {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: #000;
  border-radius: 5px;
  background-color: #fff;
  background-repeat: no-repeat;
  background-size: cover;
  transition: all 0.1s ease;
  transition-duration: 0.1s;
  -webkit-transition-duration: 0.1s;
  -ms-transition-duration: 0.1s;
  -moz-transition-duration: 0.1s;
  box-sizing: border-box;
  box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.2);
  position: absolute;
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Safari, Chrome, Opera, Samsung */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* Edge, IE */
  user-select: none; /* Modern browsers */
  touch-action: none;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.cell:focus,
.cell:active {
  outline: none;
  background-color: transparent; /* Or set to the desired default background color */
}

.empty {
  background-color: #ddd;
  box-shadow: none;
  background-image: none;
  transition: none;
}

.user_wrapper {
  display: none;
  flex-direction: row;
  align-items: center;
  z-index: 10;
  height: 100px;
  width: 100%;
  justify-content: center;
}

.user_name {
  font-size: 12px;
  color: #000;
  font-weight: 600;
  margin-right: 10px;
}

.user_image_wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 56px;
  height: 56px;
  position: relative;
}

.user_circle {
  width: 54px;
  height: 54px;
  border-radius: 27px;
  border: 2px solid #9afaa3;
  overflow: hidden;
}

.user_image {
  width: 56px;
  height: auto;
  background-size: cover;
}

.level_wrapper {
  background-color: #9afaa3;
  position: absolute;
  bottom: -10px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  border-radius: 10px;
  padding: 0px 10px;
  left: 6px;
  width: 25px;
}

.level_icon,
.coin_icon {
  width: 12px;
  height: 12px;
}

.level {
  font-size: 12px;
  color: #082d2a;
  font-weight: 600;
  margin-left: 2px;
}

.player2 {
  margin-left: 10px;
  margin-right: 0;
}

.coin_wrapper {
  height: 30px;
  padding: 0px 15px;
  margin-left: -10px;
  margin-right: -10px;
  z-index: 10;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coins {
  font-size: 13px;
  color: #0fe880;
  font-weight: 600;
  margin-left: 3px;
  word-break: keep-all;
}

.progress-bar {
  width: 90%;
  margin: 10px auto;
  height: 25px;
  background-size: 100% 100%;
  border-radius: 5px;
  position: relative;
  text-align: center;
  position: relative;
  background-color: #ddd;
}

.progress {
  height: 100%;
  float: left;
  border-radius: 5px;
  transition: all 0.2s ease;
}

.user_image_prog {
  position: absolute;
  top: -5px;
  left: 0;
  width: 30px;
  height: 30px;
  border-radius: 2px;
  border: 2px solid #9afaa3;
  transition: all 0.2s ease;
}
.progress_perc {
  position: absolute;
  width: 95%;
  text-align: right;
  color: #073828;
  font-weight: 600;
  font-size: 12px;
  line-height: 25px;
  padding-left: 10px;
}

#user1Progress {
  width: 0%;
  background-color: #073828; /* Default color */
}

#user2Progress {
  background-color: #ee3f22; /* Default color */
  width: 0%;
}

#modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100vh; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0, 0, 0); /* Fallback color */
  background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
}

/* Modal Content/Box */
#modal-content {
  background-color: #fefefe;
  margin: 50% auto; /* 15% from the top and centered */
  padding: 20px;
  border: 1px solid #888;
  width: 80%; /* Could be more or less, depending on screen size */
  height: 40%;
  border-radius: 5px;
}

/* The Close Button */
.close {
  color: #000;
  float: right;
  font-size: 28px;
  font-weight: bold;
}
.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

#modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  row-gap: 50px;
  height: 100%;
}
#modal-text {
  text-align: center;
  font-size: 1.5rem;
  line-height: 2rem;
  color: #000;
  width: 80%;
}

.exit-wrapper {
  display: flex;
  align-items: center;
  margin: 0px 0px 10px;
  width: 90%;
  justify-content: space-between;
  color: #fff;
}

.exit-wrapper img {
  width: 30px;
  height: 30px;
  cursor: pointer;
}

.heading {
  font-size: 1.3rem;
  color: #000;
  text-transform: uppercase;
}

.action-buttons {
  display: none;
  justify-content: center;
  width: 100%;
  max-width: 450px;
  padding: 0px 20px;
  margin-top: 20px;
  column-gap: 30px;
}

.action-button {
  cursor: pointer;
}

.action-button img {
  width: 60px;
  height: 60px;
  object-fit: cover;
}

#exit-game {
  background-color: #f94646;
  border-radius: 5px;
}

#continue {
  background-color: #5ddd60;
  border-radius: 5px;
}

#modal-2 {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100vh; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0, 0, 0); /* Fallback color */
  background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
}

/* Modal Content/Box */
#modal-content-2 {
  background-color: #fefefe;
  margin: 50% auto; /* 15% from the top and centered */
  padding: 20px;
  border: 1px solid #888;
  width: 80%; /* Could be more or less, depending on screen size */
  height: 40%;
  border-radius: 5px;
}

#modal-body-2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  row-gap: 50px;
  height: 100%;
}
#modal-text-2 {
  text-align: center;
  font-size: 1.5rem;
  color: #000;
  width: 80%;
}
