*, ::before, ::after {
  margin:0;
  padding:0;
  box-sizing: border-box;
  }
  
  *:focus {
      outline: none;
  }



@font-face {
  font-family: 'Major Mono Display';
  src: url('MajorMonoDisplay-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --tileColor:#852e1d;
  --tileAltColor:#4f1e0f;
  --bgColor:#c1814b;
  --bgAltColor:#c1814b;
  --btnColor:#f4a460;
  --btnActiveColor:#8c5e36;
  --btnDisabledColor: rgb(199, 134, 78);
  --btnDisabledtxtColor:#4f1e0f1a;
  --btnAltColor:#f4a460;
  --btnAltActiveColor:#8c5e36;
  --txtColor:#4f1e0f;
  --txtAltColor:#f4a460;
  --logoColor:#000000;
  --highlightColor:#FFFF00;
}

.darkmode {
  --tileColor:#2b2b2b;
  --tileAltColor:#202020;
  --bgColor:#000000;
  --bgAltColor:#2b2b2b;
  --btnColor:#800080;
  --btnDisabledColor: #330033;
  --btnDisabledtxtColor:#4400449c;
  --btnActiveColor:#4d004d;
  --btnAltColor:#2b2b2b;
  --btnAltActiveColor:#222222;
  --txtColor:black;
  --txtAltColor:black;
  --logoColor: purple;
  --highlightColor:#008000;
}

*,
/* *:before, */
*:after {
  margin: 0;
  /* padding: 0; */
  box-sizing: border-box;
  overflow: hidden;
  /* user-select: none; */
  font-family:'Major Mono Display', sans-serif;}

*:focus {outline:none !important}

.slider,
button,
textarea,
select,
p,
label,
a{
 -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
 -webkit-tap-highlight-color: transparent;
 -webkit-user-select: none;
 -khtml-user-select: none;
 -moz-user-select: none;
 -ms-user-select: none;
  user-select: none; 

 }

 /* h1, h2 {
  margin: 0;
}  */

body {
  display:flex;
  background: var(--bgColor);
  font-size: 1rem;
  width:100vw;
  height:100vh;
  justify-content: center;
  align-items: center;
  font-family:'Major Mono Display', sans-serif;
}

a {
  text-align: center;
}

thead {
  text-align: left;
}

td,th {
  border-color: #000;
  border-style: solid;
  border-width: 1px;
  color: var(--tileAltColor);
  background-color: var(--btnColor);
  padding: 5px;
}

tr td:not(:last-child) {
  width: fit-content;
  white-space: nowrap;
  
}

/*#region button */

button {
  appearance: none;
  background-color: var(--btnColor);
  border: 2px solid rgba(27, 31, 35, .25);
  border-radius: 6px;
  box-shadow: rgba(27, 31, 35, .1) 0 2px 0;
  box-sizing: border-box;
  color: var(--txtColor);
  cursor: pointer;
  display: inline-block;
  /* font-family: -apple-system,system-ui,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"; */
  font-size: 100%;
  line-height: 20px;
  padding: 6px;
  position: relative;
  text-align: center;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  vertical-align: middle;
  white-space: nowrap;
  justify-content: center;
  align-items: center;
}


button:focus:not(:focus-visible):not(.focus-visible) {
  box-shadow: none;
  outline: none;
}

button:hover {
  background-color: var(--btnColor);
}

button:focus {
  box-shadow: var(--btnActiveColor);
  outline: none;
}

button:disabled {
  background-color: var(--btnDisabledColor);
  border-color: rgba(27, 31, 35, .1);
  color: var(--btnDisabledtxtColor);
  cursor: default;
}

button:active {
  background-color: var(--btnActiveColor);
  box-shadow: rgba(20, 70, 32, .2) 0 1px 0 inset;
}

/*#endregion button */

input[type="text"] {
  background-color: var(--btnColor);
  font-size: min(5vw,2.5vh);
  border-radius: 6px;
  border: 2px solid var(--tileAltColor);
}

.textcontainer {
  font-size: min(5vw,2.5vh);
  text-align:center;
  justify-content: center;
  display:flex;
  width:100%;
  user-select: none;
}



/* .textinput {
  position: absolute;
  top: 0;
  left: 0;
  background-color: var(--bgColor);
}  */



/* .radioitem {
  display:flex;
  justify-content: center;
  align-content: center;
  align-items: center;
  width:100%;
} */

input[type="radio"] {
  /* Add if not using autoprefixer */
  -webkit-appearance: none; 
   appearance: none; 
  /* For iOS < 15 to remove gradient background */
  background-color: var(--btnColor);
  /* Not removed via appearance */
  margin: 0;
  font: inherit;
  color: var(--btnColor); 
  width: 1em;
  height: 1em;
  border: 2px solid var(--tileAltColor);
  border-radius: 6px; 
  /* transform: translateY(-0.075em); */

  display: grid;
  place-content: center;
}



input[type="radio"]:checked {
  /* transform: scale(1); */
  background-color: var(--tileAltColor);
  font-weight: bold;
}

.radiocontainer {
  display: grid;
  grid-template-columns: 1em auto;
  gap: 0.5em;
  text-align: left;
  line-height: 1.1;
  
}





.gameBtn{
  justify-content: center;
  align-items: center;
  display:grid;
  font-size: 100%;
  width:min(12vw,12vh);
  height:min(12vw,12vh);
  background-color: var(--btnAltColor);
}

.menuBtn {
  justify-content: center;
  align-items: center;
  display:grid;
  width: min(70vw,50vh);
  height: 10vh;
  font-size: min(5vw,5vh);
}

.optionBtn {
  width:90px;
  height:34px;
  text-align: center;

}


.uiContainer {
  width:min(24vw,24vh);
  height:min(12vw,12vh);
  justify-self: center;
  align-self: center;
  border-radius: 5px;
  background-color: var(--tileAltColor);
  text-align: center;
  align-items: center;
  justify-content: center;

  font-size: min(4vw,4vh);
}

.uiHContainer {
  width:auto;
  height:auto;
  align-self: center;
  justify-self: center;
}

#gameContainer {
  grid-column: 1 / span 5;
  grid-row: 4;
  justify-self: center;
  justify-content: center;
  display:flex;
  width:100%;
  height:100%;
}

