@font-face {
    font-family: "roboto-standard";
    src: url("/src/fonts/Roboto-VariableFont_wdth\,wght.ttf");
}

@font-face {
    font-family: "title-standard";
    src: url("/src/fonts/DMSerifText-Regular.ttf");
}


:root{
    --base-color: white;
    --base-variant: #eeeeee;
    --text-color: black;
    --secondary-text: #333333;
    --success: #50fa7b;
    --error: #ff5555;
    --warning: #f1fa8c;
    --border-color: rgb(195, 195, 197);
    --form: #1f1f1fc9;
    --hover-color: #525252;
    --alt-switch: #124483;
}

.darkmode{
    --base-color: rgb(31, 31, 31);
    --base-variant: #252525;
    --text-color: rgb(255, 255, 255);
    --secondary-text: #ffffff;
    --success: #50fa7b;
    --error: #ff5555;
    --warning: #f1fa8c;
    --border-color: rgb(58, 58, 58);
    --form: #141417C9;
    --hover-color: #c5c5c5;
    --alt-switch: #f2ac08;
}

body{
  margin: 0;
  padding: 0;
  font-family: "roboto-standard"; 
  text-align: center;
  background-color: var(--base-color);
  overflow-y: auto;
  overflow-x: hidden;
}

body.tutorial-on .formgame {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.tutorial-on #game {
    overflow: visible !important;
}

body.tutorial-on #gameinner {
    overflow: visible !important;
}

body.tutorial-on .formgame,
body.tutorial-on .helper {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.circle-btn svg{
  fill: var(--secondary-text);
}

#headerswitch{
  flex: 1; 
  display: flex;
  justify-content: flex-end;
  width: 30%;
  cursor: pointer;
  user-select: none;
}

#themeswitch{
  height: 50px;
  width: 50px;
  padding: 0;
  border-width: 0px;
  border-radius: 50%;
  background-color: var(--base-variant);
  overflow: hidden;
  justify-content: center;
  position: relative;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

#themeswitch svg{
  fill: var(--secondary-text);
  position: absolute;
  right: 25%;
  bottom: 25%;
  transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

.moon {
  transform: scale(1);
  opacity: 1;
}

.sun {
  transform: scale(0);
  opacity: 0;
}

.darkmode .moon {
  transform: scale(0);
  opacity: 0;
}

.darkmode .sun {
  transform: scale(1);
  opacity: 1;
}

#mainlogo img:last-child{
  display: none;
}

.darkmode #mainlogo img:first-child{
  display: none;
}

.darkmode #mainlogo img:last-child{
  display: inline;
}

.title{
  font-family: "title-standard";
  margin-top: 5%;
  margin-left: 7%;
  margin-right: 7%;
}

.statstitle{
  font-family: "title-standard";
  margin-top: 0;
  margin-left: 0;
  margin-right: 0;
}

.paragraph{
  font-weight: bold;
  margin-left: 7%;
  margin-right: 7%;
}

#home{
  background: url("/src/media/download.png");
  place-items: center;
  overflow: hidden;
  z-index: -1;
  background-size: cover;
  border-width: 2px;
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
  border-style: solid;
  border-color: var(--border-color);
  margin-top: 30px;
  padding-top: 30px;
  margin-left: min(50px, 3vw);
  margin-right: min(50px, 3vw);
  color: white;
  text-shadow: 0px 0px 5px rgba(0, 0, 0, 0.7);
}

#game{
  background: url("/src/media/Game.png");
  display: flex;
  gap: 20px;
  text-align: left;
  overflow: auto;
  z-index: -1;
  background-size: cover;
  border-width: 2px;
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
  border-style: solid;
  border-color: var(--border-color);
  margin-top: 30px;
  padding-top: 30px;
  overflow: hidden;
  padding-bottom: 30px;
  margin-left: min(50px, 3vw);
  margin-right: min(50px, 3vw);
  margin-bottom: 0;
  color: rgb(255, 255, 255);
  text-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5);
}

