@font-face {
  font-family: 'mainFont';
  src: url('mainFont.ttf') format('truetype');
}

body {
  overflow: hidden;
  font-family: 'mainFont', sans-serif;
}

button {
  font-family: 'mainFont', sans-serif;
}

#dashboard {
  width: 100vw;
  height: 60px;
  top: 0;
  left: 0;
  background-color: #121212;
  position: absolute;
  border-bottom: 2px solid black;
  box-sizing: border-box;
}

#dashboard span {
  color: white;
  height: 60px;
  width: 60px;
  cursor: pointer;
  float: right;
  margin-left: 10px;
  margin-right: 10px;
  display: flex;
  align-items: center; /* Center items vertically */
  justify-content: center; /* Center items horizontally */
  transition: all 0.25s ease;
}

#dashboard span.left {
  float: left;
}

#dashboard span svg {
  height: 40px; /* Make the SVGs a little smaller */
  width: 40px; /* Make the SVGs a little smaller */
}

#dashboard span:hover {
  transform: scale(1.1);
}

#dashboard span:hover svg path {
  fill: #75BEFF;
}

#dashContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px; /* Adjust the gap between the elements as needed */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#dashTracker, #dashColor {
  position: relative; /* Change to relative to work with flexbox */
  display: none; /* Change to flex to enable flex properties */
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
  border-radius: 10px;
  margin: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  color: #fff;
  font-size: 1.2em;
  height: 40px;
  width: 160px; /* Adjust width as needed */
}

#dashColor {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

#dashTracker_text {
  margin-right: 10px;
  font-weight: bold;
  font-size: 1.5em;
}

#dashTracker_moves {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  font-weight: bold;
}

#dashTracker.activeTracker {
  display: flex;
}

#container {
    width: 100vw;
    height: calc(100vh - 60px);
    margin: 0 auto;
    padding: 0;
    background-color: #121212;
    position: absolute;
    bottom: 0;
    left: 0;
    overflow: hidden;
    user-select: none;
}

#mainmenu {
    display: block;
}

#game {
    display: block;
    background-color: transparent;
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
}

#game canvas {
    display: block;
    margin: 0 auto;
    background-color: transparent;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
}

#container:has(#menu_win.activeP) #game, #container:has(#menu_settings.activeP) #game, #container:has(#menu_daily.activeP) #game {
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
}

body:has(#prompt.active) #container, body:has(#prompt.active) #dashboard {
  pointer-events: none;
  user-select: none;
}

#menu_win {
  width: 80vmin;
  height: auto;
  min-height: 80vmin;
  background: linear-gradient(145deg, #232323, #1a1a1a);
  position: fixed; 
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  color: #f0f0f0;
  border: 1px solid #333;
  overflow: hidden;
  display: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  padding: 30px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

#menu_win img {
  width: 50%;
  height: auto;
  max-height: 50vh;
  object-fit: contain;
  margin-bottom: 25px;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
}

#menu_win button {
  font-size: 1.2rem;
  color: #f0f0f0;
  background: linear-gradient(145deg, #3f3f3f, #353535);
  border: none;
  border-radius: 8px;
  padding: 12px 25px;
  margin: 15px;
  max-width: 100%;
  min-width: calc(50% - 80px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

#menu_win button:hover {
  cursor: pointer;
  transform: translateY(-2px);
  background: linear-gradient(145deg, #454545, #3a3a3a);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

#menu_win button:active {
  transform: translateY(1px);
}

#menu_win h2 {
  color: #f0f0f0;
  margin-bottom: 25px;
  font-weight: 600;
  font-size: 2.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  animation: glow 2s ease-in-out infinite;
}

#menu_win #hs {
  color: #ff5252;
  font-weight: 700;
  font-size: 1.8rem;
  text-shadow: 0 0 10px rgba(255, 82, 82, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { text-shadow: 0 0 5px rgba(240, 240, 240, 0.3); }
  50% { text-shadow: 0 0 20px rgba(240, 240, 240, 0.5); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

#menu_settings {
  height: 80vh;
  min-width: 80vmin;
  max-width: 80vw;
  width: auto;
  background-color: #1e1e1e;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 20px;
  transition: all 0.3s ease;
  color: #f0f0f0;
  border: 1px solid #333;
  overflow-y: auto;
  scrollbar-width: none;
  display: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  padding: 30px;
}

#menu_settings h1 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 3rem;
}

#menu_settings h2 {
  text-align: left;
  margin: 25px 0 15px 0;
  font-size: 2rem;
  transition: all 0.2s ease;
}

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.settings-section:has(.settings-group:hover) h2 {
  color: gold;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

#menu_settings span {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  height: 50px;
  width: 100%;
  font-size: 1.3rem;
  border-radius: 5px;
  transition: all 0.2s ease;
}

#menu_settings span:hover {
  background: rgba(255, 255, 255, 0.05);
}

#menu_settings span:has(button:hover) {
  color: #75BEFF;
  text-shadow: 0 0 10px rgba(117, 190, 255, 0.3);
}

#menu_settings button {
  position: relative;
  background-color: #3a3a3a;
  color: #f0f0f0;
  border: none;
  border-radius: 5px;
  padding: 8px 20px;
  font-size: 1.6rem;
  min-width: 150px;
  height: 45px;
  transition: all 0.2s ease;
}