#emptySpaceTop {
grid-column: 1 / span 5;
}

#contentContainer {
display:grid;
grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
column-gap: 1vw;
row-gap: 10px;
width:100%;
height: 100%;
grid-auto-rows:min-content;
}

/* #gameWindow {
  width: 50vw;
} */

.headerText {
  font-size: min(3vw,3vh);
  text-align: center;
  color: var(--tileAltColor);
  align-self: center;
}


#exitBtnContainer{
  grid-column: 1;
  grid-row: 2;
  justify-self: center;
  align-self: center;
}

#scoreContainer {
  grid-column: 2;
  grid-row: 2;
}

#comboContainer {
  grid-column: 3;
  grid-row: 2;
  width: min(12vw,12vh);
}

#bestscoreContainer {
  display:flex;
  grid-column: 4;
  grid-row: 2;
}

#optionsBtnContainer{
  grid-column: 5;
  grid-row: 2;
  justify-self: center;
  align-self: center;
}



#score {
  color: var(--txtAltColor);
  display:flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}


#bestScore {
  color:var(--txtAltColor);
  display:flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}
#currentCombo {
  color:var(--txtAltColor);
  display:flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}


i {
  color:var(--txtColor);
  display:block;
  justify-self: center;
  align-self: center;
  border-radius: 5px;
  font-size: min(6vw,6vh);
}


/*#region modals*/

.modal {
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
  -webkit-animation-name: fadeIn; /* Fade in the background */
  -webkit-animation-duration: 0.4s;
  animation-name: fadeIn;
  animation-duration: 0.4s;
  overflow: auto; /* Enable scroll if needed */
  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: 100%; /* Full height */
}



#mainMenuModal, 
#mpSelectionModal,
#mpGameListModal,
#mpHostGameModal {
  animation-name: none;
  -webkit-animation-name: none;
}

#mainMenuModal {
  display: block;
}

#gameOverModal, #mpSelectionModal, #mpGameListModal {
  display:none;
}

#installModal {
  background-color: rgb(0,0,0);
}


/* Modal Content */
.modal-content {
  position: fixed;
  background-color: var(--bgColor);
  width: 100%;
  height: 100%;
  border-radius: 5px;
  animation-name: none;
  -webkit-animation-name: none;
  justify-content: center;
  align-items: center;

}

#gameOverModal .modal-content,
#installModal .modal-content,
#updateModal .modal-content,
#optionsModal .modal-content,
#gameInProgressModal .modal-content {
  top:50%;
  left:50%;
  transform: translate(-50%, -50%);
  background-color: var(--bgAltColor);
  width: max-content;
  height: max-content;
  padding: 20px;
}


