* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: sans-serif;
}

/* Navbar container */
.navbar {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background-color: #333;
  color: white;
}

/* Logo */
.logo {
  font-size: 24px;
  font-weight: bold;
}

/* Nav links */
.nav-links {
  list-style: none;
  display: flex;
  padding: 5px 10px;
  gap: 20px;
}

.nav-links a {
  text-decoration: none;
  color: white;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #00bcd4;
}

/* Hamburger menu */
.menu-toggle {
  display: none;
  font-size: 32px;
  cursor: pointer;
  position: absolute;  /* relative to navbar */
  top: 50%;
  transform: translateY(-50%);
  right: 30px;
  z-index: 3;   /* above nav and overlay */
}

/* ----- Mobile responsive ----- */
@media (max-width: 768px) {

  /* hide normal links */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;   /* start off-screen right */
    height: 100%;
    width: 250px;
    background-color: #333;
    flex-direction: column;
    gap: 30px;
    padding-top: 80px;
    z-index: 2; /* above overlay */
    transition: right 0.6s ease; /* smooth slide, can change to left if also change nav-links.show */
  }

  .nav-links.show {
    right: 0; /* slide in - can change to left to make it slide from the left*/
  }

  .menu-toggle {
    display: block;
  }
}

#overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.3);
  z-index: 1;
}


/*------------------------ Content styling -------------------------*/
.break {
  white-space: pre-line; /* preserves line breaks in text */
}

.content {
  padding: 20px;
  text-align: left;
  font-size: 20px;
}
.backnext {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px;
  gap: 20px;
}

pre {
  background-color: #f5f5f5; 
  padding: 10px;
  border-radius: 5px;
  overflow-x: auto;      /* adds horizontal scroll if too wide */
  white-space: pre-wrap; /* wrap long lines */
  word-wrap: break-word; /* older fallback for wrapping */
  max-width: 100%;       /* don’t overflow container */
  text-align: left; 
}

code {
  font-family: monospace; 
  font-size: 14px;
   text-align: left;
}
