@import url('https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap');

body {
  margin: 0;
  overflow: hidden;
}

canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

#press-to-play-screen, #about-kuoki-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100; /* Ensure it covers other elements */
}

/* Media queries to adjust background image for different screen sizes */
@media (max-width: 600px) {
  #press-to-play-screen {
    background-image: url('models/backgm.png'); /* Path to your mobile background image */
    background-size: cover; /* Ensure the image covers the entire screen */
    background-position: center; /* Center the image */
    background-repeat: no-repeat; /* Do not repeat the image */
  }

  /* Adjust button sizes and positions for mobile */
  #press-to-play-container {
    align-items: center;
  }

  #kuoki-title {
    font-size: 2.5em;
  }

  .learn-more {
    font-size: 1em;
    padding: 0.8em 1.5em;
  }

  #fullscreen-button {
    top: 5px;
    right: 10px;
    padding: 0.3em 0.5em;
    font-size: 0.7em;
  }

  #character-camera-button {
    bottom: 10px;
    left: 10px;
    padding: 0.3em 0.5em;
    font-size: 0.7em;
  }

  #move-rocket-up-button {
    bottom: 20px;
    right: 20px;
    width: 60px; /* Adjusted width for mobile */
    height: 60px; /* Adjusted height for mobile */
    font-size: 1rem; /* Adjusted font size for mobile */
  }

  #button-container {
    right: 10px; /* Adjust this value to move the button container to the left */
    top: 100px; /* Adjust for mobile positioning */
  }

  #scoreboard {
    top: 150px; /* Adjust as needed */
    left: 5%;
    width: 80%; /* Adjusted width for mobile */
    max-width: none;
    padding: 5px; /* Adjusted padding for mobile */
    font-size: 0.8em; /* Adjusted font size for mobile */
  }

  /* Custom styles for buttons on mobile devices */
  .button-85, .button-back {
    padding: 0.8em 1.5em; /* Adjust padding */
    font-size: 1em; /* Adjust font size */
  }

  .btn-class-name {
    width: 80px; /* Adjust width */
    height: 70px; /* Adjust height */
    font-size: 1.2rem; /* Adjust font size */
  }
}

@media (min-width: 601px) {
  #press-to-play-screen {
    background-image: url('models/backg.png'); /* Path to your desktop background image */
    background-size: cover; /* Ensure the image covers the entire screen */
    background-position: center; /* Center the image */
    background-repeat: no-repeat; /* Do not repeat the image */
  }
}

#press-to-play-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#kuoki-title {
  font-size: 4em;
  color: #ffffff;
  font-family: 'Permanent Marker', cursive;
  margin-bottom: 20px;
}

#about-kuoki {
  text-align: center;
  color: #ffffff;
  font-family: 'Permanent Marker', cursive; /* Apply sketchy and bold font */
  margin-bottom: 20px;
}

#about-kuoki h1 {
  margin: 0;
  font-size: 2em;
}

#about-kuoki p {
  margin: 10px 0 20px 0;
  font-size: 1.2em;
}

.button-85, .button-back {
  padding: 1em 3em; /* Increase padding */
  font-size: 1.2em; /* Increase font size */
  border: none;
  outline: none;
  color: rgb(255, 255, 255);
  background: #111;
  cursor: pointer;
  position: relative;
  z-index: 10; /* Ensure buttons are above other elements */
  border-radius: 10px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  font-family: 'Permanent Marker', cursive; /* Apply sketchy and bold font */
  margin: 10px; /* Add margin between buttons */
}

.button-85:before, .button-back:before {
  content: "";
  background: linear-gradient(
    45deg,
    #ff0000,
    #ff7300,
    #fffb00,
    #48ff00,
    #00ffd5,
    #002bff,
    #7a00ff,
    #ff00c8,
    #ff0000
  );
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 400%;
  z-index: -1;
  filter: blur(5px);
  -webkit-filter: blur(5px);
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  animation: glowing-button-85 20s linear infinite;
  transition: opacity 0.3s ease-in-out;
  border-radius: 10px;
}

@keyframes glowing-button-85 {
  0% {
    background-position: 0 0;
  }
  50% {
    background-position: 400% 0;
  }
  100% {
    background-position: 0 0;
  }
}

