/** BASE */
html {
  color-scheme: dark;
  background-color: #000;
  scrollbar-gutter: stable;
}
body {
  margin: 0 auto;
  background-color: transparent;
  font-family: "Regular", sans-serif;
  max-width: 1000px;
}

/** NATIVE SCROLLBARS ARE HIDDEN EVERYWHERE (custom DOM scrollbar used instead) */
* {
  scrollbar-width: none;
}
*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/** TOP CONTENT */
#outrun_title {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2%;
  width: 40%;
  image-rendering: pixelated;
}
a:has(> #outrun_title) {
  display: flex;
  justify-content: center;
  width: 100%;
}
h1 {
  color: rgb(27, 142, 61);
  font-size: 26px;
  margin: 0px;
  text-align: center;
  font-family: "Regular";
}
#rules_box {
  width: 75%;
  overflow-wrap: break-word;
  padding-right: 2%;
  box-sizing: border-box;
}
summary {
  color: rgb(80, 230, 130);
  font-size: clamp(17px, 2.1vw, 21px);
  font-family: "Regular";
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
summary::-webkit-details-marker {
  display: none;
}
summary::marker {
  content: "";
}
summary::before {
  content: "";
  width: 0.75em;
  height: 0.75em;
  flex-shrink: 0;
  background-image: url("media/chevron_right.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: transform 0.15s ease;
}
details.rules_open summary::before {
  background-image: url("media/chevron_down.png");
}
#rules_toggle_buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 18px 0 10px;
}
.rules_toggle_btn {
  background: transparent;
  border: none;
  outline: none;
  color: rgb(150, 213, 167);
  font-family: "Regular";
  font-size: clamp(14px, 1.8vw, 17px);
  text-decoration: none;
  cursor: pointer;
  padding: 6px 16px;
}
.rules_toggle_btn:hover {
  border-color: rgb(80, 230, 130);
  color: rgb(80, 230, 130);
}
p,
ol,
ul {
  color: rgb(203, 255, 221);
  font-size: clamp(15px, 1.9vw, 19px);
  font-family: "Regular";
}
.rules_tagline {
  color: rgb(34, 177, 76);
  font-family: "Regular";
  font-weight: bold;
  font-size: clamp(20px, 3.5cqw, 34px);
  letter-spacing: 0.5px;
  text-align: center;
  margin: 0 0 10px;
}

/** SMOOTH DETAILS ANIMATION (grid-rows technique) */
#rules_box details > .rules_wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}
#rules_box details.rules_open > .rules_wrap {
  grid-template-rows: 1fr;
}
#rules_box details > .rules_wrap > .rules_wrap_inner {
  min-height: 0;
  overflow: hidden;
}
#rules_box details > .rules_wrap > .rules_wrap_inner > ul {
  margin: 6px 0 0;
  list-style: none;
  padding-left: 18px;
}
#rules_box details > .rules_wrap > .rules_wrap_inner > ul li {
  position: relative;
  padding-left: 14px;
}
#rules_box details > .rules_wrap > .rules_wrap_inner > ul li::before {
  content: "\2013";
  position: absolute;
  left: 0;
  color: rgb(80, 230, 130);
}

/** BACKGROUND */
#portal-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  image-rendering: pixelated;
  z-index: -1;
  background: #000;
}

/** MENU ELEMENTS */
.menu_bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: 0;
  background-color: transparent;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  pointer-events: none;
}
.menu_bar #menu_box {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 64px;
  margin: 0;
  pointer-events: auto;
}

#menu_box {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 64px;
  margin: 0;
}

#menu_box nav {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3%;
}
.menu_link {
  display: inline-block;
  color: rgb(27, 142, 61);
  text-align: center;
  text-decoration: none;
  font-size: 18px;
  font-family: "MinecraftSlim";
  padding: 6px 10px;
}
.menu_link:not(.shop_link):hover {
  color: rgb(34, 177, 76);
}
#rules_link {
  font-weight: bold;
  color: rgb(34, 177, 76);
}
.shop_link {
  color: #e6a800;
}
.shop_link:hover {
  color: #ffd24a;
}
#hamburger_box .hamburger_link:not(.shop_link):hover {
  color: rgb(34, 177, 76);
  border-color: rgb(34, 177, 76);
}
#hamburger_box .hamburger_link.shop_link {
  color: #e6a800;
  border-color: #e6a800;
}
#hamburger_box .hamburger_link.shop_link:hover {
  color: #ffd24a;
  border-color: #ffd24a;
}

/** HAMBURGER */
#hamburger_btn {
  display: none;
  position: fixed;
  top: 12px;
  left: 4px;
  z-index: 1000;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px;
  background: radial-gradient(
    circle,
    rgba(0, 0, 0, 0.35),
    rgba(0, 0, 0, 0.35) 45%,
    transparent 75%
  );
}
#hamburger_btn span {
  display: block;
  width: 30px;
  height: 3px;
  background-color: rgb(27, 142, 61);
  transition: all 0.3s ease;
  transform-origin: center center;
}
#hamburger_btn.open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
#hamburger_btn.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
  visibility: hidden;
  transition: all 0.3s ease, visibility 0s linear 0.3s;
}
#hamburger_btn.open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}
#hamburger_overlay {
  opacity: 0;
  visibility: hidden;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 998;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
#hamburger_overlay.overlay_open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}
#hamburger_box {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100vh;
  z-index: 999;
  transition: left 0.3s ease;
  margin: 0;
  display: flex;
  justify-content: center;
}
#hamburger_box.hamburger_open {
  left: 0;
}
#hamburger_box nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 80%;
  height: 100%;
}
#hamburger_box .hamburger_link {
  width: 80%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: rgb(27, 142, 61);
  font-family: "MinecraftSlim";
  border: 4px solid rgb(27, 142, 61);
  padding-left: 2px;
  padding-right: 2px;
}

/** MOBILE (max-width: 1023px) */
@media (max-width: 1023px) {
  #outrun_title {
    width: clamp(220px, 65%, 420px);
    z-index: 1000;
    margin-top: 10px;
    margin-bottom: 15px;
  }
  #rules_box {
    width: 95%;
    margin-left: auto;
    margin-right: auto;
  }
  #menu_box,
  .menu_bar #menu_box {
    display: none;
  }
.menu_bar {
    position: static;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding-bottom: 0;
    margin-bottom: 0;
  }
  #hamburger_btn {
    display: flex;
  }
  #hamburger_box {
    display: flex !important;
  }
  #hamburger_box .hamburger_link {
    width: 80% !important;
  }
}

/** FONTS */
@font-face {
  font-family: "MinecraftSlim";
  src: url("fonts/L00OL.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Regular";
  src: url("fonts/ShareTechMono-Regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