#finish{
  background: url("/src/media/Game.png");
  place-items: center;
  overflow: hidden;
  z-index: -1;
  background-size: cover;
  border-width: 2px;
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
  border-style: solid;
  border-color: var(--border-color);
  margin-top: 30px;
  padding-top: 30px;
  margin-left: min(50px, 3vw);
  margin-right: min(50px, 3vw);
  color: white;
  text-shadow: 0px 0px 5px rgba(0, 0, 0, 0.7);
}

#game div {
  flex: 1;
}

#forms{
  width: 100%;
  height: auto;
}

#status{
  width: 100%;
  height: auto;
}

@media only screen and (max-width: 923px) {

  body{
    text-align: left;
  }

  #mobile-headerswitch{
    flex: 1; 
    display: flex;
    padding-top: 25px;
    cursor: pointer;
    padding-left: 15px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
  }

  #finish{
    flex-direction: column;
  }

  #menu{
    height: 50px;
    width: 50px;
    padding: 0;
    border-width: 0px;
    border-radius: 50%;
    background-color: var(--base-variant);
    overflow: hidden;
    justify-content: center;
    position: relative;
    align-items: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
  }

  #menu svg{
    fill: var(--secondary-text);
    position: absolute;
    right: 25%;
    bottom: 25%;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
  }

  #mobile-themeswitch{
    height: 50px;
    width: 50px;
    padding: 0;
    border-width: 0px;
    border-radius: 50%;
    background-color: var(--base-variant);
    overflow: hidden;
    justify-content: center;
    position: relative;
    align-items: center;
    cursor: pointer;
  }

  .tutorial-box{
    text-align: left;
  }

  .tutorial-box p{
    margin-left: 0;
  }

  #mobile-themeswitch svg{
    fill: var(--secondary-text);
    position: absolute;
    right: 25%;
    bottom: 25%;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
  }

  .hamburguer {
    transform: scale(1);
    opacity: 1;
  }

  .close {
    transform: scale(0);
    opacity: 0;
  }

  .show .hamburguer {
    transform: scale(0);
    opacity: 0;
  }

  .show .close {
    transform: scale(1);
    opacity: 1;
  }

  .moon {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  .sun {
    transform: translateY(-100%) scale(0);
    opacity: 0;
  }

  .darkmode .moon {
    transform: translateY(100%) scale(0);
    opacity: 0;
  }

  .darkmode .sun {
    transform: translateY(0) scale(1);
    opacity: 1;
  } 
  .main-nav{
    display: none;
  }

  #game{
    flex-direction: column;
  }

  .logimage{
    width: clamp(200px, 32vw, 220px);
    height: auto;
    cursor: pointer;
  }

  body{
    margin-top: 130px;
    overflow-y: auto;
    overflow-x: hidden;
  }
   
  #home{
    overflow: show;
    display: flex;
    flex-direction: column;
    height: calc(100dvh + 100px);
    flex-grow: 1;
  }

  #finish{
    overflow: show;
    display: flex;
    flex-direction: column;
    height: calc(100dvh + 100px);
  }

  #titular{
    flex-grow: 1;
  }

  #titles{
    flex-grow: 1;
  }
   
  #game{
    overflow: show;
  }

  #themeswitch{
    display: none;
  }

  #menu{
    display: block;
  }

  .header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding: 15px 10%;
    z-index: 99;
    margin-top: 0;
    top: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: fixed;
    z-index: 10;
    flex-wrap: wrap;
    height: 100px;
    background-color: var(--base-color);
  } 

  #overlay{
    background: rgb(0, 0, 0, 0.5);
    position: fixed;
    inset: 0;
    z-index: 1;
    display: none;
  }

  .mobile-dropdown{
    box-sizing: border-box;
    display: flex;
    text-align: left;
    flex-direction: column;
    justify-content: space-between;
    align-items: left;
    padding-top: 30px;
    padding: 25px 10%;
    z-index: 99;
    background-color: var(--base-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    top: -100%;
    position: fixed;
    width: 100%;
    z-index: 2;
    flex-wrap: wrap;
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
    transition: transform 0.5s ease-in-out;
  } 

  .mobile-dropdown.show{
    top: 100px;
  }

  .mobile-dropdown.show ~ #overlay{
    display: block;
  }

  #home.show{
    filter: blur(10px);
  }

  #game.show{
    filter: blur(10px);
  }

  #finish.show{
    filter: blur(10px);
  }

  .navlinks{
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
  }

  .formgame{
    height: 100vh;
    margin-bottom: 30px;
  }

  #consola{
   height: 30vh;
  }

  .title{
    font-size: max(7vw, 50px);
  }

  .statstitle{
    font-size: max(7vw, 20px);
  }

  .paragraph{
    font-size: max(2.5vw, 15px);
  }
}