.button-85:after, .button-back:after {
  z-index: -1;
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: #222;
  left: 0;
  top: 0;
  border-radius: 10px;
}

#clicks-container {
  position: absolute;
  top: 20px;
  left: 20px;
  text-align: left;
  z-index: 20; /* Ensure it's above other elements */
}

#kuoki-clicks-title {
  color: #ffffff;
  font-size: 24px;
  font-family: 'Permanent Marker', cursive; /* Apply sketchy and bold font */
  margin-bottom: 10px;
}

#leaderboard-title {
  position: absolute;
  top: 10px;
  left: 20px;
  color: #ffffff;
  font-size: 24px;
  font-weight: bold;
}

/* Styles for scoreboard */
#scoreboard {
  position: absolute;
  top: 200px; /* Moved down */
  left: 20px;
  width: 90%; /* Adjusted width */
  max-width: 250px; /* Max width */
  background: rgba(255, 255, 255, 0.6); /* Increased transparency to 60% */
  backdrop-filter: blur(10px); /* Blur effect */
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  z-index: 20; /* Ensure scoreboard is above other elements */
}

#scoreboard table {
  width: 100%;
  border-collapse: collapse;
}

#scoreboard th, #scoreboard td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

#scoreboard th {
  background-color: rgba(242, 242, 242, 0.75); /* Adjusted for transparency */
}

.show-more-btn {
  background: #fff0f0;
  color: rgb(99, 94, 94);
  border: none;
  padding: 12px; /* Increased padding */
  cursor: pointer;
  width: 100%;
  text-align: center;
  border-radius: 5px;
}

#fullscreen-button {
  position: absolute;
  top: 10px;
  right: 20px;
  padding: 0.5em 1em; /* Smaller padding */
  font-size: 0.8em; /* Smaller font size */
  z-index: 20; /* Ensure button is above other elements */
}

#options-dropdown {
  position: absolute;
  top: 60px; /* Align dropdown below fullscreen button */
  right: 20px;
}

#character-camera-button {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 20; /* Ensure it's above other elements */
  display: block;
  font-family: 'Permanent Marker', cursive; /* Apply sketchy and bold font */
}

#move-rocket-up-button {
  position: absolute;
  bottom: 40px; /* Move up by increasing bottom value */
  right: 40px; /* Move left by increasing right value */
  width: 160px; /* Increase width to 2x */
  height: 140px; /* Increase height to 2x */
  z-index: 20; /* Ensure button is above the canvas */
  font-family: 'Permanent Marker', cursive; /* Apply sketchy and bold font */
}

.dropdown {
  position: absolute;
  display: inline-block;
  z-index: 20; /* Ensure dropdown is above other elements */
}

.dropbtn {
  align-self: center;
  cursor: pointer;
  display: inline-block;
  font-family: 'Permanent Marker', cursive; /* Apply sketchy and bold font */
  font-size: 1.2rem; /* Increased font size */
  line-height: 23px;
  padding: 1rem; /* Increased padding */
  text-decoration: none;
  transition: all 235ms ease-in-out;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  /* Apply .button-85 styles */
  padding: 0.6em 2em;
  border: none;
  outline: none;
  color: rgb(255, 255, 255);
  background: #fff0f0;
  position: relative;
  z-index: 20;
  border-radius: 10px;
}

.dropbtn:before {
  content: "";
  background: linear-gradient(
    45deg,
    #ff0000,
    #ff7300,
    #fffb00,
    #48ff00,
    #00ffd5,
    #002bff,
    #7a00ff,
    #ff00c8,
    #ff0000
  );
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 400%;
  z-index: 19; /* Ensure background is below button */
  filter: blur(5px);
  -webkit-filter: blur(5px);
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  animation: glowing-button-85 20s linear infinite;
  transition: opacity 0.3s ease-in-out;
  border-radius: 10px;
}

.dropbtn:after {
  z-index: 19; /* Ensure background is below button */
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: #fff0f0;
  left: 0;
  top: 0;
  border-radius: 10px;
}

