/* Ensure html and body take up full height */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

/* Loading message */
#loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  z-index: 3; /* Above everything else */
}

/* Container to hold everything */
.container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Menu on the right */
.menu {
  position: fixed; /* Stay fixed on the right */
  top: 0;
  right: 0; /* Ensure it stays on the right */
  width: 30px;
  height: 100%;
  background: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2; /* Always on top of pages */
}

.menu-item {
  color: white;
  text-align: center;
  padding: 5px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  cursor: pointer;
  margin: 5px 0;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s, background-color 0.3s;
  border-radius: 5px;

}

.menu-item:hover {
  background: #444;
}

.menu-item.active {
  background: #007BFF;
  color: #fff;
}

/* Fullscreen pages */
.page {
  position: absolute;
  top: 0;
  left: 0; /* Pages start at the left */
  width: calc(100% - 30px); /* Leave room for the menu on the right */
  height: 100%;
  background: lightgray;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  color: #333;
  z-index: 0;
  opacity: 0;
  transition: z-index 0.3s ease, opacity 0.3s ease;
}

/* Visible page */
.page.visible {
  z-index: 1;
  opacity: 1;
}