#mainMenuModal .modal-content .modal-body {
  display:grid;
  width:100%;
  height:100%;
  grid-template-columns: auto;
  grid-template-rows: 0.8fr 0.5fr 1fr 1fr 1fr 1fr 0.5fr 0.25fr 0.3fr 0.25fr;
  text-align: center;
}


#gameOverModal .modal-content .modal-body,
#gameInProgressModal .modal-content .modal-body {
  padding: 2px 10px;
  display:grid;
  width:100%;
  height:100%;
  grid-template-columns: auto;
  grid-template-rows: 1fr 1fr 1fr 1fr;
  text-align: center;
  row-gap: 10px;
}

#installModal .modal-content .modal-body {
  padding: 2px 16px;
  display:grid;
  width:100%;
  height:100%;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: 1fr 1fr 1fr 1fr;
  row-gap: 10px;

}

#updateModal .modal-content .modal-body {
  padding: 2px 16px;
  display:grid;
  width:100%;
  height:100%;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: 1fr 1fr 1fr 1fr;

}

.modal-body {
  padding: 2px;
  display:grid;
  width:100%;
  height:100%;
  grid-template-columns: auto;
  grid-template-rows: 15% 1fr 1fr 1fr 1fr 15% 0.25fr 0.5fr 0.25fr 0.10fr;
  justify-content: center;
  align-items: center;

}

#optionsModal .modal-content .modal-body {
  display:grid;
  width:100%;
  height:100%;
  grid-template-columns: auto;
  grid-template-rows: 15% auto auto auto auto 15%;
  justify-content: center;
  align-items: center;
  row-gap: 30px;
  column-gap: 10px;

}

#optionsModal .modal-content .modal-body  div{
font-size: 100%;

}

#mpGameListModal .modal-content .modal-body {
  display:grid;
  width:95%;
  height:100%;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 50px auto 50px;
  justify-content: center;
  align-items: center;
  column-gap: 10px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#mpHostGameModal .modal-content .modal-body {
  display:grid;
  width:95%;
  height:100%;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(6,auto);
  justify-content: center;
  align-items: center;
  column-gap: 10px;
  row-gap: 20px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}



/* The Close Button */
.close {
  color: var(--tileAltColor);
  float: right;
  padding-right: 10px;
  padding-top: 5px;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

/*#endregion*/

.mmLogo {
  font-size:min(15vw,15vh);
  align-self: center;
  justify-self: center;
  color: var(--logoColor);
  padding-top:50px;
}

.mmItem {
  font-size: min(5vw,2.5vh);
  align-self: center;
  justify-self: center;
  align-content: center;
  justify-content: center;
  text-align:center;
  display:grid;
  width:100%;
}

/* Add Animation */
@-webkit-keyframes slideIn {
  from {opacity: 0} 
  to {opacity: 1}
}

@keyframes slideIn {
  from {opacity: 0}
  to {opacity: 1}
}

@-webkit-keyframes fadeIn {
  from {opacity: 0} 
  to {opacity: 1}
}

@keyframes fadeIn {
  from {opacity: 0} 
  to {opacity: 1}
}



#updateTxt {
  grid-column: 2;
  grid-row: 2;
  justify-self: center;
  align-self: center;
  font-size: 1.2rem;
}

/* CSS */
#updateBtn {
  grid-column: 2;
  grid-row: 3;
}

#bgDiv {
  background-color: var(--btnColor);
  width:100%;
  justify-self: center;
  align-self: center;
  border-radius: 5px;
  padding:10px;
  overflow:auto;
}

/*#region credits/copyright*/
#creditHeader {
  justify-self: center; 
  text-align: center; 
  align-self:center; 
  font-size:min(3vw,3vh);
  color:var(--logoColor);
  margin-bottom: 10px;
}
#creditTextHeader {
  font-size:min(2.5vw,2.5vh);
  color:var(--logoColor);
}
#creditText {
  color:var(--logoColor);
}
.copyrightText {
  font-size: min(2vw,2vh);
  align-self: end;
  justify-content: center;
  color:var(--logoColor);
}
/*#endregion*/

/*#region switch*/

/* The switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  border-radius: 5px;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--btnColor);
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: var(--tileColor);
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--btnActiveColor);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--tileAltColor);
}

input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/*#endregion*/