@media only screen and (min-width: 923px) {

  #home{
    height: calc(100vh - min(194px, 10vh));
  }

  .tutorial-box{
    text-align: center;
  }

  #button-holder{
    justify-content: center;
  }

  #finish{
    height: calc(100vh - min(194px, 10vh));
  }

  #game{
    height: calc(100vh - min(224px, 20vh));
  }

  #home{
    display: flex;
    flex-direction: column;
  }

  #finish{
    display: flex;
    flex-direction: column;
  }

  #themeswitch{
    display: block;
  }

  #menu{
    display: none;
  }

  #titles{
    flex-grow: 0.7;
  }
   
  .header{
    display: flex;
    justify-content: space-between;
    z-index: 99;
    height: clamp(50px, 10vh, 100px);
    align-items: center;
    padding: 15px 10%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 10;
    flex-wrap: wrap;
  } 

  .logimage{
    width: clamp(150px, 32vh, 300px);
    height: auto;
    cursor: pointer;
  }

  .uppergame{
    flex-grow: 1;
  }

  .formgame{
    height: 100%;
  }
  
  #consola{
   height: 40%;
  }

  .mobile-dropdown{
    display: none;
  }

  .title{
    font-size: max(7vh, 50px);
  }

  .statstitle{
    font-size: max(7vh, 20px);
  }

  .paragraph{
    font-size: max(2.5vh, 16px);
  }
}

.logo{
  list-style: none;
  flex:1;
}

.logo li{
  width: 30%;
}

.main-nav{
  width: 40%;
}


a{
  font-weight: bolder;
  color: var(--text-color);
  text-decoration: none;
  transition:color 0.3s ease;
}

.navlinks{
  list-style: none;
  margin: 0;
  justify-content: center;
  padding: 0;
}

.navlinks li{
  display: inline-block;
  padding: 0px 20px;
}

.navlinks li a:hover{
  color: var(--hover-color);
}

.form{
  background-color: var(--form);
  backdrop-filter: blur(50px);
  border-color: #4c4c55c9;
  border-style: solid;
  border-width: 1px;
  -ms-flex-align: center;
  display: flex;
  gap: 8px;
  flex-direction: column;
  height: auto;
  width: 80%;
  margin-top: 0;
  margin-bottom: 30px;
  margin-left: 0;
  margin-right: 0;
  border-radius: 25px;
  padding-top: 30px;
  padding-bottom: 30px;
  justify-content: center;
  place-self: center;
  padding-left: 30px;
  padding-right: 30px;
}

.stats{
  background-color: var(--form);
  backdrop-filter: blur(50px);
  border-color: #4c4c55c9;
  border-style: solid;
  border-width: 1px;
  -ms-flex-align: center;
  display: flex;
  gap: 8px;
  flex-direction: column;
  height: auto;
  width: 80%;
  margin-top: 0;
  margin-bottom: 30px;
  margin-left: 0;
  margin-right: 0;
  border-radius: 25px;
  padding-top: 30px;
  padding-bottom: 30px;
  justify-content: center;
  place-self: center;
  padding-left: 30px;
  padding-right: 30px;
}

