:root {
  --color-black: black;
  --color-white: white;
  --color-hover: rgba(255, 255, 255, 0.2);
  --color-light-grey: rgba(255, 255, 255, 0.582);

  --regularfont: 400;
  --boldfont: 700;

  --size-small: 20px;
  --size-verybig: 36px;
  --size-title: 32px;
  --size-sub-title: 28;

  --col100: 100%;
  --col66: 66.66%;
  --col50: 50%;
  --col33: 33.33%;
}

* {
  font-family: "DotGothic16", sans-serif;
  font-weight: var(--boldfont);
  font-size: 20px;
  color: var(--color-white);
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
    1px 1px 0 #000;
  border: none;
  box-sizing: border-box;
}

button,
a {
  cursor: pointer;
}

p {
  margin-top: 10px;
  margin-bottom: 40px;
  max-width: 550px;
  font-size: 18px;
}

body {
  background-color: var(--color-black);
  margin: 0;
  padding: 0;
  font-family: "DotGothic16", sans-serif;
  color: var(--color-white);

  /* display: flex;
    flex-direction: column; */
}

#canvas-container {
  padding: 0;
  margin: 0;
}

/*Designer at the end of sec-----------------------<*/

#header {
  display: flex;
  flex-direction: column;
  position: relative;
  align-items: flex-start;
  height: 100%;
  width: 100%;
  justify-content: space-between;
}

#main-buttons {
  cursor: pointer;
  font-weight: var(--boldfont);
  font-size: 20px;
  color: var(--color-white);
  z-index: 200;
  padding-top: 15px; /* Adjusted for the header height */
  padding-left: 15px; /* Adjusted for the header height */
  padding-right: 15px; /* Adjusted for the header height */
  width: 100dvw;
  display: flex;
  justify-content: space-between;
}

#title,
#about-button {
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
    1px 1px 0 #000;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  font-weight: var(--boldfont);
  font-size: 20px;
  color: var(--color-white);
}

#menu {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: auto;
  background: var(--color-black);
  overflow-y: auto;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  z-index: 190;
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.18, 1);
  transform: translateX(-100%);
  transform-origin: left;
  pointer-events: none;
  min-width: 300px;
  padding-top: 65px; /* HEIGHT AVOIDING BUTTONS */
  padding-bottom: 18px;
  box-sizing: border-box;
  border-right: 1px solid var(--color-white);
}

#menu.active {
  transform: translateX(0);
  pointer-events: auto;
}

ul.menu-list,
#about h1,
#about p {
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  list-style: none;
  padding-left: 18px; /* Adjusted for the header height */
  padding-right: 18px; /* Adjusted for the header height */
}

#about h1,
#about p {
  width: 100%;
  font-size: 18px;
}

.menu-list li {
  margin: 0 0 8px 0;
}

.menu-list a {
  text-decoration: none;
  font-style: normal;
  line-height: normal;
  font-size: 20px;
  font-weight: 400;
  display: block;

  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
    1px 1px 0 #000;
  border: none;
}

.menu-list a::before {
  content: "";
  transition: content 0.2s;
}

.menu-list a:hover::before {
  content: "> ";
}

#about {
  z-index: 190;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  background: var(--color-black);
  overflow-y: auto;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.18, 1);
  transform: translateX(100%);
  transform-origin: right;
  pointer-events: none;
  height: 100%;
  width: 550px;
  padding-top: 80px;
  padding-bottom: 50px;
  box-sizing: border-box;
  border-left: 1px solid var(--color-white);
}

#about.active {
  transform: translateX(0);
  pointer-events: auto;
}

#about h1 {
  font-size: 20px; /* or try 2rem for consistency */
}

#about p {
  margin: 0;
  margin-bottom: 15px;
}

#menu-btn.menu-btn {
  display: none; /* Hide the checkbox */
}

/* #topper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100dvw;
    height: 100dvh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 3
} */

/*FAZER RESIZABLE -------------------------------------------*/
#background-container * {
  /*TODO: WHAT DOES THIS DO??*/
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100dvh;
  width: 100%;
  overflow: visible;
}