#menu_settings button:hover {
  cursor: pointer;
  background-color: #575757;
  transform: translateY(-1px);
}

#menu_settings .true {
  background-color: #4caf50;
}

#menu_settings .false {
  background-color: #f44336;
}

#menu_settings button#menu_close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  width: 60px;
  height: 60px;
  min-width: unset;
  padding: 8px;
}

#menu_settings button#menu_close svg {
  width: 100%;
  height: 100%;
}

#menu_settings button#menu_close:hover {
  transform: rotate(90deg);
}

#menu_settings::-webkit-scrollbar {
  width: 0;
}

#settings_game,
#settings_visual,
#settings_saveload,
#settings_daily,
#settings_keybinds {
  margin-bottom: 20px;
}

#menu_daily {
  height: 80vh;
  min-width: 80vmin;
  max-width: 80vw;
  width: auto;
  background-color: #1e1e1e;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  border-radius: 20px;
  transition: all 0.3s ease;
  color: #f0f0f0;
  border: 1px solid #333;
  overflow: auto;
  display: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  padding: 20px;
}

#menu_daily div div {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

#menu_daily div div span {
  font-size: 1.2rem;
  color: #f0f0f0;
  background-color: #3a3a3a;
  border: none;
  border-radius: 5px;
  padding: 10px 20px;
  margin-left: 20px;
  margin-right: 20px;
  max-width: calc(100% / 3);
  min-width: calc(30% - 80px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#menu_help {
  height: 80vh;
  min-width: 80vmin;
  max-width: 80vw;
  width: auto;
  background-color: #1e1e1e;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  border-radius: 20px;
  transition: all 0.3s ease;
  color: #f0f0f0;
  border: 1px solid #333;
  overflow: hidden;
  display: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  padding: 20px;
}

#menu_help div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: auto;
}

#menu_help div h2 {
  font-size: 1.5rem;
  color: #f0f0f0;
  background-color: #3a3a3a;
  border: none;
  border-radius: 5px;
  padding: 10px 20px;
  max-width: 80%;
  min-width: 60%;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 20px;
}

#menu_help div p {
  font-size: 1.2rem;
  color: #f0f0f0;
  padding: 10px 20px;
  width: 80%;
  height: auto;
  margin-bottom: 20px;
}

#menu_help div img {
  width: 50%;
  height: auto;
  max-width: 200px;
  max-height: 200px;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  #menu_help div {
    flex-direction: row;
    justify-content: space-around;
  }

  #menu_help div h2, #menu_help div p, #menu_help div img {
    width: auto;
    height: auto;
    margin-bottom: 0;
  }

  #menu_help div h2 {
    max-width: calc(100% / 3);
    min-width: calc(30% - 80px);
  }

  #menu_help div p {
    width: 30%;
    height: auto;
  }

  #menu_help div img {
    width: 30vh;
    height: 30vh;
  }
}

.activeP {
  animation: slideInFromBottom 500ms cubic-bezier(0.65, 0, 0.35, 1);
  display: block !important;
  opacity: 1;
  z-index: 1;
}

.inactiveP {
  animation: slideOutFromMiddle 500ms cubic-bezier(0.65, 0, 0.35, 1) forwards;
  display: block !important;
  opacity: 1;
  z-index: 1;
}

@keyframes slideInFromBottom {
  0% {
    transform: translate(-50%, 100%);
  }

  100% {
    transform: translate(-50%, -50%);
  }
}

@keyframes slideOutFromMiddle {
  0% {
    transform: translate(-50%, -50%);
  }

  99% {
    transform: translate(-50%, 100%);
  }
  100% {
    opacity: 0;
    display: none;
    z-index: 0;
  }
}

#prompt {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  padding: 20px;
  background-color: #1e1e1e; /* Dark background color */
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  text-align: center;
  color: #f0f0f0; /* Light text color */
  border: 1px solid #333333; /* Dark border color */
}

#prompt.active {
  display: flex;
}

#prompt_header {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #f0f0f0; /* Light text color */
}

#prompt_input {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid #333333; /* Dark border color */
  border-radius: 5px;
  font-size: 1rem;
  background-color: #333333; /* Dark background color */
  color: #f0f0f0; /* Light text color */
}

#prompt_buttons {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

#prompt_confirm, #prompt_cancel {
  width: 48%; /* Adjust width to fit two buttons in one line */
  padding: 10px;
  margin: 5px 0; /* Remove left and right margin */
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#prompt_confirm {
  background-color: #4CAF50;
  color: #ffffff;
}

#prompt_confirm:hover {
  background-color: #45a049;
}

#prompt_cancel {
  background-color: #f44336;
  color: #ffffff;
}

#prompt_cancel:hover {
  background-color: #e53935;
}

#menu_colors {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  width: 300px;
  height: 80%;
  padding: 20px;
  background-color: #1e1e1e; /* Dark background color */
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  color: #f0f0f0; /* Light text color */
  border: 1px solid #333333; /* Dark border color */
  z-index: 2;
  overflow: auto;
}

#menu_colors_list div {
  padding: 10px;
  font-size: 1.5rem;
  cursor: pointer;
}

#menu_colors_list div.selected {
  color: black;
  border: 2px dashed black;
}