.dropdown-content a {
  color: white;
  padding: 14px 16px; /* Increased padding */
  text-decoration: none;
  display: block;
  font-family: 'Permanent Marker', cursive; /* Apply sketchy and bold font */
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: rgba(245, 140, 245, 0.7); /* Black with slight transparency */
  min-width: 180px; /* Increased width */
  box-shadow: 0px 8px 16px 0px rgba(245, 140, 245, 0.7);
  z-index: 21; /* Ensure dropdown content is above other elements */
  right: 0;
}

.dropdown-content a:hover {
  background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white on hover */
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown:hover .dropbtn {
  background-color: #2980b9;
}

/* Custom button styles from button.css */
.btn-class-name {
  --primary: 255, 90, 120;
  --secondary: 150, 50, 60;
  width: 100%; /* Use 100% of the parent width */
  height: 100%; /* Use 100% of the parent height */
  border: none;
  outline: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none; /* Disable text selection in WebKit browsers */
  -ms-user-select: none; /* Disable text selection in Internet Explorer */
  touch-action: manipulation;
  outline: 10px solid rgb(var(--primary), .5);
  border-radius: 100%;
  position: relative;
  transition: .3s;
  z-index: 20; /* Ensure button is above the canvas */
  -webkit-tap-highlight-color: transparent; /* Remove blue highlight on mobile */
}

.btn-class-name .back {
  background: rgb(var(--secondary));
  border-radius: 100%;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.btn-class-name .front {
  background: linear-gradient(0deg, rgba(var(--primary), .6) 20%, rgba(var(--primary)) 50%);
  box-shadow: 0 .5em 1em -0.2em rgba(var(--secondary), .5);
  border-radius: 100%;
  position: absolute;
  border: 1px solid rgb(var(--secondary));
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.4rem; /* Increase font size to match the larger button */
  font-weight: 600;
  font-family: inherit;
  transform: translateY(-15%);
  transition: .15s;
  color: rgb(var(--secondary));
  user-select: none;
  -webkit-user-select: none; /* Disable text selection in WebKit browsers */
  -ms-user-select: none; /* Disable text selection in Internet Explorer */
}

.btn-class-name:active .front {
  transform: translateY(0%);
  box-shadow: 0 0;
}

/* Button styles */
button {
  position: relative;
  display: inline-block;
  cursor: pointer;
  outline: none;
  border: 0;
  vertical-align: middle;
  text-decoration: none;
  font-family: inherit;
  font-size: 15px;
}

.learn-more {
  font-weight: 600;
  color: #382b22;
  text-transform: uppercase;
  padding: 1.25em 2em;
  background: #fff0f0;
  border: 2px solid #b18597;
  border-radius: 0.75em;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  -webkit-transition: background 150ms cubic-bezier(0, 0, 0.58, 1), -webkit-transform 150ms cubic-bezier(0, 0, 0.58, 1);
  transition: transform 150ms cubic-bezier(0, 0, 0.58, 1), background 150ms cubic-bezier(0, 0, 0.58, 1), -webkit-transform 150ms cubic-bezier(0, 0, 0.58, 1);
  margin: 20px 0; /* Add vertical margin for spacing */
}

button.learn-more::before {
  position: absolute;
  content: '';
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #f9c4d2;
  border-radius: inherit;
  -webkit-box-shadow: 0 0 0 2px #b18597, 0 0.625em 0 0 #ffe3e2;
  box-shadow: 0 0 0 2px #b18597, 0 0.625em 0 0 #ffe3e2;
  -webkit-transform: translate3d(0, 0.75em, -1em);
  transform: translate3d(0, 0.75em, -1em);
  transition: transform 150ms cubic-bezier(0, 0, 0.58, 1), box-shadow 150ms cubic-bezier(0, 0, 0.58, 1), -webkit-transform 150ms cubic-bezier(0, 0, 0.58, 1), -webkit-box-shadow 150ms cubic-bezier(0, 0, 0.58, 1);
}

button.learn-more:hover {
  background: #ffe9e9;
  -webkit-transform: translate(0, 0.25em);
  transform: translate(0, 0.25em);
}

button.learn-more:hover::before {
  -webkit-box-shadow: 0 0 0 2px #b18597, 0 0.5em 0 0 #ffe3e2;
  box-shadow: 0 0 0 2px #b18597, 0 0.5em 0 0 #ffe3e2;
  -webkit-transform: translate3d(0, 0.5em, -1em);
  transform: translate3d(0, 0.5em, -1em);
}

button.learn-more:active {
  background: #ffe9e9;
  -webkit-transform: translate(0em, 0.75em);
  transform: translate(0em, 0.75em);
}

button.learn-more:active::before {
  -webkit-box-shadow: 0 0 0 2px #b18597, 0 0 #ffe3e2;
  box-shadow: 0 0 0 2px #b18597, 0 0 #ffe3e2;
  -webkit-transform: translate3d(0, 0, -1em);
  transform: translate3d(0, 0, -1em);
}

/* Styles for #kuoki-clicks-title */
#kuoki-clicks-title {
  color: #ffffff;
  font-size: 24px;
  font-family: 'Permanent Marker', cursive;
  margin-bottom: 10px;
}

/* Styles for #click-counter to match #kuoki-clicks-title */
#click-counter {
  color: #ffffff;
  font-size: 24px;
  font-family: 'Permanent Marker', cursive;
  text-align: center; /* Center the text */
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

#button-container {
  position: absolute;
  right: 110px; /* Adjust this value to move the button container to the left */
  top: 150px; /* Moved down */
  z-index: 20; /* Ensure it's above the canvas */
}