.formgame{
  background-color: var(--form);
  backdrop-filter: blur(50px);
  border-color: #4c4c55c9;
  border-style: solid;
  border-width: 1px;
  -ms-flex-align: center;
  display: flex;
  flex-direction: column;
  width: calc(100% - 14%);
  margin-top: 0;
  margin-bottom: 0;
  border-radius: 25px;
  padding-top: 30px;
  box-sizing: border-box;
  padding-bottom: 30px;
  justify-content: center;
  place-self: right;
  padding-left: 30px;
  padding-right: 30px;
  margin-left: 7%;
  margin-right: 7%;
  gap: 8px;
}

.helper{
  background-color: var(--form);
  backdrop-filter: blur(50px);
  border-color: #4c4c55c9;
  border-style: solid;
  border-width: 1px;
  -ms-flex-align: center;
  display: flex;
  flex-direction: column;
  width: calc(100% - 14%);
  margin-top: 0;
  margin-bottom: 0;
  border-radius: 25px;
  padding: 20px 20px 20px 20px;
  box-sizing: border-box;
  justify-content: center;
  place-self: right;
  margin-left: 7%;
  margin-right: 7%;
  gap: 8px;
  flex: 0;
}

.main-helper{
  display: flex;
  gap: 8px;
  flex: 0;
  margin: 0;
  padding: 0;
  flex-direction: row;
}

.button-link{
  width: 100px;
}

code{
  background-color: #2525258a;
  border-radius: 5px;
  padding-left: 10px;
  padding-right: 10px;
}

.buttoncontinue{
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 10px; 
  text-align: left;
  transition: transform 0.2s, opacity 0.5s ease-in-out;
  font-weight: bold;
  font-size: 20px;
  color: white;
  height: 55px;
  padding-left: 15px;
  background: linear-gradient(270deg,rgba(1, 117, 204, 1) 0%, rgba(27, 161, 246, 1) 50%, rgba(13, 163, 248, 1) 100%);
  width: auto;
  padding-right: 10px;
  border: 0px;
  cursor: pointer;
}

.buttonnext{
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 10px; 
  text-align: left;
  transition: transform 0.2s, opacity 0.5s ease-in-out;
  font-weight: bold;
  font-size: 20px;
  color: white;
  height: 55px;
  padding-left: 15px;
  background: linear-gradient(270deg,rgb(55, 150, 91) 0%, rgb(70, 173, 87) 50%, rgb(88, 194, 106) 100%);
  width: auto;
  padding-right: 10px;
  border: 0px;
  cursor: pointer;
}

.buttonfinish{
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 10px; 
  text-align: left;
  transition: transform 0.2s, opacity 0.5s ease-in-out;
  font-weight: bold;
  font-size: 20px;
  color: white;
  height: 55px;
  padding-left: 15px;
  background: linear-gradient(270deg,rgb(255, 124, 233) 0%, rgb(250, 139, 204) 50%, rgb(252, 105, 166) 100%);
  width: auto;
  padding-right: 10px;
  border: 0px;
  cursor: pointer;

}

.error{
  position: relative;
  animation: shake .1s linear;
  animation-iteration-count: 3;
}

@keyframes shake {
  0% { left: -5px; }
  100% { right: -5px; }
}

.buttoncontinue:disabled {
  cursor: not-allowed;
  opacity: 50%;
}


.buttoncontinue:enabled:hover{
  transform: scale(1.02);
}

.buttoncontinue:enabled:active{
  transform: scale(0.98); 
}

.buttoncontinue:focus {
  outline: 0px;
}

.buttoncontinue:disabled {
  cursor: not-allowed;
  opacity: 50%;
}


.buttonfinish:enabled:hover{
  transform: scale(1.02);
}

.buttonfinish:enabled:active{
  transform: scale(0.98); 
}

.buttonfinish:focus {
  outline: 0px;
}