#background-container {
  position: absolute;
  top: 0;
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden; /* Add this */
}

.box {
  overflow: auto;
  /*padding: 18px;*/
  min-width: 50px;
  transition: flex 0.2s;
  /*padding-top: 75px;*/
  flex-shrink: 0; /* Add this */
}

/*#sub-menu.hidden {
   display: none;  <-- Remove this line to allow CSS transitions to work
}
*/

#sub-menu {
  z-index: 100;
  background-color: var(--color-black);
  overflow-x: hidden;
  flex: 0 0 60%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-right: 18px;
  padding-left: 18px;
  border-right: 1px solid var(--color-white);
}

.sub-menu-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sub-menu-content img {
  /*STORYBOARD*/
  width: 100%;
  height: auto;
  max-width: 50dvw;
  margin-top: 5px;
  margin-bottom: 5px;
  border: 0.5px solid var(--color-white);
}

.sub-menu-content img:last-of-type {
  /*POSTER*/
  width: auto;
  height: auto;
  max-height: 80dvh;
  margin-top: 20px;
  margin-bottom: 60px;
  border: 0.5px solid var(--color-white);
  box-sizing: content-box;
  max-width: 100%;
}

#sub-menu-text {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: start;
  width: 100%;
  padding-top: 80px;
}

#canvas-container {
  z-index: 0;
  flex: 1 1 auto;
  min-width: 0;
}

canvas {
  image-rendering: pixelated;
  display: block;
  position: absolute;
  /* Stack canvases on top of each other */
  top: 0;
  left: 0;
}

.resizer {
  flex-shrink: 0;
  z-index: 100;
  width: 10px;
  height: 100%;
  background: transparent;
  cursor: col-resize;
  user-select: none;
}

.resizer.hidden {
  display: none;
}

h4 {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 30px;
}

.canvas-c {
  background-color: purple;
  width: 100%;
  height: 100%;
}

#synopsis {
  margin-bottom: 10px;
}


#authors,
.grey-this {
  margin-top: 10px;
  margin-bottom: 50px;
  color: var(--color-light-grey);
  font-size: 14px !important;
}


#sub-menu,
#resizer {
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.18, 1);
  transform: translateX(-100%);
  pointer-events: none;
}

#sub-menu.visible,
#resizer.visible {
  transform: translateX(0);
  pointer-events: auto;
  pointer-events: auto;
}


@media (max-width: 600px) {
  /* Your mobile styles here */
  #menu {
    width: 100dvw;
    min-width: 0;
    border-right: 0px solid var(--color-white);
    height: 90%;
    border-bottom: 1px solid var(--color-white);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.18, 1);
    transform: translateY(-100%);
  }

  #menu.active {
    transform: translateY(0);
  }

  #about {
    width: 100dvw;
    height: calc(30% - 10px); /* Adjusted for the header height */
    min-width: 0;
    border-left: 0px solid var(--color-white);
    border-bottom: 1px solid var(--color-white);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.18, 1);
    transform: translateY(-100%);
    padding-top: 65px;
  }

  /* #sub-menu {
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.18, 1);
  transform: translateY(100%);
  }

  #sub-menu.active {
    transform: translateY(0);
  }
  
  #sub-menu.hidden {
    display: none;
  } */

  #sub-menu,
  #resizer {
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.18, 1);
    transform: translateY(100%);
    pointer-events: none;
  }

  #sub-menu.visible,
  #resizer.visible {
    transform: translateY(0);
    pointer-events: auto;
  }

  /* Add more mobile-specific styles as needed */
  #resizer {
    display: none; /* Hide the resizer on mobile */
  }

  #sub-menu {
    flex: 0 0 70%;
    border-top: 1px solid var(--color-white);
    border-right: 0px solid var(--color-white);
  }

  .sub-menu-content img {
    border: 1px solid var(--color-white);
  }

  #sub-menu-text {
    padding-top: 18px; /* Adjusted for the header height */
  }

  #background-container {
    flex-direction: column-reverse;
  }

  .sub-menu-content img {
    max-width: 100%;
  }

}