.button-menu {
  cursor: pointer;
  position: absolute;
  z-index: 12;
  background-color: #ffe9e9;
  border: 2px solid #1e1e1e;
  color: #1e1e1e;
  font-size: 30px;
  font-weight: 700;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  -webkit-box-shadow: 0px 3px 10px 0px rgba(16, 16, 16, 0.5);
  -moz-box-shadow: 0px 3px 10px 0px rgba(16, 16, 16, 0.5);
  box-shadow: 0px 3px 10px 0px rgba(16, 16, 16, 0.5);
}

.checkbox {
  width: 60px;
  height: 60px;
  opacity: 0;
  z-index: 10;
  cursor: pointer;
  position: absolute;
}

.option {
  position: absolute;
  background-color: #1e1e1e;
  border: 2px solid #ffe9e9;
  color: #ffe9e9;
  z-index: -1;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s;
  -webkit-box-shadow: 3px 3px 10px 0px rgba(16, 16, 16, 0.5);
  -moz-box-shadow: 3px 3px 10px 0px rgba(16, 16, 16, 0.5);
  box-shadow: 3px 3px 10px 0px rgba(16, 16, 16, 0.5);
  transform: translate(0, 0); /* Initial position */
  opacity: 0; /* Initially hidden */
  visibility: hidden; /* Initially hidden */
}

.checkbox:hover ~ .button-menu,
.checkbox:checked ~ .button-menu {
  background-color: #ffe9e9;
  transform: scale(0.98);
  box-shadow: none;
}

.checkbox:not(:checked) ~ .button-menu::before {
  content: "+";
}

.checkbox:checked ~ .button-menu::after {
  content: "-";
  transform: scale(0.98);
  box-shadow: none;
}

.checkbox:not(:checked) ~ .option {
  box-shadow: none;
}

.option:hover,
.option:active,
.option:focus {
  box-shadow: none;
  transform: scale(0.98);
}

.checkbox:checked ~ .option {
  opacity: 1; /* Visible when checked */
  visibility: visible; /* Visible when checked */
}

.checkbox:checked ~ .option-a {
  transition-delay: 0.1s;
  transform: translateY(-75px); /* Move up */
  z-index: 11;
}

.checkbox:checked ~ .option-b {
  transition-delay: 0.2s;
  transform: translateX(-75px); /* Move left */
  z-index: 11;
}

.checkbox:checked ~ .option-c {
  transition-delay: 0.3s;
  transform: translateY(75px); /* Move down */
  z-index: 11;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: rgba(0, 0, 0, 0.7);
  min-width: 180px; /* Increased width */
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 12; /* Ensure dropdown content is above other elements */
  right: 0; /* Position dropdown next to the button */
  top: 135px; /* Adjusted to be below the "Explore" button */
}

.dropdown-content a {
  color: white;
  padding: 14px 16px; /* Increased padding */
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

#explore-button:hover + .dropdown-content,
.dropdown-content:hover {
  display: block;
}