.buttonnext:disabled {
  cursor: not-allowed;
  opacity: 50%;
}


.buttonnext:enabled:hover{
  transform: scale(1.02);
}

.buttonnext:enabled:active{
  transform: scale(0.98); 
}

.buttonnext:focus {
  outline: 0px;
}

body.fade-in {
  opacity: 1;
  transition: opacity 1s ease-in-out;
}

body.fade-out {
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

#default-input{
  border-radius: 10px; 
  font-weight: bold;
  color: white;
  background-color: #14141738;
  height: 50px;
  padding-left: 15px;
  border: 0px;
  font-size: 20px;
  width: auto;
}

#codigo{
  border-radius: 10px; 
  font-weight: bold;
  color: white;
  background-color: #14141738;
  height: 60%;
  padding-left: 15px;
  border: 0px;
  font-size: 20px;
  width: auto;
  resize: none;
  padding-top: 10px;
  padding-bottom: 10px;
}

#codigo:disabled{
  cursor: not-allowed;
}


#consola{
  border-radius: 10px; 
  font-weight: bold;
  color: rgba(255, 255, 255, 0.301);
  background-color: #14141738;
  padding-left: 15px;
  padding-top: 10px;
  padding-bottom: 10px;
  margin-left: 0;
  margin-right: 0;
  border: 0px;
  height: auto;
  font-size: 20px;
  width: auto;
  overflow-x: hidden;
}

.counter{
  display: flex;
  flex-direction: row;
  border-radius: 10px; 
  font-weight: bold;
  color: rgba(255, 255, 255, 0.301);
  background-color: #14141738;
  padding-left: 15px;
  padding-right: 15px;
  padding-top: 10px;
  padding-bottom: 10px;
  margin-left: 0;
  margin-right: 0;
  border: 0px;
  height: auto;
  font-size: 20px;
  width: auto;
  overflow-x: hidden;
  justify-content: space-between;
  flex-wrap: wrap;
}

.buttonhelp{
  display: flex;
  flex-direction: row;
  align-items: center;
  border-radius: 10px; 
  text-align: center;
  transition: transform 0.2s, opacity 0.5s ease-in-out;
  justify-content: center;
  font-weight: bold;
  font-size: 20px;
  color: white;
  height: auto;
  background: linear-gradient(270deg,rgb(245, 194, 99) 0%, rgb(241, 184, 59) 50%, rgb(255, 203, 60) 100%);
  width: auto;
  padding: 0 5px 0 5px;
  border: 0px;
  cursor: pointer;
}

.icon{
  height: round(70%);
}

#leaderboard{
  border-radius: 10px; 
  font-weight: bold;
  color: rgba(255, 255, 255, 0.301);
  background-color: #14141738;
  height: auto;
  padding-left: 15px;
  padding-top: 10px;
  padding-bottom: 10px;
  margin-top: 5px;
  border: 0px;
  font-size: 20px;
  width: auto;
}

.disable-focus:focus{
  user-select: none;
  outline-width: 0;
  outline: none;
}

#tutorial-prompt{
  color: white;
}

#tutorial-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999; 
}

#tutorial-tooltip {
    position: fixed;
    z-index: 1001;
    max-width: 300px;
    width: 80%;
    padding: 20px;
    color: white;
    transition: opacity 0.3s ease; 
    pointer-events: auto;
}

#tutorial-text {
    color: white !important; 
    text-align: left;
}

.tutorial-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    width: clamp(200px, 75vw, 400px);
    padding: 30px;
}

.tutorial-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.circle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: var(--base-variant);
    color: var(--text-color); 
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.circle-btn:hover {
    transform: scale(1.1);
}

.circle-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: scale(1);
}

.tutorial-highlight {
    position: relative !important;
    z-index: 1000 !important;
    outline: 4px solid #3b82f6 !important; 
    outline-offset: 4px !important;
    border-radius: 10px !important; 
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.5) !important; 
    background-color: var(--form) !important; 
}